A charging data automatic processing system and method supporting a multi-terminal architecture

By using IoT data acquisition terminals and integrated management and control interface modules, the system achieves unified processing of heterogeneous data from multiple terminals. It configures a billing rule base to support dynamic updates and utilizes multi-rule parallel matching algorithms and directed graph data structures to control the billing time sequence. This solves the problems of data fusion, rule solidification, and time sequence conflicts in multi-terminal billing systems, thereby improving the accuracy and efficiency of billing data.

CN122509908APending Publication Date: 2026-08-04COSCO SHIPPING PORTS INVESTMENTS (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
COSCO SHIPPING PORTS INVESTMENTS (SHANGHAI) CO LTD
Filing Date
2026-05-15
Publication Date
2026-08-04

AI Technical Summary

Technical Problem

Existing port billing systems face challenges in multi-terminal architecture, including difficulties in integrating heterogeneous data from multiple terminals, rigid billing rules leading to insufficient system flexibility, and billing timeline conflicts. These issues result in low efficiency in acquiring billing data, long rule adjustment cycles, and poor accuracy, making it difficult to adapt to the diversified business needs of port groups.

Method used

The system uses IoT data acquisition terminals to collect multi-source heterogeneous data in real time, achieves unified data format conversion through an integrated management and control interface module, configures a billing rule base to support dynamic rule updates, uses a multi-rule parallel matching algorithm for condition evaluation, constructs a directed graph data structure to control the billing time sequence, and integrates a data display and push module to achieve the accuracy and efficiency of billing results.

Benefits of technology

It enables automatic collection and unified processing of heterogeneous data from multiple terminals, supports dynamic configuration of billing rules, avoids billing order confusion, improves billing accuracy and efficiency, and adapts to the rapidly changing business needs of the port group.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122509908A_ABST
    Figure CN122509908A_ABST
Patent Text Reader

Abstract

The application discloses a kind of charging data automatic processing system and method supporting multi-port architecture, it is related to port information technology field.The system includes internet of things collection terminal, management and control integrated interface module, charging rule configuration engine, data preprocessing server, charging calculation engine, charging time sequence control module and data display and push module.The method is through internet of things terminal real-time acquisition multi-source heterogeneous data, after pre-processing, with the unified format data extracted from each business system is matched, uses multi-rule parallel matching algorithm to calculate charging amount, and based on ship scheduling plan, directed graph is constructed to carry out topological sorting, generates conflict-free charging event execution sequence.The application realizes the automatic fusion of multi-port heterogeneous data, the dynamic configuration of charging rule and the intelligent scheduling of charging time sequence, improves charging accuracy and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of port information technology, and specifically to an automatic billing data processing system and method that supports multi-terminal architecture. Background Technology

[0002] Port operation billing is a core part of port operation and management, covering the entire process of cargo loading and unloading, storage management, ship berthing and tugboat services. Its accuracy and efficiency directly affect the port's operating benefits and customer satisfaction.

[0003] Traditional billing systems typically employ a fixed rule design, embedding billing logic directly into the application code. They also rely on manual collection and input of operational data, a approach that has proven severely limited in the context of increasingly complex port operations. With the continuous expansion of port group operations and the significant increase in the number of its subsidiaries, billing systems face multiple technical challenges.

[0004] First, the difficulty of integrating heterogeneous data from multiple terminals has become a significant bottleneck. Each terminal typically deploys its own terminal operating system, enterprise resource planning system, and contract management system. These systems are provided by different vendors and employ differentiated technical architectures, data models, and communication protocols. For example, some terminals use relational databases while others use unstructured data storage, with varying field naming rules, timestamp formats, and unit of measurement standards. This results in critical data required for billing, such as workload, vessel dynamics, and customer contracts, being scattered across multiple isolated systems. Due to the lack of unified data exchange standards and integration mechanisms, billing personnel are forced to collect data offline through methods such as file export and email transmission, followed by manual entry and format conversion. This inefficient data processing method is not only time-consuming and labor-intensive but also highly susceptible to human error, failing to meet the stringent requirements of modern ports for the real-time performance, completeness, and accuracy of billing data.

[0005] Secondly, the rigid billing rules severely restrict system flexibility. In traditional architectures, various rate rules and calculation logic are hard-coded into the application. When port business rules are adjusted (such as adding billing items, modifying rate standards, or adapting to new customer agreements), professional developers must modify the source code, recompile, and deploy the entire system. This process typically takes several weeks and involves rigorous testing and verification, resulting in slow response to business changes and difficulty in matching the rapidly changing and diversified business needs of port groups. For example, when holiday storage rates are temporarily adjusted or special cargo handling fees are added, the system cannot take effect in a timely manner, causing billing discrepancies and customer disputes. Thirdly, the problem of billing sequence conflicts in multi-terminal collaborative operations is becoming increasingly prominent. In cross-terminal operation scenarios, the same cargo may undergo continuous operations at multiple terminals, such as unloading at Terminal A, storage at Terminal B, and loading at Terminal C. The billing events at each stage have strict temporal dependencies. Traditional billing systems lack intelligent scheduling mechanisms and cannot automatically identify and handle these dependencies, often requiring manual intervention to determine the billing order. In practice, due to dynamic changes in work progress and delays in information transmission, the billing order is easily reversed. For example, the outbound operation fee may be mistakenly triggered before the storage fee is calculated, resulting in the same goods being billed twice or key links being omitted from the billing, causing financial losses and customer complaints.

[0006] Finally, the tightly coupled architecture between systems limits overall performance. Some existing solutions deeply integrate billing functions into the terminal operating system, forming a tightly coupled architecture. This design causes the billing module and the terminal operation logic to be mutually constrained. On the one hand, it limits the terminal operating system's ability to expand its functions according to operational needs; on the other hand, it makes the billing function subject to the operating system's performance bottlenecks and version updates, resulting in low billing processing efficiency and difficulty in guaranteeing the accuracy of calculation results.

[0007] Therefore, the industry urgently needs a new billing data processing solution that can effectively support multi-terminal architecture, achieve seamless integration of heterogeneous system data, provide dynamic configuration capabilities for billing rules, and have an intelligent scheduling mechanism for billing time series, in order to solve the aforementioned long-standing technical challenges. Summary of the Invention

[0008] The purpose of this application is to provide an automatic billing data processing system and method that supports a multi-terminal architecture. It has the advantages of automatic collection and unified processing of heterogeneous data from multiple terminals, support for dynamic configuration of billing rules, avoidance of billing order disorder, and improvement of billing accuracy and efficiency.

[0009] In a first aspect, the present invention provides an automatic billing data processing system supporting a multi-terminal architecture, comprising: An IoT data collection terminal is deployed at at least two terminals. The IoT data collection terminal includes a work counting sensor installed on the loading and unloading equipment, a mass sensor installed on the weighbridge, and a license plate recognition device installed at the gate. It is used to collect multi-source heterogeneous data generated by each terminal during port operations in real time, and upload the collected multi-source heterogeneous data to a data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data, and vehicle weighing data. The integrated management and control interface module connects to the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries. It is used to extract agreement data, rate data and customer profile data from each system, and use preset mapping rules to convert heterogeneous data from different business systems into data objects in a unified format. The billing rule configuration engine is used to store and manage a configurable billing rule library. Each rule in the billing rule library is stored in JSON format, containing trigger condition items and corresponding billing rate expressions, and supports dynamic addition, deletion, modification and query of rules. A data preprocessing server, connected to the IoT acquisition terminal, is used to perform data cleaning and format standardization processing on the multi-source heterogeneous data to obtain standardized billing basic data. The billing calculation engine is connected to the data preprocessing server, the integrated management and control interface module, and the billing rule configuration engine, respectively. It is used to match the standardized billing basic data with the rule expressions in the billing rule library and calculate the billing amount of each terminal based on the matching results. The billing calculation engine is configured with a multi-rule parallel matching algorithm, which can evaluate multiple rule expressions at the same time and calculate the comprehensive billing result. The billing timing control module, connected to the billing calculation engine, is used to construct a directed graph data structure based on the ship scheduling plan and use the linked list algorithm of the data structure to generate the execution order of multi-terminal billing events, so as to avoid duplicate billing or omission of billing due to disordered billing order. The data display and push module is connected to the billing calculation engine and is used to push the billing calculation results to the port group's financial settlement system and customer service system through the communication interface, and display the billing details of each terminal on the visualization terminal.

[0010] Secondly, the present invention also provides an automatic billing data processing method supporting a multi-terminal architecture, applied to the above-mentioned system, comprising the following steps: S1. Collect multi-source heterogeneous data generated by each terminal during port operations in real time through IoT collection terminals deployed at at least two terminals, and upload the collected multi-source heterogeneous data to the data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data and vehicle weighing data. S2. Perform data cleaning and format standardization processing on the multi-source heterogeneous data to obtain standardized billing basic data; S3. Through the integrated management and control interface module, agreement data, rate data and customer file data are extracted from the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries, respectively, and the heterogeneous data from different business systems are converted into data objects in a unified format using preset mapping rules. S4. Build a configurable billing rule library and store the billing rules in JSON format in the billing rule configuration engine. Each rule contains trigger condition items and corresponding billing rate expressions. S5. The standardized billing base data obtained in S2 is matched with the rule expressions in the billing rule base obtained in S4. A multi-rule parallel matching algorithm is used to evaluate multiple rule expressions simultaneously, and the billing amount of each terminal is calculated based on the matching results. S6. Construct a directed graph data structure based on the ship scheduling plan, use the linked list algorithm of the data structure to generate the execution order of multi-terminal billing events, and the scheduling billing calculation engine executes the billing calculation step by step according to the execution order; S7. The billing calculation results of S5 are pushed to the port group's financial settlement system and customer service system through the communication interface, and the billing details of each terminal are displayed on the visualization terminal.

[0011] As can be seen from the above, the billing data automatic processing system and method provided in this application, which supports a multi-terminal architecture, automatically collects multi-source heterogeneous data by deploying IoT acquisition terminals, unifies the data format by using an integrated management and control interface module, configures a billing rule base to support dynamic rule updates, applies a multi-rule parallel matching algorithm for condition evaluation, and constructs a directed graph data structure to control the billing sequence. This solves problems such as difficulty in multi-terminal data fusion, slow response of rule solidification, and billing sequence conflicts. It has the advantages of realizing automatic collection and unified processing of heterogeneous data from multiple terminals, supporting dynamic configuration of billing rules, avoiding billing sequence disorder, and improving billing accuracy and efficiency. Attached Figure Description

[0012] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram of the structure of an automatic billing data processing system supporting a multi-terminal architecture according to an embodiment of the present invention; Figure 2 This is a flowchart illustrating an automatic billing data processing method supporting a multi-terminal architecture according to an embodiment of the present invention. Detailed Implementation

[0014] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0015] Traditional port billing systems, in a multi-terminal architecture, face several technical challenges, including difficulty in integrating heterogeneous data from multiple terminals, insufficient system scalability due to rigid billing rules, duplicate or missed billing caused by billing timeline conflicts between multiple terminals, and limited billing efficiency due to tight coupling between systems. These problems result in low efficiency in acquiring billing data, long rule adjustment cycles, and poor billing accuracy, making it difficult to adapt to the flexible needs of port groups' diversified business development.

[0016] In this regard, such as Figure 1 As shown, this application proposes an automatic billing data processing system supporting a multi-terminal architecture, comprising: The IoT data collection terminals are deployed at at least two terminals. These terminals include operation counting sensors installed on loading and unloading equipment, mass sensors installed on weighbridges, and license plate recognition devices installed at gates. They are used to collect multi-source heterogeneous data generated by each terminal during port operations in real time, and upload the collected multi-source heterogeneous data to a data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data, and vehicle weighing data. The integrated management and control interface module connects to the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries. It is used to extract agreement data, rate data and customer profile data from each system, and use preset mapping rules to convert heterogeneous data from different business systems into data objects in a unified format. The billing rule configuration engine is used to store and manage a configurable billing rule library. Each rule in the billing rule library is stored in JSON format, containing trigger conditions and corresponding billing rate expressions, and supports dynamic addition, deletion, modification and query of rules. The data preprocessing server, connected to the IoT acquisition terminal, is used to perform data cleaning and format standardization on multi-source heterogeneous data to obtain standardized billing base data; The billing calculation engine is connected to the data preprocessing server, the integrated management and control interface module, and the billing rule configuration engine, respectively. It is used to match the standardized billing basic data with the rule expressions in the billing rule library and calculate the billing amount for each terminal based on the matching results. The billing calculation engine is equipped with a multi-rule parallel matching algorithm, which can evaluate multiple rule expressions at the same time and calculate the comprehensive billing result. The billing timing control module, connected to the billing calculation engine, is used to construct a directed graph data structure based on the ship scheduling plan. It uses a linked list algorithm to generate the execution order of billing events at multiple terminals, avoiding duplicate billing or omissions caused by disordered billing order. The data display and push module is connected to the billing calculation engine. It is used to push the billing calculation results to the port group's financial settlement system and customer service system through the communication interface, and to display the billing details of each terminal on the visualization terminal.

[0017] Among them, the Internet of Things (IoT) data acquisition terminal refers to a collection of intelligent devices deployed at port terminals to sense and acquire port operation-related data in real time. This terminal uses various sensors and identification devices to convert physical world operational information into processable digital signals.

[0018] Multi-source heterogeneous data refers to various types of data generated by different systems and equipment during port operations, which differ in data format, structure, or semantics. This data may originate from multiple business processes such as loading and unloading operations, ship dynamics, cargo storage, and vehicle entry and exit.

[0019] The integrated management and control interface module is middleware responsible for connecting different business systems within the port group (such as ERP, TOS, and contract management systems). Its main function is to extract, transform, and integrate data between different systems, ensuring smooth data flow.

[0020] A billing rule configuration engine is a software component specifically designed for storing, managing, and dynamically adjusting billing rules. This engine allows users to define and modify billing logic in a non-programming manner, thereby improving system flexibility and maintainability.

[0021] The billing rule base refers to a collection of rules maintained by the billing rule configuration engine and stored in a specific format (such as JSON). Each rule typically contains the conditions that trigger billing and the corresponding rate calculation expression.

[0022] A data preprocessing server is a computing unit that receives raw collected data and performs preliminary processing on it. This server performs operations such as data cleaning and format conversion to improve data quality and consistency, providing reliable input for subsequent billing calculations.

[0023] Standardized billing base data refers to a set of data that has been cleaned and standardized by a data preprocessing server, conforming to unified data standards and specifications. This data is the direct basis for the billing calculation engine to perform billing calculations.

[0024] The billing calculation engine is the core processing unit responsible for executing billing logic based on preset rules and standardized data. This engine calculates the charges payable for each task by matching conditions and applying rate expressions.

[0025] The multi-rule parallel matching algorithm is a high-efficiency algorithm used within the billing calculation engine, capable of simultaneously evaluating and matching multiple billing rules. This algorithm aims to improve computational efficiency in complex billing scenarios and handle situations where multiple rules are matched simultaneously.

[0026] The billing sequence control module is responsible for managing and scheduling the execution order of billing events across multiple terminals. This module analyzes the dependencies between billing events to generate a conflict-free execution sequence, thus avoiding billing errors.

[0027] A directed graph data structure is a data model consisting of nodes (representing billing events) and directed edges (representing dependencies between events). This structure can intuitively represent the sequence and logical relationships of billing events.

[0028] Linked list algorithms are algorithms applied to directed graph data structures, such as topological sorting algorithms. These algorithms determine the linear order of nodes in a directed graph, thereby generating the correct execution sequence of billing events.

[0029] The data display and push module is responsible for visualizing the billing calculation results and sending them to other relevant business systems. This module ensures that billing information can be accessed and used effectively in a timely manner.

[0030] This embodiment provides an automated billing data processing system that supports multi-terminal architecture. By integrating various functional modules, this system aims to automate and intelligently process port billing.

[0031] First, the system deploys IoT data acquisition terminals. These terminals are configured at at least two terminal sites and integrate various sensors and identification devices. For example, operation counting sensors can be installed on loading and unloading equipment to record the number of operations; weight sensors can be installed on weighbridges to measure cargo weight; and license plate recognition devices can be installed at gates to identify vehicles entering and exiting. These devices work together to collect multi-source heterogeneous data generated by each terminal during port operations in real time, such as loading and unloading operation data, ship entry and exit data, cargo storage data, and vehicle weighing data. The collected raw data is transmitted to a data preprocessing server via industrial Ethernet.

[0032] Secondly, the system includes an integrated management and control interface module. This module is responsible for data interaction with the existing business systems of the port group headquarters and its various terminal subsidiaries, such as the ERP system, TOS system, and contract management system. The integrated management and control interface module extracts the necessary agreement data, rate data, and customer profile data from these systems. Since the data formats of different business systems may differ, this module uses preset mapping rules to transform the extracted heterogeneous data into data objects of a unified format for subsequent processing.

[0033] Furthermore, the system includes a billing rule configuration engine. The core function of this engine is to store and manage a configurable billing rule library. Each rule in the library is stored in JSON format, and each rule contains conditions for triggering billing and a corresponding billing rate expression. The engine supports dynamic addition, deletion, modification, and querying of rules, allowing for flexible adjustments to the billing logic.

[0034] Furthermore, the system is equipped with a data preprocessing server. This server connects to the IoT data acquisition terminals and receives multi-source heterogeneous data from various terminals. The data preprocessing server performs data cleaning and format standardization on this data. Data cleaning operations may include removing duplicate data, correcting erroneous data, or filling in missing data; format standardization unifies data from different sources and in different formats into a standard format, ultimately generating standardized billing base data.

[0035] In addition, the system includes a billing calculation engine. This engine is the core of the billing process and is connected to the data preprocessing server, the integrated management and control interface module, and the billing rule configuration engine. The billing calculation engine receives standardized basic billing data and matches it against rule expressions in the billing rule base. Based on the matching results, the engine calculates the billing amount for each terminal. To improve computational efficiency, the billing calculation engine is equipped with a multi-rule parallel matching algorithm. This algorithm can simultaneously evaluate multiple rule expressions and calculate the cost based on the evaluation results of these rules. For example, for a billing event, the algorithm can simultaneously check multiple applicable billing rules and calculate the cost based on the evaluation results of these rules.

[0036] Meanwhile, the system integrates a billing sequence control module. This module connects to the billing calculation engine, and its main function is to manage the execution order of billing events across multiple terminals. This module constructs a directed graph data structure based on the vessel scheduling plan, which represents the dependencies between billing events. Subsequently, using a linked list algorithm, the module generates an execution sequence of billing events across multiple terminals to ensure the logical correctness of the billing process and avoid duplicate or missed billing due to improper billing order. For example, when processing vessel billing involving operations at multiple terminals, this module can ensure that berthing fees are calculated first, then loading and unloading fees, and finally storage fees, to conform to actual business logic.

[0037] Finally, the system includes a data display and push module. This module connects to the billing calculation engine and is responsible for outputting the final billing calculation results. Specifically, this module pushes the billing results to the port group's financial settlement system and customer service system via a communication interface, enabling the sharing and flow of billing information. Simultaneously, this module also displays the billing details for each terminal on a visual terminal for easy user access and management.

[0038] The system proposed in this embodiment effectively solves the problem of difficult integration of heterogeneous data from multiple terminals by using an IoT data acquisition terminal and an integrated management and control interface module, achieving automatic acquisition and unified integration of billing data. Through a billing rule configuration engine, flexible configuration and dynamic updates of billing rules are achieved, overcoming the insufficient system scalability caused by rigid rules. Simultaneously, the application of a billing timing control module effectively avoids duplicate or missed billing caused by multi-terminal billing timing conflicts, significantly improving the accuracy and automation level of billing.

[0039] In one alternative implementation, the IoT data acquisition terminal also includes an AIS ship identification terminal, deployed at each dock berth, for automatically acquiring ship berthing and departure time data.

[0040] Specifically, an AIS (Automatic Identification System) vessel identification terminal is an automatic identification system capable of receiving dynamic information broadcast by vessels (such as position, speed, and heading), static information (such as name, call sign, and IMO number), and voyage-related information. Through continuous monitoring and analysis of this real-time data, the dynamic status of a vessel can be accurately determined, including the precise time of its entry into or departure from a specific area (such as a berth). This terminal typically consists of an AIS receiver, a data processing unit, and a communication interface, capable of decoding the received raw AIS signal and extracting structured vessel information. Deploying AIS vessel identification terminals at various berths means that the terminals are installed close to the area where the vessel is actually docked. This close-range deployment ensures the stability and accuracy of AIS signal reception, reduces signal attenuation or interference, and thus more reliably captures the precise dynamics of vessels within the berth area. For example, it can be installed on quay cranes, lighthouses, or dedicated monitoring masts near the berth to achieve optimal signal coverage and data acquisition. The AIS (Autonomous Identification System) vessel identification terminal continuously monitors a vessel's AIS signal, particularly its position, speed, and status information. Combined with preset berth geofences or virtual boundaries, it can automatically identify when a vessel enters the berth area and stops moving (berthing) and when it leaves the berth area and begins moving (departure). For example, when a vessel's AIS position data remains within the geofence of a berth for a continuous period and its speed is below a preset threshold, the system automatically records this as berthing time; when the vessel leaves the geofence and its speed exceeds the preset threshold, it records this as departure time. This automated mechanism avoids manual intervention, ensuring the objectivity and accuracy of the time data.

[0041] By adding AIS vessel identification terminals to the IoT data acquisition terminals and deploying them at various terminal berths, this system can achieve automated and high-precision acquisition of vessel berthing and departure times. This automated data acquisition method effectively solves the problems of large errors, low efficiency, and easy omissions that exist in traditional manual recording or reliance on non-automated methods to obtain vessel arrival and departure time data. Specifically, the AIS vessel identification terminal receives the precise location and status information broadcast by the vessel in real time. Combined with geofencing technology for the berth area, it can accurately determine the precise time of the vessel's entry and departure from the berth, thus providing reliable and error-free basic data for related billing items such as vessel berthing fees and terminal usage fees. This not only significantly improves the accuracy and real-time nature of billing data and reduces billing disputes caused by inaccurate data, but also greatly improves the automation level and operational efficiency of port billing operations. This allows the billing calculation engine to perform billing based on more accurate raw data, ensuring the fairness and transparency of billing processing in a multi-terminal architecture.

[0042] In one alternative implementation, the billing rule configuration engine provides a visual rule configuration interface, through which users can add, delete, modify, and query billing rules without modifying the underlying code.

[0043] Specifically, the visual rule configuration interface can be a web-based application or a module integrated into the port group's internal management platform. This interface is designed to be intuitive and easy to use, presenting various parameters of the billing rules graphically. For example, users can select predefined trigger conditions such as vessel type, cargo type, and operation type via drop-down menus; enter specific values ​​or strings such as rate amount and time range via text boxes; and combine logical operations using checkboxes or drag-and-drop components to construct complex trigger conditions. Billing rate expressions can also be configured via forms on the interface, supporting selection of a single rate, tiered rates, or dynamic rate modes based on decision logic, and inputting the corresponding rate parameters.

[0044] When a user needs to add a new billing rule, they can fill in all the necessary rule information on the visual rule configuration interface and click the "Save" button. The system will convert this information into JSON format data and store it in the billing rule library. When an existing rule needs to be modified, the user can query the target rule through the interface, edit its parameters, and then save the update. Similarly, deleting a rule only requires selecting and confirming it on the interface. The entire process does not require the user to directly access or modify any underlying code; the billing rule configuration engine is responsible for parsing and executing these data-driven rules.

[0045] Through the aforementioned technical solution, this application enables non-technical personnel, such as operations or finance staff in port business departments, to intuitively and conveniently perform add, delete, modify, and query operations on billing rules. Since rule updates and maintenance do not require modification of the underlying code, the technical threshold and operational complexity of rule maintenance are greatly reduced, improving the configuration efficiency and response speed of billing rules. This not only reduces reliance on IT personnel but also ensures that billing rules can adapt to business changes in a timely and accurate manner, thereby enhancing the flexibility and maintainability of the entire automated billing data processing system. It effectively avoids billing errors caused by untimely rule updates or operational mistakes, ensuring the accuracy and business continuity of multi-terminal billing.

[0046] In one optional implementation, the rule expressions in the billing rule base support logical combination operations between condition items, including AND, OR, and NOT operations; the billing rate expressions include single rates, tiered rates, and dynamic rates based on decision logic.

[0047] Specifically, the rule expressions in the billing rule base support logical combination operations between condition items, including AND, OR, and NOT operations. This means that the triggering conditions for billing rules are no longer limited to the judgment of a single condition, but can combine multiple conditions for judgment through logical operators (such as AND, OR, NOT). For example, a rule can be configured to "trigger when the vessel type is a container ship and the berthing time exceeds 24 hours and the cargo weight is greater than 100 tons". In implementation, when storing rules, the billing rule configuration engine can represent condition items as a nested logical expression structure. For example, in JSON format, the condition part can contain an operator field (such as "AND") and multiple operands (i.e., sub-conditions). When evaluating rules, the billing calculation engine parses these logical operators and evaluates each sub-condition according to Boolean logic, ultimately determining the truth value of the entire combined condition, thereby determining whether the rule is hit.

[0048] Meanwhile, the billing rate expressions include single rates, tiered rates, and dynamic rates based on decision logic. This provides diverse rate calculation models for different billing modes commonly used in port operations. A single rate is the most basic rate mode, where a fixed rate is applied directly once certain conditions are met. Tiered rates allow rates to vary based on different ranges of a quantity (such as cargo weight, berthing time, or number of operations). For example, it can be set that "the rate for the first 100 tons of cargo is X, and the rate for the portion exceeding 100 tons is Y." Dynamic rates based on decision logic are more flexible; the rate determination not only relies on simple numerical ranges but may also depend on more complex business logic judgments, such as "if the cargo is dangerous goods, the rate increases by 20% on the base rate; if it is also refrigerated goods, then an additional 10% is added." In implementation, the billing rule configuration engine can define specific structures and parameters for each rate type when storing rate expressions. For example, tiered rates can contain a basic field and multiple tier intervals and their corresponding rate values; dynamic rates can contain a series of conditional judgments and corresponding rate adjustment logic. The billing calculation engine will call the corresponding calculation logic to determine the final billing rate based on the type and parameters of the rate expression.

[0049] Through the aforementioned technical solutions, the billing rule configuration engine can support the construction of more refined and complex billing trigger conditions, thereby accurately capturing billing scenarios involving multiple intertwined factors in port operations. For example, it can precisely define composite conditions such as "a specific type of vessel berths at a specific berth for more than a specific duration and loads / unloads specific cargo," avoiding billing ambiguity or errors caused by insufficient rule expression capabilities. Simultaneously, by providing various rate expressions, including single rates, tiered rates, and dynamic rates based on decision logic, the system can flexibly adapt to diverse billing models in port operations. Whether it's simple fixed charges, volume-based segmented billing, or dynamic rate adjustments based on various business attributes, all can be effectively supported. This significantly improves the expressive power of billing rules and the system's business adaptability, ensuring the accuracy and flexibility of billing, reducing the complexity of manual intervention and rule maintenance, and thus improving the automation level and reliability of the entire automatic billing data processing system.

[0050] In one optional implementation, the multi-rule parallel matching algorithm is configured to: simultaneously input standardized billing base data into all rule expressions in the billing rule base for parallel condition evaluation; for billing scenarios that match multiple rules, perform billing calculations after merging the rules according to preset rule priorities or combination strategies.

[0051] Specifically, after receiving standardized billing base data from the data preprocessing server, the billing calculation engine no longer checks the rules in the billing rule base one by one or in a preset order. Instead, it distributes the standardized billing base data to multiple processing units or threads. Each processing unit independently and concurrently performs conditional judgments on one or a group of rule expressions in the billing rule base. For example, a multi-threaded pool technique can be used, with each thread responsible for evaluating the triggering conditions of one or more rule expressions, thereby completing the initial screening of all rules within the same time period. This parallel processing method significantly reduces the overall time consumption for rule matching.

[0052] After the parallel condition evaluation is completed, the billing calculation engine collects all triggered (i.e., condition met) rules. Since billing rules may overlap or be mutually exclusive, the system processes these hit rules according to pre-defined strategies to ensure the accuracy and uniqueness of the billing results. Pre-defined rule priorities can be defined for each rule in the billing rule library. When multiple rules are hit simultaneously, the system executes the rule with the highest priority first, and decides whether to ignore the billing effects of other lower-priority rules or use them as auxiliary conditions based on business needs. Combination strategies address complex billing scenarios requiring multiple rules to work together. These strategies can define how to sum the billing amounts of multiple hit rules (e.g., base fee plus surcharge), select the maximum or minimum value from multiple hit rules as the final rate, or make the triggering of one rule a prerequisite for the calculation of another. These strategies ensure the clarity of the billing logic and the correctness of the results in the case of multiple rule hits. In this way, the billing calculation engine can effectively integrate the results of parallel evaluations and ultimately perform accurate billing calculations.

[0053] Through the aforementioned technical solutions, the billing calculation engine can process large amounts of billing rules and standardized billing data with higher efficiency, significantly improving the speed of billing processing. Simultaneously, by introducing preset rule priorities and combination strategies, the system can intelligently handle complex billing logic in scenarios with multiple rule hits, effectively avoiding billing errors, duplicate billing, or missed billing caused by rule conflicts or overlaps, ensuring the accuracy and consistency of billing results. This enables the entire automated billing data processing system to provide more stable, reliable, and efficient services when facing port billing demands from multiple terminals, multiple services, and high concurrency.

[0054] In one optional implementation, in the directed graph data structure constructed by the billing timing control module, the billing events of each dock are used as nodes of the directed graph, and the dependencies between billing events are used as directed edges. The data structure linked list algorithm is used to perform topological sorting on the directed graph to generate a conflict-free execution sequence of billing events.

[0055] Specifically, a billing event refers to the smallest business unit in port operations that requires billing, such as ship berthing, cargo loading and unloading, storage, tugboat services, pilotage services, and departure. The system creates corresponding nodes for all billing-related operations that may occur at each terminal within a specific time period. These nodes can store attributes such as the event's unique identifier, the terminal to which it belongs, the expected occurrence time, and associated vessel or cargo information, thereby discretizing the complex billing process into manageable units and laying the foundation for subsequent dependency modeling.

[0056] Furthermore, the dependencies between billing events are abstracted as directed edges in a directed graph. These dependencies can be temporal (e.g., berthing billing must precede departure billing) or logical preconditions (e.g., cargo storage billing can only begin after cargo unloading billing). The system provides a flexible configuration mechanism, allowing business personnel to define these dependencies based on actual port operations and billing rules. For example, dependencies can be automatically identified and established through drag-and-drop connections in a graphical interface or by configuring rule expressions. These directed edges clearly define the sequence and logical constraints of billing events, ensuring the correctness of the billing process.

[0057] Building upon this foundation, to generate a logically correct execution order for billing events, the billing sequence control module employs a linked list data structure algorithm to perform topological sorting on the constructed directed graph. Topological sorting is a method for linearly ordering the vertices of a directed acyclic graph (DAG) such that for any directed edge (u, v), node u always appears before node v. Commonly used topological sorting algorithms include the Kahn algorithm based on in-degree or algorithms based on depth-first search (DFS). For example, the Kahn algorithm first calculates the in-degree of all nodes in the graph, adds nodes with an in-degree of 0 to a queue, and then iteratively removes nodes from the queue and adds them to the sorting result, while decrementing the in-degree of all its adjacent nodes by 1. If the in-degree of an adjacent node becomes 0, it adds it to the queue. In this way, potential billing order conflicts can be systematically identified and resolved.

[0058] Ultimately, through a topological sorting algorithm, the system generates a conflict-free execution sequence of billing events. "Conflict-free" means that the sequence satisfies all predefined dependencies, avoids circular dependencies or logical contradictions, and ensures that each billing event executes only after all its preconditions are met. This sequence is an ordered list containing the execution order of all billing events, providing the billing calculation engine with a clear and reliable execution path and preventing billing errors caused by sequence issues.

[0059] By employing the aforementioned technical solution, billing events at each terminal are abstracted as nodes in a directed graph, and the dependencies between billing events are precisely modeled as directed edges. This application can clearly express and manage complex billing logic in a multi-terminal environment. Based on this, a linked list algorithm is used to perform topological sorting on the directed graph, which can systematically identify and resolve potential billing order conflicts, ensuring that the generated execution sequence of billing events is logically consistent. This effectively avoids duplicate or missed billing caused by disordered billing order, significantly improving the accuracy and reliability of billing. Simultaneously, this structured management approach provides a clear basis for subsequent billing process optimization and troubleshooting, reducing the need for manual intervention and improving the automation level and operational efficiency of the entire automatic billing data processing system.

[0060] In an optional implementation, the system further includes a billing audit workflow engine connected to the billing calculation engine. This engine is a software module specifically designed to manage and coordinate the billing result audit process. Its core function is to automate the allocation, flow, and status tracking of audit tasks. Specifically, the engine can be built based on Business Process Management (BPM) technology, such as using the BPMN (Business Process Modeling Notification) standard to define each node, participating role, and flow condition in the audit process. It receives raw billing results from the billing calculation engine as input and drives the execution of the entire audit process according to a preset audit strategy. Its main function is to ensure that the billing results undergo necessary verification and confirmation before being finally pushed to the financial settlement system and customer service system, thereby improving the accuracy, compliance, and reliability of billing data.

[0061] Audit strategies are a set of predefined rules or conditions that guide the billing audit workflow engine in handling different billing results. These strategies are flexibly configurable. For example, they can be set to require senior finance personnel to audit billing amounts exceeding a certain threshold; for billing of specific customers or business types, confirmation from business unit leaders may be required; or for small, routine billing amounts, they can be set to automatically approve or randomly sample. Audit strategy configuration is typically done through a visual interface, allowing users to dynamically adjust them according to actual business needs to adapt to different risk control and management requirements. The goal is to achieve intelligent and automated audit processes, reduce the complexity of manual judgment, and improve audit efficiency and decision consistency.

[0062] Audit tasks are generated by the billing audit workflow engine based on audit policies and assigned to specific auditors or system pending processing. Each audit task typically includes information such as the billing details to be audited, relevant raw data, application of billing rules, calculation results, and audit deadline. These tasks are usually presented on the audit terminal as a to-do list, clearly informing auditors of the content to be reviewed and the required actions (such as approval, rejection, modification, or supplementary explanation). The generation and assignment of audit tasks ensure the orderly progress of the audit work and provide auditors with a clear and centralized work interface and basis.

[0063] The audit terminal is a user interface or system interface for auditors to review, confirm, or modify billing results. This terminal can be a web-based application interface, a mobile application, or an integrated module of an existing port management system (such as an ERP system). On the audit terminal, auditors can view detailed billing details, relevant raw data, the application status of billing rules, and the output results of the billing calculation engine. The audit terminal also provides a series of operation buttons, such as "Approve," "Reject," and "Return for Modification," enabling auditors to efficiently complete audits and record audit comments and operation logs.

[0064] Once the billing audit workflow engine receives the "audit approved" instruction from the audit terminal, it marks the billing result as approved and sends it to the data display and push module. This step is crucial in ensuring that only verified and approved billing results are ultimately displayed to customers or pushed to the port group's financial settlement and customer service systems. This mechanism effectively prevents unaudited or problematic billing data from entering subsequent financial settlement and external service processes, thus guaranteeing the accuracy, authority, and consistency of external data.

[0065] By introducing a billing audit workflow engine, this application adds a crucial verification and confirmation step to the existing billing calculation engine's automatic billing amount calculation. This engine intelligently transforms the billing calculation results into specific audit tasks based on preset audit strategies and automatically assigns them to the appropriate audit terminals. Auditors manually review the billing details or have the system automatically verify them on the audit terminals to ensure the accuracy and compliance of the billing results. Only billing results that pass the audit are sent to the data display and push module, and then to the financial settlement system and customer service system. This mechanism effectively solves the potential error risks and compliance issues of purely automated billing, significantly improves the reliability and authority of billing data, avoids financial risks and customer disputes caused by billing errors, and improves audit efficiency through automated workflow management. It achieves an organic combination of automated billing and manual review, ensuring the rigor and accuracy of port billing operations.

[0066] In one alternative implementation, the review strategy includes an automatic approval strategy triggered by a billing amount threshold, a flow strategy that allocates different review levels based on amount ranges, and a sampling strategy based on user type.

[0067] Specifically, an audit strategy refers to a predefined set of rules that guide the billing audit workflow engine in processing billing results. These strategies aim to automate and optimize the audit process, ensuring the accuracy and compliance of billing results and improving audit efficiency. Audit strategies typically exist in a configurable form within the system, allowing administrators to flexibly define and adjust them according to actual business needs.

[0068] The automatic approval strategy triggered by a billing amount threshold means that when the billing amount calculated by the billing calculation engine is lower than or equal to a preset threshold, the billing result will be automatically marked as approved by the system without manual review. For example, a threshold such as 100 yuan can be set, and all billing documents less than or equal to 100 yuan will be automatically approved. This strategy is typically implemented by configuring a judgment module in the billing review workflow engine. This module obtains the billing amount output by the billing calculation engine and compares it with the preset threshold. If the automatic approval condition is met, the review status of the billing result is directly updated.

[0069] The workflow strategy of allocating billing results to different review levels based on amount ranges refers to automatically assigning billing results to reviewers with different permissions or responsibilities based on different ranges of billing amounts. For example, billing results between 100 and 1000 yuan may require review by a Level 1 reviewer, while billing results exceeding 1000 yuan may require review by a Level 2 reviewer or a department manager. This strategy is typically implemented by defining multiple amount ranges in the billing review workflow engine and associating each range with one or more review roles or review processes. After a billing result is generated, the system determines its range based on its billing amount and automatically routes it to the corresponding review level.

[0070] User-type-based sampling strategy refers to a system that determines whether to conduct sampling checks or mandatory audits based on the user type associated with the billing result. For example, newly registered users or users with poor historical credit records may be subject to mandatory manual audits or high-percentage sampling checks; while long-term cooperative users with good credit may only undergo low-percentage sampling checks or be exempt from audits. This strategy is typically implemented by maintaining a mapping table between user types and sampling rules in the billing audit workflow engine. When a billing result is generated, the system applies the corresponding sampling rules based on the associated user type to determine whether to include it in the manual audit queue.

[0071] By introducing the aforementioned intelligent review strategies, the system can differentiate review tasks based on billing amount and user type. The automatic approval strategy based on billing amount thresholds significantly reduces the amount of manual review for low-risk, small-amount billing, improving processing efficiency. The flow strategy based on allocating billing results to different review levels based on amount ranges ensures that billing results of different risk levels receive corresponding levels of professional review, avoiding misallocation of review resources. The sampling strategy based on user type allows the system to focus on monitoring specific high-risk or new users while sampling low-risk users, thereby optimizing the review process while ensuring review quality and improving the intelligence level and operational efficiency of the entire automated billing data processing system.

[0072] In addition, such as Figure 2 As shown, this application also proposes an automatic billing data processing method supporting a multi-terminal architecture, applied to the above-mentioned system, including: S1. Collect multi-source heterogeneous data generated by each terminal during port operations in real time through IoT collection terminals deployed at at least two terminals, and upload the collected multi-source heterogeneous data to the data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data and vehicle weighing data. S2. Perform data cleaning and format standardization on multi-source heterogeneous data to obtain standardized billing base data; S3. Through the integrated management and control interface module, agreement data, rate data and customer file data are extracted from the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries, respectively, and the heterogeneous data from different business systems are converted into data objects in a unified format using preset mapping rules. S4. Build a configurable billing rule library and store the billing rules in JSON format in the billing rule configuration engine. Each rule contains trigger condition items and corresponding billing rate expressions. S5. The standardized billing base data obtained in step S2 is matched with the rule expressions in the billing rule base obtained in step S4. A multi-rule parallel matching algorithm is used to evaluate multiple rule expressions at the same time, and the billing amount of each terminal is calculated based on the matching results. S6. Construct a directed graph data structure based on the ship scheduling plan, and use the linked list algorithm of the data structure to generate the execution order of multi-terminal billing events. The scheduling billing calculation engine executes the billing calculation step by step according to the execution order. S7. Push the billing calculation results from step S5 to the port group's financial settlement system and customer service system through the communication interface, and display the billing details of each terminal on the visualization terminal.

[0073] The following example will provide a more detailed explanation of the above technical solution: A port group owns Terminal A and Terminal B. A vessel plans to unload containers at Terminal A and then move to Terminal B for bulk cargo unloading. Containerized cargo will be temporarily stored in the yard at Terminal A, while bulk cargo will be transported directly from Terminal B by truck.

[0074] First, when a vessel arrives at berth A, the AIS vessel identification terminal in the IoT data collection terminal deployed at berth A automatically acquires the vessel's berthing time. Subsequently, operation counting sensors installed on the loading and unloading equipment record the number of container unloadings in real time. When the vessel leaves berth A for berth B, the AIS vessel identification terminal again records its departure time. After the vessel arrives at berth B, the AIS vessel identification terminal at berth B records the berthing time. During bulk cargo unloading, trucks enter berth B, and the weight sensors installed on the weighbridge collect the weight of the bulk cargo loaded on the trucks in real time. License plate recognition devices installed at the gate automatically acquire the license plate numbers of the entering and exiting trucks. This multi-source heterogeneous data generated during port operations, including vessel entry and exit data, loading and unloading operation data, and vehicle weighing data, is uploaded in real time to a data preprocessing server via industrial Ethernet. Compared to traditional manual recording or decentralized system data entry methods, this system achieves automatic real-time acquisition of billing data through IoT data collection terminals, improving data accuracy and timeliness.

[0075] Meanwhile, the integrated management and control interface module connects to the port group's ERP system, the TOS systems of Terminal A and Terminal B, and the contract management system. This module extracts agreement data, rate data, and customer profile data, including vessel scheduling plans, customer agreements, rate standards, and customer profiles, from these heterogeneous systems. Because the data formats of each system may differ, the integrated management and control interface module uses preset mapping rules to convert this heterogeneous data from different business systems into data objects of a unified format, solving the problem of integrating heterogeneous data from multiple terminals.

[0076] After receiving heterogeneous data from multiple sources uploaded by IoT data acquisition terminals, the data preprocessing server performs data cleaning and format standardization. Data cleaning includes removing outliers, filling in missing values, and deduplication; for example, correcting false alarms from sensors or filling in missing operation timestamps. Format standardization converts data in different formats or units into a unified data format and unit system; for example, unifying all weight units to "tons" and time formats to "YYYY-MM-DD HH:MM:SS," thus obtaining standardized billing data.

[0077] The billing rule configuration engine stores and manages a configurable billing rule library. For example, the library might contain a rule stating, "If the vessel is a container ship and berths at terminal A, a berthing fee of X yuan per hour will be charged." Another rule might specify, "If the cargo is bulk cargo and is unloaded at terminal B, an unloading fee of Y yuan per ton will be charged, with a Z% discount based on the customer agreement." These rules are stored in JSON format, containing triggering conditions (such as vessel type, terminal identifier, and cargo type) and corresponding billing rate expressions (supporting single rates, tiered rates, and dynamic rates based on decision logic). The billing rule configuration engine provides a visual rule configuration interface, allowing users to add, delete, modify, and query billing rules without modifying the underlying code, enabling dynamic rule updates. This solves the problems of fixed rules and time-consuming modifications in traditional billing systems, significantly shortening the rule adjustment cycle.

[0078] The billing calculation engine connects to the data preprocessing server, the integrated management and control interface module, and the billing rule configuration engine. It performs conditional matching between the standardized billing base data output by the data preprocessing server and the rule expressions in the billing rule configuration engine. The billing calculation engine is equipped with a multi-rule parallel matching algorithm, capable of simultaneously evaluating multiple rule expressions. For example, for a ship berthing event at terminal A, the system simultaneously evaluates the berthing fee rule, the vessel type surcharge rule, and the customer VIP discount rule. For billing scenarios that match multiple rules, the system merges the rules according to preset rule priorities or combination strategies and then performs the billing calculation to obtain the final billing amount. The billing calculation engine independently calculates the berthing fee and container unloading fee for terminal A, and the berthing fee, bulk cargo unloading fee, and truck weighing fee for terminal B.

[0079] The billing timing control module connects to the billing calculation engine to construct a directed graph data structure based on the ship scheduling plan. In this directed graph, billing events for each terminal, such as "Terminal A berthing fee calculation," "Terminal A container unloading fee calculation," "Terminal B berthing fee calculation," "Terminal B bulk cargo unloading fee calculation," and "Terminal B truck weighing fee calculation," are treated as nodes. Dependencies between billing events are represented as directed edges; for example, "Terminal A berthing fee calculation" points to "Terminal A container unloading fee calculation," indicating that the calculation of the container unloading fee depends on the determination of the berthing time. A linked list algorithm is used to perform topological sorting on this directed graph, generating a conflict-free execution sequence of billing events. For example, the berthing fee for Terminal A is calculated first, followed by the container unloading fee; then the berthing fee for Terminal B is calculated, followed by the bulk cargo unloading fee and truck weighing fee. The billing calculation engine executes the billing calculations step-by-step according to this execution order, avoiding the problems of duplicate or missed billing caused by the lack of automated timing scheduling in traditional multi-terminal billing, thus ensuring the accuracy of billing.

[0080] In a preferred embodiment, the billing calculation results are first sent to the billing audit workflow engine. This engine automatically assigns audit tasks to audit terminals according to a preset audit strategy. For example, bills below a certain threshold are automatically approved; bills within a certain range are assigned to junior auditors; and bills above a certain threshold are assigned to senior auditors. For bills from specific customer types, the system performs random checks. Approved billing results are then pushed to the port group's financial settlement system and customer service system via a communication interface by the data display and push module. Simultaneously, the data display and push module displays detailed billing information for Terminal A and Terminal B on a visualization terminal, including the type of each fee, amount, calculation basis, and occurrence time.

[0081] Through the collaborative work of the various modules in the system, this system achieves automatic acquisition and unified fusion of heterogeneous data from multiple terminals, solving the data silo problem. A dynamically configurable billing rule base is constructed using rule engine technology, improving the system's scalability. By employing a multi-rule parallel matching algorithm and a billing timing control module, the system resolves the issues of multiple rule conflicts and disordered billing order leading to duplicate or missed billing in a multi-terminal architecture. The various modules of the system are connected through standardized communication interfaces, decoupling the billing rule configuration engine from the billing business logic, fundamentally solving the problem of mutual constraints and scalability difficulties caused by the tight coupling between the terminal operating system and billing functions in traditional systems.

[0082] Although embodiments of the invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. An automatic billing data processing system supporting a multi-terminal architecture, characterized in that, include: An IoT data collection terminal is deployed at at least two terminals. The IoT data collection terminal includes a work counting sensor installed on the loading and unloading equipment, a mass sensor installed on the weighbridge, and a license plate recognition device installed at the gate. It is used to collect multi-source heterogeneous data generated by each terminal during port operations in real time, and upload the collected multi-source heterogeneous data to a data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data, and vehicle weighing data. The integrated management and control interface module connects to the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries. It is used to extract agreement data, rate data and customer profile data from each system, and use preset mapping rules to convert heterogeneous data from different business systems into data objects in a unified format. The billing rule configuration engine is used to store and manage a configurable billing rule library. Each rule in the billing rule library is stored in JSON format, containing trigger condition items and corresponding billing rate expressions, and supports dynamic addition, deletion, modification and query of rules. A data preprocessing server, connected to the IoT acquisition terminal, is used to perform data cleaning and format standardization processing on the multi-source heterogeneous data to obtain standardized billing basic data. The billing calculation engine is connected to the data preprocessing server, the integrated management and control interface module, and the billing rule configuration engine, respectively. It is used to match the standardized billing basic data with the rule expressions in the billing rule library and calculate the billing amount of each terminal based on the matching results. The billing calculation engine is configured with a multi-rule parallel matching algorithm, which can evaluate multiple rule expressions at the same time and calculate the comprehensive billing result. The billing timing control module, connected to the billing calculation engine, is used to construct a directed graph data structure based on the ship scheduling plan and use the linked list algorithm of the data structure to generate the execution order of multi-terminal billing events, so as to avoid duplicate billing or omission of billing due to disordered billing order. The data display and push module is connected to the billing calculation engine and is used to push the billing calculation results to the port group's financial settlement system and customer service system through the communication interface, and display the billing details of each terminal on the visualization terminal.

2. The system according to claim 1, characterized in that, The IoT data acquisition terminal also includes an AIS ship identification terminal, which is deployed at each dock berth to automatically acquire ship berthing and departure time data.

3. The system according to claim 1, characterized in that, The billing rule configuration engine provides a visual rule configuration interface, through which users can add, delete, modify, and query billing rules without modifying the underlying code.

4. The system according to claim 1, characterized in that, The rule expressions in the billing rule base support logical combination operations between condition items, including AND, OR, and NOT operations; the billing rate expressions include single rates, tiered rates, and dynamic rates based on decision logic.

5. The system according to claim 1, characterized in that, The multi-rule parallel matching algorithm is configured to: simultaneously input standardized billing basic data into all rule expressions in the billing rule library for parallel condition evaluation; for billing scenarios that match multiple rules, perform billing calculations after merging the rules according to preset rule priorities or combination strategies.

6. The system according to claim 1, characterized in that, In the directed graph data structure constructed by the billing timing control module, the billing events of each dock are used as nodes of the directed graph, and the dependencies between billing events are used as directed edges. The linked list algorithm of the data structure is used to perform topological sorting on the directed graph to generate a conflict-free execution sequence of billing events.

7. The system according to claim 1, characterized in that, The system also includes a billing audit workflow engine, which is connected to the billing calculation engine and is used to automatically allocate audit tasks to audit terminals according to preset audit strategies, and send the audited billing results to the data display and push module.

8. The system according to claim 7, characterized in that, The review strategies include an automatic approval strategy triggered by a billing amount threshold, a flow strategy that allocates different review levels based on amount ranges, and a sampling strategy based on user type.

9. A method for automatically processing billing data supporting a multi-terminal architecture, applied to the system described in any one of claims 1 to 8, characterized in that, Includes the following steps: S1. Collect multi-source heterogeneous data generated by each terminal during port operations in real time through IoT collection terminals deployed at at least two terminals, and upload the collected multi-source heterogeneous data to the data preprocessing server via industrial Ethernet. The multi-source heterogeneous data includes loading and unloading operation data, ship entry and exit data, cargo storage data and vehicle weighing data. S2. Perform data cleaning and format standardization processing on the multi-source heterogeneous data to obtain standardized billing basic data; S3. Through the integrated management and control interface module, agreement data, rate data and customer file data are extracted from the ERP system, TOS system and contract management system of the port group headquarters and various terminal subsidiaries, respectively, and the heterogeneous data from different business systems are converted into data objects in a unified format using preset mapping rules. S4. Build a configurable billing rule library and store the billing rules in JSON format in the billing rule configuration engine. Each rule contains trigger condition items and corresponding billing rate expressions. S5. The standardized billing base data obtained in S2 is matched with the rule expressions in the billing rule base obtained in S4. A multi-rule parallel matching algorithm is used to evaluate multiple rule expressions simultaneously, and the billing amount of each terminal is calculated based on the matching results. S6. Construct a directed graph data structure based on the ship scheduling plan, use the linked list algorithm of the data structure to generate the execution order of multi-terminal billing events, and the scheduling billing calculation engine executes the billing calculation step by step according to the execution order; S7. The billing calculation results of S5 are pushed to the port group's financial settlement system and customer service system through the communication interface, and the billing details of each terminal are displayed on the visualization terminal.