Automatic configuration and cost calculation methods, devices, equipment and media for miscellaneous charges quotations

By building a multi-dimensional miscellaneous fee quotation template library and capturing data in real time, and launching a rule matching engine to automatically adapt the billing mode and calculation formula, the cumbersome problem of quoting and calculating multiple miscellaneous fees in warehousing and logistics is solved, realizing efficient and accurate closed-loop billing throughout the entire process, and adapting to the rapid processing needs of cross-border e-commerce.

CN122134253APending Publication Date: 2026-06-02SHENZHEN RONGSHENG INFORMATION TECH CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHENZHEN RONGSHENG INFORMATION TECH CO LTD
Filing Date
2026-03-10
Publication Date
2026-06-02

AI Technical Summary

Technical Problem

In the warehousing and logistics sector, the pricing and calculation of various miscellaneous fees rely on manual configuration. This results in cumbersome pricing rules, fragmented data, low calculation efficiency, and difficulty in reusing across different scenarios. Consequently, labor costs are high, error rates are high, and response times are slow, making it difficult to meet the rapid processing needs of massive orders in industries such as cross-border e-commerce.

Method used

Build a multi-dimensional miscellaneous fee quotation template library and verify imported templates, capture order-related data in real time, start the rule matching engine, automatically adapt the billing mode and calculation formula, support batch parallel calculation, parallel exception handling, and generate and synchronize billing results.

Benefits of technology

It has achieved automation and intelligence in quoting various fees, and closed-loop cost calculation throughout the entire process, which has improved the accuracy and efficiency of billing, reduced labor costs, and adapted to the rapid processing needs of industries such as cross-border e-commerce.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122134253A_ABST
    Figure CN122134253A_ABST
Patent Text Reader

Abstract

This invention relates to a method, apparatus, equipment, and medium for automatic configuration and cost calculation of miscellaneous charges. The method includes constructing a multi-dimensional standardized template library and completing import verification to form a set of callable pricing rules; upon receiving a calculation request, retrieving and preprocessing order-related data across systems; filtering candidate rules through a rule matching engine and determining the optimal billing basis by weighting and sorting according to a preset priority system; adapting the billing mode and formula based on this basis, initiating batch parallel calculations and handling anomalies synchronously; and supporting multi-format export and cross-system synchronization after integrating the results. This invention includes modules for template library construction and verification, data retrieval and preprocessing, rule matching and sorting, cost calculation and anomaly handling, and result integration and synchronization. It achieves automatic configuration and efficient calculation of miscellaneous charges, improves data accuracy and process closure, adapts to the needs of multiple scenarios throughout the warehousing and logistics process, and significantly reduces labor costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of billing software systems, and in particular to a method, apparatus, equipment, and medium for automatic configuration and calculation of multiple miscellaneous fees. Background Technology

[0002] In the operation of the warehousing and logistics industry, the quotation and calculation of various fees run through the entire process of receiving, shipping, returns and value-added services. These fees include various types of charges such as handling fees, packaging fees, fuel surcharges and residential delivery fees. They also need to be adapted to the differentiated billing requirements of different warehouses, logistics channels and customer levels. This is a core link that affects the accuracy of financial settlement and the efficiency of business flow.

[0003] Currently, the pricing and calculation of various miscellaneous fees in the warehousing and logistics field largely rely on manual configuration and accounting. This results in cumbersome pricing rule configuration, requiring manual creation of billing templates adapted to different scenarios. These templates lack standardized formats, have poor custom scalability, and are difficult to reuse across scenarios. Importing data can easily lead to configuration failures due to missing fields or overlapping ranges. Data collection relies on manual entry, and data fragmentation across order management systems (OMS) and warehouse management systems (WMS) makes it impossible to synchronize core data such as product attributes, warehouse information, and value-added service requirements in real time, which can easily cause calculation benchmark errors. Rule matching lacks intelligent means, requiring manual screening when multiple candidate rules appear in multiple scenarios. Priority determination lacks a unified standard, which can easily lead to billing conflicts. Calculation efficiency is low, as it does not support parallel processing of batch orders. Unit conversions must be done manually, and there is a lack of automated handling mechanisms for anomalies, resulting in calculation delays. Calculation results must be manually exported and synchronized to related systems, resulting in poor process closure and difficulties in reconciliation and traceability.

[0004] The aforementioned problems result in high labor costs, high error rates, and slow response times in traditional multi-fee quotation and calculation processes, making it difficult to adapt to the rapid processing needs of massive orders in industries such as cross-border e-commerce. This seriously affects the operational efficiency and customer experience of warehousing and logistics companies. Therefore, developing an automated, intelligent, and fully closed-loop multi-fee quotation configuration and cost calculation technology has become a pressing technical challenge for the industry. Summary of the Invention

[0005] The main objective of this invention is to provide a method, apparatus, device, and medium for automatic configuration and cost calculation of miscellaneous fees. By including modules for template library construction and verification, data capture and preprocessing, rule matching and sorting, cost calculation and anomaly handling, and result integration and synchronization, the invention achieves automatic configuration and efficient calculation of miscellaneous fees.

[0006] To achieve the above objectives, this invention provides a method for automatic configuration and cost calculation of miscellaneous charges, comprising the following steps: A multi-dimensional miscellaneous fee quotation template library is constructed and imported templates are verified. The templates are preset with basic configuration items and billing rule items. The integrity of fields, data compliance and reasonableness of ranges are automatically verified. Templates that pass the verification are stored in the library to form a set of callable quotation rules. Specific error messages are returned if the verification fails. Upon receiving an external calculation request, order-related data and configuration data are retrieved in real time through a cross-system synchronization interface; The preset rule matching engine is activated, the set of pricing rules is called, and the order-related data is matched with the multi-dimensional attributes of the approved template. If the order meets multiple pricing rules, the optimal rule is selected according to the preset priority to form the exclusive billing basis for the order. Based on the exclusive billing basis, the corresponding billing mode and calculation formula are automatically adapted, batch parallel calculation is started and automatic unit conversion is supported. An exception handling mechanism is triggered synchronously during the calculation process. Once the calculations and exception handling are completed, a detailed list of order miscellaneous expenses, a summary of expenses, and a rule matching log are generated. The results can be exported and synchronized to related systems. Furthermore, the steps of constructing a multi-dimensional miscellaneous fee quotation template library and verifying imported templates, wherein the templates have preset basic configuration items and billing rule items, automatically verify field integrity, data compliance, and range rationality, and storing templates that pass verification into the library to form a set of callable quotation rules, and returning specific error messages for verification failures, include: Based on the needs of the entire warehousing and logistics process, a standardized template containing basic configuration items and billing rules items is generated, while allowing users to add special billing fields and save frequently used versions; Receive user requests uploaded based on the above template format, parse the imported content into structured data, and provide input for subsequent validation; Complete the following checks in sequence: complete the integrity checks of required fields, the compliance checks of numerical or time data, and the reasonableness checks of tiered ranges to ensure that no core parameters are missing or conflicting. If the verification passes, the structured data will be stored in the template library to form a set of pricing rules. If the verification fails, a prompt containing the error type and correction suggestions will be returned for the user to adjust and re-import. Furthermore, the step of receiving an external calculation request and then retrieving order-related data and configuration data in real time through a cross-system synchronization interface includes: Receive a calculation request containing a set of orders or a single order identifier, parse out the unique identifier of the order and the calculation range, and identify the target object of the data to be captured; Based on the parsed order identifier, a preset synchronization interface with the associated business system is triggered to request order-related data and configuration data. Real-time data capture of order module, product attributes, value-added service requirements, warehouse information, and channel configuration data from related business systems ensures data coverage, rule matching, and cost calculation meet core requirements. The system standardizes the format of the captured cross-system data, automatically converts weight or size units and unifies data precision, and removes duplicate or invalid data. Verify whether core data is missing. If key fields are missing, mark the missing items and trigger a supplementary entry prompt. Once the data verification is passed, it serves as the basic input for rule matching and cost calculation. Furthermore, the step of activating the preset rule matching engine, calling the pricing rule set, matching the order-related data with the multi-dimensional attributes of the approved template, and if the order meets multiple pricing rules, selecting the optimal rule according to preset priority to form the exclusive billing basis for the order includes: Trigger the preset rule matching engine to call the set of verified pricing rules in the template library to provide rule support for order matching; Based on the cleaned order association data, the basic configuration items and billing rule items of the pricing rules are compared one by one according to the module to which the order belongs, the attributes of the goods, the value-added service requirements, etc., and candidate rules that meet all matching conditions are selected. If there are multiple candidate rules, they are sorted according to the pre-configured priority, and the rule with the highest priority is selected as the basis for order-specific billing. Record the rule matching process and store it in conjunction with the specific billing basis; Furthermore, the step of sorting multiple candidate rules based on pre-configured priorities and selecting the rule with the highest priority as the basis for order-specific billing includes: The system invokes the priority rules pre-configured by the system. The configuration system includes at least three core dimensions: channel priority, customer priority, and rule effective time priority, and supports users to customize the weight ratio of each dimension. For each candidate rule, extract its associated channel priority value, corresponding customer priority level, and rule effective timestamp to form a priority attribute set for each candidate rule; The priority attributes of the candidate rules are weighted according to preset weights to obtain the comprehensive priority score of each candidate rule; among them, the higher the channel priority value, the higher the customer priority level, and the more recent the effective time, the higher the corresponding score. Sort the candidate rules in descending order of comprehensive priority score, select the candidate rule with the highest score as the basis for order-specific billing, and synchronously record the score, ranking dimension contribution value and optimal rule selection logic of each candidate rule to form a priority ranking log; Furthermore, the steps of automatically adapting the corresponding billing mode and calculation formula based on the exclusive billing basis, initiating batch parallel calculations and supporting automatic unit conversion, and synchronously triggering an exception handling mechanism during the calculation process include: The dedicated billing basis is invoked to extract the billing mode identifier, calculation parameters and unit benchmark, providing core basis for subsequent calculations; Based on the billing mode identifier, match the corresponding tiered pricing, combined billing, and other modes, and synchronously call the preset calculation formula to clarify the calculation logic of basic fees and additional fees; Based on the adapted formula, batch order parallel calculation is started, and the weight or size units of data from different sources are automatically converted to the base unit in the billing basis. After unifying the data accuracy, the cost calculation is completed. During the calculation process, abnormal situations are monitored in real time. When there is no matching billing basis, the template library is used as a fallback configuration. When data is missing, the field is marked and recalculation is supported after data is added. When the cost exceeds the preset threshold, a secondary confirmation warning is triggered. After the exception handling is completed, a detailed breakdown of miscellaneous expenses for each order and a total amount are generated and bound to the exception handling record to provide complete data support for the final output. Furthermore, after the calculations and anomaly handling are completed, the following steps are taken to generate order miscellaneous expense details, summary expenses, and rule matching logs, supporting result export and synchronization to related systems: Summarize the order miscellaneous expense details and total expenses, and associate them with the rule matching logs and exception handling records to form a complete dataset of order miscellaneous expense calculation results; The dataset is organized according to a preset format to generate a detailed list of order miscellaneous expenses, including the name of each miscellaneous expense, the calculation basis, the amount, and the total cost. The log of the association rule matching process and the explanation of exception handling are synchronized. Users can export the above structured results in a preset format, and the exported file is automatically associated with the unique order identifier; The structured results are pushed to the relevant business systems in real time through the preset data synchronization interface, and data verification marks are carried during synchronization to ensure the integrity of transmission. Receive synchronization receipts from associated systems and verify whether data has been successfully written; if synchronization fails, trigger a retry mechanism and record the reason for failure, return a synchronization status prompt to the user, and complete the entire closed loop process; The present invention also provides an automatic configuration and cost calculation device for multiple miscellaneous fees, comprising: The template library building and validation module is used to generate standardized templates that adapt to the entire warehousing and logistics process and support custom extensions. It parses data and performs validation. Templates that pass validation are stored in the template library to form a set of pricing rules, while those that fail validation return specific error messages. The data capture and preprocessing module is used to receive external calculation requests and parse order identifiers, start cross-system synchronization interfaces to capture order-related data and configuration data, perform data format unification, unit conversion and integrity verification, and output cleaned standardized data. The rule matching and priority sorting module is used to start the rule matching engine, call the set of pricing rules in the template library, filter candidate rules, load the preset priority configuration system, extract the priority attributes of candidate rules and perform weighted calculations, sort the rules by comprehensive score and select the best rule as the exclusive billing basis, and generate matching and sorting logs synchronously. The cost calculation and exception handling module is used to load exclusive billing basis, automatically adapt to the corresponding billing mode and calculation formula, start batch parallel calculation and complete the unified unit conversion. The results integration and synchronization module is used to integrate intermediate calculation results, matching logs and exception handling records, generate structured order miscellaneous fee details and summary fees, and provide multi-format export support; The present invention also provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described method for automatic configuration and cost calculation of miscellaneous charges quotation; The present invention also provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps of the method for automatic configuration and cost calculation of miscellaneous charges as described above. Attached Figure Description

[0007] Figure 1 This is a flowchart of a method for automatically configuring and calculating multiple miscellaneous fees in one embodiment of the present invention; Figure 2 This is a structural block diagram of a multi-fee quotation automatic configuration and cost calculation device according to an embodiment of the present invention; The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0008] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0009] Reference Figure 1 This is a flowchart illustrating an automatic configuration and cost calculation method for multiple miscellaneous fees proposed in this invention, including the following steps: S1. Construct a multi-dimensional miscellaneous fee quotation template library and verify the imported templates. The templates are preset with basic configuration items and billing rule items. The integrity of fields, data compliance and reasonableness of intervals are automatically verified. Templates that pass the verification are stored in the library to form a set of callable quotation rules. If the verification fails, a specific error message is returned. S2, after receiving an external calculation request, retrieves order-related data and configuration data in real time through a cross-system synchronization interface; S3, start the preset rule matching engine, call the set of pricing rules, match the order association data with the multi-dimensional attributes of the approved template, if the order meets multiple pricing rules, filter the optimal rule according to the preset priority, and form the exclusive billing basis for the order; S4. Based on the exclusive billing basis, automatically adapt the corresponding billing mode and calculation formula, start batch parallel calculation and support automatic unit conversion, and trigger the exception handling mechanism synchronously during the calculation process. S5 generates order miscellaneous expense details, summary expenses, and rule matching logs after the calculation and exception handling are completed. It supports exporting the results and synchronizing them to related systems.

[0010] As described in step S1 above, a multi-dimensional miscellaneous fee quotation template library is built to adapt to the entire warehousing and logistics process. The templates in the library have pre-set basic configuration items and billing rules, balancing standardized adaptation with custom expansion needs to meet the differentiated billing configuration requirements of different business scenarios. Subsequently, the library receives template import requests submitted by users and parses and processes the imported data. Based on this, a multi-dimensional automatic verification process is initiated, sequentially performing field integrity checks to ensure no core parameters are missing, data compliance checks, and range reasonableness checks. Templates that pass verification are stored in the template library, integrating them into a set of directly callable quotation rules to provide a foundation for subsequent rule matching. If verification fails, a specific prompt including the error type and location is immediately returned, facilitating user adjustments and re-import.

[0011] As described in step S2 above, the system receives a miscellaneous fee calculation request initiated from an external source, synchronously parses the core information in the request, extracts key parameters such as the unique order identifier and calculation range, clarifies the order object to be calculated and the business boundary, and then, based on the parsed order identifier, initiates a preset cross-system synchronization interface to establish a data transmission link with the related business systems of warehousing and logistics. Through this interface, two types of core data are captured in real time: first, order-related data, covering the business module to which the order belongs, the weight / size of the goods, value-added service requirements, warehouse information, etc.; second, configuration data, including the latest billing configuration of the corresponding logistics channel, etc. The entire data capture process emphasizes real-time performance and targeting to ensure that the acquired data is highly matched with the current calculation requirements.

[0012] As described in step S3 above, the system starts the preset rule matching engine and synchronously calls the pricing rule set built and verified in step S1 to build the data support foundation for rule matching. Then, using the order association data and configuration data preprocessed in step S2 as the matching benchmark, the system compares the basic configuration items and billing rule items of each template in the pricing rule set one by one according to the multi-dimensional attributes such as the module to which the order belongs, product attributes, and value-added service requirements. The system accurately selects candidate rules that meet all matching conditions. If there are multiple candidate rules, the system will load the preset priority configuration system and sort and filter them by extracting the associated priority attributes of the candidate rules (such as channel, customer, effective time, etc.). Finally, the rule with the highest priority is determined as the exclusive billing basis for the order. At the same time, the system records the rule matching process and the optimal rule selection logic and generates a matching log to ensure that the billing basis is traceable and to provide a guarantee for the accuracy of subsequent cost calculation.

[0013] As described in step S4 above, the system loads the order-specific billing basis determined in step S3, extracts core information such as billing mode identifier, calculation parameters, and unit benchmark, laying the foundation for calculation execution. Subsequently, it automatically adapts the corresponding billing mode (such as tiered pricing, combined billing, etc.) and preset calculation formula according to the billing mode identifier, clarifying the calculation logic of basic fees and additional fees. Then, it starts the batch parallel calculation mechanism to perform cost accounting for multiple orders simultaneously. At the same time, it automatically converts the weight and size units of data from different sources to the benchmark units in the billing basis, unifying data precision to ensure calculation accuracy. During the calculation process, an exception handling mechanism is triggered simultaneously. For orders without matching billing basis, the template library preset fallback configuration is enabled. For orders with missing data, the missing fields are marked and can be recalculated after data is added. For orders with fees exceeding the preset threshold, a secondary confirmation warning is triggered. Finally, the intermediate calculation results containing the details of miscellaneous fees for a single order and the total amount are output, providing complete data support for the result integration in step S5.

[0014] As described in step S5 above, the system integrates multiple types of core data, including the single order miscellaneous fee item details and total amount output in step S4, as well as the rule matching log in step S3 and the exception handling record in step S4, ensuring that the result dataset is complete and traceable. Subsequently, the dataset is structured according to a preset format to generate a clear order miscellaneous fee detail containing the miscellaneous fee name, calculation basis, amount, and total cost. The matching log and exception description are synchronized and associated. Next, multi-format export support is provided to meet users' local archiving and reconciliation needs such as Excel and CSV. Then, the structured results are synchronized to related systems such as financial settlement and order management in real time through a preset interface. During synchronization, a verification mark is carried to ensure the integrity of the transmission. Finally, the synchronization receipt from the related system is received to verify the data writing status. If the synchronization fails, a retry mechanism is triggered and the reason is recorded. The synchronization status is fed back to the user, and the closed-loop management of the entire miscellaneous fee quotation calculation process is finally completed.

[0015] In one embodiment, step S1, which involves constructing a multi-dimensional miscellaneous fee quotation template library and validating imported templates, wherein the templates have preset basic configuration items and billing rule items, automatically verify field integrity, data compliance, and range rationality, and storing valid templates in the library to form a set of callable quotation rules, and returning specific error messages for verification failures, includes: S11 generates standardized templates and supports custom extensions; S12, Receive template import request and parse data; S13, perform multi-dimensional automatic verification; S14, output the verification result and complete the template library update.

[0016] In its implementation, the construction of the multi-dimensional miscellaneous fee quotation template library is anchored to the entire business scenario of warehousing and logistics. First, a standardized template framework is generated based on industry-standard billing requirements. The template has two types of core configuration items: basic configuration items cover applicable scenario identifiers, such as "cross-border e-commerce outbound" and "domestic same-city delivery inbound", associated corresponding warehouse codes, logistics channel codes and other resource information, and support for multiple currencies such as CNY, USD, and EUR, as well as valid time intervals; billing rule items include billing unit types, such as "by weight (kg)", "by number of pieces", and "by volume (m³)", basic fee values, tiered pricing parameters, and additional service association identifiers, such as the additional fee rule IDs corresponding to "delivery upstairs" and "insurance service". At the same time, the template supports user-defined extensions, allowing the addition of fields according to special business needs. For example, for fresh food cold chain business, a "temperature control surcharge billing standard" field can be added and saved as a frequently used version to adapt to differentiated scenario requirements. When a user initiates a template import request, the system receives the file uploaded by the user using a preset Excel template format. It automatically parses the basic configuration information, billing rule parameters, and related matching conditions from the imported data, transforming the unstructured tabular data into structured data containing field names, values, and data types. Subsequently, the system initiates a multi-dimensional automatic verification mechanism to validate the structured data: Field integrity verification targets mandatory fields such as "Applicable Scenario Identifier," "Warehouse Code," and "Valid Time Interval" in the basic configuration items, and "Billing Unit Type" and "Basic Fee Value" in the billing rule items. If any mandatory field is missing, the verification fails. Data compliance verification focuses on the validity of numerical parameters, such as the basic fee value and tiered unit price, which must be positive numbers greater than 0 to prevent billing logic failures caused by negative or 0 values. It also checks the reasonableness of the time interval, ensuring that the effective time is not later than the expiration time to avoid situations like "Effective on 2025-01-01, Expired on 2024-12-31." The system checks for logical contradictions and ensures consistency between associated identifiers and the system's preset dictionary. For example, logistics channel codes must match the codes already registered in the system, such as "SF - SF Express" and "YT - YTO Express," to avoid invalid associations. The interval rationality check targets tiered pricing scenarios, verifying whether there are overlaps or breaks in weight, volume, and other tiered intervals. For instance, the boundaries between "0-5kg" and "5-10kg" in tiered pricing parameters must be continuous, and there should be no overlap between "0-6kg" and "5-10kg." After verification, the system performs differentiated result processing: if all verification items pass, the parsed structured data is categorized by "applicable scenario + logistics channel" and stored in the template library, forming a set of callable pricing rules. A unique rule ID is assigned to each rule for subsequent retrieval. If any verification fails, the system generates detailed prompts including the error type, error location, and correction suggestions, and sends them back to the user.

[0017] Taking the import of the US FBA warehouse outbound miscellaneous fee template in the cross-border e-commerce industry as an example, in the template uploaded by the user, the basic configuration items are filled with "Applicable scenario identifier: US FBA warehouse outbound, warehouse code: US-FBA-LA01, pricing currency: USD, effective time range: 2025-01-01 to 2025-12-31", and the billing rules items are filled with "Billing unit type: by weight kg, basic fee value: 2.5 USD, tiered pricing parameters: 0-10kg (2.5 USD / kg), 10-20kg (2.2 USD / kg), additional service association identifier: INS-001 (insurance service)". At the same time, a custom "fuel surcharge ratio" field is added and filled with "8%". After system analysis and validation, no issues were found with field completeness and data compliance. However, during the interval reasonableness validation, it was discovered that the user had mistakenly entered the stepped intervals as "0-10kg" and "11-20kg," creating a break in the 10-11kg interval. The system then returned a message stating, "The stepped intervals are discontinuous; it is recommended to correct '11-20kg' to '10-20kg'." After the user corrected the error and re-imported the data, validation passed, and the template was saved to the template library. This template can now be directly used for matching miscellaneous fee rules for outbound orders from the US FBA warehouse.

[0018] In one embodiment, step S2, which involves retrieving order-related data and configuration data in real time via a cross-system synchronization interface after receiving an external calculation request, includes: S21, Receive the calculation request and parse the order identifier; S22, initiate the cross-system synchronization interface to establish a data link; S23, targeted fetching of order-related data and configuration data; S24, Data preprocessing; S25, verify data integrity and output standardized data.

[0019] In its implementation, the system incorporates a lightweight request parser that automatically extracts core parameters from request messages. It focuses on parsing unique order identifiers (supporting single order numbers such as "ORD20250618001" or a list of batch order numbers), calculation range identifiers (such as "01-Outbound Miscellaneous Fees Only," "02-Full Process Miscellaneous Fees," "03-Value-Added Service Special Miscellaneous Fees"), data return timeliness requirements, and request initiator information. Simultaneously, the system collaborates with the permission management module to verify request legitimacy, checking the validity of the initiator's authentication token and the scope of calculation permissions. If a token expires or there is no corresponding order calculation permission, a 403 permission error response is immediately returned. If the request format is incorrect (e.g., a missing order identifier field), a 400 parameter error response is returned, thus preventing illegal requests and invalid data access from the source. Based on the order identifier and associated business attributes (such as the warehouse to which the order belongs and the logistics channel) obtained from S21 parsing, the system automatically matches and launches the corresponding interface in the preset cross-system synchronization interface pool. This interface supports high-concurrency real-time data transmission. After launch, it first completes two-way authentication with associated systems such as the Warehouse Management System (WMS), Order Management System (OMS), and Logistics Channel Configuration System. The system sends an authentication message containing the interface key and request timestamp to the associated systems. After the associated systems verify the authentication, they return a successful authentication receipt and simultaneously provide their own data transmission protocol version. After successful authentication, the system automatically establishes an encrypted data transmission link based on the SSL / TLS protocol and performs AES-256 encryption on all data during transmission to prevent security risks such as data leakage, tampering, or forgery. In the targeted data retrieval of order-related data and configuration data, the system initiates precise targeted data query requests to the associated systems based on the parsed order identifier, avoiding resource waste and efficiency loss caused by full data retrieval. The core data for targeted data capture is divided into two categories: one is order-related core data, which covers the business module to which the order belongs (such as "cross-border e-commerce FBA outbound" and "domestic same-city delivery inbound"), product attribute information (weight, length × width × height dimensions, product category code, number of pieces), value-added service requirements (such as insurance service level, delivery to upstairs requirements, temperature-controlled transportation requirements), warehouse area information (warehouse code, storage location type, whether it is a dangerous goods storage area), and order status (pending outbound, already in storage, in transit); the other is configuration data, including the latest billing configuration for the corresponding logistics channel (such as the basic freight rate update time and surcharge effective rules), warehouse operation parameters (such as outbound operation timeliness standards and storage fee rate benchmarks), and customer level configuration (such as VIP customer discount thresholds). During the data capture process, the system monitors the data transmission progress in real time. If a transmission timeout occurs (exceeding the preset 30-second threshold), the link reconnection mechanism is automatically triggered, supporting up to 3 reconnections. If the reconnection fails, an exception log is recorded and a data capture failure message is returned.In the data preprocessing stage, the system calls a preset data cleaning engine to standardize the captured raw data. First, it performs a format unification operation, converting heterogeneous data returned by different systems (such as weight units of "pounds" returned by WMS and weight units of "kilograms" returned by OMS) into the system's preset base units. At the same time, it unifies the date format to "YYYY-MM-DD HH:MM:SS" and retains two decimal places for numerical precision. Second, it performs data deduplication and invalid data removal, filtering duplicate data and removing obviously invalid data by using the order identifier + data field combination primary key. Finally, it performs data association and completion, associating and binding the product data, warehouse data, and value-added service data of the same order according to the order identifier to form a structured order data set. In the data integrity verification and standardized data output step, the system loads preset core field verification rules and performs integrity checks on the preprocessed order data set. The required core fields to be verified include order identifier, product weight, product size, warehouse code, logistics channel code, and value-added service requirement identifier. If any required field is missing, the system automatically marks the missing field name and triggers a supplementary entry prompt, initiating a secondary supplementary entry request to the corresponding business system through a cross-system interface. If the supplementary entry fails, the order is marked as "incomplete data" and added to the abnormal order queue, while recording the missing field information and the reason for the supplementary entry failure. After all required fields pass verification, the system generates a standardized order data file, stores it in JSON format and associates it with a unique data batch number, and synchronously pushes it to the input cache of the rule matching engine, completing the full-process data processing of step S2.

[0020] Taking the scenario of calculating miscellaneous fees for e-commerce orders from a large domestic warehousing and logistics company as an example, an e-commerce platform sends a batch calculation request to the system of this invention through the OMS system. The request message contains 100 order numbers (such as "ORD20250618001-ORD20250618100"), the calculation range identifier "02-Full Process Miscellaneous Fees", and the return timeliness requirement "Immediate Return". After parsing the order identifier, the system starts the synchronization interface with the WMS and logistics channel configuration system, and retrieves the product data (such as the product of order ORD20250618001 being a brand of home appliance, weighing 25kg, with a size of 0.12m³, and category code "JD001-Home Appliance"), warehouse information (warehouse code "WH003-East China Warehouse", ordinary storage location), value-added service requirements (delivery upstairs, service code "SV002"), and the latest billing configuration data of the corresponding logistics channel "YT-Yuantong". During the preprocessing stage, the system converted the weight unit of three orders from "pounds" to "kg" and removed one invalid order with a negative weight. During the integrity verification, it was found that two orders were missing "logistics channel codes". The system automatically supplemented the codes to the OMS system and obtained complete data. Finally, 99 standardized order data files were output and pushed to the rule matching engine. The whole process took 8 seconds and the data accuracy rate reached 100%.

[0021] In one embodiment, step S3, which involves activating a preset rule matching engine, invoking the set of pricing rules, matching the order-related data with the multi-dimensional attributes of the approved template, and if the order meets multiple pricing rules, selecting the optimal rule according to a preset priority to form the exclusive billing basis for the order, includes: S31, Start the rule matching engine and load the quotation rule set; S32, multi-dimensional attribute comparison and candidate filtering rules; S33, load the preset priority configuration system; S34, candidate rule priority weighted sorting operation; S35, determine the optimal rule as the basis for exclusive billing; S36, Generate rule matching and sorting logs.

[0022] In practical implementation, during the rule matching engine startup and rule set loading phases, the system automatically invokes the rule matching engine based on the standardized data batch number output in step S2. The engine adopts a dual-core architecture of "rule parser + matching executor," supporting parallel matching processing of high-concurrency orders. After the engine starts, it loads the quotation rule set that has passed the verification in step S1 through the template library retrieval interface. During the loading process, the rules are automatically categorized and indexed according to the dimensions of "applicable scenario + logistics channel," generating a temporary rule index table. The index keys include core attributes such as scenario identifier, channel code, and customer level, significantly improving the efficiency of subsequent matching and retrieval. At the same time, the engine performs validity verification on the loaded rule set, removing expired (current time exceeds the rule's validity period) and disabled rules to ensure that all rules participating in the matching are currently available. In the multi-dimensional attribute precise matching and candidate rule screening stage, the system uses the standardized order data output in step S2 as a benchmark to extract key matching attributes, including business scenario identifiers, such as cross-border e-commerce FBA outbound, logistics channel codes (e.g., "SF-SF International"), customer level (e.g., "VIP-Diamond"), product attributes (category code, weight range, size range), value-added service requirement identifiers (e.g., "insurance service-INS001"), and warehouse area codes. The matching executor performs matching based on a temporary rule index table, following a "coarse screening followed by fine screening" logic: first, coarse screening is performed using scenario identifiers and channel codes to quickly identify a subset of rules that fit the basic scenario of the current order; then, for each rule in the rule subset, the key order attributes are compared one by one with the rule's preset basic configuration items and billing rule items. Only when the order attributes completely meet all the matching conditions of the rule is the rule included in the candidate rule list. For example, a rule might pre-determine the following conditions: "Applicable scenario: cross-border e-commerce FBA outbound, channel code: SF-SF International, customer level: VIP and above, and product weight: 0-20kg". If the order data fully matches the above conditions, it will be included in the candidate rule; if the order weight is 25kg, which exceeds the rule's weight limit, it will be directly excluded. In the priority ranking and optimal rule selection process for multiple candidate rules, if the candidate rule list contains only one rule, the system will directly determine it as the exclusive billing basis for that order. If there are two or more candidate rules, the system will start the preset priority configuration system for ranking. This priority system adopts a flexible configuration mode of "fixed dimensions + custom weights" and presets three core ranking dimensions: channel priority (set by the enterprise according to the cooperation level, such as SF International priority level 8 and YTO International priority level 6), customer priority (set according to customer contribution value, such as diamond level 7, gold level 5 and ordinary level 3), and rule effective time priority (the newer the effective time, the higher the priority, quantified into a specific score by the difference in timestamps). At the same time, it supports enterprises to customize the weight ratio of each dimension according to business needs, such as the default configuration of channel priority 40%, customer priority 30%, and effective time priority 30%.The system automatically extracts the corresponding priority attribute of each candidate rule, performs weighted calculations according to preset weights, and obtains a comprehensive priority score for each rule. The score = channel priority score × weight 1 + customer priority score × weight 2 + effective time score × weight 3. The rules are then sorted in descending order of comprehensive score, and the rule with the highest score is selected as the exclusive billing basis for the order. In the billing basis determination and matching log generation stage, the system assigns a unique billing basis ID to the selected optimal rule, associating it with the corresponding rule ID, matching conditions, billing parameters, and other core information to form a structured exclusive billing basis. Simultaneously, the system automatically generates a rule matching log. The log content includes information such as order identifier, data batch number, number of rules participating in the matching, candidate rule list and matching conditions for each rule, priority score calculation process, optimal rule selection basis, and rule ID. The log is stored and named "order identifier + matching timestamp," supporting subsequent billing traceability and problem investigation.

[0023] Taking a VIP diamond-level customer order from a cross-border e-commerce company as an example, the standardized data for this order is as follows: scenario identifier "cross-border e-commerce FBA outbound", channel code "SF-SF International", customer level "VIP-Diamond", product weight 15kg, and value-added service "insurance service-INS001". During the rule matching process, the system initially screened out 3 candidate rules: Rule A (SF International, VIP customer, 0-20kg, insurance service, channel priority 8, customer priority 7, effective time 2025-01-01), Rule B (SF International, VIP customer, 0-20kg, no insurance service, channel priority 8, customer priority 7, effective time 2024-12-01), and Rule C (SF International, Gold and above customers, 0-18kg, insurance service, channel priority 8, customer priority 5, effective time 2025-01-01). The overall score is calculated using the default weights (channel 40%, customer 30%, effective time 30%): Rule A score = 8 × 40% + 7 × 30% + 98 (timestamp quantified score) × 30% = 3.2 + 2.1 + 29.4 = 34.7; Rule B score = 8 × 40% + 7 × 30% + 95 × 30% = 3.2 + 2.1 + 28.5 = 33.8; Rule C score = 8 × 40% + 5 × 30% + 98 × 30% = 3.2 + 1.5 + 29.4 = 34.1. The system sorts the scores in descending order. Rule A, with a score of 34.7, ranks first and is determined as the exclusive billing basis. The matching log fully records the above calculation process, which can be traced at any time. In one embodiment, step S4, which involves automatically adapting the corresponding billing mode and calculation formula based on the dedicated billing basis, initiating batch parallel calculations and supporting automatic unit conversion, and synchronously triggering an exception handling mechanism during the calculation process, includes: S41, loads the exclusive billing basis and extracts the core parameters; S42, Automatic Adaptation of Billing Mode and Calculation Formula; S43, initiate batch parallel calculations and unify unit precision; S44, synchronously triggers multi-scenario exception handling mechanism; S45 outputs the intermediate measurement results.

[0024] In practical implementation, during the dedicated billing basis loading and core parameter extraction phase, the system uses the billing basis ID to call the order-specific billing basis generated in step S3. A structured data parser is used to extract the core calculation elements, including billing mode identifiers such as "01-tiered pricing," "02-combination pricing," and "03-fixed unit price pricing," basic billing parameters such as basic unit price, starting surcharge, tiered range thresholds, and surcharge association rules such as fuel surcharge ratio, value-added service order, unit base (weight base kg, volume base m³), ​​and the requirement for two decimal places for fee precision. During extraction, the system automatically verifies the completeness of core parameters. If any parameters are missing or formatted incorrectly, such as a non-numerical basic unit price, it is marked as "invalid billing basis" and a backtracking mechanism is triggered, initiating a re-matching request to the rule matching engine to ensure the validity of the calculation basis. In the automatic billing mode and calculation formula adaptation phase, the system matches the corresponding billing logic and calculation formula based on the extracted billing mode identifier through a preset mode mapping table. Differentiated adaptation strategies are adopted for different billing models: Under the tiered pricing model, the mapping relationship between tier intervals and corresponding unit prices is automatically associated, and the segmented cumulative formula is loaded (total cost = Σ weight / volume of each tier interval × corresponding unit price + surcharge); Under the combined pricing model, a composite formula of "basic cost + surcharge" is adapted, where the basic cost is calculated based on a fixed unit price, and the surcharge is associated with the value-added service type, such as insurance calculated at 0.5% of the product value, and a fixed fee charged per item for delivery upstairs; Under the fixed unit price pricing model, the basic formula of "total cost = billable quantity × fixed unit price" is directly loaded. After the formula adaptation is completed, the system automatically substitutes the extracted billing parameters into the formula to generate a directly executable calculation script, ensuring the consistency of the calculation logic. In the batch parallel calculation and automatic unit conversion stage, the system adopts a multi-threaded parallel architecture to start batch order calculation, dynamically allocating thread resources according to the number of orders (10 parallel threads are used when the number of orders in a single batch is ≤1000, and automatically expanded to 20 threads when the number of orders exceeds 1000), which greatly improves the calculation efficiency. During the calculation process, an automatic unit conversion module is simultaneously activated to perform secondary standardization on heterogeneous unit data that still exists after S2 preprocessing. For example, residual units such as "gram (g)" and "pound (lb)" for some special product categories are uniformly converted to the standard unit "kilogram (kg)," and "cubic centimeter (cm³)" and "cubic foot (ft³)" are converted to "cubic meter (m³)." The conversion process strictly follows industry standard conversion factors (1lb=0.4536kg, 1ft³=0.0283m³), while retaining two decimal places of precision. During the calculation process, the system monitors the running status of each thread in real time and records the calculation results of each order's itemized costs (basic fee, surcharge, and other miscellaneous fees) to avoid calculation omissions caused by thread conflicts.The system incorporates a built-in exception monitoring engine that synchronizes the triggering and execution of exception handling mechanisms. During the calculation process, it scans the calculation data and execution status in real time, performing differentiated processing for three core exception scenarios: First, in scenarios where there is no matching billing basis, the system automatically calls the fallback configuration from the template library, adopts the industry benchmark billing standard for the corresponding business scenario, and marks it with a "fallback calculation" flag to ensure uninterrupted order calculation; Second, in scenarios where data is missing, the system automatically marks missing fields such as product value (required for insurance service calculation) and size data (required for volumetric pricing) discovered during the calculation process. If a field name is missing, a request to supplement it is sent to OMS / WMS through a cross-system interface. If the supplementation is successful, the order calculation will be re-executed. If the supplementation fails, the order will be added to the exception queue and a supplementation failure log will be generated. Thirdly, in the case of exceeding the cost limit, if the total amount of the order calculation exceeds the preset threshold (set according to customer level, such as 5,000 yuan for VIP customers and 3,000 yuan for ordinary customers), the system will automatically trigger a secondary confirmation warning, freeze the calculation results and push the warning information to the operation management platform. The results will be unlocked after the operation personnel approve it. If the approval fails, the calculation will be returned for recalculation. In the intermediate result output stage, after the exception handling is completed, the system performs structured integration of the calculation data for each order, generating intermediate calculation results that include order identifier, billing basis ID, itemized miscellaneous fee name (basic transportation fee, fuel surcharge, insurance fee, etc.), calculation basis (unit price, quantity, conversion process), itemized amount, total amount, calculation timestamp, and exception handling identifier (no exception / backup calculation / calculation after supplementation). This result is indexed by "data batch number + order identifier", stored in a temporary result database, and simultaneously pushed to the input cache area of ​​the result integration module.

[0025] Taking the e-commerce bulk order calculation scenario of a domestic integrated logistics company as an example, the system receives calculation requests for 1,500 e-commerce orders, including three categories: home appliances, daily necessities, and fresh produce. Some orders contain heterogeneous data with weight units in "pounds" and volume units in "cubic centimeters," and three orders lack the value data of goods required for insurance services. After loading the exclusive billing basis for each order, the system adapts the corresponding billing mode: home appliance orders (with larger weights) are adapted to a tiered pricing mode (0-20kg unit price 5 yuan / kg, over 20kg unit price 4.5 yuan / kg), daily necessities are adapted to a fixed unit price pricing mode (3 yuan / kg), and fresh produce (including temperature-controlled value-added services) is adapted to a combined pricing mode (basic unit price 6 yuan / kg + temperature control surcharge 2 yuan / kg). During the parallel calculation process, the "pounds" of 28 orders were automatically converted to "kg" and the "cubic centimeters" of 15 orders were converted to "m³". Supplementation requests were initiated for 3 orders with missing product values. The supplementation was successful for 2 orders and the calculation was completed. The supplementation failed and was added to the exception queue. A total cost of 6,800 yuan for a home appliance order was detected (exceeding the 5,000 yuan threshold for VIP customers), triggering a secondary confirmation warning.

[0026] In one embodiment, step S5, which involves automatically adapting the corresponding billing mode and calculation formula based on the dedicated billing basis, initiating batch parallel calculations and supporting automatic unit conversion, and synchronously triggering an exception handling mechanism during the calculation process, includes: S51 integrates core data across the entire process; S52, generate a structured list of order miscellaneous expenses and a summary of expenses; S53 provides support for exporting results in multiple formats; S54 triggers cross-system data synchronization transmission; S55 verifies the synchronization result and completes the process loop.

[0027] In the specific implementation, during the core data integration phase of the entire process, the system automatically retrieves key data from the entire process based on the batch number of the intermediate calculation results output in step S4, constructing a complete order miscellaneous fee calculation dataset. The integrated data dimensions cover three core information categories: first, core calculation result data, including the single-order itemized miscellaneous fee details generated in step S4, such as basic transportation fees, fuel surcharges, insurance fees, value-added service fees, etc., the total fee amount, the billing basis ID, and the calculation timestamp; second, rule matching traceability data, namely the rule matching log from step S3 (the number of participating matching rules, the candidate rule list, the optimal rule selection logic, and the priority score calculation process); and third, anomaly handling record data, including the anomaly types in step S4 (fallback calculation, data supplementation, fee exceeding limits), the processing process, and the processing result identifier. During the integration process, the system uses the "order identifier" as the core association key to link and bind the three types of data, automatically removing duplicate data and invalid redundant information, generating a structured integrated dataset, and assigning a unique result batch number to each dataset for subsequent full-process traceability.

[0028] In the structured results generation stage, the system loads a preset output template and standardizes the integrated dataset. The output template is designed according to the financial settlement standards of the warehousing and logistics industry, generating two core types of output content: one is a detailed order miscellaneous expense list, including fields such as order identifier, product information, name of each miscellaneous expense item, calculation basis (corresponding unit price, billing quantity, conversion process), item amount, expense tax rate, and total expense (including / excluding tax), ensuring the traceability of the calculation logic for each expense item; the other is a full batch result summary table, covering statistical information such as result batch number, total number of orders, number of successfully calculated orders, number of abnormal orders and distribution of abnormality types, and total batch expense amount, providing macro-level data support for operations management and financial reconciliation. After structured processing, the system automatically verifies the completeness of the output fields and data consistency. If there are missing fields or data contradictions (such as inconsistencies between the sum of item amounts and the total amount), a data reconstruction mechanism is triggered to retrieve the original data again to complete the integration and generation, ensuring the accuracy of the output results. The system supports multiple export formats, offering diverse export functions to suit different user scenarios. Supported export formats include Excel, CSV, and PDF. Excel and CSV formats are suitable for scenarios such as financial system reconciliation and secondary data analysis, preserving complete structured fields and calculation process data. PDF format is suitable for scenarios such as business voucher archiving and customer reconciliation confirmation, automatically generating standardized voucher templates, including the company's electronic signature location and order information QR code (scanning the code allows viewing the complete calculation process). Users can initiate export requests through the export function module on the system's front-end interface, selecting a single order, a specified order range, or all orders in a batch. The system dynamically allocates processing resources based on the number of orders requested. Exported files are automatically named with "Result Batch Number + Export Timestamp," and the system supports real-time display of export progress. Upon completion, users are notified via system message to download. For large batches of orders (more than 500), the system also supports breakpoint resume functionality to prevent export failures due to network interruptions. In the cross-system data synchronization and transmission phase, the system automatically initiates cross-system data synchronization services based on preset associated system configuration information. The associated systems covered in the synchronization encompass core warehousing and logistics systems, including the Order Management System (OMS), financial settlement system, and Customer Relationship Management System (CRM). Synchronized data fields from different systems are precisely matched through a preset field mapping table (e.g., mapping the "Summary Expenses" field to the "Amount of Miscellaneous Expenses Payable" field in the financial system). During the synchronization process, synchronized data is encapsulated and transmitted in JSON format. Before transmission, a data verification code is automatically added to each order data item for data integrity verification at the receiving end. The system supports flexible configuration of synchronization modes, allowing users to choose between real-time synchronization (synchronizing immediately after calculation) or scheduled batch synchronization (synchronizing at preset hourly / daily fixed time intervals) to meet the data timeliness requirements of different systems.In the synchronization result verification and closed-loop completion phase, the system receives synchronization receipts from various related systems in real time. It compares the data checksum in the receipt with a locally generated checksum to verify the integrity and accuracy of the synchronized data. If the verification passes, the order data is marked as "synchronized successfully," and the synchronization status log is updated. If the verification fails, such as due to missing data or a mismatched checksum, the system automatically records the reason for the failure, such as network interruption or receiving system anomaly, and triggers a tiered retry mechanism. The first failure initiates a retry immediately, and if it still fails, it retryes at preset intervals (5 minutes), supporting a maximum of 3 retries. After all 3 retries fail, the order is added to the synchronization anomaly queue, and an anomaly alarm is pushed to the operations management platform to remind operations personnel to intervene manually. After all order synchronization statuses are confirmed, the system generates a full batch synchronization result report, including the number of successfully synchronized orders, the number of failed orders, statistics on the reasons for failure, and handling suggestions, completing the closed-loop management of the entire S5 process.

[0029] Taking the monthly miscellaneous expense calculation scenario of a cross-border warehousing and logistics company as an example, after the system completes the miscellaneous expense calculation for 2,000 cross-border e-commerce orders in the current month, it proceeds to step S5 to process the results. The system first integrates the calculation details of these 2,000 orders (including six categories of expenses such as basic transportation fees, cross-border surcharges, and insurance fees), the rule matching logs from step S3, and the exception handling records from step S4 (five orders were fallback calculations, and three orders had completed data supplementation). It then generates a standardized order miscellaneous expense detail sheet and a monthly summary table in a structured manner. Subsequently, a finance staff member initiates a request to export the entire batch in Excel format. The system completes the export in 15 seconds and pushes a download notification. Simultaneously, the system initiates real-time synchronization according to the preset configuration, synchronizing the results to the OMS system and the financial settlement system. During the synchronization process, three orders failed to synchronize due to a temporary outage of the financial system. The system automatically triggered a retry mechanism, completing a second synchronization after the financial system recovered. Ultimately, all 2,000 orders in the batch were successfully synchronized. The entire S5 process took 28 seconds, with a 100% synchronization accuracy. The generated detailed statements and summary tables fully met the financial reconciliation requirements, and the synchronized data was seamlessly integrated into the subsequent settlement process.

[0030] Reference Figure 2 The diagram shows the structure of a multi-fee quotation automatic configuration and cost calculation device according to an embodiment of the present invention, comprising: The template library building and validation module is used to generate standardized templates that adapt to the entire warehousing and logistics process and support custom extensions. It parses data and performs validation. Templates that pass validation are stored in the template library to form a set of pricing rules, while those that fail validation return specific error messages. The data capture and preprocessing module is used to receive external calculation requests and parse order identifiers, start cross-system synchronization interfaces to capture order-related data and configuration data, perform data format unification, unit conversion and integrity verification, and output cleaned standardized data. The rule matching and priority sorting module is used to start the rule matching engine, call the set of pricing rules in the template library, filter candidate rules, load the preset priority configuration system, extract the priority attributes of candidate rules and perform weighted calculations, sort the rules by comprehensive score and select the best rule as the exclusive billing basis, and generate matching and sorting logs synchronously. The cost calculation and exception handling module is used to load exclusive billing basis, automatically adapt to the corresponding billing mode and calculation formula, start batch parallel calculation and complete the unified unit conversion. The results integration and synchronization module is used to integrate intermediate calculation results, matching logs and exception handling records, generate order miscellaneous fee details and summary fees in a structured manner, and provide multi-format export support.

[0031] In summary, the specific implementation of this invention revolves around the entire process of automatic configuration and accurate calculation of miscellaneous charges in warehousing and logistics. The core is to achieve a business closed loop through standardized data processing and intelligent logic execution. First, a multi-dimensional miscellaneous charge quotation template library adapted to all scenarios is constructed. Imported templates undergo field integrity, data compliance, and range rationality checks. After passing these checks, a set of callable quotation rules is formed, laying the foundation for subsequent processes. Upon receiving external calculation requests, order-related data and configuration data are retrieved via encrypted cross-system interfaces. After preprocessing and integrity checks such as format unification, unit conversion, deduplication, and completion, standardized data is output. Based on this data, a rule matching engine is activated to filter candidate rules from the quotation rule set. The optimal exclusive billing basis is determined by weighted sorting using a preset priority system, and matching logs are generated simultaneously to ensure traceability. Based on the exclusive billing basis, corresponding billing modes and calculation formulas are adapted, and batch calculations are performed using a multi-threaded parallel architecture, simultaneously completing automatic unit conversion and exception handling. Finally, the calculation results, matching logs, and anomaly records are integrated to generate structured detailed statements and summary tables, providing support for exporting in multiple formats. Simultaneously, encrypted synchronization to related business systems is implemented, and data flow reliability is ensured through verification and tiered retry mechanisms, achieving closed-loop management throughout the entire process. The entire implementation process automates, improves efficiency, and enhances the accuracy of miscellaneous expense calculations, significantly improving business workflow efficiency.

[0032] In this embodiment, the specific implementation of each unit in the above device embodiment is described in the above method embodiment, and will not be repeated here.

[0033] An embodiment of the present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. It is understood that the computer-readable storage medium in this embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.

[0034] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the present invention and embodiments can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual-rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM, etc.

[0035] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, apparatus, article, or method that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, apparatus, article, or method. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, apparatus, article, or method that includes that element.

[0036] The above description is only a preferred embodiment of the present invention and does not limit the patent scope of the present invention. Any equivalent structural or procedural transformations made based on the content of the present invention specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of the present invention.

Claims

1. A method for automatically configuring and calculating multiple miscellaneous fees, characterized in that, Includes the following steps: A multi-dimensional miscellaneous fee quotation template library is constructed and imported templates are verified. The templates are preset with basic configuration items and billing rule items. The integrity of fields, data compliance and reasonableness of ranges are automatically verified. Templates that pass the verification are stored in the library to form a set of callable quotation rules. Specific error messages are returned if the verification fails. Upon receiving an external calculation request, order-related data and configuration data are retrieved in real time through a cross-system synchronization interface; The preset rule matching engine is activated, the set of pricing rules is called, and the order-related data is matched with the multi-dimensional attributes of the approved template. If the order meets multiple pricing rules, the optimal rule is selected according to the preset priority to form the exclusive billing basis for the order. Based on the exclusive billing basis, the corresponding billing mode and calculation formula are automatically adapted, batch parallel calculation is started and automatic unit conversion is supported. An exception handling mechanism is triggered synchronously during the calculation process. After the calculation and exception handling are completed, a detailed list of order miscellaneous expenses, a summary of expenses, and a rule matching log are generated. The results can be exported and synchronized to related systems.

2. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 1, characterized in that, The steps of constructing a multi-dimensional miscellaneous fee quotation template library and validating imported templates, wherein the templates have preset basic configuration items and billing rule items, automatically verify field integrity, data compliance, and range rationality, and storing templates that pass verification into the library to form a set of callable quotation rules, and returning specific error messages for verification failures, include: Based on the needs of the entire warehousing and logistics process, a standardized template containing basic configuration items and billing rules items is generated, while allowing users to add special billing fields and save frequently used versions; Receive user requests uploaded based on the above template format and parse the imported content into structured data; Complete the following checks in sequence: complete the integrity checks of required fields, verify the compliance of numerical or time data, and verify the reasonableness of tiered ranges. If the validation passes, the structured data will be stored in the template library to form a set of pricing rules; if the validation fails, a prompt containing the error type and correction suggestions will be returned.

3. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 1, characterized in that, The step of receiving an external calculation request and then retrieving order-related data and configuration data in real time through a cross-system synchronization interface includes: Receive a calculation request containing a set of orders or a single order identifier, parse out the unique identifier of the order and the calculation range, and identify the target object of the data to be captured; Based on the parsed order identifier, a preset synchronization interface with the associated business system is triggered to request order-related data and configuration data. Real-time data on order module, product attributes, value-added service requirements, warehouse information, and channel configuration can be retrieved from related business systems. The system standardizes the format of the captured cross-system data, automatically converts weight or size units and unifies data precision, and removes duplicate or invalid data. Verify whether core data is missing. If key fields are missing, mark the missing items and trigger a supplementary entry prompt. Once the data verification is successful, it serves as the basic input for rule matching and cost calculation.

4. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 1, characterized in that, The steps of activating the preset rule matching engine, calling the pricing rule set, matching the order-related data with the multi-dimensional attributes of the approved template, and if the order meets multiple pricing rules, selecting the optimal rule according to preset priority to form the exclusive billing basis for the order include: Trigger the preset rule matching engine to call the set of validated pricing rules in the template library; Based on the cleaned order association data, the basic configuration items and billing rule items of the pricing rules are compared one by one according to the module to which the order belongs, the attributes of the goods, the value-added service requirements, etc., and candidate rules that meet all matching conditions are selected. If there are multiple candidate rules, they are sorted according to the pre-configured priority, and the rule with the highest priority is selected as the basis for order-specific billing. Record the rule matching process and store it in conjunction with the dedicated billing basis.

5. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 4, characterized in that, The step of sorting multiple candidate rules based on pre-configured priorities and selecting the rule with the highest priority as the basis for order-specific billing includes: The system invokes the priority rules pre-configured by the system. The configuration system includes at least three core dimensions: channel priority, customer priority, and rule effective time priority, and supports users to customize the weight ratio of each dimension. For each candidate rule, extract its associated channel priority value, corresponding customer priority level, and rule effective timestamp to form a priority attribute set for each candidate rule; The priority attributes of the candidate rules are weighted according to preset weights to obtain the comprehensive priority score of each candidate rule; among them, the higher the channel priority value, the higher the customer priority level, and the more recent the effective time, the higher the corresponding score. Sort the candidate rules in descending order of their overall priority scores, select the candidate rule with the highest score as the basis for order-specific billing, and synchronously record the score of each candidate rule, the contribution value of the sorting dimension, and the optimal rule selection logic to form a priority sorting log.

6. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 1, characterized in that, The steps of automatically adapting the corresponding billing mode and calculation formula based on the exclusive billing basis, initiating batch parallel calculations and supporting automatic unit conversion, and synchronously triggering an exception handling mechanism during the calculation process include: The dedicated billing basis is invoked to extract the billing mode identifier, calculation parameters, and unit benchmark. Based on the billing mode identifier, match the corresponding tiered pricing, combined billing, and other modes, and synchronously call the preset calculation formula to clarify the calculation logic of basic fees and additional fees; Based on the adapted formula, batch order parallel calculation is started, and the weight or size units of data from different sources are automatically converted to the base unit in the billing basis. After unifying the data accuracy, the cost calculation is completed. During the calculation process, abnormal situations are monitored in real time. When there is no matching billing basis, the template library is used as a fallback configuration. When data is missing, the field is marked and recalculation is supported after data is added. When the cost exceeds the preset threshold, a secondary confirmation warning is triggered. After the exception is handled, a detailed breakdown of miscellaneous expenses for each order and a summary amount are generated and linked to the exception handling record.

7. The method for automatic configuration and cost calculation of multiple miscellaneous fees according to claim 1, characterized in that, After the calculations and anomaly handling are completed, the following steps are taken to generate order miscellaneous expense details, summary costs, and rule matching logs, supporting result export and synchronization to related systems: Summarize miscellaneous expense details, summarize expense and rule matching logs, and exception handling records to form a dataset of order miscellaneous expense calculation results; Organize the dataset according to the preset format to generate a detailed list of miscellaneous expenses for orders, including the name of the miscellaneous expenses, the basis for calculation, the amount, and the total cost. Supports exporting structured results in a preset format, with the exported file linked to a unique order identifier; The structured results are synchronized to the associated system in real time through a preset interface, with data verification identifiers carried during synchronization. Receive acknowledgments from associated systems and verify the write status. If synchronization fails, trigger a retry, record the reason, and return a synchronization status prompt.

8. A device for automatically configuring and calculating multiple miscellaneous fees, characterized in that, include: The template library building and validation module is used to generate standardized templates that adapt to the entire warehousing and logistics process and support custom extensions. It parses data and performs validation. Templates that pass validation are stored in the template library to form a set of pricing rules, while those that fail validation return specific error messages. The data capture and preprocessing module is used to receive external calculation requests and parse order identifiers, start cross-system synchronization interfaces to capture order-related data and configuration data, perform data format unification, unit conversion and integrity verification, and output cleaned standardized data. The rule matching and priority sorting module is used to start the rule matching engine, call the set of pricing rules in the template library, filter candidate rules, load the preset priority configuration system, extract the priority attributes of candidate rules and perform weighted calculations, sort the rules by comprehensive score and select the best rule as the exclusive billing basis, and generate matching and sorting logs synchronously. The cost calculation and exception handling module is used to load exclusive billing basis, automatically adapt to the corresponding billing mode and calculation formula, start batch parallel calculation and complete the unified unit conversion. The results integration and synchronization module is used to integrate intermediate calculation results, matching logs and exception handling records, generate order miscellaneous fee details and summary fees in a structured manner, and provide multi-format export support.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method for automatic configuration and cost calculation of miscellaneous charges as described in any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the method for automatic configuration and cost calculation of miscellaneous charges as described in any one of claims 1 to 7.