A cross-system order data synchronization consistency method and system
Patent Information
- Application Number
- CN202610940514.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-26
- Publication Date
- 2026-08-18
AI Technical Summary
[0003]然而,在网络抖动或高并发资源抢占的边界条件下,异步回调链路极易发生不可预知的时序乱序与状态补偿重试
本发明通过全局状态机的状态枚举字段与单向迁移路径,实现全链路状态收敛的强约束,解决传统方案异构节点通信语义间隙导致盲目重发与状态冲突的痛点;一致性哈希路由与令牌桶限流将无序的散列请求,转化为服务确定性收敛与远端并发流量拦截的定量控制,精准抵御高并发洪峰,避免本地数据库长事务回滚与连接池阻塞;探针补偿消息结合锁定令牌实现了自适应退避与幂等性拦截,既切断了远端事务挂起向中台传播的阻塞路径,又为闭环特征报文比对提供基础,有效避免资源实扣表的重复扣减,彻底杜绝数据永久性割裂。
Smart Images

Figure CN122601581A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data synchronization technology, specifically to a method and system for synchronizing and maintaining consistency of cross-system order data. Background Technology
[0002] With the development of distributed collaborative processing technology, heterogeneous data processing subsystems typically use asynchronous message passing or application programming interface calls to synchronize cross-system business data status. In the process of cross-system collaborative processing of multi-node data flow, the first terminal node generates the original business request and pushes it to the business management platform. After the business management platform performs format conversion and verification of the request data, it issues instructions to the remote data execution system. After the remote data execution system completes the pre-occupation and physical verification of the target resources in its local database, it asynchronously callbacks the execution result status to the business management platform and the first terminal node through the message middleware, thereby completing the closed loop of the entire data lifecycle status of the same order.
[0003] However, under boundary conditions of network jitter or high-concurrency resource contention, asynchronous callback links are highly susceptible to unpredictable timing out-of-order events and state compensation retries. Because the data verification mechanisms between heterogeneous nodes are independent and have communication semantic gaps, blind retransmissions or probe compensation commands triggered by the business management platform without obtaining confirmation credentials can easily lead to non-idempotent duplicate deductions in the remote resource deduction table or flow conflicts in the global state machine when the remote system's local transaction processing has been suspended or its physical reconciliation progress information has not yet been synchronized. This results in a permanent break in the underlying state data between multiple nodes. Therefore, in a distributed collaborative processing architecture consisting of the first terminal node, the business management platform, and the remote data execution system, how to avoid state flow conflicts and underlying data breakage caused by asynchronous concurrent compensation is a problem that urgently needs to be solved in this field. Summary of the Invention
[0004] To address the shortcomings of existing technologies, the present invention aims to provide a cross-system order data synchronization consistency method. This method achieves deterministic convergence of requests to unique service shards through consistent hash routing, introduces globally unique identifiers to bind to the global state machine to provide unique state arbitration anchors, and employs two-phase verification combined with lightweight pre-locking to generate lock tokens for resource pre-allocation. This achieves deterministic write-offs while maintaining high system concurrency throughput and operating without strong consistency global locks, accurately intercepts probe compensation messages to avoid duplicate deductions, and performs end-to-end closed-loop confirmation by performing byte-by-byte comparison based on closed-loop feature messages. This effectively resolves the fragmentation and flow conflicts of multi-node underlying state data.
[0005] To achieve the above objectives, the present invention provides the following technical solution: In a first aspect, the present invention provides a method for synchronizing and maintaining consistency of order data across systems, comprising: Obtain the original business request and perform consistent hash routing, output standardized request messages, perform duplicate determination based on the standardized request messages, instantiate and output the global state machine, perform mode verification and standardized preprocessing on the standardized request messages, and output a set of resource consumption parameters. Perform two-stage verification on the resource consumption parameter set, output resource pre-allocation instruction, perform token bucket rate limiting and lightweight pre-locking on the resource pre-allocation instruction, generate and output locking token, drive the global state machine based on the locking token to send physical confirmation instruction to perform physical resource cancellation, and output asynchronous event message; The comparison hash benchmark value is calculated based on asynchronous event messages. The comparison hash benchmark value is used to drive the global state machine to transition to the reconciliation completion state. The probe compensation message is issued by the global state machine. Joint comparison is performed on the probe compensation message, and the comparison judgment result is output. The closed loop feature message is obtained based on the comparison judgment result. Byte-by-byte comparison is performed based on the closed loop feature message, and the final consistency data is output.
[0006] Furthermore, the execution process of the consistent hash routing includes: Extract globally unique identifiers from the original business request; A consistent hash ring with a preset number of virtual nodes is constructed, and each virtual node is bound to a corresponding physical service shard. The hash algorithm is called to perform a hash operation on the globally unique identifier to generate a hash value, and the hash value is mapped to the location coordinates on the consistent hash ring; Starting from the azimuth coordinates, a linear search is performed clockwise to locate the first matched virtual node. The original business request is then routed to the physical service shard bound to that virtual node and encapsulated to generate a standardized request message.
[0007] Furthermore, the instantiation process of the global state machine includes: Retrieve the state repository containing the state machine record table, and perform duplicate checks on the state machine record table using a globally unique identifier as the primary key; If it is determined that a data record row corresponding to a globally unique identifier already exists, the current state is returned to the first terminal node and instantiation is refused. If it is determined that no data record row exists, a new global state machine is instantiated in memory, and the state enumeration field, identifier binding field, first timestamp field, token register field, target state baseline value field and version number field are set in the global state machine. Extract the first timestamp from the standardized request message, configure the state enumeration field to the initial suspended state, write the identifier binding field and the first timestamp field to the globally unique identifier and the first timestamp respectively, configure the token register field and the target state baseline value field to null values, and write the global state machine as a new data record row into the state machine record table.
[0008] Furthermore, the method for obtaining the set of resource consumption parameters includes: Extract the target resource code, resource consumption quantity, and remote system identifier from the standardized request message; Based on the preset standard number of bits, the target resource encoding is padded with leading zeros or truncated with trailing characters, and normalized into a fixed-length string; Remove the non-numeric characters and decimal parts from the resource consumption quantity and round it down to a positive integer. Obtain the remote system registry, match the remote system identifier in the remote system registry to extract the internal system identification code, and use it as the remote system code; The target resource code, resource consumption quantity, and remote system code are combined into a set of resource consumption parameters.
[0009] Furthermore, obtaining the resource pre-allocation instruction includes: Extract the resource consumption quantity and target resource code from the resource consumption parameter set, determine whether the resource consumption quantity is greater than the preset single resource limit, and obtain the resource master data dictionary to determine whether the target resource code exists in the resource master data dictionary; If all the judgments pass, a resource pre-allocation instruction is constructed and sent to the remote data execution system corresponding to the remote system code; The resource pre-allocation instruction consists of a globally unique identifier, a target resource code, a resource consumption quantity, and a timing stamp issued by the data collection platform.
[0010] Furthermore, the execution process of token bucket rate limiting and lightweight pre-locking for resource pre-allocation instructions includes: Get the token bucket with available tokens, and check the number of available tokens in the token bucket; If the number of available tokens is zero, the judgment result will be determined as access denial and a rate limiting denial response will be returned to the business management platform; If the number of available tokens is greater than or equal to one, deduct one available token as admission permission and retrieve the resource pre-occupancy table from the local database; A single short transaction is initiated and immediately committed in the resource reservation table to insert a reservation record, which consists of the globally unique identifier, the target resource code, the resource consumption quantity, and the reservation deadline.
[0011] Furthermore, the method for obtaining the locking token includes: After the pre-reservation record is successfully inserted into the resource pre-reservation table, the collection token issuance sequence stamp is collected. Obtain the number of currently uncancelled pre-occupied records and the upper limit constant of the resource pre-occupied table capacity, and calculate the pre-lock survival period based on the number of currently uncancelled pre-occupied records and the upper limit constant of the resource pre-occupied table capacity; The pre-occupancy deadline is calculated by superimposing the token issuance sequence stamp with the pre-lock survival period; The hash calculation is performed on the byte stream formed by concatenating the globally unique identifier and the token issuance time stamp to obtain the digest value as the token identifier; Combine the token identifier, pre-lock lifespan, token issuance sequence stamp, and globally unique identifier to generate and output a lock token.
[0012] Furthermore, the method for obtaining the asynchronous event message includes: Perform a consistency comparison between the globally unique identifier in the lock token and the identifier binding field in the global state machine; If the comparison is consistent, the state enumeration field in the global state machine is updated to the pending execution state, and a physical confirmation instruction is sent to the remote data execution system. Get the current timestamp of the system that received the physical confirmation instruction, and extract the token identifier in the physical confirmation instruction to query the resource pre-occupancy table. If the corresponding pre-occupancy record exists and the current timestamp of the system is earlier than or equal to the pre-occupancy deadline, get the actual resource deduction table and deduct the resource consumption from it, and update the pre-occupancy record to the cancelled status. The hash digest of the concatenation of the globally unique identifier and the actual deducted resource consumption is used as the reconciliation receipt. The token cache is retrieved, the token identifier and the reconciliation receipt are written into the token cache, and an asynchronous event message containing the reconciliation receipt and the final resource balance is output.
[0013] Furthermore, the execution process of using the comparison hash benchmark value to drive the global state machine to transition to the reconciliation completion state includes: Extract the globally unique identifier, revocation receipt and final resource balance from the asynchronous event message, concatenate the strings and perform hash digest calculation to obtain the comparison hash base value; Retrieve the global state machine corresponding to the globally unique identifier from the state machine record table, and perform a consistency check between the token identifier in the asynchronous event message and the token identifier in the token register field of the global state machine. If the verification matches, the comparison hash base value will be written into the target state base value field in the global state machine, and the state enumeration field will be unidirectionally migrated to the reconciliation completion state. Increment the version number field in the global state machine and overwrite it in the state repository.
[0014] Furthermore, the method for obtaining the comparison and determination result includes: Set a time window and a retry counter. If no asynchronous event message is detected within the time window, initialize the retry counter, calculate the backoff interval corresponding to the retry counter, and sleep for the duration corresponding to the backoff interval. Collect the probe sending time stamp, combine the lock token, retry counter and probe sending time stamp to construct a probe compensation message and send it down; Obtain the token identifier from the probe compensation message and perform a joint comparison between the token cache and the resource pre-occupancy table; If it is determined that the token identifier already exists in the token cache, then the asynchronous event message is re-published based on the revocation receipt in the token cache as the comparison and determination result; If it is determined that the token identifier does not exist in the token cache library, but there is a corresponding pre-reservation record in the resource pre-reservation table, and the current time is earlier than or equal to the pre-reservation deadline, then the physical write-off of the resource will be re-executed and an asynchronous event message will be published.
[0015] Furthermore, the method for obtaining the eventually consistent data includes: Obtain the closed-loop feature message constructed and reported by the first terminal node based on the receipt completion time stamp. The closed-loop feature message is composed of a globally unique identifier, a verification receipt, the final resource balance and the receipt completion time stamp. Remove the receipt completion time stamp from the closed-loop feature message, concatenate the remaining components into strings and calculate to obtain the status hash value; Compare the state hash value with the target state baseline value extracted from the target state baseline value field in the global state machine byte by byte; If the comparison is consistent, the state enumeration field is migrated to the closed-loop destruction state, and the archived record containing the closed-loop characteristic message is written to the state repository as the final consistent data.
[0016] Secondly, the present invention provides a cross-system order data synchronization and consistency system for implementing the aforementioned cross-system order data synchronization and consistency method, the system comprising: Request routing module: used to obtain the original business request and perform consistent hashing routing, output standardized request messages, perform duplicate determination based on the standardized request messages, instantiate and output the global state machine, and perform mode verification and standardized preprocessing on the standardized request messages, and output a set of resource consumption parameters; Resource pre-allocation module: It is used to perform two-stage verification on the resource consumption parameter set, output resource pre-allocation instructions, perform token bucket rate limiting and lightweight pre-locking on the resource pre-allocation instructions, generate and output locking tokens, drive the global state machine based on the locking tokens to send physical confirmation instructions to perform physical resource cancellation, and output asynchronous event messages; The probe compensation module is used to calculate the comparison hash benchmark value based on asynchronous event messages, drive the global state machine to transition to the reconciliation completion state using the comparison hash benchmark value, issue probe compensation messages using the global state machine, perform joint comparison on the probe compensation messages, output the comparison judgment result, obtain the closed-loop feature message based on the comparison judgment result, perform byte-by-byte comparison based on the closed-loop feature message, and output the final consistency data.
[0017] Compared with the prior art, the beneficial effects achieved by the present invention are as follows: This invention achieves strong constraints on end-to-end state convergence through the state enumeration field of the global state machine and unidirectional migration paths, solving the pain points of blind retransmission and state conflicts caused by semantic gaps in heterogeneous node communication in traditional solutions. Consistent hash routing and token bucket rate limiting transform disordered hash requests into quantitative control of service deterministic convergence and remote concurrent traffic interception, accurately resisting high-concurrency surges and avoiding local database long transaction rollback and connection pool blockage. Probe compensation messages combined with locking tokens realize adaptive backoff and idempotent interception, which not only cuts off the blocking path of remote transaction suspension to propagate to the middle platform, but also provides a basis for closed-loop feature message comparison, effectively avoiding duplicate deduction of resource deduction tables and completely eliminating permanent data fragmentation. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 A flowchart illustrating a method for synchronizing and maintaining consistency of cross-system order data, as provided in an embodiment of the present invention; Figure 2 This is a consistent hash routing and service convergence topology diagram provided in an embodiment of the present invention; Figure 3 A schematic diagram of the global state machine state transition provided in an embodiment of the present invention; Figure 4 The timing diagram for token bucket rate limiting and lightweight pre-locking provided in the embodiments of the present invention; Figure 5 The timing diagram of probe compensation and interception based on adaptive backoff algorithm provided in the embodiments of the present invention; Figure 6 This is a functional block diagram of a cross-system order data synchronization and consistency system provided in an embodiment of the present invention. Detailed Implementation
[0020] 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, and 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.
[0021] Example 1 Please see Figure 1 As shown, this embodiment provides a method for synchronizing and maintaining consistency of order data across systems, including: Step S10: Obtain the original business request and perform consistent hash routing, output standardized request messages, perform duplicate determination based on standardized request messages, instantiate and output the global state machine, perform mode verification and standardized preprocessing on standardized request messages, and output a set of resource consumption parameters.
[0022] Further, step S10 includes: Step S11: Obtain the original business request and perform consistent hash routing to output a standardized request message.
[0023] In current cross-system order collaborative processing scenarios, load balancing strategies based on round-robin or random weights are commonly used to distribute front-end order requests to arbitrary service instances of the intermediate management node. There is no order-level state anchoring relationship between these service instances. Under high-concurrency resource contention conditions, multiple retry requests for the same order due to network jitter are hashed to different service instances and processed repeatedly in parallel. Downstream instructions triggered independently by each instance result in unpredictable out-of-order timing when reaching the remote execution node. Furthermore, over long periods, the full request remapping caused by service instance scaling can lead to large-scale local state cache invalidation, causing order states to drift between different instances, ultimately resulting in a permanent fragmentation of underlying state data across multiple nodes. This latent defect cannot be eradicated under the existing load balancing architecture. Therefore, a consistent hash routing mechanism based on globally unique identifier binding is proposed to achieve deterministic convergence of all requests throughout the entire lifecycle of the same order to a unique service shard in the business management platform.
[0024] Specifically, the original business request is obtained from the JSON-formatted structured message constructed by the business input module of the first terminal node. The first terminal node is deployed on the store's business operation side, and its physical carrier is an embedded business terminal equipped with a business input module, a message subscription client, and a signature action collection component. Its internal payload includes an order business field input interface and a local message cache queue. The business input module is an interactive program used to capture business document data input by store operators. The message subscription client is a communication proxy used to establish a long connection with the cloud message middleware and asynchronously receive downstream status callback messages. The signature action collection component is a hardware interface used to listen for and record events triggered by physical signature peripherals, such as barcode scanners. The order business field input interface is a graphical front-end view that displays business dimensions such as target resources and quantities to operators. The local message cache queue is a first-in-first-out data structure in the embedded business terminal's memory used to temporarily store unconfirmed or asynchronous event messages during network outages. The original business request includes three fields: a globally unique identifier, a first timestamp, and a business payload field. The globally unique identifier refers to a 128-bit binary identifier code generated according to the RFC4122 specification. Its physical carrier is a 36-character hexadecimal string. This identifier code serves as a unique tracking identifier associated with the first terminal node's initiation of actions, the business management middleware state machine update, and the remote data execution system's reconciliation record. The first timestamp refers to the timestamp collected by the first terminal node at the moment of triggering the original business request, serving as the time-series starting point anchor of the order's lifecycle. The business payload field refers to a closed set of fields consisting of three key-value pairs: target resource code, resource consumption quantity, and remote system identifier. The target resource code is a unique material identification code referring to a specific material or commodity on the warehousing and logistics side. The resource consumption quantity is an integer value referring to the target resource code's request for outbound, occupied, or consumed information. The remote system identifier is a routing address code referring to the specific warehouse system or independent execution server designated to undertake the physical reconciliation task of this order.
[0025] After receiving the original business request, the business management platform first performs a request field validity check. The business management platform is deployed in the cloud, and its physical carrier is an intermediate management node cluster consisting of multiple stateless service shards and a state repository. The request field validity check performed by the request routing layer involves checking each item: whether the globally unique identifier conforms to the RFC4122 character format; whether the difference between the first timestamp and the business management platform's local clock falls within a preset clock tolerance window; and whether all three key-value pairs of the business payload field are not empty. If all three checks pass, the process proceeds to the routing stage; if any check fails, a request verification rejection response carrying the name of the failed field is returned to the first terminal node, and the flow is terminated. The preset clock tolerance window refers to the maximum allowable deviation between the first timestamp and the platform's local clock. It is set based on the industry-standard drift limit for cross-regional terminal device clock synchronization, aiming to intercept expired requests from terminals with severely inaccurate clocks. For example, the preset clock tolerance window is set to 300 seconds.
[0026] During the routing process, a consistent hash ring is pre-constructed for deterministic distribution. Specifically, a hash ring with a value range of 0 to... A linear integer numerical space is constructed by connecting the first and last elements of the linear integer space to form a closed ring logical hash topology space. For each physical service shard in the business management platform, a preset number of virtual nodes are configured. The number of virtual nodes mapped to each service shard is a system-level hyperparameter, set based on industry-standard configuration experience for uniform load distribution in consistent hashing. For example, the number of virtual nodes for each service shard is set to 160. When deploying these virtual nodes to the logical hash topology space, the hardware identification code of each physical service shard, such as the IP address or shard sequence number, is extracted sequentially and concatenated with a set of monotonically increasing index values from 1 to 160 to construct a unique virtual node identifier for each virtual node. A hash algorithm, such as the MurmurHash3 hash algorithm, is called to calculate the virtual node identifier, and the resulting 32-bit integer result is used as the coordinate point of the virtual node on the consistent hash ring for anchoring. Ultimately, all virtual nodes of all physical service shards are evenly and interleavedly distributed in the ring from 0 to 160. On the constructed hash ring, the initialization and construction of the consistent hash ring are completed. Based on the constructed consistent hash ring, the routing process specifically involves: invoking a hash algorithm, such as the MurmurHash3 hash algorithm, to perform a hash operation on the globally unique identifier in the original business request. This outputs a unique hash value within a 32-bit integer space. The system then performs an unsigned interpretation on this 32-bit integer output, directly interpreting its two's complement representation as an unsigned 32-bit integer, thereby mapping the value range to 0 to... The interval serves as the location coordinate point of the original business request on the consistent hash ring, thus completing the projection mapping from the numerical space to the topological space. Starting from this location coordinate point, a linear search is performed on the hash ring in a clockwise direction until the first virtual node is found. The system further extracts the corresponding physical service shard bound to this virtual node, thereby deterministically routing the original business request to this unique service shard. After routing is completed, the target service shard encapsulates the original business request along with the service shard identifier matched by the route into a standardized request message. See also... Figure 2 This diagram illustrates the consistent hashing routing and service convergence topology provided in this embodiment of the invention. In the diagram, a circular topology represents the "consistent hashing ring," which is the logical hashing topology space constructed by the system. The upper left corner of the diagram shows a cross-shaped "location coordinate point," representing the point where the integer hash value obtained after applying the hash algorithm to the globally unique identifier in the original business request is projected onto the unsigned integer space of the hash ring. From this location coordinate point, the data flow follows the arc-shaped dashed arrow outside the ring, performing a "linear search in a clockwise direction," until it touches and locates the "first virtual node found" in the upper right corner of the hash ring. Subsequently, the straight arrow on the right indicates that this virtual node deterministically routes the original request to the corresponding physical service shard at the bottom, and completes the encapsulation of the standardized request message within that shard.
[0027] Step S12: Perform a repeatability determination based on the standardized request message, instantiate and output the global state machine.
[0028] After receiving the standardized request message, in order to provide a unique state arbitration anchor point for data interaction in the distributed collaborative processing system consisting of the first terminal node, the business management platform and the remote data execution system, and to avoid state conflicts in the data flow process due to the lack of global state records, the business management platform establishes a global state machine instantiation mechanism with a globally unique identifier as the primary key, and converges the entire process state of the order lifecycle into a single arbitrable data object.
[0029] Specifically, the global state machine refers to a structured state object instantiated in memory and synchronously written to a state repository by the business management platform. The state repository is deployed in the cloud, specifically a relational database or distributed key-value database located in the intermediate state management node cluster. Its construction and binding process includes: creating a state machine record table in the state repository and setting the primary key field of this state machine record table to carry a globally unique identifier; after the service shard of the business management platform generates the global state machine in memory, using the globally unique identifier as the primary key index, inserting each field corresponding to the global state machine as an independent data record row into the state machine record table, thereby achieving a strong binding between the global state machine and a single order data item, i.e., the globally unique identifier, at the physical storage level. The internal payload of the global state machine consists of six fields: a state enumeration field, an identifier binding field, a first timestamp field, a token register field, a target state baseline value field, and a version number field. The state enumeration field takes the value of a closed enumeration set consisting of four states: initial suspended state, pending execution state, verification completed state, and closed-loop destruction state. It only allows unidirectional migration paths from the initial suspended state to the pending execution state, from the pending execution state to the verification completed state, and from the verification completed state to the closed-loop destruction state, as well as a unique fallback path from the pending execution state to the initial suspended state under the pre-lock failure condition. Any state change instruction outside these migration paths is directly rejected by the business management platform. The pre-lock failure condition refers to a situation where, due to network anomalies, communication packet loss, or processing timeouts, the time elapsed for the target resource temporarily locked by the remote data execution system exceeds the pre-lock lifespan. When the remote data execution system receives a physical confirmation instruction, it determines that the corresponding pre-occupied record does not exist or has exceeded the pre-occupied deadline, and then returns a pre-lock failure response to the business management platform. The moment the business management platform receives this pre-lock failure response is the triggering of the pre-lock failure condition. The pre-lock survival period refers to the maximum duration during which the target resource is allowed to be temporarily locked by the remote data execution system without being preempted by other orders.The identifier binding field stores the globally unique identifier in the standardized request message in the structured state object in memory, so as to maintain a consistent mapping with the primary key in the state machine record table; the first timestamp field records the first timestamp in the standardized request message, serving as the time-series anchoring basis for the start of the data lifecycle; the token storage field temporarily stores the exclusive locking token generated and called back by the remote data execution system, so as to realize the binding mapping between the state machine and the token; the target state benchmark value field stores the hash benchmark value required for end-to-end closed-loop comparison. The end-to-end closed-loop comparison hash benchmark value refers to the summation value obtained by concatenating the values of the globally unique identifier, the reversal receipt generated by the remote data execution system, and the remaining available quantity of the target resources after the remote data execution system completes the target resource deduction, and then calling the hash algorithm to calculate the hash value; the version number field is used to perform an auto-increment operation with a step size of 1 each time the state enumeration field undergoes a state transition, so as to provide an optimistic locking verification mechanism in the event of resource preemption.
[0030] Before instantiating the global state machine, the business management platform uses the globally unique identifier in the standardized request message as the primary key to query the state repository for duplicate detection: if a data record row corresponding to the globally unique identifier already exists in the state machine record table of the state repository, the instantiation action is rejected, and the current state enumeration field value of the existing global state machine is directly returned to the first terminal node; if a data record row corresponding to the globally unique identifier does not exist in the state machine record table of the state repository, system resources are allocated to instantiate a new global state machine. During instantiation, the system configures the initial value of the state enumeration field to the initial suspended state, writes the identifier binding field and the first timestamp field to the values of the globally unique identifier and the first timestamp carried in the standardized request message, respectively, configures the token register field and the target state baseline value field to null values, configures the version number field used to record the migration number of the state enumeration field to the initial integer value 1, and synchronously writes the initialized global state machine as a new data record row into the state machine record table of the state repository for solidification, finally outputting the global state machine in the initial suspended state. See also Figure 3 This is a schematic diagram of the global state machine state transition principle provided in an embodiment of the present invention. Figure 3The left side of the diagram illustrates the repetitive decision-making logic before instantiation: the business management platform extracts the globally unique identifier from the standardized request message as the primary key and performs a query in the state machine record table of the state repository. If the branch determines that a corresponding data record already exists, it proceeds to the lower branch, directly rejecting the instantiation action and returning; if the branch determines that no data record exists, it proceeds to the right branch, successfully allocating system resources and outputting the global state machine in the initial suspended state. Secondly, the middle and right sides of the diagram use four rectangular nodes from left to right to represent the four possible closed enumeration states of the state enumeration field: initial suspended state, pending execution state, verification completed state, and closed-loop destruction state. The nodes are connected by solid arrows pointing to the right, clearly indicating that the system only allows unidirectional migration paths from the initial suspended state to the pending execution state, from the pending execution state to the verification completed state, and from the verification completed state to the closed-loop destruction state. Any state change instruction outside of these solid-line paths will be directly rejected. Finally, a broken-line arrow is marked below the pending state and the initial suspended state in the figure. This arrow represents the only fallback path for the global state machine to fall back from the pending state to the initial suspended state under the condition of pre-lock failure, that is, when the business management platform receives the pre-lock failure response sent by the remote data execution system.
[0031] Step S13: Perform mode verification and standardization preprocessing on the standardized request message, and output a set of resource consumption parameters.
[0032] After outputting the global state machine, in order to enable the resource pre-allocation instructions sent by the business management platform to the remote data execution system to be constructed in a structured form that can be directly executed by the local database of the remote data execution system, and to avoid parsing failures and invalid communication round trips caused by heterogeneous format data in the standardized request message being directly passed through to the remote data execution system, the business management platform establishes a heterogeneous protocol parsing and parameter structure extraction mechanism to complete the alignment of cross-system communication semantics.
[0033] Specifically, the business management platform invokes the data pattern validation component to perform pattern validation and field type normalization preprocessing on the business payload fields contained in the standardized request message. The data pattern validation component is a validation tool used to verify the legality of the JSON data structure. The specific process of the normalization preprocessing includes: extracting the target resource code from the business payload field and obtaining the character length of the target resource code. If the character length is less than the preset standard number of bits, leading zero characters are added to the beginning of the target resource code. These leading zero characters are placeholder characters with an exponent value of 0 and no actual business meaning, used to meet the fixed-length requirement. If the character length is greater than the preset standard number of bits, the characters following the standard number of bits in the target resource code are truncated and discarded as the excess. If the character length is equal to the standard number of bits, the target resource code remains unchanged, thereby deterministically normalizing the target resource code into a unique fixed-length string type. The standard number of bits is set based on the fixed-length constraint of the primary key field of the material master data table in the local database of the remote data execution system; for example, it is set to 16 bits. The resource consumption quantity is extracted from the business payload field. Since the resource consumption quantity encapsulated in the original business request may be presented as a text string format with quotation marks or a floating-point number format with decimal places, the business management platform removes non-numeric characters and decimal parts from the resource consumption quantity and performs a round-down operation to convert it into an unsigned integer value, thereby deterministically normalizing the resource consumption quantity into a unique positive integer type. The remote system identifier is extracted from the business payload field and used as the query primary key for precise mapping and matching in the remote system registry maintained locally by the business management platform. Upon successful matching, the internal system identification code uniquely bound to the remote system identifier is obtained and extracted, thereby deterministically normalizing the remote system identifier into the remote system code already registered in the remote system registry. The remote system registry is a key-value pair data table deployed in the business management platform's memory or state repository, used to pre-record the static mapping relationship between the external request identifiers and internal routing identifiers of each allowed remote data execution system. The three structured fields—the target resource code (a fixed-length string type after type normalization), the resource consumption quantity (a positive integer type), and the remote system code—are combined into a resource consumption parameter set. During the above standardization preprocessing, the business management platform synchronously determines whether any field type normalization has failed. The specific logic for determining any field type normalization failure is as follows: if the extracted resource consumption quantity, after parsing and conversion, is a negative number or a null value, or the normalized code is a null value or contains illegal characters, or the remote system identifier fails to match the corresponding internal system identification code, then the field type normalization in the pattern validation is determined to have failed.If the pattern validation fails to normalize the type of any field, the global state machine remains in its initial suspended state, the business management platform returns a resolution rejection response carrying the name of the failed field to the first terminal node, and terminates the current flow logic; if all pattern validations pass, the resource consumption parameter set is successfully generated.
[0034] Step S10 addresses the problem in a distributed collaborative processing system comprised of a first terminal node, a business management platform, and a remote data execution system. This is because concurrent retry requests for the same order are easily distributed out of order by load balancing across different service shards, and due to communication semantic gaps between heterogeneous nodes, the underlying state data of multiple nodes is permanently fragmented. Step S10 achieves deterministic convergence of cross-system lifecycle requests to a unique state arbitration anchor point. Specifically, the original business request serves as the source input credential triggering the entire link state transition; the standardized request message constructs an aligned, structured data base for cross-level transmission within the business management platform; the global state machine provides a unique authoritative copy with closed enumeration and unidirectional migration constraints, cutting off the path of out-of-order asynchronous event propagation state conflicts; and the resource consumption parameter set eliminates heterogeneous format differences, serving as the core credential driving the remote data execution system to pre-allocate resources.
[0035] Step S20: Perform two-stage verification on the resource consumption parameter set, output resource pre-occupancy instruction, perform token bucket rate limiting and lightweight pre-locking on the resource pre-occupancy instruction, generate and output locking token, drive the global state machine based on the locking token to send physical confirmation instruction to perform physical resource cancellation, and output asynchronous event message.
[0036] Further, step S20 includes: Step S21: Perform a two-stage verification on the resource consumption parameter set and output a resource pre-allocation instruction.
[0037] After outputting the resource consumption parameter set, in order to confirm the allocatability of the target resource corresponding to the target resource code without establishing a strong consistency global lock between the state repository of the business management platform and the local database of the remote data execution system for a long time, and to avoid long transaction rollbacks and connection pool blocking in the remote local database due to insufficient available target resources when directly using the resource consumption parameter set to drive the remote data execution system to perform physical write-off, the business management platform establishes a resource pre-allocation instruction issuance mechanism under a two-phase verification protocol. This mechanism ensures that the resource pre-allocation instruction is deterministically delivered to the unique remote data execution system corresponding to the remote system code. Specifically, the two-phase verification protocol refers to a two-phase deterministic verification process consisting of a local static verification phase and a remote availability exploration phase.
[0038] During the local static verification phase, the business management platform extracts the resource consumption quantity and target resource code from the resource consumption parameter set, and determines whether the resource consumption quantity is greater than zero and less than or equal to the preset single resource limit, and whether the target resource code exists in the resource master data dictionary maintained locally by the business management platform. If any of the determinations fails, a static verification rejection response is returned to the first terminal node and the current flow logic is terminated. If all determinations pass, the platform enters the remote availability exploration phase. The resource master data dictionary refers to a data table deployed in the state repository or memory cache of the business management platform, used to uniformly record the basic attributes of legal materials across the entire network. It is generated unidirectionally and synchronously by the enterprise's global resource planning system, serving as a static verification benchmark for the business management platform to determine whether the material code input from the front end is a material that actually exists within the system. The single-item resource limit refers to the maximum quantity allowed to be consumed in a single order for a single target resource code. Its setting is based on the maximum physical loading quantity of a single standard pallet or single container unit on the warehousing and logistics side. The purpose is to intercept abnormal over-limit requests on the platform side, such as numerical overflow caused by operator error entering too many zero characters, thus avoiding invalid cross-system communication and remote table locking. For example, the single-item resource limit is set to 1000 items. During the remote availability exploration phase, the business management platform constructs a resource pre-allocation instruction and sends it to the remote data execution system corresponding to the remote system code in the resource consumption parameter set. The resource pre-allocation instruction refers to a structured instruction message consisting of four fields: a globally unique identifier bound to the global state machine, a target resource code of type fixed-length string, a resource consumption quantity of type positive integer, and a timing stamp issued by the middle platform. It serves as the trigger payload for requesting the remote data execution system to perform lightweight pre-locking. The timing stamp issued by the middle platform refers to the timestamp generated by the business management middle platform when constructing the resource pre-allocation instruction, using the local clock of its server. It not only records the precise time of instruction departure but also serves as a metadata field that is transparently transmitted to the remote data execution system along with the resource pre-allocation instruction.
[0039] Step S22: Execute token bucket rate limiting and lightweight pre-locking on the resource pre-occupancy command, and generate and output lock tokens.
[0040] After the business management platform issues a resource pre-allocation instruction, in order to protect the local database of the remote data execution system from the impact of the pre-allocation request surge under the boundary conditions of high-concurrency resource pre-allocation, the remote data execution system establishes a token bucket rate limiting and lightweight pre-locking mechanism.
[0041] Specifically, the remote data execution system invokes the token bucket algorithm to perform admission and rate limiting judgments on arriving resource pre-allocation commands. The token bucket algorithm uses a binary judgment result of admission approval or admission rejection as the target output variable. The token bucket capacity and token filling rate are set, and available tokens are dynamically generated and stored in the token bucket according to the stated token filling rate. The token bucket capacity refers to the maximum number of available tokens allowed to be stored in the token bucket. Its setting is based on the stress test calibration results of the local database connection pool size and single-instance concurrent carrying capacity of the remote data execution system. The purpose is to limit the maximum scale of instantaneous bursts of pre-allocation requests. For example, the token bucket capacity is set to 1000 available tokens. The token filling rate is set based on the stress test calibration results of the number of pre-allocation write transactions that the local database can stably carry per second. The purpose is to confine continuous pre-allocation traffic within the stable throughput range of the database. For example, the token filling rate is set to 200 available tokens per second. The specific execution logic of the access control and rate limiting determination is as follows: The remote data execution system checks whether there are available tokens in the current token bucket. If the number of available tokens is greater than or equal to 1, 1 available token is deducted, and the determination result is set as access control. Then, the remote data execution system performs a lightweight pre-locking operation in the local database. The lightweight pre-locking refers to opening and immediately committing a single short transaction in the resource pre-occupancy table of the local database to insert a pre-occupancy record. The resource pre-occupancy table refers to a data table deployed in the local database of the remote data execution system used to record details of unwritten temporary resource occupancy. The single short transaction refers to an independent database transaction that performs a single row-level data insertion operation on a single data table, namely the resource pre-occupancy table, and does not span the network communication round-trip cycle. Through this single short transaction, the system inserts only one pre-occupancy record in the resource pre-occupancy table, consisting of a globally unique identifier in the resource pre-occupancy instruction, the target resource code, the resource consumption quantity, and the pre-occupancy deadline, and does not open local database row-level locks or cross-table lock transactions, using record-level temporary placeholders to replace conventional lock-level resource freezing. If the number of available tokens is 0, the judgment result is set as admission rejection, and the remote data execution system returns a rate limiting rejection response to the business management platform. After receiving the rate limiting rejection response, the business management platform keeps the state enumeration field of the global state machine in the initial suspended state and resends the resource pre-emption instruction to the remote data execution system. After a single short transaction is committed and confirmed as successfully inserted, a locking token is generated.The locking token refers to a structured credential object consisting of six fields: token identifier, globally unique identifier, target resource code, resource consumption quantity, pre-lock survival period, and token issuance time stamp. The token identifier is a digest value calculated by applying a hash algorithm, such as SHA-256, to a byte stream formed by concatenating the globally unique identifier and the token issuance time stamp. This digest serves as a unique deduplication credential throughout the subsequent physical confirmation, probe compensation, and idempotent interception processes. The token issuance time stamp is the precise timestamp value generated by the local clock of the server where the remote data execution system resides, at the moment when the remote data execution system successfully inserts the pre-occupancy record into the resource pre-occupancy table of the local database.
[0042] The pre-occupancy deadline in the pre-occupancy record is calculated by adding the current issuance time to the pre-lock survival period. The issuance time refers to the local timestamp collected by the remote system at the moment the remote data execution system successfully inserts the pre-occupancy record into the local database's resource pre-occupancy table. The maximum duration of the pre-lock survival period is dynamically calculated and determined locally by the remote data execution system using the following formula: Where T is the pre-lock survival period. The basic lifecycle constant is set based on the upper limit of the end-to-end communication link latency stress test from the time when the business management platform issues the resource pre-occupancy instruction to the remote data execution system to the time when the remote data execution system performs the physical cancellation of resources based on the locking token. The purpose is to ensure that the pre-occupancy record does not expire prematurely before the physical cancellation of resources is triggered under normal communication conditions. For example, it is set to 30 seconds. This is the load extension factor, which is set based on the waiting time delay in the queue increasing with the queue occupancy rate, i.e., the ratio of the number of currently un-cancelled pre-occupied records to the upper limit constant of the resource pre-occupancy table capacity, with an engineering approximation assumption of approximately linear growth; for example, it is set to 0.5; The current number of unredeemed pre-occupied records is a dynamic integer value obtained by performing a real-time counting query on the local resource pre-occupied table each time a lock token is issued by the remote data execution system. The real-time counting query uses the records in the resource pre-occupied table that are currently unredeemed as filtering conditions, calls a database aggregation function, such as the COUNT function, to count the total number of records that currently meet the conditions, and uses this total number of records as the current number of unredeemed pre-occupied records. This is a constant representing the upper limit of the resource pre-occupied table capacity. Its setting is based on the maximum number of records in the local database of the remote data execution system when the performance of a single resource pre-occupied table reaches an inflection point during read and write operations. The purpose is to provide a normalized denominator for the dynamic load ratio of the remote data execution system. For example, it is set to 50,000 records. The delay compensation factor is set based on the classic engineering constraint in the TCP timeout retransmission mechanism, where retransmission timeouts are calculated as a multiple of the smoothed round-trip delay. The purpose is to cover the tail of round-trip delays exceeding the average due to network jitter. For example, it is set to 4. R is the average network round-trip delay, which is the sliding window arithmetic mean of the single-interaction delays of the remote data execution system in the last twenty processing of the resource pre-allocation command. The specific calculation process is as follows: the remote data execution system records the reception timestamp of each received resource pre-allocation command and the sending timestamp of the locking token sent to the service management platform. The difference between these two timestamps is calculated as the single-interaction delay sample value. The sum of the last twenty single-interaction delay sample values is then divided by the number of samples to dynamically calculate the delay. After the locking token is generated, the remote data execution system sends the locking token to the service management platform via the inter-system communication channel. See also... Figure 4 This is a timing diagram for token bucket rate limiting and lightweight pre-locking provided in an embodiment of the present invention. Figure 4 In the diagram, the overall timeline consists of two vertical lifelines representing the "Business Management Platform" and the "Remote Data Execution System," as well as a top-down time axis. In the diagram, the first solid arrow pointing from the Business Management Platform to the Remote Data Execution System represents the issuance of the "Resource Pre-allocation Instruction." The rectangular activation blocks on the remote data execution system's lifeline, from top to bottom, represent three core operations executed within the system: first, "Token Bucket Rate Limiting Admission Judgment"; second, "Lightweight Pre-locking," which involves initiating and immediately committing a single short transaction to insert a pre-allocation record into the resource pre-allocation table; and third, dynamically calculating the "Pre-lock Survival Period" based on a formula and generating a "Lock Token." The solid arrow pointing back from the remote data execution system to the Business Management Platform represents the callback sending of the generated "Lock Token." Furthermore, the broken line segments marked next to the rectangular activation blocks visually indicate the effective duration of the "Pre-lock Survival Period," from the issuance time of successful insertion of the pre-allocation record to the pre-allocation deadline.
[0043] Step S23: Based on the locking token, drive the global state machine to send a physical confirmation instruction to perform physical resource write-off and output an asynchronous event message.
[0044] After receiving the lock token from the remote data execution system, the business management platform establishes a state transition and physical confirmation linkage mechanism based on the lock token in order to synchronize the fact that the remote system has completed resource pre-occupation to the global state machine and trigger the final physical allocation of the target resource. This mechanism also prevents the lock token from failing to be cleared within the pre-lock lifecycle due to network communication or processing delays.
[0045] Specifically, the business management platform compares the globally unique identifier in the lock token with the identifier binding field of the global state machine in memory. If they do not match, the lock token is discarded and a binding exception log is recorded, while the state enumeration field of the global state machine remains in the initial suspended state. If they match, the lock token is written to the token register field of the global state machine, the state enumeration field is moved from the initial suspended state to the pending execution state, the version number field is incremented by 1, and a physical confirmation instruction is constructed and sent to the remote data execution system. The physical confirmation instruction is a structured instruction message composed of all fields of the lock token and the platform confirmation time stamp, used to authorize the remote data execution system to convert the pre-occupied record into a physical deduction. The platform confirmation time stamp refers to the server local timestamp collected and generated by the business management platform when constructing the physical confirmation instruction.
[0046] After receiving the physical confirmation instruction, the remote data execution system extracts the token identifier and uses it to query the resource pre-allocation table in the local database to perform a validity determination. The determination result is divided into two mutually exclusive branches: if the pre-allocation record corresponding to the token identifier exists, and the current timestamp of the system receiving the physical confirmation instruction is earlier than or equal to the pre-allocation deadline recorded in the pre-allocation record, then the remote data execution system performs resource physical write-off. The resource physical write-off refers to opening a single short transaction in the local database, namely the resource write-off transaction, and performing two atomic write operations within the resource write-off transaction: First, check whether the corresponding available quantity in the resource deduction table is greater than or equal to the resource consumption quantity. If it is less, roll back the resource write-off transaction and return an insufficient inventory response; if it is greater than or equal to, deduct the resource consumption quantity from the available quantity field. The resource deduction table refers to the data table deployed in the local database of the remote data execution system that records the details of the target resource available quantity deduction. Second, update the record status of the pre-allocation record in the resource pre-allocation table from unwritten to written. After a resource revocation transaction is successfully submitted, the remote data execution system generates a revocation receipt and writes the token identifier and the receipt into a token cache. The revocation receipt is a digest value calculated using a hash algorithm after concatenating a globally unique identifier, the transaction number of the resource revocation transaction, and the actual deducted resource consumption. The token cache is a remote local cache set with the token identifier as the key and the revocation receipt as the value. This token cache is configured with a cache entry expiration period. The cache entry expiration period is the maximum duration for which the token identifier and revocation receipt are allowed to reside in the cache. This period is set based on the empirical upper bound of the maximum tolerance time required for probe command retransmission under extreme network latency. The purpose is to ensure that duplicate commands arriving late due to network jitter can hit the token cache for deduplication. For example, the cache entry expiration period is set to 24 hours.
[0047] The remote data execution system publishes an asynchronous event message to the message middleware of the system bus. The message middleware refers to a distributed message queue cluster using a globally unique identifier as the partition key. The asynchronous event message is an event payload consisting of five fields: final resource balance, second timestamp, revocation receipt, globally unique identifier, and token identifier. The second timestamp is the system's local timestamp at the time the aforementioned resource revocation transaction was submitted. The final resource balance is the remaining available quantity in the row corresponding to the target resource code in the resource deduction table after the aforementioned resource revocation transaction was submitted. If the pre-occupancy record corresponding to the token identifier does not exist, or the system's current timestamp is later than the pre-occupancy deadline recorded in the pre-occupancy record, it is determined that a pre-lock failure condition has been triggered. At this time, the remote data execution system returns a pre-lock failure response to the business management platform. After receiving the pre-lock failure response, the business management platform rolls back the state enumeration field of the global state machine from the pending execution state along the unique rollback path to the initial suspended state, clears the token register field, and re-initiates the two-phase verification process.
[0048] Step S20 addresses the issues in a distributed collaborative processing system comprised of a first terminal node, a business management platform, and a remote data execution system. These issues arise from either establishing a long-term, strongly consistent global lock to ensure cross-system resource consistency, or directly driving physical write-offs that lead to long transaction rollbacks and connection pool blocking in the remote local database. Step S20 achieves deterministic cross-system resource write-offs without a strongly consistent global lock. Specifically, the resource consumption parameter set serves as the foundational structured judgment benchmark driving the business management platform to perform two-phase verification; the resource pre-allocation instruction triggers a request for the remote data execution system to perform lightweight pre-locking; the lock token cuts off the path for remote transaction suspensions to propagate blocking to the business management platform; and the asynchronous event message drives the synchronous flow of subsequent end-to-end closed-loop confirmations between systems.
[0049] Step S30: Calculate the comparison hash benchmark value based on the asynchronous event message, use the comparison hash benchmark value to drive the global state machine to transition to the reconciliation completion state, use the global state machine to issue probe compensation messages, perform joint comparison on the probe compensation messages, output the comparison judgment result, obtain the closed loop feature message based on the comparison judgment result, perform byte-by-byte comparison based on the closed loop feature message, and output the final consistency data.
[0050] Further, step S30 includes: Step S31: Calculate the comparison hash benchmark value based on the asynchronous event message, and use the comparison hash benchmark value to drive the global state machine to transition to the reconciliation completion state.
[0051] After the remote data execution system publishes an asynchronous event message to the message middleware, in order to verify the consistency of the end-to-end data flow, prevent the risk of data tampering and out-of-order timing during message transmission, and converge the physical write-off facts of the remote data execution system to the unique state anchor point of the business management platform, the business management platform establishes a hash comparison and state machine linkage flow mechanism based on asynchronous event messages.
[0052] Specifically, the business management platform extracts the values of three fields from the asynchronous event message: the globally unique identifier, the reconciliation receipt, and the final resource balance. The platform then concatenates these three fields in a fixed order: globally unique identifier first, reconciliation receipt in the middle, and final resource balance last. A hash algorithm, such as SHA-256, is applied to the concatenated data to calculate the digest, resulting in the actual end-to-end closed-loop comparison hash base value. Using the globally unique identifier as the primary key, the platform retrieves and activates the corresponding global state machine from the state machine record table in the state repository. The business management platform extracts the token identifier from the asynchronous event message and performs a consistency check with the token identifier of the locked token temporarily stored in the token register field of the global state machine. If they do not match, the asynchronous event message is determined to be an abnormal message under timeout retransmission or failure environment, and is directly discarded, terminating the current flow logic. If they match, it means that the asynchronous event message is a valid and up-to-date confirmation credential. The business management platform writes the actually calculated comparison hash benchmark value into the target state benchmark value field of the global state machine as the final state arbitration credential throughout the entire order lifecycle. Simultaneously, strictly adhering to the unidirectional migration constraint, the business management platform unidirectionally migrates the state enumeration field of the global state machine from the pending execution state to the verification completed state, and performs an auto-increment operation with a step size of 1 on the version number field of the global state machine. Before performing this auto-increment operation, the business management platform extracts the old value of the version number field before the auto-increment as the update matching condition. The business management platform synchronously persists the global state machine to the state storage repository. The business management platform checks whether the current version number corresponding to the globally unique identifier in the state machine record table of the state repository is equal to the update matching condition. If they are equal, the update is allowed, and the global state machine with the modified values of the three fields (the completed state enumeration field, the target state baseline value field, and the version number field) is written as the latest data record row to overwrite the state machine record table of the state repository. If they are not equal, the update is rejected, thereby strictly ensuring the strong consistency confirmation of the fact that the business management platform performs physical write-off of system resources on remote data in a concurrent environment.
[0053] Step S32: Use the global state machine to send probe compensation messages, perform joint comparison on the probe compensation messages, and output the comparison judgment result.
[0054] After the business management platform migrates the state enumeration fields of the global state machine to the pending execution state and issues a physical confirmation command, in order to prevent the message middleware from losing or delaying the arrival of asynchronous event messages due to network jitter, avoid the global state machine from being permanently suspended in the pending execution state, and prevent the business management platform from blindly resending the physical confirmation command and causing duplicate deductions in the resource deduction table of the remote data execution system, the business management platform and the remote data execution system establish a probe compensation and idempotency interception mechanism based on an adaptive backoff algorithm.
[0055] Specifically, if the communication proxy component of the business management platform does not detect an asynchronous event message containing the globally unique identifier within a preset time window, a probe compensation loop is initiated. The preset time window refers to the maximum duration allowed for waiting for the remote data execution system to return an asynchronous event message, starting from the moment the business management platform sends the physical confirmation instruction. It is set based on the upper limit of the end-to-end latency stress test for the remote data execution system to complete resource physical write-off, and is strictly constrained to be less than the basic lifespan constant. The purpose is to ensure that the probe compensation message has at least one chance to reach the remote data execution system before the pre-occupied record expires. For example, the time window is set to 5 seconds. When the probe compensation loop is initiated, the business management platform initializes a retry counter n. The retry counter is an integer variable used to record the number of times the current probe compensation message has been retransmitted. Its initial value is set to 1, and its range is from 1 to a preset maximum retry count. The maximum retry count is set based on the engineering constraint that the cumulative sleep time of the exponential backoff sequence does not exceed the conventional value of the pre-locked survival period. The purpose is to prevent infinite retries of the remote data execution system that has lost contact. For example, the maximum retry count is set to 5 times. The internal operation sequence of each probe compensation cycle is as follows: First, calculate the backoff interval corresponding to the current retry counter n. The system performs the following steps: First, it controls the duration of the backoff interval corresponding to the current probe compensation cycle sleep. Second, it constructs a probe compensation message and sends it to the remote data execution system. The probe compensation message is a structured compensation message composed of three fields: the full value of the lock token temporarily stored in the token register field of the global state machine, the current value of the retry counter, and the probe sending time stamp. The probe sending time stamp is the local timestamp of the server collected by the business management platform when constructing the probe compensation message. Third, it increments the value of the retry counter by 1 step. Fourth, it continuously listens for asynchronous event messages and possible pre-lock failure responses returned by the remote data execution system during the next backoff interval. The formula for calculating the backoff interval is: ,in, It is a minimum value function. The maximum backoff interval is set based on limiting the maximum waiting time per event caused by exponential increase; for example, it is set to 16 seconds. The initial backoff reference interval is set based on the empirical value of round-trip delay of a single communication on the verification link, which is rounded down to an integer multiple. For example, it is set to 1 second. The multiplication factor is the retry counter as the exponent. The purpose of jitter amplification weights is to proportionally increase the retry interval when the network is more unstable in order to avoid congestion. For example, it is set to 1. The network jitter coefficient is the coefficient of variation obtained by dividing the standard deviation of the most recent twenty single-interaction latency samples from the business management platform by the arithmetic mean of those twenty single-interaction latency samples. This is the random jitter item corresponding to the current retry counter. Its value is a random duration that is uniformly sampled between zero and a preset random jitter upper limit. The purpose is to break up the sending time of concurrent probe compensation messages to avoid the thundering herd of retries. For example, the preset random jitter upper limit is set to 200 milliseconds.
[0056] After receiving the probe compensation message, the remote data execution system extracts the token identifier from the message and performs a joint comparison between the token cache and the resource pre-allocation table using this token identifier as the query key. The comparison result is divided into three mutually exclusive and exhaustive branches: First branch: If the token identifier already exists in the token cache, it is determined that the physical resource cancellation corresponding to the probe compensation message has been completed beforehand. The remote data execution system directly blocks the execution path of the underlying physical resource cancellation and, based on the cancellation receipt corresponding to the token identifier in the token cache, reconstructs and republishes the asynchronous event message to the message middleware; Second branch: If the token identifier does not exist in the token cache, but a pre-allocation record corresponding to the token identifier exists in the resource pre-allocation table, and the current time of the system receiving the probe compensation message is earlier than or equal to the pre-allocation deadline recorded in the pre-allocation record, it is determined that the physical confirmation instruction sent by the business management platform was lost in network transmission. The remote data execution system treats the probe compensation message as a physical confirmation instruction, performs resource physical cancellation again, writes the token identifier and cancellation receipt into the token cache, and publishes an asynchronous event message to the message middleware. In the third branch, if the token identifier does not exist in the token cache, and the pre-occupancy record corresponding to the token identifier in the resource pre-occupancy table does not exist, or the current time of the system that received the probe compensation message is later than the pre-occupancy deadline, it is determined that the pre-lock failure condition has been triggered, and the remote data execution system returns a pre-lock failure response to the business management middleware. The termination conditions for the aforementioned probe compensation loop are as follows: If the business management platform listens for and receives an asynchronous event message generated by the re-issuance of the first branch or the re-issuance of the second branch, it immediately exits the probe compensation loop, calculates the comparison hash base value based on the asynchronous event message, and drives the global state machine to migrate to the reconciliation completion state; if the business management platform receives a pre-lock failure response returned by the third branch, it immediately exits the probe compensation loop, rolls back the state enumeration field of the global state machine from the pending execution state to the initial suspended state, clears the token register field, and re-initiates the two-phase verification process; if the retry counter reaches the maximum retry limit and still no asynchronous event message or pre-lock failure response is received, it exits the probe compensation loop, and the state enumeration field of the global state machine remains in the pending execution state, awaiting manual intervention. See also Figure 5 This is a timing diagram of probe compensation and interception based on an adaptive backoff algorithm provided in an embodiment of the present invention. Figure 5In the diagram, the overall timeline consists of two vertical lifelines representing the "Business Management Platform" and the "Remote Data Execution System," as well as a top-down time axis. In the diagram, the first solid arrow with a dashed line and a cross, pointing from the Business Management Platform to the Remote Data Execution System, represents packet loss or anomalies in the network transmission of the issued "Physical Confirmation Command." Subsequently, the light gray rectangle and the broken line segment on the left side of the Business Management Platform lifeline visually indicate that the system is waiting within a "preset time window" and has not detected any asynchronous event messages. Immediately afterward, a second rectangular activation block appears on the Business Management Platform lifeline, representing the system initiating a probe compensation loop, calculating the backoff interval, and hibernating for the corresponding duration to avoid network congestion. After hibernation, the first... The two solid arrows represent sending the generated "probe compensation message" to the remote data execution system. This probe compensation message contains exclusive verification credentials such as a lock token and a retry counter. The rectangular activation block on the lifeline of the remote data execution system represents the joint comparison operation it performs internally after receiving the message to perform idempotent interception. Finally, the solid arrow pointing back from the remote data execution system to the business management platform represents the "asynchronous event message" published by the remote system and successfully listened to and obtained by the platform. This fully demonstrates the entire process of end-to-end link self-healing achieved by the system through adaptive backoff and interception mechanisms in the case of single-point communication anomalies.
[0057] Step S33: Obtain the closed-loop feature message based on the comparison and judgment result, perform byte-by-byte comparison based on the closed-loop feature message, and output the final consistency data.
[0058] After the state enumeration field of the global state machine is migrated to the reconciliation completion state, in order to ultimately feed back the physical reconciliation facts of the remote data execution system to the first terminal node as the order initiator, and complete the end-to-end closed-loop confirmation with a computable mathematical certificate, so as to avoid the global state machine being permanently stuck in the reconciliation completion state and causing the state storage repository to be continuously occupied by undestroyed records, the business management platform and the first terminal node establish a multi-source feature matching and end-to-end closed-loop confirmation mechanism.
[0059] The first terminal node triggers and collects the signature completion time stamp through its internal signature action collection component. The signature action collection component refers to the hardware and software interface module deployed in the first terminal node, used to monitor physical signature action events triggered by peripheral devices, such as barcode scanners or front-end confirmation buttons. The signature completion time stamp refers to the terminal's local timestamp captured by the signature action collection component at the moment of the final physical signature action. Subsequently, the first terminal node constructs a closed-loop feature message based on the signature completion time stamp. Specifically, the closed-loop feature message is a constructed four-component structured vector, including a globally unique identifier in the asynchronous event message, a verification receipt in the asynchronous event message, the final resource balance in the asynchronous event message, and the signature completion time stamp. This closed-loop feature message serves as a closed-loop reporting payload carrying both terminal signature facts and remote verification facts. The first terminal node reports this closed-loop feature message to the business management platform via the communication network. After receiving the closed-loop feature message, the business management platform extracts its status hash value. The specific extraction process is as follows: After removing the receipt completion time stamp component from the closed-loop feature message, the business management platform concatenates the three components of the remaining asynchronous event message—the globally unique identifier, the verification receipt, and the final resource balance—in a fixed order: globally unique identifier first, verification receipt in the middle, and final resource balance last. A hash algorithm, such as SHA-256, is then applied to the concatenated byte stream to perform digest calculation, and the calculated digest value is used as the state hash value. The logic for removing the receipt completion time stamp is as follows: the receipt completion time stamp is a unique time-series record field on the first terminal node side, does not participate in the mathematical comparison of state consistency, and is only stored with the final data archive. After extraction, the business management platform performs a byte-by-byte comparison between the state hash value and the target state benchmark value stored in the target state benchmark value field of the global state machine. The comparison result is divided into two mutually exclusive branches.
[0060] In the first branch, if the state hash value is consistent with the target state baseline value byte-by-byte, the business management platform strictly follows the one-way migration constraint, unidirectionally migrating the state enumeration field of the global state machine from the reconciliation completion state to the closed-loop destruction state. Simultaneously, the business management platform writes an archive record consisting of seven fields—a globally unique identifier, a first timestamp, a second timestamp, a receipt completion time stamp, the final resource balance, the reconciliation receipt, and the closed-loop feature message—as final consistency data into the archive partition of the state repository for persistent storage. This final consistency data serves as an immutable audit credential for the final consistency of the three-party system link states. After storage, the business management platform destroys the memory instance of the global state machine and deletes the corresponding data record row in the state machine record table of the state repository to release active system resources and complete the final closed-loop flow of cross-system order data synchronization. In the second branch, if the state hash value is inconsistent with the target state baseline value, it is determined that the closed-loop feature message suffered transmission damage in the reporting link or that the asynchronous event message version subscribed to by the first terminal node is outdated. At this point, the business management platform issues a re-reporting instruction to the first terminal node and initiates a retransmission loop for the globally unique identifier. The retransmission loop uses a retransmission counter as the control variable, and the internal operation sequence for each loop is as follows: the business management platform issues a re-reporting instruction; the first terminal node resubscribes to and obtains asynchronous event messages, reconstructs and reports the closed-loop characteristic message; the business management platform re-executes the aforementioned state hash value comparison. The termination condition for this retransmission loop is: the state hash value comparison is consistent, or the retransmission counter reaches the preset maximum retransmission count limit. The maximum retransmission count limit is set based on on-site statistical experience of retransmission success rate convergence in a weak network environment for the first terminal node; for example, it is set to 3 times. If the comparison is still inconsistent when the retransmission counter reaches the maximum retransmission count limit, the state enumeration field of the global state machine remains in the verification completed state and is suspended, no longer generating any data. An abnormal alarm is sent to the local operation and maintenance system for manual intervention.
[0061] Step S30, through probe compensation messages, closed-loop feature messages, and eventual consistency data, solves the problem that asynchronous callback links are prone to unpredictable temporal disorder and state compensation retries under boundary conditions of network jitter or high-concurrency resource contention. This leads to non-idempotent duplicate resource allocation, state machine transition conflicts, and permanent fragmentation of underlying state data across multiple nodes. It completely avoids state conflicts and data fragmentation in a distributed environment and completes the final closed-loop flow of cross-system order data synchronization. Specifically, comparing the hash benchmark value converges the physical reconciliation facts of the remote data execution system to the unique state anchor point of the business management platform; the probe compensation message avoids duplicate deductions from the remote resource deduction table caused by blindly resending physical confirmation instructions; and the closed-loop feature message and eventual consistency data enable the three-party systems to safely and deterministically complete the final destruction of the state machine and data solidification under the constraint of comparing the state hash value with the target state benchmark value.
[0062] Example 2 This embodiment, based on embodiment 1, provides a cross-system order data synchronization and consistency system, such as... Figure 6 As shown, it includes: Request routing module: used to obtain the original business request and perform consistent hashing routing, output standardized request messages, perform duplicate determination based on the standardized request messages, instantiate and output the global state machine, and perform mode verification and standardized preprocessing on the standardized request messages, and output a set of resource consumption parameters; Resource pre-allocation module: It is used to perform two-stage verification on the resource consumption parameter set, output resource pre-allocation instructions, perform token bucket rate limiting and lightweight pre-locking on the resource pre-allocation instructions, generate and output locking tokens, drive the global state machine based on the locking tokens to send physical confirmation instructions to perform physical resource cancellation, and output asynchronous event messages; The probe compensation module is used to calculate the comparison hash benchmark value based on asynchronous event messages, drive the global state machine to transition to the reconciliation completion state using the comparison hash benchmark value, issue probe compensation messages using the global state machine, perform joint comparison on the probe compensation messages, output the comparison judgment result, obtain the closed-loop feature message based on the comparison judgment result, perform byte-by-byte comparison based on the closed-loop feature message, and output the final consistency data.
[0063] In the request routing module, the process involves obtaining the original business request and performing consistent hash routing, outputting a standardized request message, performing duplicate detection based on the standardized request message, instantiating and outputting a global state machine, performing pattern verification and standardization preprocessing on the standardized request message, and outputting a set of resource consumption parameters, including: Step S11: Obtain the original business request and perform consistent hash routing, outputting a standardized request message; Step S12: Perform a duplicate determination based on the standardized request message, instantiate and output the global state machine; Step S13: Perform mode verification and standardization preprocessing on the standardized request message, and output a set of resource consumption parameters.
[0064] In the resource pre-allocation module, a two-stage verification is performed on the resource consumption parameter set, a resource pre-allocation instruction is output, token bucket rate limiting and lightweight pre-locking are performed on the resource pre-allocation instruction, a locking token is generated and output, and a physical confirmation instruction is sent to the global state machine based on the locking token to perform physical resource write-off, and asynchronous event messages are output, including: Step S21: Perform a two-stage verification on the resource consumption parameter set and output a resource pre-allocation instruction; Step S22: Perform token bucket rate limiting and lightweight pre-locking on the resource pre-occupation command, and generate and output the lock token; Step S23: Based on the locking token, drive the global state machine to send a physical confirmation instruction to perform physical resource write-off and output an asynchronous event message.
[0065] In the probe compensation module, the following steps are taken: calculating a comparison hash benchmark value based on asynchronous event messages; using the comparison hash benchmark value to drive the global state machine to transition to the reconciliation completion state; issuing probe compensation messages using the global state machine; performing joint comparison on the probe compensation messages; outputting comparison judgment results; obtaining closed-loop feature messages based on the comparison judgment results; performing byte-by-byte comparison on the closed-loop feature messages; and outputting final consistency data, including: Step S31: Calculate the comparison hash benchmark value based on the asynchronous event message, and use the comparison hash benchmark value to drive the global state machine to transition to the reconciliation completion state; Step S32: Use the global state machine to send probe compensation messages, perform joint comparison on the probe compensation messages, and output the comparison judgment result; Step S33: Obtain the closed-loop feature message based on the comparison and judgment result, perform byte-by-byte comparison based on the closed-loop feature message, and output the final consistency data.
[0066] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0067] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely preferred embodiments of the present invention, and the scope of protection of the present invention is not limited to the above embodiments. All technical solutions falling within the scope of the present invention's concept are within the scope of protection of the present invention. It should be noted that for those skilled in the art, any improvements and modifications made without departing from the principles of the present invention should also be considered within the scope of protection of the present invention.
Claims
1. A method for synchronizing and maintaining consistency of order data across systems, characterized in that, The method includes: Obtain the original business request and perform consistent hash routing, output standardized request messages, perform duplicate determination based on the standardized request messages, instantiate and output the global state machine, perform mode verification and standardized preprocessing on the standardized request messages, and output a set of resource consumption parameters. Perform two-stage verification on the resource consumption parameter set, output resource pre-allocation instruction, perform token bucket rate limiting and lightweight pre-locking on the resource pre-allocation instruction, generate and output locking token, drive the global state machine based on the locking token to send physical confirmation instruction to perform physical resource cancellation, and output asynchronous event message; The comparison hash benchmark value is calculated based on asynchronous event messages. The comparison hash benchmark value is used to drive the global state machine to transition to the reconciliation completion state. The probe compensation message is issued by the global state machine. Joint comparison is performed on the probe compensation message, and the comparison judgment result is output. The closed loop feature message is obtained based on the comparison judgment result. Byte-by-byte comparison is performed based on the closed loop feature message, and the final consistency data is output.
2. The method for synchronizing and maintaining consistency of cross-system order data according to claim 1, characterized in that, The execution process of the consistent hashing routing includes: Extract globally unique identifiers from the original business request; A consistent hash ring with a preset number of virtual nodes is constructed, and each virtual node is bound to a corresponding physical service shard. The hash algorithm is called to perform a hash operation on the globally unique identifier to generate a hash value, and the hash value is mapped to the location coordinates on the consistent hash ring; Starting from the azimuth coordinates, a linear search is performed clockwise to locate the first matched virtual node. The original business request is then routed to the physical service shard bound to that virtual node and encapsulated to generate a standardized request message.
3. The method for cross-system order data synchronization and consistency according to claim 2, characterized in that, The instantiation process of the global state machine includes: Retrieve the state repository containing the state machine record table, and perform duplicate checks on the state machine record table using a globally unique identifier as the primary key; If it is determined that a data record row corresponding to a globally unique identifier already exists, the current state is returned to the first terminal node and instantiation is refused. If it is determined that no data record row exists, a new global state machine is instantiated in memory, and the state enumeration field, identifier binding field, first timestamp field, token register field, target state baseline value field and version number field are set in the global state machine. Extract the first timestamp from the standardized request message, configure the state enumeration field to the initial suspended state, write the identifier binding field and the first timestamp field to the globally unique identifier and the first timestamp respectively, configure the token register field and the target state baseline value field to null values, and write the global state machine as a new data record row into the state machine record table.
4. The method for synchronizing and maintaining consistency of cross-system order data according to claim 2, characterized in that, The methods for obtaining the set of resource consumption parameters include: Extract the target resource code, resource consumption quantity, and remote system identifier from the standardized request message; Based on the preset standard number of bits, the target resource encoding is padded with leading zeros or truncated with trailing characters, and normalized into a fixed-length string; Remove the non-numeric characters and decimal parts from the resource consumption quantity and round it down to a positive integer. Obtain the remote system registry, match the remote system identifier in the remote system registry to extract the internal system identification code, and use it as the remote system code; The target resource code, resource consumption quantity, and remote system code are combined into a set of resource consumption parameters.
5. A method for synchronizing and maintaining consistency of cross-system order data according to claim 4, characterized in that, The acquisition of the resource pre-allocation instruction includes: Extract the resource consumption quantity and target resource code from the resource consumption parameter set, determine whether the resource consumption quantity is greater than the preset single resource limit, and obtain the resource master data dictionary to determine whether the target resource code exists in the resource master data dictionary; If all the judgments pass, a resource pre-allocation instruction is constructed and sent to the remote data execution system corresponding to the remote system code; The resource pre-allocation instruction consists of a globally unique identifier, a target resource code, a resource consumption quantity, and a timing stamp issued by the data collection platform.
6. The method for cross-system order data synchronization and consistency according to claim 5, characterized in that, The execution process of token bucket rate limiting and lightweight pre-locking for resource pre-allocation instructions includes: Get the token bucket with available tokens, and check the number of available tokens in the token bucket; If the number of available tokens is zero, the judgment result will be determined as access denial and a rate limiting denial response will be returned to the business management platform; If the number of available tokens is greater than or equal to one, deduct one available token as admission permission and retrieve the resource pre-occupancy table from the local database; A single short transaction is initiated and immediately committed in the resource reservation table to insert a reservation record, which consists of the globally unique identifier, the target resource code, the resource consumption quantity, and the reservation deadline.
7. A method for synchronizing and maintaining consistency of cross-system order data according to claim 6, characterized in that, The method for obtaining the lock token includes: After the pre-reservation record is successfully inserted into the resource pre-reservation table, the collection token issuance sequence stamp is collected. Obtain the number of currently uncancelled pre-occupied records and the upper limit constant of the resource pre-occupied table capacity, and calculate the pre-lock survival period based on the number of currently uncancelled pre-occupied records and the upper limit constant of the resource pre-occupied table capacity; The pre-occupancy deadline is calculated by superimposing the token issuance sequence stamp with the pre-lock survival period; The hash calculation is performed on the byte stream formed by concatenating the globally unique identifier and the token issuance time stamp to obtain the digest value as the token identifier; Combine the token identifier, pre-lock lifespan, token issuance sequence stamp, and globally unique identifier to generate and output a lock token.
8. A method for synchronizing and maintaining consistency of cross-system order data according to claim 7, characterized in that, The method for obtaining the asynchronous event message includes: Perform a consistency comparison between the globally unique identifier in the lock token and the identifier binding field in the global state machine; If the comparison is consistent, the state enumeration field in the global state machine is updated to the pending execution state, and a physical confirmation instruction is sent to the remote data execution system. Get the current timestamp of the system that received the physical confirmation instruction, and extract the token identifier in the physical confirmation instruction to query the resource pre-occupancy table. If the corresponding pre-occupancy record exists and the current timestamp of the system is earlier than or equal to the pre-occupancy deadline, get the actual resource deduction table and deduct the resource consumption from it, and update the pre-occupancy record to the cancelled status. The hash digest of the concatenation of the globally unique identifier and the actual deducted resource consumption is used as the reconciliation receipt. The token cache is retrieved, the token identifier and the reconciliation receipt are written into the token cache, and an asynchronous event message containing the reconciliation receipt and the final resource balance is output.
9. A method for synchronizing and maintaining consistency of cross-system order data according to claim 8, characterized in that, The execution process of using the comparison hash benchmark value to drive the global state machine to transition to the rewrite completion state includes: Extract the globally unique identifier, revocation receipt and final resource balance from the asynchronous event message, concatenate the strings and perform hash digest calculation to obtain the comparison hash base value; Retrieve the global state machine corresponding to the globally unique identifier from the state machine record table, and perform a consistency check between the token identifier in the asynchronous event message and the token identifier in the token register field of the global state machine. If the verification matches, the comparison hash base value will be written into the target state base value field in the global state machine, and the state enumeration field will be unidirectionally migrated to the reconciliation completion state. Increment the version number field in the global state machine and overwrite it in the state repository.
10. A method for synchronizing and maintaining consistency of cross-system order data according to claim 9, characterized in that, The method for obtaining the comparison and determination result includes: Set a time window and a retry counter. If no asynchronous event message is detected within the time window, initialize the retry counter, calculate the backoff interval corresponding to the retry counter, and sleep for the duration corresponding to the backoff interval. Collect the probe sending time stamp, combine the lock token, retry counter and probe sending time stamp to construct a probe compensation message and send it down; Obtain the token identifier from the probe compensation message and perform a joint comparison between the token cache and the resource pre-occupancy table; If it is determined that the token identifier already exists in the token cache, then the asynchronous event message is re-published based on the revocation receipt in the token cache as the comparison and determination result; If it is determined that the token identifier does not exist in the token cache library, but there is a corresponding pre-reservation record in the resource pre-reservation table, and the current time is earlier than or equal to the pre-reservation deadline, then the physical write-off of the resource will be re-executed and an asynchronous event message will be published.
11. A method for synchronizing and maintaining consistency of cross-system order data according to claim 10, characterized in that, The method for obtaining the eventually consistent data includes: Obtain the closed-loop feature message constructed and reported by the first terminal node based on the receipt completion time stamp. The closed-loop feature message is composed of a globally unique identifier, a verification receipt, the final resource balance and the receipt completion time stamp. Remove the receipt completion time stamp from the closed-loop feature message, concatenate the remaining components into strings and calculate to obtain the status hash value; Compare the state hash value with the target state baseline value extracted from the target state baseline value field in the global state machine byte by byte; If the comparison is consistent, the state enumeration field is migrated to the closed-loop destruction state, and the archived record containing the closed-loop characteristic message is written to the state repository as the final consistent data.
12. A cross-system order data synchronization and consistency system, used to implement the cross-system order data synchronization and consistency method according to any one of claims 1-11, characterized in that, The system includes: Request routing module: used to obtain the original business request and perform consistent hashing routing, output standardized request messages, perform duplicate determination based on the standardized request messages, instantiate and output the global state machine, and perform mode verification and standardized preprocessing on the standardized request messages, and output a set of resource consumption parameters; Resource pre-allocation module: It is used to perform two-stage verification on the resource consumption parameter set, output resource pre-allocation instructions, perform token bucket rate limiting and lightweight pre-locking on the resource pre-allocation instructions, generate and output locking tokens, drive the global state machine based on the locking tokens to send physical confirmation instructions to perform physical resource cancellation, and output asynchronous event messages; The probe compensation module is used to calculate the comparison hash benchmark value based on asynchronous event messages, drive the global state machine to transition to the reconciliation completion state using the comparison hash benchmark value, issue probe compensation messages using the global state machine, perform joint comparison on the probe compensation messages, output the comparison judgment result, obtain the closed-loop feature message based on the comparison judgment result, perform byte-by-byte comparison based on the closed-loop feature message, and output the final consistency data.