Complex logic charging processing method, device and system
Through a complex logical billing processing method, billing parameters and configuration data are obtained, billing expressions are determined, and the warehousing expenses to be calculated are calculated according to the preset multi-priority calculation rules, which solves the problem of low efficiency in complex logical billing processing in the prior art, and realizes efficient and flexible billing calculations.
Patent Information
- Application Number
- CN202411952270.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-27
- Publication Date
- 2025-05-30
AI Technical Summary
The prior art is difficult to efficiently handle complex logic billing, especially in logistics services. The complexity and diversity of computing logic lead to difficulty in coding implementation and low development efficiency.
Provide a complex logical billing method, which determines the billing expression by obtaining billing parameters and configuration data, and calculates the warehousing expenses to be calculated according to the preset multi-priority calculation rules. The method includes data acquisition, expression determination and calculation modules, which use a pre-design calculation engine to perform calculations, and supports a variety of computational functions and logic.
It improves the processing efficiency of complex logic billing, simplifies the configuration and implementation of computing logic, reduces development difficulty, supports multiple business logic computing processing, and realizes the reuse of computing logic.
Smart Images

Figure CN120069858A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet of Things, and in particular, to a processing method, device and system for complex logic billing. Background Art
[0002] With the continuous development of logistics business, the logical calculation processes involved in the business are becoming increasingly complex, such as the calculation of warehouse rental fees, storage fees, and so on. These complex logical calculations include various calculation logics such as decision tree calculation, four arithmetic operations, aggregation calculation, and calculation condition rules, and the operation steps of the combined calculation logic may also change according to the rules.
[0003] Currently, the calculation logics used in the data processing process, such as calculation processes, calculation rules, and calculation formulas, are often implemented through the coding of a certain programming language. However, implementing calculation logics in the form of coding requires high requirements for calculation logic developers. In addition, the implementations of the same calculation logic in different data processing applications are diverse, which is not conducive to the maintenance of data processing applications. Coding these complex combined calculation logics also has problems such as high development difficulty and low work efficiency. Therefore, it is necessary to design a processing solution for complex logic billing to improve the efficiency of logistics management. Summary of the Invention
[0004] The present invention aims to overcome the above-mentioned defects of the prior art and provides a processing method, device and system for complex logic billing, which can improve the processing efficiency of complex logic billing.
[0005] An embodiment of the present invention provides a processing method for complex logic billing, including the following steps: Obtain billing parameters and determine configuration data; wherein, the billing parameters include but are not limited to single SKU volume, single SKU quantity, total inbound quantity, inbound time, unit price; and the configuration data includes the preset multi-priority calculation rules. Determine a billing expression for the storage fee to be calculated according to the configuration data. Calculate the storage fee to be calculated according to the billing parameters and the billing expression according to the preset multi-priority calculation rules.
[0006] Further, the configuration data specifically includes: several preset calculation configuration types and several calculation logics corresponding to the preset calculation configuration types; wherein, the calculation logics include a preset calculation process, the preset multi-priority calculation rules, and preset calculation input parameters.
[0007] Further, the determining of the billing expression according to the configuration data specifically includes: Converting the preset calculation process into the billing expression, including: Convert the functions included in the pre-designed calculation process into corresponding function special characters; Convert the judgment conditions included in the pre-designed calculation process into corresponding logical parsing expressions; Convert the four arithmetic operations included in the pre-designed calculation process into corresponding calculation instructions.
[0008] Further, calculating the calculation result according to the billing parameters and the billing expression according to the preset multi-priority calculation rule specifically includes: Parse the billing expression to obtain the parameter categories required for calculation; Extract the to-be-billed parameters from the billing parameters according to the parameter categories; Determine the calculation order of the billing expression according to the preset multi-priority calculation rule; Substitute the to-be-billed parameters into the billing expression, and calculate the calculation result through a pre-designed calculation engine according to the calculation order; wherein, several calculation functions are included in the pre-designed calculation engine.
[0009] Preferably, before substituting the to-be-billed parameters into the billing expression, it further includes: Decompose the to-be-billed parameters into single-dimensional parameters according to the attributes of the to-be-billed parameters; Assign values to the single-dimensional parameters according to the pre-designed calculation input parameters. When there is a reference parameter value corresponding to the single-dimensional parameter in the pre-designed calculation input parameters, assign the reference parameter value to the single-dimensional parameter. When there is no reference parameter value corresponding to the single-dimensional parameter in the pre-designed calculation input parameters, extract the reference parameter from the calculation input parameters for nested calculation and then assign the nested calculation result to the single-dimensional parameter.
[0010] Preferably, the calculation functions include at least one of four arithmetic operations, rounding, carry processing, taking the maximum value, aggregation and superposition calculation, binary calculation, and fuzzy matching.
[0011] Another embodiment of the present invention provides a processing device for complex logic billing, including: a data acquisition module, an expression determination module, and a calculation module; The data acquisition module acquires billing parameters and determines configuration data; wherein, the billing parameters include but are not limited to single SKU volume, single SKU quantity, total inbound quantity, inbound time, unit price; and the configuration data includes the preset multi-priority calculation rule; The expression determination module is used to determine the billing expression for calculating the storage cost according to the configuration data; The calculation module is used to calculate the storage fee to be calculated according to the billing parameters and the billing expression according to the preset multi-priority calculation rule.
[0012] Furthermore, the configuration data specifically includes: several preset calculation configuration types and several calculation logics corresponding to the preset calculation configuration types; wherein, the calculation logics include preset calculation formulas, the preset multi-priority calculation rule, and preset calculation input parameters.
[0013] Furthermore, the calculation module is used to calculate a calculation result according to the billing parameters and the billing expression according to the preset multi-priority calculation rule, specifically including: Parse the billing expression to obtain the parameter categories required for calculation; Extract the to-be-billed parameters from the billing parameters according to the parameter categories; Determine the calculation order of the billing expression according to the preset multi-priority calculation rule; Substitute the to-be-billed parameters into the billing expression, and calculate the calculation result according to the calculation order through a preset calculation engine; wherein, several calculation functions are included in the preset calculation engine.
[0014] Another embodiment of the present invention provides a processing system for complex logic billing, including a client and a service end; The client is used to obtain billing parameters and configuration data, and send the billing parameters and configuration data to the service end; The service end is communicatively connected to the client, and is used to perform complex logic billing according to the billing parameters and configuration data, and send the calculated calculation result to the client.
[0015] Compared with the prior art, the beneficial effects of the present invention are as follows: By configuring calculation rules with multiple steps, multiple priorities, and calculation rules embedded, business personnel only need to complete the configuration of the calculation, and can easily obtain the desired calculation result, which can handle various simple or complex business logic calculations, improving the processing efficiency of complex logic billing. In addition, the logical calculation therein is completely independently processed and can be reused infinitely, enabling the reuse of calculation logic, thereby improving the development efficiency of software developers. Description of the Drawings
[0016] Figure 1 It is a schematic flowchart of a processing method for complex logic billing provided by an embodiment of the present invention.
[0017] Figure 2Schematic diagram of a processing device for complex logic billing provided by another embodiment of the present invention. Detailed implementation manners
[0018] The drawings are only for illustrative purposes and should not be construed as a limitation of this patent. For those skilled in the art, it is understandable that some well-known structures and their descriptions in the drawings may be omitted.
[0019] The technical solutions of the present invention will be further described below with reference to the drawings and embodiments.
[0020] Referring to Figure 1 , which is a flowchart of a processing method for complex logic billing provided by an embodiment of the present invention, including the following steps: S1: Obtain billing parameters and determine configuration data; wherein, the billing parameters include but are not limited to single SKU volume, single SKU quantity, total inbound quantity, inbound time, unit price; and the configuration data includes the preset multi-priority calculation rules. S2: Determine the billing expression for the storage fee to be calculated according to the configuration data. S3: Calculate the storage fee to be calculated according to the billing parameters and the billing expression according to the preset multi-priority calculation rules.
[0021] For step S1, specifically, the configuration data specifically includes: several preset calculation configuration types and several calculation logics corresponding to the preset calculation configuration types; wherein, the calculation logics include a preset calculation process, the preset multi-priority calculation rules, and preset calculation input parameters.
[0022] In a preferred embodiment, the preset calculation process may include some parameter judgment conditions, references to some common functions, and specific calculation symbols. The preset multi-priority calculation rules specify which steps or nested calculations in the preset calculation process need to be calculated preferentially. The preset calculation input parameters include reference parameter values of some specific parameters, which can be directly referenced when converting the billing expression.
[0023] For step S2, specifically, determining the billing expression according to the configuration data specifically includes: Converting the preset calculation process into the billing expression, including: Converting the functions included in the preset calculation process into corresponding function special characters. Converting the judgment conditions included in the preset calculation process into corresponding logical parsing expressions. Converting the four arithmetic operations included in the preset calculation process into corresponding calculation instructions.
[0024] In a preferred embodiment, it can be parsed according to a pre-designed calculation process in the configuration data and converted into an executable billing expression. The pre-designed calculation process may contain elements such as conditional judgments and common function references. For example: When calculating the handling fee for a certain box-shaped cargo, there is the following calculation process: When the longest side of the box is within the range of 0 - 10m, the specific calculation formula for the handling fee is unit price * (take the maximum value: (order SKU quantity, 100)) * billing weight, where the unit price = 18; When the longest side of the box is within the range of 10 - 20m, the specific calculation formula for the handling fee is unit price * (round: order SKU quantity) * billing weight, where the unit price = 22.
[0025] Thus, when the above pre-designed calculation process is received, it is necessary to determine the specific calculation formula according to the longest side of the box, and finally convert the functions, judgment conditions, and four arithmetic operations in the pre-designed calculation formula one by one, and finally form a billing expression: When [the longest side of the box] ∈ [0, 10], [handling fee] = 18 * max([order SKU quantity], 100) * [billing weight]; when [the longest side of the box] ∈ [10, 20], [handling fee] = 22 * round([order SKU quantity], 0) * [billing weight].
[0026] For step S3, specifically, the calculation result obtained by calculating according to the billing parameters and the billing expression according to the preset multi-priority calculation rules specifically includes: Parse the billing expression to obtain the parameter categories required for calculation; Extract the parameters to be billed from the billing parameters according to the parameter categories; Determine the calculation order of the billing expression according to the preset multi-priority calculation rules; Substitute the parameters to be billed into the billing expression, and calculate the calculation result according to the calculation order through a pre-designed calculation engine; among them, several calculation functions are included in the pre-designed calculation engine.
[0027] Preferably, the calculation functions include at least one of four arithmetic operations, rounding, carry processing, taking the maximum value, aggregation and superposition calculation, binary calculation, and fuzzy matching.
[0028] In a preferred embodiment, taking the calculation process of the handling fee for a certain box-shaped cargo as an example, it can be known that the billing expression is: when [the longest side of the box] ∈ [0, 10], [handling fee] = 18 * max([the number of order SKUs], 100) * [billing weight]; when [the longest side of the box] ∈ [10, 20], [handling fee] = 22 * round([the number of order SKUs], 0) * [billing weight].
[0029] According to the billing expression, the to-be-billed parameters that need to be extracted include [the longest side of the box], [the number of order SKUs], and [billing weight]. Therefore, after obtaining the specific values of these to-be-billed parameters from the billing parameters, the cost can be calculated through a pre-designed calculation engine according to the billing expression. For example, when the specific values of [the longest side of the box], [the number of order SKUs], and [billing weight] are parsed as 15, 31, and 20 respectively, the final formula to be calculated is: 22 * 30 * 20, and the result is 13,200 yuan.
[0030] Preferably, the pre-designed calculations include but are not limited to multiple function calculation logics such as max (maximum value), min (minimum value), sum (summation), sumif (conditional summation), round (rounding), etc. Users can use one or more of these calculation logics in the configuration data. In the case of using multiple calculation logics, multiple calculation logics can also be organized into the form of a calculation logic flow in the configuration data.
[0031] For step S3, preferably, before substituting the to-be-billed parameters into the billing expression, it further includes: According to the attributes of the to-be-billed parameters, disassemble the to-be-billed parameters into single-dimensional parameters; Assign values to the single-dimensional parameters according to the pre-designed calculation input parameters. When there is a reference parameter value corresponding to the single-dimensional parameter in the pre-designed calculation input parameters, assign the reference parameter value to the single-dimensional parameter. When there is no reference parameter value corresponding to the single-dimensional parameter in the pre-designed calculation input parameters, extract the reference parameter from the calculation input parameters for nested calculation and then assign the nested calculation result to the single-dimensional parameter.
[0032] In a preferred embodiment, assuming that the volume of a box-shaped cargo needs to be calculated, since the volume is a multi-dimensional parameter, the calculation of the volume needs to be decomposed into the calculations of several single-dimensional parameters: volume = length * width * height. If there are specific reference parameter values for the three single-dimensional parameters of length, width, and height in the pre-designed calculation input parameters, they can be directly substituted for calculation. If there is no specific reference parameter value for a certain single-dimensional parameter in the pre-designed calculation input parameters, it is also necessary to determine the specific value of this single-dimensional parameter through additional nested calculation and then substitute it for calculation.
[0033] Reference Figure 2 , which is a schematic structural diagram of a processing device for complex logic billing provided by another embodiment of the present invention, including: a data acquisition module 101, an expression determination module 102, and a calculation module 103; The data acquisition module 101 acquires billing parameters and determines configuration data; wherein, the billing parameters include but are not limited to single SKU volume, single SKU quantity, total inbound quantity, inbound time, unit price; and the configuration data includes the preset multi-priority calculation rules; The expression determination module 102 is used to determine a billing expression for calculating storage fees according to the configuration data; The calculation module 103 is used to calculate the storage fees to be calculated according to the billing parameters and the billing expression according to the preset multi-priority calculation rules.
[0034] Further, the configuration data specifically includes: several preset calculation configuration types and several calculation logics corresponding to the preset calculation configuration types; wherein, the calculation logics include preset calculation formulas, the preset multi-priority calculation rules, and preset calculation input parameters.
[0035] Further, the calculation module 103 is used to calculate a calculation result according to the billing parameters and the billing expression according to the preset multi-priority calculation rules, specifically including: Parsing the billing expression to obtain parameter categories required for calculation; Extracting the parameters to be billed from the billing parameters according to the parameter categories; Determining the calculation order of the billing expression according to the preset multi-priority calculation rules; Substituting the parameters to be billed into the billing expression, and calculating the calculation result through a preset calculation engine according to the calculation order; wherein, the preset calculation engine includes several calculation functions.
[0036] Another embodiment of the present invention provides a processing system for complex logic billing, including a client and a service end; The client is used to acquire billing parameters and configuration data, and send the billing parameters and configuration data to the service end; The service end is communicatively connected to the client, and is used to perform complex logic billing according to the billing parameters and configuration data, and send the calculated calculation result to the client.
[0037] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, rather than limitations on the implementation manners of the present invention. For those of ordinary skill in the art, other different forms of changes or modifications can be made based on the above description. It is not necessary and impossible to enumerate all the implementation manners here. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included within the protection scope of the claims of the present invention.
[0038] Embodiments of the mechanisms disclosed in this application can be implemented in hardware, software, firmware, or a combination of these implementation methods. Embodiments of this application can be implemented as a computer program or program code executed on a programmable system, which includes at least one processor, a storage system (including volatile and non-volatile memories and / or storage elements), at least one input device, and at least one output device.
[0039] The program code can be applied to the input instructions to perform the various functions described in this application and generate output information. The output information can be applied to one or more output devices in a known manner. For the purposes of this application, a processing system includes any system having a processor such as, for example, a Digital Signal Processor (DSP), a microcontroller, an Application Specific Integrated Circuit (ASIC), or a microprocessor. The program code can be implemented in a high-level procedural language or an object-oriented programming language to communicate with the processing system. When necessary, the program code can also be implemented in assembly language or machine language. In fact, the mechanisms described in this application are not limited to the scope of any specific programming language. In any case, the language can be a compiled language or an interpreted language.
[0040] In some cases, the disclosed embodiments may be implemented in hardware, firmware, software, or any combination thereof. The disclosed embodiments may also be implemented as instructions carried or stored on one or more transitory or non-transitory machine-readable (e.g., computer-readable) systems, which may be read and executed by one or more processors. For example, the instructions may be distributed via a network or via other computer-readable media. Thus, machine-readable media may include any mechanism for storing or transmitting information in a machine (e.g., computer) readable form, including but not limited to, floppy disks, optical disks, optical discs, CD-ROMs, magneto-optical disks, read only memory (ROM), random access memory (RAM), erasable programmable read only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic or optical cards, flash memory, or tangible machine-readable memories for transmitting information (e.g., carrier waves, infrared signals, digital signals, etc.) using propagated signals in electrical, optical, acoustic, or other forms via the Internet. Thus, machine-readable media include any type of machine-readable media suitable for storing or transmitting electronic instructions or information in a machine (e.g., computer) readable form.
Claims
1. A method for processing complex logic billing, characterized in that: The steps include: Obtaining billing parameters and determining configuration data; wherein the billing parameters include but are not limited to single SKU volume, single SKU quantity, total number of warehousing, warehousing time, and unit price; the configuration data includes the preset multi-priority calculation rules; Determine a billing expression for the storage fee to be calculated according to the configuration data; The storage fee to be calculated is obtained according to the billing parameters and the billing expression and the preset multi-priority calculation rules.
2. The method according to claim 1, characterized in that The configuration data specifically includes: several preset computing configuration types and several computing logics corresponding to the preset computing configuration types; wherein the computing logic includes a preset computing process, the preset multi-priority computing rules and preset computing input parameters.
3. The method according to claim 2, characterized in that The determining of the charging expression according to the configuration data specifically includes: Converting the preset calculation process into the billing expression comprises: Convert the functions included in the preset calculation process into corresponding function special characters; Converting the judgment conditions included in the preset calculation process into corresponding logical analysis expressions; The four arithmetic operations included in the preset calculation process are converted into corresponding calculation instructions.
4. The method according to claim 2, characterized in that The step of calculating the calculation result according to the charging parameter and the charging expression and the preset multi-priority calculation rule specifically includes: Parsing the billing expression to obtain the parameter category required for calculation; Extracting the to-be-billed parameter from the billing parameter according to the parameter category; Determining the calculation order of the billing expression according to the preset multi-priority calculation rule; Substitute the to-be-billed parameter into the billing expression, and obtain the calculation result by using a preset calculation engine according to the calculation sequence; wherein the preset calculation engine includes several calculation functions.
5. The method according to claim 4, characterized in that Before substituting the to-be-charged parameter into the charging expression, the method further includes: According to the attributes of the parameter to be charged, the parameter to be charged is decomposed into single-dimensional parameters; According to the preset calculation input parameters, the single-dimensional parameter is assigned a value. When there is a reference parameter value corresponding to the single-dimensional parameter in the preset calculation input parameters, the reference parameter value is assigned to the single-dimensional parameter. When there is no reference parameter value corresponding to the single-dimensional parameter in the preset calculation input parameters, the reference parameter is extracted from the calculation input parameters for nested calculation and then the nested calculation result is assigned to the single-dimensional parameter.
6. The method according to claim 4, characterized in that The calculation function includes at least one of four arithmetic operations, rounding, carry processing, maximum value, aggregate superposition calculation, binary calculation, and fuzzy matching.
7. A processing device for complex logic billing, characterized in that: include: Data acquisition module, expression determination module and calculation module; The data acquisition module acquires billing parameters and determines configuration data; wherein the billing parameters include but are not limited to single SKU volume, single SKU quantity, total number of warehousing, warehousing time, and unit price; the configuration data includes the preset multi-priority calculation rules; The expression determination module is used to determine the billing expression for the storage fee to be calculated according to the configuration data; The calculation module is used to calculate the storage fee to be calculated according to the billing parameters and the billing expression and the preset multi-priority calculation rules.
8. The processing device for complex logic billing according to claim 7, characterized in that: The configuration data specifically includes: several preset calculation configuration types and several calculation logics corresponding to the preset calculation configuration types; wherein the calculation logic includes a preset calculation formula, the preset multi-priority calculation rules and preset calculation input parameters.
9. The processing device for complex logic billing as claimed in claim 8, characterized in that: The calculation module is used to calculate the calculation result according to the charging parameter and the charging expression according to the preset multi-priority calculation rule, specifically including: Parsing the billing expression to obtain the parameter category required for calculation; Extracting the to-be-billed parameter from the billing parameter according to the parameter category; Determining the calculation order of the billing expression according to the preset multi-priority calculation rule; Substitute the to-be-billed parameter into the billing expression, and obtain the calculation result by using a preset calculation engine according to the calculation sequence; wherein the preset calculation engine includes several calculation functions.
10. A complex logic billing processing system, characterized in that: Including client and business end; The client is used to obtain billing parameters and configuration data, and send the billing parameters and configuration data to the service end; The service end is connected to the client for communication, and is used to perform complex logic billing according to the billing parameters and configuration data, and send the calculated results to the client.