A method and device for querying additional fees

By introducing a unified surcharge query interface in the logistics system, combined with the pre-created surcharge type library and project information library, the problems of cumbersome surcharge query and limited business expansion in the existing technology are solved, and more efficient surcharge management and business maintenance are achieved.

CN119782360APending Publication Date: 2025-04-08BEIJING JINGDONG QIANSHITECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311290640.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-08
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

In the prior art, each surcharge type corresponds to a query interface, which leads to a cumbersome query process that is not conducive to management. In addition, each new interface requires the upstream express system to be adaptively updated and launched, affecting business expansion and maintenance.

Method used

All types of surcharge queries are carried out through a query interface, and the pre-created surcharge type library and surcharge item information library are used to determine the surcharge type and element information based on the query parameters, and query the surcharge items of items through the query interface.

Benefits of technology

The query process of surcharges has been optimized to facilitate the management of surcharge items and surcharge types, avoiding the online deployment of express delivery systems in order to connect with new interfaces, and is more conducive to business expansion and maintenance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782360A_ABST
    Figure CN119782360A_ABST
Patent Text Reader

Abstract

The present invention discloses a method and device for querying surcharges, and relates to the field of computer technology. A specific implementation of the method includes: in response to receiving a surcharge query request for an item, obtaining a query parameter; determining at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter; determining at least one corresponding surcharge element information from a pre-created surcharge item information library according to each surcharge type and the item identifier of the item; and querying at least one surcharge item corresponding to the item from each surcharge element information through a query interface according to the parameter value of the query parameter to determine the surcharge of the item. This implementation implements a universal surcharge query method, performs all types of surcharge queries through a query interface, optimizes the surcharge query process, and facilitates the management of surcharge items and surcharge types, as well as the expansion and maintenance of services.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method and device for querying additional charges. Background Art

[0002] In the operation scenario of the logistics system, logistics transportation charges may be affected by factors such as delivery time and the goods being transported, and additional transportation surcharges may be charged. For example, during the Spring Festival, peak period surcharges or fuel charges may be added to certain goods. The current common method is to query the specific surcharge items corresponding to the goods by calling the query interface of each surcharge type.

[0003] In the process of implementing the present invention, the inventors found that the prior art has the following problems:

[0004] The existing method of corresponding one query interface to each surcharge type makes the surcharge query process cumbersome, which is not only not conducive to the management of surcharge items and surcharge types, but also requires the upstream express system to be adaptively updated and put online for each new interface, which is not conducive to business expansion and maintenance. Summary of the invention

[0005] In view of this, an embodiment of the present invention provides a method and device for querying surcharges, which performs all types of surcharge queries through a query interface, optimizes the query process of surcharges, facilitates the management of surcharge items and surcharge types, avoids the online deployment of the express delivery system in order to connect to the new interface, and is more conducive to business expansion and maintenance.

[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for querying a surcharge is provided, comprising:

[0007] In response to receiving a surcharge query request for an item, obtaining a query parameter;

[0008] Determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter;

[0009] According to each of the surcharge types and the item identifier of the item, determining at least one corresponding surcharge element information from a pre-created surcharge item information library;

[0010] According to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each of the surcharge element information through a query interface to determine the surcharge of the item.

[0011] Optionally, before determining the corresponding surcharge type from a pre-created surcharge type library, the method further includes: configuring the surcharge type through a surcharge type configuration page, defining at least one component of the surcharge type, and obtaining a component set of the surcharge type; and storing the surcharge type and the corresponding component set in the surcharge type library.

[0012] Optionally, based on the query parameters, at least one corresponding surcharge type is determined from a pre-created surcharge type library, including: determining a type query element set based on the parameter name of the query parameter, and obtaining each element subset of the type query element set; querying at least one component element set that matches each element subset from the correspondence between the surcharge type and the component element set, and determining at least one corresponding surcharge type based on the matched component element set.

[0013] Optionally, before determining the corresponding surcharge element information from a pre-created surcharge item information library, the method further includes: configuring the surcharge element information of the surcharge item through a surcharge item configuration page, defining the surcharge type corresponding to the surcharge item, and the item identification corresponding to the surcharge item; storing the surcharge item, the surcharge type corresponding to the surcharge item, the item identification corresponding to the surcharge item, and the surcharge element information of the surcharge item in the surcharge item information library.

[0014] Optionally, the surcharge element information corresponding to the surcharge items in the surcharge item information library is stored in a key-value pair, and the key of the key-value pair is determined according to the surcharge type and the item identification corresponding to the surcharge item; according to each of the surcharge types and the item identification of the item, at least one corresponding surcharge element information is determined from a pre-created surcharge item information library, including: obtaining at least one key value according to each of the surcharge types and the item identification of the item; and querying the surcharge element information corresponding to each of the key values ​​from the surcharge item information library.

[0015] Optionally, there is a corresponding relationship between the surcharge type and the surcharge element information, and according to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each of the surcharge element information through the query interface, including: for each surcharge type corresponding to the item, obtaining at least one surcharge item corresponding to the item by executing the following method; for each component element of the surcharge type, obtaining the parameter value corresponding to the component element from the query parameter, and matching the parameter value with the information value in the corresponding surcharge element information; when each component element is successfully matched, returning the surcharge item corresponding to the surcharge element information to the query interface, so that the surcharge item can be obtained through the query interface.

[0016] Optionally, after obtaining the query parameters, the method further includes: verifying the query parameters, and determining whether the verification passes.

[0017] According to a second aspect of an embodiment of the present invention, a device for querying additional fees is provided, including:

[0018] A query parameter acquisition module, configured to acquire a query parameter in response to receiving a surcharge query request for an item;

[0019] A type determination module, configured to determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter;

[0020] An element information determination module, configured to determine at least one corresponding surcharge element information from a pre-created surcharge item information library according to each of the surcharge types and the item identifier of the item;

[0021] The surcharge determination module is used to query at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface according to the parameter value of the query parameter to determine the surcharge of the item.

[0022] According to a third aspect of an embodiment of the present invention, there is provided an electronic device for querying additional fees, comprising:

[0023] one or more processors;

[0024] a storage device for storing one or more programs,

[0025] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.

[0026] According to a fourth aspect of an embodiment of the present invention, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present invention is implemented.

[0027] An embodiment of the invention has the following advantages or beneficial effects: by responding to a surcharge query request received for an item, a query parameter is obtained; according to the query parameter, at least one corresponding surcharge type is determined from a pre-created surcharge type library; according to each surcharge type and the item identifier of the item, at least one corresponding surcharge element information is determined from a pre-created surcharge item information library; according to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each surcharge element information through a query interface to determine the technical solution of the surcharge of the item, a universal surcharge query method is implemented, all types of surcharge queries are performed through a query interface, the surcharge query process is optimized, the management of surcharge items and surcharge types is facilitated, and the express delivery system is avoided from being deployed online in order to connect to the newly added interface, which is more conducive to business expansion and maintenance. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0029] Figure 1 is a schematic diagram of the main process of the method for querying surcharges according to an embodiment of the present invention;

[0030] Figure 2 is a schematic diagram of a flow chart of determining a surcharge type according to an embodiment of the present invention;

[0031] Figure 3 is a schematic diagram of the configuration flow of surcharge types and surcharge items in an embodiment of the present invention;

[0032] Figure 4 is a schematic diagram of a flow chart of determining surcharge items in an embodiment of the present invention;

[0033] Figure 5 This is a schematic diagram of the overall flow of surcharge query according to an embodiment of the present invention;

[0034] Figure 6 is a schematic diagram of main modules of a device for querying surcharges according to an embodiment of the present invention;

[0035] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0036] Figure 8 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION

[0037] It should be noted that in the technical solution of the present invention, the collection / collection, update, analysis, use, transmission, storage and other aspects of user personal information involved are in compliance with the provisions of relevant laws and regulations, are used for legal and reasonable purposes, are not shared, leaked or sold outside of these legal uses, and are subject to supervision and management by national regulatory authorities. Necessary measures should be taken for user personal information to selectively block the use or access to personal information data to prevent illegal access to such personal information data, ensure that persons who have access to personal information data comply with the provisions of relevant laws and regulations, and ensure the security of user personal information. In addition, once these user personal information data are no longer needed, the risks should be minimized by limiting or even prohibiting data collection and / or deleting data.

[0038] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0039] The existing method of corresponding one query interface to each surcharge type makes the surcharge query process cumbersome, which is not only not conducive to the management of surcharge items and surcharge types, but also requires the upstream express system to be adaptively updated and put online for each new interface, which is not conducive to business expansion and maintenance, and cannot meet practical applications well.

[0040] In order to solve the above-mentioned problems existing in the prior art, the present invention proposes a method for querying surcharges, which determines at least one surcharge element information corresponding to the item according to at least one surcharge type determined by a query parameter and an item identifier, and then in combination with the parameter value of the query parameter, queries at least one surcharge item of the item from each surcharge element information through a query interface, thereby realizing a universal surcharge query method, performing all kinds of surcharge queries through a query interface, optimizing the surcharge query process, facilitating the management of surcharge items and surcharge types, avoiding the online deployment of the express delivery system for docking with the newly added interface, and being more conducive to business expansion and maintenance.

[0041] Figure 1 FIG. 1 is a schematic diagram of the main process of the method for querying additional fees according to an embodiment of the present invention. Figure 1 As shown, the method for querying surcharges according to the embodiment of the present invention includes the following steps S101 to S104.

[0042] Step S101: in response to receiving a surcharge query request for an item, obtaining query parameters;

[0043] Specifically, when the ordering system of the item transaction receives the item order information, it will trigger a surcharge query request for the item. The query system can obtain the query parameters through the input parameters in the query request, or it can obtain the order information based on the order number in the received surcharge query request, and obtain the query parameters from the order information. The specific query parameters can be parameter information such as the item identification of the item, the order time, the order delivery address, etc.

[0044] According to an embodiment of the present invention, after obtaining the query parameters, the method further includes: verifying the query parameters and determining whether the verification passes.

[0045] Specifically, as the main data source for surcharge query, the query parameters need to be verified to ensure their accuracy. After obtaining the query parameters, the parameter name of the query parameters can be used to determine whether the parameter value conforms to the data type corresponding to the parameter name. For example, the address parameter should have an address area name instead of a series of numbers or letters. The query parameters that pass the verification can ensure their accuracy and avoid problems such as parameter errors caused by link or transmission equipment failures.

[0046] Step S102: Determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter.

[0047] Specifically, different surcharge types characterize the characteristics of surcharge collection. For example, peak-time surcharges are usually related to time. Orders that meet specific time conditions are subject to peak-time surcharges. Remote area surcharges are usually related to the delivery address. When the delivery address belongs to certain remote areas, remote area surcharges are required. Using the parameter name of the query parameter that can characterize the characteristics of the item order, at least one surcharge type corresponding to the item is determined from a pre-created surcharge type library that includes various surcharge types. For example, the peak-time surcharge and remote area surcharge mentioned above are usually related to the order time and order address. If the query parameter name contains the order time and order address, it can be determined that the surcharge type corresponding to the item is the peak-time surcharge and remote area surcharge.

[0048] According to one embodiment of the present invention, before determining the corresponding surcharge type from a pre-created surcharge type library, the method further includes: configuring the surcharge type through a surcharge type configuration page, defining at least one component of the surcharge type, and obtaining a component set of the surcharge type; and storing the surcharge type and the corresponding component set in the surcharge type library.

[0049] Specifically, an embodiment of the present invention provides a convenient and fast method for constructing a surcharge type library, in which a new surcharge type is created through a front-end visualized surcharge type configuration page, a corresponding surcharge type code is generated, and then at least one component included in the surcharge type is defined or selected. After the definition is completed, the newly created surcharge type is enabled and effective, and the surcharge type, surcharge type code, and corresponding component set can be obtained. As mentioned above, the time involved in the peak surcharge is the component, and if there are other components, the time and other components constitute the component set of the peak surcharge. Furthermore, the surcharge type, surcharge type code, and the component set corresponding to the surcharge type are associated and stored in the surcharge type library to facilitate the query system to maintain, manage, and obtain the surcharge type.

[0050] According to another embodiment of the present invention, at least one corresponding surcharge type is determined from a pre-created surcharge type library based on the query parameters, including: determining a type query element set based on the parameter name of the query parameter, and obtaining each element subset of the type query element set; querying at least one component element set that matches each element subset from the correspondence between the surcharge type and the component element set, and determining at least one corresponding surcharge type based on the matched component element set.

[0051] Specifically, all valid surcharge types are stored in the surcharge type library. All surcharge types and corresponding component element sets are read from the surcharge type library, and a correspondence between the surcharge type and the component element set is established for subsequent query of the surcharge type. In addition, considering that the surcharge type library may be updated in real time, the latest correspondence between the surcharge type and the component element set can be obtained by monitoring the update message of the surcharge type library to ensure that the correspondence between the surcharge type and the component element set is synchronized with the surcharge type library.

[0052] Furthermore, considering that there may be some unnecessary query parameters in the query parameters, in order to facilitate the query of surcharge items, the query parameter screening conditions can be preset based on business experience. According to the screening conditions, the parameter names that meet the screening conditions are selected from all the parameter names in the query parameters, and these parameter names that meet the screening conditions are combined into the type query element set of the item, and then each element subset is obtained for the type query element, that is, all possible combinations of parameter names. For example, the query parameters of item A include time parameters and address parameters, then the type query element set is {time parameter; address parameter}, and correspondingly, the element subsets of the type query element set are {time parameter}, {address parameter} and {time parameter; address parameter}. Then, the component element sets that match each element subset are queried from the correspondence between the surcharge type and the component element set obtained above. If a matching component element set is found, at least one corresponding surcharge type can be determined according to the surcharge type corresponding to the matching component element set.

[0053] Figure 2 The present invention is a flowchart of determining the surcharge type according to an embodiment of the present invention. This figure uses the common components of the current surcharge type (time component and address component) as the screening conditions of the query parameter to screen and combine the parameter names of the query parameters. First, it is determined whether the parameter name of the query parameter has a time parameter related to the time component. If there is a time parameter, the time parameter name is added to the type query element set; if there is no time parameter, it is continued to determine whether the query parameter has an address parameter related to the address component; in addition, after the time parameter name is added, it is also continued to determine whether the query parameter has an address parameter related to the address component; if there is an address parameter, the address parameter name is added to the type query element set; if there is no address parameter, the item identification name required by default in the query parameter is added to the type query element set; in addition, after the address parameter name is added, the item identification name in the query parameter is also added to the type query element set, so that the type query element set is determined according to the parameter name of the query parameter. Then, each element subset of the type query element set is obtained; from the correspondence between the acquired surcharge type and the component element set, at least one component element set matching each element subset is queried, and at least one corresponding surcharge type is determined according to the matched component element set.

[0054] Step S103: Determine at least one corresponding surcharge element information from a pre-created surcharge item information library according to each surcharge type and the item identifier of the item.

[0055] The embodiment of the present invention stores the surcharge element information of each surcharge item, as well as the corresponding surcharge type and item identification through a surcharge item information library, wherein the surcharge element information is used to determine whether the specific data conditions of the surcharge item are met. For example, surcharge item C of the peak surcharge mainly involves orders between January 1st and January 10th within a specific period, so January 1st to January 10th are the surcharge element information of surcharge item C. The surcharge items (including surcharge element information) and surcharge types, as well as the corresponding relationship with the item identification in the surcharge item information library can be read first, stored, and maintained and updated in real time according to the surcharge item information library. Based on the above-determined surcharge types and item identifications, at least one corresponding surcharge element information is determined from the corresponding relationship, that is, according to a surcharge type and an item identification, a corresponding surcharge element information can be determined.

[0056] According to one embodiment of the present invention, before determining the corresponding surcharge element information from a pre-created surcharge item information library, the method further includes: configuring the surcharge element information of the surcharge item through a surcharge item configuration page, defining the surcharge type corresponding to the surcharge item, and the item identification corresponding to the surcharge item; storing the surcharge item, the surcharge type corresponding to the surcharge item, the item identification corresponding to the surcharge item, and the surcharge element information of the surcharge item in the surcharge item information library.

[0057] Specifically, an embodiment of the present invention provides a convenient and fast method for constructing a surcharge item information library, in which a new surcharge item is created through a front-end visualized surcharge item information configuration page, the corresponding surcharge element information is configured, and the surcharge type corresponding to the surcharge item and the item identification corresponding to the surcharge item are selected; the surcharge type corresponding to the newly created surcharge item (including the surcharge element information) and the item identification are stored in the surcharge item information library.

[0058] Figure 3It is a schematic diagram of the configuration process of the surcharge type and surcharge item of the embodiment of the present invention. By opening the surcharge type configuration page of the management end, a new surcharge type is created, and at least one component of the surcharge type is defined. After the definition is completed, the newly created surcharge type is enabled and effective. At this time, the surcharge type and the component set corresponding to the surcharge type are associated and stored in the surcharge type library, so that the correspondence between the surcharge type and the component set can be read from the surcharge type library. Similarly, through the surcharge item information configuration page, a new surcharge item is created, the corresponding surcharge element information is configured, and the surcharge type corresponding to the surcharge item and the item identification corresponding to the surcharge item are selected. After the configuration is completed, the newly created surcharge item is enabled and effective. At this time, the newly created surcharge item is associated with the corresponding surcharge type and stored in the surcharge item information library, and the newly created surcharge item is associated with the corresponding item identification and stored in the surcharge item information library, so that the surcharge item and the surcharge type, as well as the corresponding relationship type with the item identification can be read from the surcharge item information library.

[0059] According to another embodiment of the present invention, the surcharge element information corresponding to the surcharge items in the surcharge item information library is stored in a key-value pair, and the key of the key-value pair is determined according to the surcharge type and the item identification corresponding to the surcharge item; according to each of the surcharge types and the item identification of the item, at least one corresponding surcharge element information is determined from a pre-created surcharge item information library, including: obtaining at least one key value according to each of the surcharge types and the item identification of the item; and querying the surcharge element information corresponding to each of the key values ​​from the surcharge item information library.

[0060] Specifically, considering that there is a lot of data information stored in the surcharge item information library, the amount of data is generally large, which is not conducive to query. The embodiment of the present invention optimizes the storage structure of the surcharge item information library, and uses a key-value pair method for storage, where the surcharge type and item identifier are used to generate the Key of the key-value pair, and the corresponding Value stores the surcharge element information of the surcharge item. Based on the above-determined surcharge types and item identifiers, a corresponding key value Key is generated, and the corresponding surcharge element information can be quickly found from the surcharge item information library according to the key value. In the case of multiple surcharge types, multiple corresponding key values ​​are generated, and correspondingly, multiple corresponding surcharge element information is found.

[0061] Step S104: According to the parameter value of the query parameter, query at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface to determine the surcharge of the item.

[0062] Specifically, the query system of the embodiment of the present invention provides a universal query interface to the outside, which is connected to the surcharge type library and the surcharge item information library. Through specific matching logic processing, it can support the query of various surcharge types and various surcharge items. After the surcharge element information is determined as above, the parameter value of the query parameter is matched with the corresponding value in each surcharge element information. A successful match indicates that the surcharge item corresponding to the surcharge element information is hit.

[0063] According to one embodiment of the present invention, there is a corresponding relationship between the surcharge type and the surcharge element information, and according to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each of the surcharge element information through the query interface, including: for each surcharge type corresponding to the item, obtaining at least one surcharge item corresponding to the item by executing the following method; for each component element of the surcharge type, obtaining the parameter value corresponding to the component element from the query parameter, and matching the parameter value with the information value in the corresponding surcharge element information; in the case where each component element is successfully matched, returning the surcharge item corresponding to the surcharge element information to the query interface, so that the surcharge item can be obtained through the query interface.

[0064] Specifically, considering that the surcharge element information of the surcharge item corresponds to the component element set in its surcharge type, the parameters for subsequent numerical matching can be determined based on the component element set of the surcharge type. It can be seen from the surcharge type determined above that there may be more than one surcharge type. For each surcharge type, each component element in the corresponding component element set can be obtained. For example, if the component element set of the surcharge type is {item ID, date}, then the item ID and date are two components. For each component element, the parameter value corresponding to the component element is obtained from the query parameter, and the parameter value is matched with the corresponding numerical information in the surcharge element information, that is, the information value. The surcharge element information here corresponds to the surcharge type. If the parameter value falls within the interval of the information value, or is the same as the information value, it means that the parameter match is successful. If each component element is matched successfully, it means that the surcharge item corresponding to the surcharge element information is hit. According to the above method, each surcharge type is traversed to obtain all surcharge items hit by the parameter value of the item.

[0065] It can be understood that the query matching for each component mentioned above can be performed by a parallel distributed query matching method or a serial chain method. The parallel distributed query matching method has a higher matching efficiency when all components are successfully matched, but if one of the components fails to match, it may not affect the matching of other components. At this time, the matching is not meaningful, and logical processing resources are wasted; using the serial chain method, when a component fails to match, it can be perceived, and there is no need to match subsequent components, avoiding the waste of logical processing resources. Of course, when all components are successfully matched, the matching efficiency may be lower than that of the above parallel distributed matching method.

[0066] Figure 4 It is a flow chart of determining the surcharge items in the embodiment of the present invention. This figure takes the common components of the current surcharge type (time element and address element, wherein the address element includes the first list of addresses and the second list of addresses, the first list of addresses is used to clarify that the addresses in the list need to be charged with remote area surcharges, and the second list of addresses is used to clarify that the addresses in the list are not charged with remote area surcharges) as an example, and uses a serial chain matching method to display the matching and filtering of each component element, so as to finally determine the surcharge items. The matching and filtering of each component element of the serial chain is a node. When the node matching and filtering pass, the next node is executed. For example, the time element, its matching and filtering is the time matching filtering, and the matching and filtering of the first list of addresses is the first list matching and filtering. If the components in the current surcharge type have the time element and the second list of addresses, the time matching and filtering of the time element are performed. When the time matching and filtering pass, the second list matching and filtering are performed. When the second list matching and filtering pass, it is determined that the surcharge items corresponding to the current surcharge element information are hit. Correspondingly, if the time matching and filtering fail or the second list matching and filtering fail, it is determined that the surcharge items corresponding to the current surcharge element information are not hit.

[0067] Specifically for the scenario in this figure, first determine whether each component of the surcharge type has a time element or an address element, and then execute the matching filtering logic of the corresponding component based on the surcharge element information corresponding to the surcharge type. The specific steps are: obtain the surcharge element information corresponding to the surcharge type, determine whether the component of the current surcharge type has a time element, if there is a time element, perform time matching filtering according to the specific time value corresponding to the query parameter and the corresponding time information value in the surcharge element information; if there is no time element, then determine whether the component of the surcharge type has an address first list. In addition, if the above time matching filtering is successfully passed, continue to determine whether the component of the surcharge type has an address first list. If there is an address first list, perform first list matching filtering according to the specific address information corresponding to the query parameter and the specific first list address information corresponding to the surcharge element information; if there is no address first list, then determine whether the component of the surcharge type has an address second list. If there is no address second list, then the matching filtering ends, and the surcharge item corresponding to the current surcharge element information is returned to obtain the queried surcharge item. If there is a second list of addresses, the second list is matched and filtered according to the specific address information corresponding to the query parameters and the specific second list address information corresponding to the surcharge element information. If the second list is matched and filtered successfully, the surcharge item corresponding to the current surcharge element information is returned to obtain the surcharge item being queried. In addition, in the case where the first list of addresses is successfully matched, although the first list of addresses and the second list of addresses are mutually exclusive in the business scenario, for the sake of logical integrity, it is also possible to determine whether the component elements of the surcharge type have a second list of addresses. Under normal circumstances, there is no second list of addresses at this time, and the matching and filtering is terminated. The surcharge item corresponding to the current surcharge element information is returned to obtain the surcharge item being queried. It should be noted that the execution order of each node in the serial chain process can be flexibly changed, that is, the judgment and matching filtering order between the various components of the surcharge type can be flexibly changed, or the first list of addresses or the second list of addresses can be determined first. The present invention does not make specific limitations.

[0068] Figure 5It is a schematic diagram of the overall process of surcharge query in an embodiment of the present invention. The query system receives a query request for surcharges and obtains query parameters; verifies the obtained query parameters and determines that the verification is passed; reads surcharge type information (the correspondence between all surcharge types and component element sets) from the surcharge item information library; reads surcharge item information (the correspondence between surcharge items and surcharge types, and the item identifier) ​​from the surcharge item information library. Based on these relationship data, the surcharge type is first confirmed, and according to the filtering conditions of the preset query parameters, the parameter names that meet the filtering conditions are selected from all the parameter names in the query parameters, and these parameter names that meet the filtering conditions are combined to form the type query element set of the item, and then each element subset is obtained for the type query element, and then the component element set that matches each element subset is queried from the correspondence between the surcharge type and the component element set obtained above. If a matching component element set is found, at least one corresponding surcharge type can be determined based on the surcharge type corresponding to the matching component element set. The specific steps have been described in. Figure 2 The above-mentioned surcharge items (including surcharge element information) and the corresponding relationship between the surcharge type and the item ID are optimized into a key-value pair storage format. According to the determined surcharge type and item ID, the key value used to search for the surcharge element information is obtained, and the surcharge item is determined. The surcharge element information is obtained according to the key value. The subsequent specific steps are described in Figure 4 The text description is explained in detail and will not be repeated here. After obtaining the surcharge items to be queried, the results are packaged according to the agreed format and the packaged results are sent to the query interface to display the surcharge items of the queried items to the user.

[0069] The embodiment of the present invention provides a universal surcharge query method, which performs all types of surcharge queries through a query interface, optimizes the surcharge query process, and the update of surcharge types and surcharge items will not affect the express delivery system, which is more conducive to business expansion and maintenance.

[0070] Figure 6 FIG. 2 is a schematic diagram of the main modules of the device for querying additional fees according to an embodiment of the present invention. Figure 6 As shown, the surcharge query device 600 mainly includes a query parameter acquisition module 601, a type determination module 602, an element information determination module 603 and a surcharge determination module 604.

[0071] A query parameter acquisition module 601, configured to acquire a query parameter in response to receiving a surcharge query request for an item;

[0072] A type determination module 602, configured to determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter;

[0073] An element information determination module 603 is used to determine at least one corresponding surcharge element information from a pre-created surcharge item information library according to each surcharge type and the item identifier of the item;

[0074] The surcharge determination module 604 is used to query at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface according to the parameter value of the query parameter to determine the surcharge of the item.

[0075] According to one embodiment of the present invention, the surcharge query device 600 also includes a surcharge type library construction module (not shown in the figure), which is used to: before determining the corresponding surcharge type from a pre-created surcharge type library, configure the surcharge type through a surcharge type configuration page, define at least one component of the surcharge type, and obtain a component set of the surcharge type; store the surcharge type and the corresponding component set in the surcharge type library.

[0076] According to another embodiment of the present invention, the type determination module 602 is further used to: determine the type query element set according to the parameter name of the query parameter, and obtain each element subset of the type query element set; query at least one component element set that matches each element subset from the correspondence between the surcharge type and the component element set, and determine at least one corresponding surcharge type according to the matched component element set.

[0077] According to another embodiment of the present invention, the surcharge query device 600 also includes a surcharge item information library construction module (not shown in the figure), which is used to: configure the surcharge element information of the surcharge item through the surcharge item configuration page before determining the corresponding surcharge element information from the pre-created surcharge item information library, define the surcharge type corresponding to the surcharge item, and the item identification corresponding to the surcharge item; store the surcharge item, the surcharge type corresponding to the surcharge item, the item identification corresponding to the surcharge item, and the surcharge element information of the surcharge item in the surcharge item information library.

[0078] According to another embodiment of the present invention, the surcharge element information corresponding to the surcharge items in the surcharge item information library is stored in a key-value pair, and the key of the key-value pair is determined according to the surcharge type and the item identification corresponding to the surcharge item; the element information determination module 603 is further used to: obtain at least one key value according to each of the surcharge types and the item identification of the item; and query the surcharge element information corresponding to each of the key values ​​from the surcharge item information library.

[0079] According to another embodiment of the present invention, there is a correspondence between the surcharge type and the surcharge element information, and the surcharge determination module 604 is further used to: for each surcharge type corresponding to the item, obtain at least one surcharge item corresponding to the item by executing the following method; for each component element of the surcharge type, obtain a parameter value corresponding to the component element from the query parameter, and match the parameter value with the information value in the corresponding surcharge element information; when each component element is successfully matched, return the surcharge item corresponding to the surcharge element information to the query interface, so that the surcharge item can be obtained through the query interface.

[0080] According to another embodiment of the present invention, the surcharge query device 600 further includes a parameter verification module (not shown in the figure), which is used to: after obtaining the query parameters, verify the query parameters and determine whether the verification is passed.

[0081] Figure 7 is an exemplary system architecture diagram to which embodiments of the present invention can be applied.

[0082] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0083] Users can use terminal devices 701, 702, 703 to interact with server 705 via network 704 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 701, 702, 703, such as surcharge query applications, etc. (only as an example).

[0084] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.

[0085] The server 705 may be a server that provides various services, such as a background management server (only an example) that supports the surcharge query performed by the user using the terminal devices 701, 702, and 703. The background management server may obtain a query parameter in response to receiving a surcharge query request for an item; determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter; determine at least one corresponding surcharge element information from a pre-created surcharge item information library according to each of the surcharge types and the item identifier of the item; query at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface according to the parameter value of the query parameter to determine the surcharge of the item, etc., and feed back the processing result (such as the surcharge item, etc. - only an example) to the terminal device.

[0086] It should be noted that the method for querying the surcharge provided in the embodiment of the present invention is generally executed by the server 705 , and accordingly, the device for querying the surcharge is generally disposed in the server 705 .

[0087] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0088] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device or server suitable for implementing an embodiment of the present invention. Figure 8 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0089] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0090] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.

[0091] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.

[0092] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.

[0093] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0094] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes: a query parameter acquisition module, a type determination module, an element information determination module and an additional fee determination module.

[0095] The names of these modules do not, in some cases, limit the modules themselves. For example, the query parameter acquisition module may also be described as a "module for acquiring query parameters in response to receiving a surcharge query request for an item."

[0096] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by a device, the device includes: in response to receiving a surcharge query request for an item, obtaining a query parameter; according to the query parameter, determining at least one corresponding surcharge type from a pre-created surcharge type library; according to each of the surcharge types and the item identifier of the item, determining at least one corresponding surcharge element information from a pre-created surcharge item information library; according to the parameter value of the query parameter, querying at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface to determine the surcharge of the item.

[0097] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by responding to a surcharge query request received for an item, a query parameter is obtained; according to the query parameter, at least one corresponding surcharge type is determined from a pre-created surcharge type library; according to each surcharge type and the item identifier of the item, at least one corresponding surcharge element information is determined from a pre-created surcharge item information library; according to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each surcharge element information through a query interface to determine the surcharge of the item. The technical solution realizes a universal surcharge query method, performs all types of surcharge queries through a query interface, optimizes the surcharge query process, facilitates the management of surcharge items and surcharge types, avoids the online deployment of the express delivery system in order to connect to the newly added interface, and is more conducive to business expansion and maintenance.

[0098] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.

Claims

1. A method for querying additional charges, characterized in that: include: In response to receiving a surcharge query request for an item, obtaining a query parameter; According to the query parameter, determining at least one corresponding surcharge type from a pre-created surcharge type library; According to each of the surcharge types and the item identifier of the item, determining at least one corresponding surcharge element information from a pre-created surcharge item information library; According to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each of the surcharge element information through a query interface to determine the surcharge of the item.

2. The method according to claim 1, characterized in that Before determining the corresponding surcharge type from the pre-created surcharge type library, the method further includes: Through the surcharge type configuration page, configure the surcharge type, define at least one component of the surcharge type, and obtain a component set of the surcharge type; The surcharge type and the corresponding component element set are stored in a surcharge type library.

3. The method according to claim 1, characterized in that Determining at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter includes: Determine a type query element set according to the parameter name of the query parameter, and obtain each element subset of the type query element set; At least one component element set matching the respective element subsets is searched from the correspondence between the surcharge type and the component element set, and at least one corresponding surcharge type is determined according to the matching component element set.

4. The method according to claim 1, characterized in that: Before determining the corresponding surcharge element information from the pre-created surcharge item information library, the method further includes: Through the surcharge item configuration page, configure the surcharge element information of the surcharge item, define the surcharge type corresponding to the surcharge item, and the item identifier corresponding to the surcharge item; The surcharge item, the surcharge type corresponding to the surcharge item, the item identifier corresponding to the surcharge item, and the surcharge element information of the surcharge item are stored in a surcharge item information library.

5. The method according to claim 1, characterized in that The surcharge element information corresponding to the surcharge item in the surcharge item information database is stored in a key-value pair, and the key of the key-value pair is determined according to the surcharge type and the item identifier corresponding to the surcharge item; According to each of the surcharge types and the item identifier of the item, at least one corresponding surcharge element information is determined from a pre-created surcharge item information library, including: Obtaining at least one key value according to each of the surcharge types and the item identifier of the item; The surcharge element information corresponding to each of the key values ​​is searched from the surcharge item information database.

6. The method according to claim 2, characterized in that There is a corresponding relationship between the surcharge type and the surcharge element information. According to the parameter value of the query parameter, at least one surcharge item corresponding to the item is queried from each of the surcharge element information through the query interface, including: For each surcharge type corresponding to the item, obtaining at least one surcharge item corresponding to the item by executing the following method; For each component of the surcharge type, a parameter value corresponding to the component is obtained from the query parameter, and the parameter value is matched with the information value in the corresponding surcharge element information; when each component is successfully matched, the surcharge item corresponding to the surcharge element information is returned to the query interface so that the surcharge item can be obtained through the query interface.

7. The method according to claim 1, characterized in that After obtaining the query parameters, the method further includes: The query parameters are verified, and confirmation is made that the verification passes.

8. A device for querying additional charges, characterized in that: include: A query parameter acquisition module, configured to acquire a query parameter in response to receiving a surcharge query request for an item; A type determination module, configured to determine at least one corresponding surcharge type from a pre-created surcharge type library according to the query parameter; An element information determination module, configured to determine at least one corresponding surcharge element information from a pre-created surcharge item information library according to each of the surcharge types and the item identifier of the item; The surcharge determination module is used to query at least one surcharge item corresponding to the item from each of the surcharge element information through a query interface according to the parameter value of the query parameter to determine the surcharge of the item.

9. A mobile electronic device terminal, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.

10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.