Order clearing state synchronization method and system based on multi-device cooperation

By constructing a multi-device collaborative sensing topology and state drift vector token based on spatiotemporal and semantics, the problems of state tearing and incorrect order settlement in multi-device state synchronization are solved, achieving efficient local state convergence and differential synchronization, and reducing communication overhead and cloud pressure.

CN122496510APending Publication Date: 2026-07-31CHUSHANG DIGITAL TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHUSHANG DIGITAL TECHNOLOGY CO LTD
Filing Date
2026-05-18
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing multi-device state synchronization technologies cannot dynamically resolve state drift conflicts caused by high-frequency concurrent operations in complex physical spaces, leading to state fragmentation and incorrect order settlement between devices, and also incurring redundant communication overhead and network jitter issues.

Method used

Based on the spatiotemporal span and semantic distance of terminal devices, a multi-device collaborative perception topology with a directed acyclic graph configuration is dynamically constructed to generate multi-dimensional state drift vector tokens. Local state convergence and differential synchronization are achieved through asynchronous directional diffusion synchronization and dynamic consensus threshold mechanisms.

Benefits of technology

It effectively blocks spoofed synchronization across physical regions, solves the problem of state tearing and incorrect order settlement caused by concurrent operations of multiple terminals in weak network environments and during peak business periods, reduces redundant communication overhead and cloud server pressure, and ensures strong state consistency between local devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122496510A_ABST
    Figure CN122496510A_ABST
Patent Text Reader

Abstract

This invention relates to the field of intelligent commercial transaction terminals and discloses a method and system for order clearing status synchronization based on multi-device collaboration. The method includes: dynamically constructing a multi-device collaborative perception topology with a directed acyclic graph configuration based on the spatiotemporal span and semantic distance of the terminal devices; intercepting order clearing events, calculating the state drift probability based on concurrency history and order popularity, and generating a multi-dimensional state drift vector token containing a vector clock; calculating the synchronization urgency index of each node according to the perception topology, and using the token to perform asynchronous directional diffusion synchronization based on spatiotemporal lock verification; completing local state convergence using a dynamic consensus threshold mechanism negatively correlated with the state drift probability, generating a Merkle tree state snapshot, and submitting a differential synchronization request to the cloud server; solving the problems of state tearing, conflict, and cloud overload that are easily caused by traditional centralized synchronization schemes in weak networks or during peak business periods, through local adaptive collaboration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent commercial transaction terminals, and in particular to a method and system for synchronizing order clearing status based on multi-device collaboration. Background Technology

[0002] As smart commerce becomes increasingly complex with its multi-terminal scenarios, a single business location often deploys a massive number of heterogeneous terminals, including cash registers, kitchen dashboards, waiter PDAs, and customer self-service devices. In the order clearing process, such high-concurrency state changes heavily rely on the consistency and synchronization of states across multiple devices.

[0003] However, existing multi-device state synchronization technologies typically rely on centralized cloud polling, cloud global broadcasting, or simple indiscriminate local area network flooding. These conventional solutions fundamentally ignore the spatiotemporal distribution characteristics of different terminal devices in physical space and the semantic differences in business roles. This homogenization of synchronization logic not only leads to a large amount of redundant communication overhead for unrelated devices, but also fails to dynamically resolve state drift conflicts caused by high-frequency concurrent operations when network jitter occurs in complex physical spaces. It lacks an adaptive local consensus mechanism driven by order popularity and device spatial relationships, ultimately inevitably causing severe state tearing between devices and incorrect order settlement during weak networks or peak business periods. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for synchronizing order clearing status based on multi-device collaboration, in order to solve the problems mentioned in the background art.

[0005] This invention is implemented as follows: On one hand, a method for synchronizing order clearing status based on multi-device collaboration, the method comprising:

[0006] Based on the spatiotemporal span of terminal devices and the semantic distance of roles, a multi-device collaborative perception topology with a directed acyclic graph configuration is dynamically constructed.

[0007] Intercept order clearing events within a multi-device network, calculate state drift probability based on concurrency history and order popularity, and generate a multi-dimensional state drift vector token containing a vector clock;

[0008] Based on the multi-device collaborative sensing topology, the synchronization urgency index of each node is calculated, and the asynchronous directional diffusion synchronization based on spatiotemporal lock verification is performed using the multi-dimensional state drift vector token.

[0009] Local state convergence is achieved by using a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, a Merkle tree state snapshot is generated, and a differential synchronization request is submitted to the cloud server.

[0010] As a further aspect of the present invention, the dynamic construction of a multi-device collaborative perception topology based on the spatiotemporal span of terminal devices and the semantic distance of roles specifically includes:

[0011] The physical space signal attenuation rate and network round-trip latency of the active terminal devices within the local environment are detected to construct the spatiotemporal span between devices.

[0012] Extract the business role tags of each terminal device, and calculate the interrelationship of different role terminals to specific order operations through a preset semantic mapping table to obtain the semantic distance of the roles;

[0013] The spatiotemporal span and the comprehensive connection weight between the role semantic distance calculation device are integrated, and a multi-device collaborative perception topology containing the primary and secondary data flow directions is constructed based on this.

[0014] The system monitors the movement trajectory and signal attenuation changes of the terminal device in real time, and adaptively adjusts the connection edge of the multi-device collaborative sensing topology when the overall connection weight is lower than the reconstruction threshold.

[0015] As a further aspect of the present invention, the interception of order clearing events within a multi-device network, and the calculation of state drift probability based on concurrency history and order popularity, to generate a multi-dimensional state drift vector token containing a vector clock, specifically includes:

[0016] The order clearing event is intercepted in the business processing engine of the terminal device, and the initial state parameters, including the operation terminal identifier, operation type identifier, and basic order summary, are extracted.

[0017] Retrieve the concurrent operation frequency of the order that has experienced the order clearing event within a preset historical time window, and use the sliding window algorithm to calculate the state drift probability of the current order experiencing data conflict;

[0018] Generate the vector clock that records the state evolution of each terminal, and concatenate it with the initial state parameters and the state drift probability using multi-dimensional features to construct the order state drift vector;

[0019] The order state drift vector is encoded and compressed using a dynamic hash algorithm to generate the multidimensional state drift vector token for network transmission.

[0020] As a further aspect of the present invention, the step of calculating the synchronization urgency index of each node based on the multi-device collaborative sensing topology and performing asynchronous directional diffusion synchronization based on spatiotemporal lock verification using the multi-dimensional state drift vector token specifically includes:

[0021] The source node that triggers the order clearing event extracts the connection weights of adjacent nodes associated with the current order based on the multi-device collaborative sensing topology, and calculates the synchronization urgency index of each adjacent node;

[0022] Asynchronous directional diffusion of the multidimensional state drift vector token is initiated to the target nodes with priority, according to the principle of descending order of the synchronization urgency index.

[0023] After parsing the multidimensional state drift vector token, the receiving node extracts the vector clock and the spatial coordinates of the source node, and performs the spatiotemporal lock verification to determine whether the state transmission time difference and physical space span conform to the preset safe parabolic model.

[0024] If the spacetime lock verification passes, the state carried by the multidimensional state drift vector token is updated to the local order memory snapshot according to the preset vector clock merging rule to eliminate state divergence.

[0025] The receiving node generates a reduced-dimensional heartbeat receipt containing the updated status check code and returns it to the source node through the reverse path of the multi-device collaborative sensing topology.

[0026] As a further aspect of the present invention, the step of utilizing a dynamic consensus threshold mechanism negatively correlated with the state drift probability to achieve local state convergence, generating a Merkle tree state snapshot, and submitting a differential synchronization request to the cloud server specifically includes:

[0027] The source node that triggers the order clearing event continuously listens for and aggregates the reduced-dimensional heartbeat receipts from each receiving node;

[0028] Extract the state drift probability, and dynamically calculate the dynamic consensus threshold required for the current order settlement event based on the inverse principle that the higher the state drift probability, the more verification nodes are required.

[0029] When the number of valid dimensionality reduction heartbeat receipts collected reaches the dynamic consensus threshold, the states of all nodes participating in this local state convergence are hashed and aggregated to construct a local Merkle tree state snapshot.

[0030] Extract the difference between the root node hash value of the Merkle tree state snapshot and the last synchronization state of the cloud server, and initiate the differential synchronization request to the cloud server;

[0031] Receive the global confirmation sequence number sent by the cloud server, release the spatiotemporal lock on the terminal device associated with the current order, and clear the state drift probability cache.

[0032] As a further aspect of the present invention, another option is an order clearing status synchronization system based on multi-device collaboration, the system comprising:

[0033] The topology awareness module is used to dynamically construct a multi-device collaborative awareness topology with a directed acyclic graph structure based on the spatiotemporal span and semantic distance of terminal devices, so as to eliminate communication blind spots caused by heterogeneous network physical space and optimize transmission paths.

[0034] The vector generation module is used to intercept order clearing events in a multi-device network and calculate the state drift probability based on concurrency history and order popularity. It generates a multi-dimensional state drift vector token containing a vector clock to standardize and encapsulate the temporal evolution characteristics and potential conflict probabilities.

[0035] The directional diffusion module is used to calculate the synchronization urgency index of each node based on the multi-device collaborative sensing topology, and to use the multi-dimensional state drift vector token to perform asynchronous directional diffusion synchronization based on spatiotemporal lock verification, so as to block illegal forged synchronization across physical regions.

[0036] The dynamic convergence module is used to complete local state convergence by utilizing a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, generating a Merkle tree state snapshot and submitting a differential synchronization request to the cloud server, so as to reduce network bandwidth consumption while ensuring strong data consistency.

[0037] As a further aspect of the present invention, the topology sensing module specifically includes:

[0038] The span calculation unit is used to detect the physical space signal attenuation rate and network round-trip latency of active terminal devices in the local environment in order to construct the spatiotemporal span.

[0039] The semantic computing unit is used to extract the business role tags of terminal devices and calculate the interrelationship between different role terminals to obtain the semantic distance of roles.

[0040] The graph-based assembly unit is used to integrate spatiotemporal span and role semantic distance to calculate comprehensive connection weights and construct the multi-device collaborative perception topology of the directed acyclic graph.

[0041] The adaptive adjustment unit is used to monitor the status of terminal devices in real time and adaptively adjust the connection edges of the topology when the overall connection weight is lower than the reconstruction threshold.

[0042] As a further aspect of the present invention, the vector generation module specifically includes:

[0043] The event interception unit is used to intercept order clearing events and extract initial status parameters such as operation terminal identifier, operation type and basic summary.

[0044] The probability inference unit is used to retrieve the frequency of concurrent operations of an order and calculate the state drift probability using a sliding window algorithm.

[0045] The feature concatenation unit is used to generate a vector clock and concatenate it with the initial state parameters and state drift probability to construct an order state drift vector;

[0046] The encoding and compression unit is used to encode and compress the order state drift vector using a dynamic hash algorithm to generate the multidimensional state drift vector token.

[0047] As a further aspect of the present invention, the directional diffusion module specifically includes:

[0048] The index calculation unit is used to extract node connection weights to calculate the synchronization urgency index of adjacent nodes;

[0049] The asynchronous distribution unit is used to initiate asynchronous directional diffusion of multidimensional state drift vector tokens to the target node in descending order of synchronization urgency index;

[0050] The spatiotemporal verification unit is used to extract the vector clock and source node spatial coordinates at the receiving end and perform spatiotemporal lock verification based on the secure parabolic model;

[0051] The status merging unit is used to update the status to the local order memory snapshot according to the vector clock merging rule after the verification is passed;

[0052] The receipt reversal unit is used to generate a reduced-dimensional heartbeat receipt and return it to the source node through a topological reversal path.

[0053] The order settlement status synchronization method and system based on multi-device collaboration provided by this invention fundamentally abandons the crude mode of traditional centralized polling and indiscriminate flooding by constructing a perception topology based on spatiotemporal and semantic dimensions and introducing state drift vector tokens. This effectively blocks forged synchronization across physical regions and solves the problems of state fragmentation and incorrect order settlement caused by concurrent operations of multiple terminals in weak network environments and during peak business periods. Simultaneously, relying on dynamic local consensus and differential synchronization design, it greatly reduces redundant communication overhead and cloud server load while ensuring strong consistency of edge cluster status. Attached Figure Description

[0054] Figure 1 This is the main flowchart of the order clearing status synchronization method based on multi-device collaboration.

[0055] Figure 2 This is a logical block diagram of the generation of multi-dimensional state drift vector tokens in the order clearing status synchronization method based on multi-device collaboration.

[0056] Figure 3 This is a logic diagram for the determination of directional diffusion synchronization based on spatiotemporal lock verification in the order clearing status synchronization method based on multi-device collaboration. Detailed Implementation

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

[0058] The specific implementation of the present invention will be described in detail below with reference to specific embodiments.

[0059] The method and system for synchronizing order clearing status based on multi-device collaboration provided by this invention solves the technical problems in the background art.

[0060] like Figure 1 The diagram shown is a main flowchart of an order settlement status synchronization method based on multi-device collaboration according to an embodiment of the present invention. The order settlement status synchronization method based on multi-device collaboration includes:

[0061] Based on the spatiotemporal span of terminal devices and the semantic distance of roles, a multi-device collaborative perception topology with a directed acyclic graph configuration is dynamically constructed.

[0062] Intercept order clearing events within a multi-device network, calculate state drift probability based on concurrency history and order popularity, and generate a multi-dimensional state drift vector token containing a vector clock;

[0063] Based on the multi-device collaborative sensing topology, the synchronization urgency index of each node is calculated, and the asynchronous directional diffusion synchronization based on spatiotemporal lock verification is performed using the multi-dimensional state drift vector token.

[0064] Local state convergence is achieved by using a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, a Merkle tree state snapshot is generated, and a differential synchronization request is submitted to the cloud server.

[0065] In this embodiment, under traditional network architectures, multiple devices are prone to concurrent operations on the same order within the same time period (e.g., while a customer scans a QR code to pay, the cashier clicks "reverse checkout" or "refund" on the POS machine). If relying solely on cloud servers for polling and synchronization, network jitter can cause state fragmentation. Therefore, this embodiment first uses underlying LAN protocols (such as Wi-Fi Direct or Bluetooth Mesh) to dynamically construct a multi-device collaborative perception topology with a directed acyclic graph configuration based on the spatiotemporal span and semantic distance of the terminal devices. This physically clarifies the master-slave relationship of communication and the priority of data flow between devices. When any order settlement event occurs within the multi-device network, the system intercepts the operation command at the application layer and calculates the state drift probability in real time by combining the historical concurrent operation records of the order and the order's popularity (such as the peak transaction characteristics of the time period). This generates a multi-dimensional state drift vector token carrying core temporal characteristics, namely a vector clock. Subsequently, instead of using traditional network-wide flooding, the system calculates the synchronization urgency index of each adjacent node based on the established multi-device collaborative sensing topology. It then utilizes this multi-dimensional state drift vector token to perform asynchronous directional diffusion synchronization based on spatiotemporal lock verification, ensuring that data is preferentially transmitted only between the most closely related devices with reasonable physical distances. Finally, after completing local directional diffusion, the system uses a dynamic consensus threshold mechanism negatively correlated with the state drift probability to quickly achieve local state convergence within the local area network, generating a Merkle tree state snapshot containing the synchronization results. The differential data is then submitted to the cloud server, thus fundamentally guaranteeing strong consistency and high real-time performance of order clearing status among multiple devices within the local area network without requiring real-time cloud intervention.

[0066] As a preferred embodiment of the present invention, the dynamic construction of a multi-device collaborative perception topology based on the spatiotemporal span and semantic distance of terminal devices and roles specifically includes:

[0067] The physical space signal attenuation rate and network round-trip latency of the active terminal devices within the local environment are detected to construct the spatiotemporal span between devices.

[0068] Extract the business role tags of each terminal device, and calculate the interrelationship of different role terminals to specific order operations through a preset semantic mapping table to obtain the semantic distance of the roles;

[0069] The spatiotemporal span and the comprehensive connection weight between the role semantic distance calculation device are integrated, and a multi-device collaborative perception topology containing the primary and secondary data flow directions is constructed based on this.

[0070] The system monitors the movement trajectory and signal attenuation changes of the terminal device in real time, and adaptively adjusts the connection edge of the multi-device collaborative sensing topology when the overall connection weight is lower than the reconstruction threshold.

[0071] In this embodiment, the system's underlying layer calls the wireless network card driver interface of the terminal device. By sending probes and receiving response packets, the received signal strength indication is extracted to calculate the physical space signal attenuation rate. Simultaneously, the network round-trip time is obtained using the Ping command of the ICMP protocol, thus constructing a spatiotemporal span matrix between devices reflecting physical distance and network quality. Meanwhile, the system internally pre-configures a semantic mapping table in XML or JSON format, defining business role labels for different terminal devices. By reading this mapping table, the interrelationship degree of different role terminals for specific order operations is calculated. For example, the correlation weight between the POS machine and the customer's desktop tablet in the payment process is set to 0.9, while the correlation weight between the kitchen display board and the desktop tablet in the payment process is only 0.2, thus deriving the semantic distance between roles. After obtaining the above two basic parameters, a preset weighted fusion algorithm (such as the Euclidean distance weighted summation algorithm) is used to calculate the comprehensive connection weight between devices. A multi-device collaborative sensing topology with a directed acyclic graph configuration avoiding communication loops is generated using a topology sorting algorithm in graph theory, where links with high weights are defined as the main data flow direction. To address topology failures caused by device movement, a background daemon is set up to monitor movement trajectories and signal attenuation changes in real time at a fixed frequency (e.g., once per second). Once it is found that the overall connection weight of a link is lower than the set reconstruction threshold (e.g., the threshold is 0.4), the local routing table update instruction is immediately triggered, the old connection is adaptively disconnected, and a new optimal relay node is found to adjust the topology connection edge, ensuring that the cooperative network is always in the best communication state.

[0072] like Figure 2 As shown, in a preferred embodiment of the present invention, the interception of order clearing events within a multi-device network, and the calculation of state drift probability based on concurrency history and order popularity, to generate a multi-dimensional state drift vector token containing a vector clock, specifically includes:

[0073] The order clearing event is intercepted in the business processing engine of the terminal device, and the initial state parameters, including the operation terminal identifier, operation type identifier, and basic order summary, are extracted.

[0074] Retrieve the concurrent operation frequency of the order that has experienced the order clearing event within a preset historical time window, and use the sliding window algorithm to calculate the state drift probability of the current order experiencing data conflict;

[0075] Generate the vector clock that records the state evolution of each terminal, and concatenate it with the initial state parameters and the state drift probability using multi-dimensional features to construct the order state drift vector;

[0076] The order state drift vector is encoded and compressed using a dynamic hash algorithm to generate the multidimensional state drift vector token for network transmission.

[0077] In this embodiment, during actual code deployment, the system uses AOP (Aspect-Oriented Programming) technology to embed tracking points in the application's business processing engine. This allows it to intercept order settlement events without intruding on existing business code, accurately extracting the MAC address of the operating terminal as the terminal identifier, the enumeration value of the operation type (e.g., payment, order cancellation, rounding down), and the basic order summary containing the order number and amount as initial state parameters. To predict the potential conflict risk of this order, the system calls the local database or Redis cache to retrieve the concurrent operation frequency of this specific order within a preset historical time window (e.g., the past 5 minutes), and substitutes it into the exponentially weighted moving average sliding window algorithm model, outputting a state drift probability value between 0 and 1, with higher values ​​indicating greater conflict risk. Based on this, the classic vector clock algorithm for distributed systems is used to allocate a monotonically increasing logical timestamp array for the current operation, accurately recording the state evolution progress of each terminal before this operation. Subsequently, a serialization framework is used to concatenate the vector clock, initial state parameters, and state drift probability into a multi-dimensional feature byte stream to construct the order state drift vector. To further reduce bandwidth consumption in local area network transmission and ensure data integrity, a dynamic hash algorithm was ultimately used to encode and compress the vector, generating a multidimensional state drift vector token that not only contains rich business information but is also small in size and suitable for high-frequency network transmission.

[0078] like Figure 3 As shown, in a preferred embodiment of the present invention, the step of calculating the synchronization urgency index of each node based on the multi-device collaborative sensing topology and performing asynchronous directional diffusion synchronization based on spatiotemporal lock verification using the multi-dimensional state drift vector token specifically includes:

[0079] The source node that triggers the order clearing event extracts the connection weights of adjacent nodes associated with the current order based on the multi-device collaborative sensing topology, and calculates the synchronization urgency index of each adjacent node;

[0080] Asynchronous directional diffusion of the multidimensional state drift vector token is initiated to the target nodes with priority, according to the principle of descending order of the synchronization urgency index.

[0081] After parsing the multidimensional state drift vector token, the receiving node extracts the vector clock and the spatial coordinates of the source node, and performs the spatiotemporal lock verification to determine whether the state transmission time difference and physical space span conform to the preset safe parabolic model.

[0082] If the spacetime lock verification passes, the state carried by the multidimensional state drift vector token is updated to the local order memory snapshot according to the preset vector clock merging rule to eliminate state divergence.

[0083] The receiving node generates a reduced-dimensional heartbeat receipt containing the updated status check code and returns it to the source node through the reverse path of the multi-device collaborative sensing topology;

[0084] It should be understood that after the source node triggering the order clearing event completes token generation, the system reads the multi-device collaborative sensing topology already constructed in memory, extracts its directly connected neighboring nodes and the connection weights of these nodes associated with the current order, and calculates the synchronization urgency index of each neighboring node by multiplying the connection weights with the previously calculated state drift probability. The source node sorts these nodes from largest to smallest according to the urgency index and sends the multi-dimensional state drift vector token to the highest priority target nodes in the queue via a non-blocking Socket asynchronous communication mechanism or a lightweight message queue, thereby achieving targeted diffusion. When the target receiving node listens to the data packet on the network port and parses the token, it extracts the vector clock and the three-dimensional spatial coordinates of the source node. At this point, the receiving node triggers a security verification mechanism called a spacetime lock: the system calculates the difference between the current system time and the token's timestamp (i.e., the state transmission time difference), and combines this with the speed of light or the estimated maximum electromagnetic wave transmission rate to calculate the theoretically possible physical spatial span. If the actual physical distance between the source node coordinates declared on the token and the local coordinates exceeds the range allowed by the aforementioned time difference's parabolic model, the token is determined to be illegally forged or subjected to a replay attack, and the data packet is directly discarded. Only when the spacetime lock verification passes will the receiving node call its internal concurrency control logic, and according to the merging rule of taking the maximum value of the vector clock, overwrite the latest state carried by the token into the order snapshot of the local JVM or in-memory database, thereby eliminating state discrepancies between multiple devices. Finally, the receiving node generates a short checksum for the updated state, encapsulates it into a reduced-dimensional heartbeat receipt, and returns it to the source node through the reverse TCP long connection path of the original topology, completing a single closed-loop confirmation.

[0085] In a preferred embodiment of the present invention, the step of utilizing a dynamic consensus threshold mechanism negatively correlated with the state drift probability to achieve local state convergence, generating a Merkle tree state snapshot, and submitting a differential synchronization request to the cloud server specifically includes:

[0086] The source node that triggers the order clearing event continuously listens for and aggregates the reduced-dimensional heartbeat receipts from each receiving node;

[0087] Extract the state drift probability, and dynamically calculate the dynamic consensus threshold required for the current order settlement event based on the inverse principle that the higher the state drift probability, the more verification nodes are required.

[0088] When the number of valid dimensionality reduction heartbeat receipts collected reaches the dynamic consensus threshold, the states of all nodes participating in this local state convergence are hashed and aggregated to construct a local Merkle tree state snapshot.

[0089] Extract the difference between the root node hash value of the Merkle tree state snapshot and the last synchronization state of the cloud server, and initiate the differential synchronization request to the cloud server;

[0090] Receive the global confirmation sequence number sent by the cloud server, release the spatiotemporal lock on the terminal device associated with the current order, and clear the state drift probability cache.

[0091] In this embodiment, during actual operation, the source node has a built-in multi-threaded pool-based receipt monitoring service. This service continuously collects reduced-dimensional heartbeat receipts from each receiving node into a thread-safe blocking queue. To balance synchronization efficiency and data security, the system extracts the state drift probability of the current liquidation event again and calculates a dynamic consensus threshold using an inverse proportional mapping function. Once the number of valid reduced-dimensional heartbeat receipts collected in the queue exceeds this dynamic consensus threshold, the system determines that the local state has successfully converged. At this point, the underlying state data of all nodes participating in this consensus confirmation is hashed, and a local Merkle tree state snapshot is constructed upwards using a pairwise merge hashing method. This data structure can represent the overall state of a large dataset with extremely low storage cost. Subsequently, only the root node hash value of this Merkle tree needs to be extracted and XORed with the last global state hash value issued by the cloud server cached locally. If an inconsistency is found, the system only packages the changed differential business data and initiates a differential synchronization request to the cloud server via HTTPS encryption protocol. Once the cloud server completes database persistence and sends a response message containing the latest global confirmation sequence number, the source node's system layer will issue a release command to release the local spacetime lock on the current order and associated terminal devices, and clear the state drift probability cache variable in memory in order to release system resources for the clearing process of the next order.

[0092] In another preferred embodiment of the present invention, a multi-device collaborative order clearing status synchronization system is provided, the system comprising:

[0093] The topology awareness module is used to dynamically construct a multi-device collaborative awareness topology with a directed acyclic graph structure based on the spatiotemporal span and semantic distance of terminal devices, so as to eliminate communication blind spots caused by heterogeneous network physical space and optimize transmission paths.

[0094] The vector generation module is used to intercept order clearing events in a multi-device network and calculate the state drift probability based on concurrency history and order popularity. It generates a multi-dimensional state drift vector token containing a vector clock to standardize and encapsulate the temporal evolution characteristics and potential conflict probabilities.

[0095] The directional diffusion module is used to calculate the synchronization urgency index of each node based on the multi-device collaborative sensing topology, and to use the multi-dimensional state drift vector token to perform asynchronous directional diffusion synchronization based on spatiotemporal lock verification, so as to block illegal forged synchronization across physical regions.

[0096] The dynamic convergence module is used to complete local state convergence by utilizing a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, generating a Merkle tree state snapshot and submitting a differential synchronization request to the cloud server, so as to reduce network bandwidth consumption while ensuring strong data consistency.

[0097] In this embodiment, the system is typically deployed in an edge computing gateway or a high-performance main POS terminal within a commercial setting. It integrates four independent core modules that communicate via an internal bus. First is the topology awareness module, which includes an independent background sniffing process responsible for continuously acquiring signal characteristics and network configurations of the physical environment. It dynamically constructs and maintains a directed acyclic graph (DAG) structure for multi-device collaborative awareness, effectively eliminating wireless communication blind spots caused by physical obstructions such as bar counters and load-bearing walls, and planning optimal transmission paths between devices. Second is the vector generation module, deeply integrated into the operating system's input / output interception layer or application programming interface (API) layer. This module is responsible for capturing order settlement events in real time, using internally integrated algorithm operators to perform mathematical deductions of state drift probabilities, and ultimately encapsulating business data and timing logic such as vector clocks into multi-dimensional state drift vector tokens, achieving standardized compression of multi-dimensional information. Furthermore, there is the directional diffusion module. This module primarily relies on its internal high-performance network transmission components. It uses data provided by the topology-aware module to finely calculate the synchronization urgency index of each node and executes asynchronous directional diffusion with underlying spatiotemporal lock verification logic. This completely blocks illegal tampering and forged synchronization requests across physical regions at the system level. Finally, there is the dynamic convergence module. This module acts as a gateway between the local area cluster and the cloud. Internally, it runs a dynamic threshold determination engine and a cryptographic hash calculator. After ensuring that the cluster within the local area network achieves strong data consistency through a dynamic consensus mechanism, it is responsible for generating Merkle tree state snapshots and initiating low-frequency, high-efficiency differential synchronization requests to the cloud server. This greatly reduces the dependence on wide area network bandwidth and the concurrent pressure on the cloud server.

[0098] In another preferred embodiment of the present invention, the topology sensing module specifically includes:

[0099] The span calculation unit is used to detect the physical space signal attenuation rate and network round-trip latency of active terminal devices in the local environment in order to construct the spatiotemporal span.

[0100] The semantic computing unit is used to extract the business role tags of terminal devices and calculate the interrelationship between different role terminals to obtain the semantic distance of roles.

[0101] The graph-based assembly unit is used to integrate spatiotemporal span and role semantic distance to calculate comprehensive connection weights and construct the multi-device collaborative perception topology of the directed acyclic graph.

[0102] The adaptive adjustment unit is used to monitor the status of terminal devices in real time and adaptively adjust the connection edges of the topology when the overall connection weight is lower than the reconstruction threshold.

[0103] In this embodiment, to accurately capture the physical and logical state of the local area network, the topology sensing module is configured with a span calculation unit. By capturing the received signal strength indication at the hardware layer and calculating the round-trip time (RTT) of data packets at the network layer, a mapping table corresponding to device IPs and spatiotemporal spans is established in memory. Simultaneously, the semantic calculation unit within the topology sensing module is responsible for reading the business role tags registered by the terminal devices to the local configuration center during system initialization and performing weight calculations based on the system's pre-loaded semantic association rule library. This categorizes devices across different business dimensions, such as cashier and food preparation, and calculates the semantic distance between roles. After acquiring these two types of core data, the graph configuration assembly unit is triggered. Its internal graph calculation engine inputs the span data and semantic distance into a preset multiple linear regression equation to derive the comprehensive connection weights between nodes. This weight is then instantiated in memory as a multi-device collaborative sensing topology object containing vertices and directed edges in a directed acyclic graph configuration. To ensure the real-time availability of the topology, the topology-aware module also includes an adaptive adjustment unit that is always awake. This unit uses a sliding time window mechanism to smooth out fluctuations in network quality. Once it is determined that the overall connection weight between two nodes is lower than the reconstruction threshold fixed in the configuration file due to physical displacement or signal interference, a topology redraw event is immediately issued to guide the underlying routing table to cut off inferior connections and establish new communication links.

[0104] In another preferred embodiment of the present invention, the vector generation module specifically includes:

[0105] The event interception unit is used to intercept order clearing events and extract initial status parameters such as operation terminal identifier, operation type and basic summary.

[0106] The probability inference unit is used to retrieve the frequency of concurrent operations of an order and calculate the state drift probability using a sliding window algorithm.

[0107] The feature concatenation unit is used to generate a vector clock and concatenate it with the initial state parameters and state drift probability to construct an order state drift vector;

[0108] The encoding and compression unit is used to encode and compress the order state drift vector using a dynamic hash algorithm to generate the multidimensional state drift vector token.

[0109] In this embodiment, the event interception unit acts as the first data gateway. By embedding hook functions in the underlying business logic controller of the terminal POS software or ordering APP, it accurately identifies and intercepts specific API calls such as "confirm payment" and "cancel order." From these calls, it extracts the unique device identifier (such as IMEI or MAC), the standard encoding dictionary value of the operation type, and a basic summary containing the order number and actual payment amount, forming a standardized initial state parameter structure. Subsequently, the probability inference unit, upon receiving this structure, initiates an asynchronous query to the system's local cache database. This retrieves the concurrent operation frequency logs of the order being queried or modified by other terminals in the recent minutes. This discrete time-series data is then input into its internally pre-built sliding window conflict evaluation algorithm to quickly derive a quantified state drift probability. The feature concatenation unit is responsible for maintaining the vector clock array of the current terminal. Whenever an interception event occurs, it increments the clock counter of its corresponding node. Then, it precisely concatenates the updated vector clock, the aforementioned initial state parameters, and the state drift probability according to a predefined binary protocol format, constructing a complete order state drift vector. To meet the lightweight requirements of network transmission, the encoding and compression unit finally calls a system kernel-level or hardware-accelerated encryption component, using a dynamic hash algorithm to perform secondary encoding and compression on the concatenated long byte string, outputting a multi-dimensional state drift vector token for final network distribution.

[0110] In another preferred embodiment of the present invention, the directional diffusion module specifically includes:

[0111] The index calculation unit is used to extract node connection weights to calculate the synchronization urgency index of adjacent nodes;

[0112] The asynchronous distribution unit is used to initiate asynchronous directional diffusion of multidimensional state drift vector tokens to the target node in descending order of synchronization urgency index;

[0113] The spatiotemporal verification unit is used to extract the vector clock and source node spatial coordinates at the receiving end and perform spatiotemporal lock verification based on the secure parabolic model;

[0114] The status merging unit is used to update the status to the local order memory snapshot according to the vector clock merging rule after the verification is passed;

[0115] The receipt reversal unit is used to generate a reduced-dimensional heartbeat receipt and return it to the source node through a topological reversal path.

[0116] In this embodiment, the index calculation unit is the logical decision-making center of the module. Before sending data each time, it extracts the node connection weight matrix maintained by the topology awareness module from memory, calculates the synchronization urgency index for each associated node in combination with the current business context, stores the calculation result in a local temporary cache in the form of key-value pairs, and executes a quicksort algorithm. After sorting, the asynchronous delivery unit takes over control. Through its internally instantiated non-blocking I / O (NIO) thread pool, it asynchronously pushes the multidimensional state drift vector tokens to the IP address and listening port of the target node in a multiplexed manner according to the priority order of the urgency index. After the data arrives at the receiving end, the spatiotemporal verification unit in the receiving device is immediately awakened. This unit first extracts the vector clock and source node spatial coordinates from the token header through deserialization, and then runs a rigorous spatiotemporal matching script. It substitutes the difference between the arrival time and the timestamp of the data packet into a preset physical security parabolic verification model to check whether the data packet originates from an unreasonable node that is too far away with microsecond-level precision. Once the verification logic returns a true value, the state merging unit intervenes. It compares the vector clock in the token with the vector clock maintained in local memory, and, following the principle of causal consistency algorithm, overwrites or retains relevant business data, persisting the final correct order status to the local order memory snapshot. Finally, the receipt reversal unit encapsulates a dimensionality-reduced heartbeat receipt containing the verification result code based on the source IP and routing path of this communication cached in memory, and accurately sends it back to the sending node through the reverse channel, completing the closed-loop communication of the entire diffusion process.

[0117] The above embodiments of the present invention provide a method for synchronizing order settlement status based on multi-device collaboration, and a system for synchronizing order settlement status based on multi-device collaboration. By constructing a perception topology based on spatiotemporal and semantic dimensions and introducing state drift vector tokens, the crude mode of traditional centralized polling and indiscriminate flooding is fundamentally abandoned. This effectively blocks forged synchronization across physical regions and solves the problems of state fragmentation and incorrect order settlement caused by concurrent operations of multiple terminals in weak network environments and during peak business periods. Simultaneously, relying on dynamic local consensus and differential synchronization design, while ensuring strong consistency of edge cluster status, redundant communication overhead and cloud server load are greatly reduced.

[0118] In order for the above methods and systems to operate smoothly, the system may include more or fewer components than those described above, or combine certain components, or different components, in addition to the various modules mentioned above. For example, it may include input / output devices, network access devices, buses, processors, and memory.

[0119] The processor can be a central processing unit, or other general-purpose processors, digital signal processors, application-specific integrated circuits (ASICs), off-the-shelf programmable gate arrays (OPGs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor. This processor is the control center of the system, connecting various parts via various interfaces and lines.

[0120] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0121] The embodiments described above are merely illustrative of several implementations of the present invention, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of the present invention. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention, and these modifications and improvements all fall within the scope of protection of the present invention. Therefore, the scope of protection of this patent should be determined by the appended claims.

[0122] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method and system for synchronizing order clearing status based on multi-device collaboration, characterized in that, The method includes: Based on the spatiotemporal span of terminal devices and the semantic distance of roles, a multi-device collaborative perception topology with a directed acyclic graph configuration is dynamically constructed. Intercept order clearing events within a multi-device network, calculate state drift probability based on concurrency history and order popularity, and generate a multi-dimensional state drift vector token containing a vector clock; Based on the multi-device collaborative sensing topology, the synchronization urgency index of each node is calculated, and the asynchronous directional diffusion synchronization based on spatiotemporal lock verification is performed using the multi-dimensional state drift vector token. Local state convergence is achieved by using a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, a Merkle tree state snapshot is generated, and a differential synchronization request is submitted to the cloud server.

2. The order clearing status synchronization based on multi-device collaboration according to claim 1, characterized in that, The dynamic construction of a multi-device collaborative perception topology based on the spatiotemporal span of terminal devices and the semantic distance of roles specifically includes: The physical space signal attenuation rate and network round-trip latency of the active terminal devices within the local environment are detected to construct the spatiotemporal span between devices. Extract the business role tags of each terminal device, and calculate the interrelationship of different role terminals to specific order operations through a preset semantic mapping table to obtain the semantic distance of the roles; The spatiotemporal span and the comprehensive connection weight between the role semantic distance calculation device are integrated, and a multi-device collaborative perception topology containing the primary and secondary data flow directions is constructed based on this. The system monitors the movement trajectory and signal attenuation changes of the terminal device in real time, and adaptively adjusts the connection edge of the multi-device collaborative sensing topology when the overall connection weight is lower than the reconstruction threshold.

3. The order clearing status synchronization based on multi-device collaboration according to claim 1, characterized in that, The interception of order clearing events within a multi-device network, and the calculation of state drift probability based on concurrency history and order popularity, to generate a multi-dimensional state drift vector token containing a vector clock, specifically includes: The order clearing event is intercepted in the business processing engine of the terminal device, and the initial state parameters, including the operation terminal identifier, operation type identifier, and basic order summary, are extracted. Retrieve the concurrent operation frequency of the order that has experienced the order clearing event within a preset historical time window, and use the sliding window algorithm to calculate the state drift probability of the current order experiencing data conflict; Generate the vector clock that records the state evolution of each terminal, and concatenate it with the initial state parameters and the state drift probability using multi-dimensional features to construct the order state drift vector; The order state drift vector is encoded and compressed using a dynamic hash algorithm to generate the multidimensional state drift vector token for network transmission.

4. The order clearing status synchronization based on multi-device collaboration according to claim 1, characterized in that, The step of calculating the synchronization urgency index of each node based on the multi-device collaborative sensing topology and performing asynchronous directional diffusion synchronization based on spatiotemporal lock verification using the multi-dimensional state drift vector token specifically includes: The source node that triggers the order clearing event extracts the connection weights of adjacent nodes associated with the current order based on the multi-device collaborative sensing topology, and calculates the synchronization urgency index of each adjacent node; Asynchronous directional diffusion of the multidimensional state drift vector token is initiated to the target nodes with priority, according to the principle of descending order of the synchronization urgency index. After parsing the multidimensional state drift vector token, the receiving node extracts the vector clock and the spatial coordinates of the source node, and performs the spatiotemporal lock verification to determine whether the state transmission time difference and physical space span conform to the preset safe parabolic model. If the spacetime lock verification passes, the state carried by the multidimensional state drift vector token is updated to the local order memory snapshot according to the preset vector clock merging rule to eliminate state divergence. The receiving node generates a reduced-dimensional heartbeat receipt containing the updated status check code and returns it to the source node through the reverse path of the multi-device collaborative sensing topology.

5. The order clearing status synchronization based on multi-device collaboration according to claim 1, characterized in that, The step of using a dynamic consensus threshold mechanism negatively correlated with the state drift probability to achieve local state convergence, generating a Merkle tree state snapshot, and submitting a differential synchronization request to the cloud server specifically includes: The source node that triggers the order clearing event continuously listens for and aggregates the reduced-dimensional heartbeat receipts from each receiving node; Extract the state drift probability, and dynamically calculate the dynamic consensus threshold required for the current order settlement event based on the inverse principle that the higher the state drift probability, the more verification nodes are required. When the number of valid dimensionality reduction heartbeat receipts collected reaches the dynamic consensus threshold, the states of all nodes participating in this local state convergence are hashed and aggregated to construct a local Merkle tree state snapshot. Extract the difference between the root node hash value of the Merkle tree state snapshot and the last synchronization state of the cloud server, and initiate the differential synchronization request to the cloud server; Receive the global confirmation sequence number sent by the cloud server, release the spatiotemporal lock on the terminal device associated with the current order, and clear the state drift probability cache.

6. A multi-device collaborative order clearing status synchronization system, characterized in that, The system employs the order clearing status synchronization method based on multi-device collaboration as described in any one of claims 1-5, wherein the system comprises: The topology awareness module is used to dynamically construct a multi-device collaborative awareness topology with a directed acyclic graph structure based on the spatiotemporal span and semantic distance of terminal devices, so as to eliminate communication blind spots caused by heterogeneous network physical space and optimize transmission paths. The vector generation module is used to intercept order clearing events in a multi-device network and calculate the state drift probability based on concurrency history and order popularity. It generates a multi-dimensional state drift vector token containing a vector clock to standardize and encapsulate the temporal evolution characteristics and potential conflict probabilities. The directional diffusion module is used to calculate the synchronization urgency index of each node based on the multi-device collaborative sensing topology, and to use the multi-dimensional state drift vector token to perform asynchronous directional diffusion synchronization based on spatiotemporal lock verification, so as to block illegal forged synchronization across physical regions. The dynamic convergence module is used to complete local state convergence by utilizing a dynamic consensus threshold mechanism that is negatively correlated with the state drift probability, generating a Merkle tree state snapshot and submitting a differential synchronization request to the cloud server, so as to reduce network bandwidth consumption while ensuring strong data consistency.

7. The order clearing status synchronization system based on multi-device collaboration according to claim 6, characterized in that, The topology-aware module specifically includes: The span calculation unit is used to detect the physical space signal attenuation rate and network round-trip latency of active terminal devices in the local environment in order to construct the spatiotemporal span. The semantic computing unit is used to extract the business role tags of terminal devices and calculate the interrelationship between different role terminals to obtain the semantic distance of roles. The graph-based assembly unit is used to integrate spatiotemporal span and role semantic distance to calculate comprehensive connection weights and construct the multi-device collaborative perception topology of the directed acyclic graph. The adaptive adjustment unit is used to monitor the status of terminal devices in real time and adaptively adjust the connection edges of the topology when the overall connection weight is lower than the reconstruction threshold.

8. The order clearing status synchronization system based on multi-device collaboration according to claim 6, characterized in that, The vector generation module specifically includes: The event interception unit is used to intercept order clearing events and extract initial status parameters such as operation terminal identifier, operation type and basic summary. The probability inference unit is used to retrieve the frequency of concurrent operations of an order and calculate the state drift probability using a sliding window algorithm. The feature concatenation unit is used to generate a vector clock and concatenate it with the initial state parameters and state drift probability to construct an order state drift vector; The encoding and compression unit is used to encode and compress the order state drift vector using a dynamic hash algorithm to generate the multidimensional state drift vector token.

9. The order clearing status synchronization system based on multi-device collaboration according to claim 6, characterized in that, The directional diffusion module specifically includes: The index calculation unit is used to extract node connection weights to calculate the synchronization urgency index of adjacent nodes; The asynchronous distribution unit is used to initiate asynchronous directional diffusion of multidimensional state drift vector tokens to the target node in descending order of synchronization urgency index; The spatiotemporal verification unit is used to extract the vector clock and source node spatial coordinates at the receiving end and perform spatiotemporal lock verification based on the secure parabolic model; The status merging unit is used to update the status to the local order memory snapshot according to the vector clock merging rule after the verification is passed; The receipt reversal unit is used to generate a reduced-dimensional heartbeat receipt and return it to the source node through a topological reversal path.