Triggered high-performance time sequence data synchronization method and system
By adopting a triggered high-performance timing data synchronization method in industrial monitoring systems, the loss, disorder and high load problems in data synchronization in the prior art are solved, real-time and order of data are achieved, and the performance and reliability of the system are improved.
Patent Information
- Application Number
- CN202510102306.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-22
- Publication Date
- 2025-05-27
AI Technical Summary
The existing data synchronization methods have problems such as data loss, disorder and high load in industrial monitoring redundant systems, which limit the system's performance improvement and reliability guarantee.
The triggered high-performance timing data synchronization method is adopted to obtain configuration information through the host driver, analyze and mark data, and use the TCP protocol to ensure data sequence, and only the changed data is sent for synchronization.
Real-time and sequential data are realized, network resource occupation and hard disk I/O load are reduced, and data synchronization performance and system reliability are greatly improved.
Smart Images

Figure CN120045621A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing, and in particular, to a trigger-based high-performance timing data synchronization method and system. Background Art
[0002] In an industrial monitoring redundancy system, data synchronization plays a crucial role. Its core function is to enable the host to transmit the latest device data to the standby machine in a timely and accurate manner, so as to ensure that when the main system fails, the standby machine can seamlessly take over, maintaining the continuity and stability of industrial monitoring and ensuring the normal operation of industrial production.
[0003] With the rapid development of the industrial Internet, industrial security has increasingly become the core concern in the field of industrial monitoring. Many manufacturing enterprises have started to upgrade and transform system redundancy, and "data does not disconnect when the host drops" has become a key indicator. To achieve this goal, the latest data must be maintained in real time on the standby machine. However, if the host and the standby machine collect data from the device simultaneously, two major problems will arise. First, some devices may not support the multi-connection mode. Second, when the data volume is large, the doubled data requests will significantly increase the probability of unstable device operation, adding additional risks to the use of the monitoring system.
[0004] Currently, data synchronization mainly relies on two methods: active full-volume push by the host and request by the standby machine. However, after in-depth practice, it is found that they have many deficiencies that cannot be ignored.
[0005] From the perspective of setting the synchronization time interval, the existing methods must preset the synchronization time interval. However, within this interval, once a host-standby switch occurs, all data generated from the last synchronization moment to the instant of the switch will be lost. In terms of synchronization frequency, when the synchronization frequency is high, the stability of the network environment has a great impact on the data transmission quality. Once network fluctuations occur, the problem of disordered data sequence is very likely to appear. In scenarios with a large data volume, each synchronization process will consume a large amount of I / O resources of the standby machine server. This not only places extremely high requirements on the hardware performance of the standby machine, increasing the hardware procurement cost, but also may cause the server to respond slowly during data synchronization, affecting the normal operation of other key services.
[0006] Currently, both the limitations of the host-standby machine acquisition method and the inherent defects of traditional synchronization methods indicate that the existing data synchronization methods seriously limit the performance improvement and reliability guarantee of industrial monitoring redundancy systems.
[0007] Through the retrieval of patent documents, it is found that the invention patent with the application number CN202011214996.8 provides a data synchronization method and a data synchronization system. This method is a non-triggered database data synchronization method. When the internal database server of the centralized control or the sub-station performs data synchronization, according to the data comparison and conversion rule between the host and the standby machine, after data conversion, synchronization is carried out. It has no strong correlation with the database and can achieve cross-different databases while ensuring strong data consistency. This patent reads the data of the host database, converts it into data to be synchronized, and then writes it into the standby database. The synchronization of this method requires setting a synchronization period. If the host has an abnormality during the two synchronizations, it cannot guarantee that the latest data is obtained at the standby machine.
[0008] In summary, aiming at the problems of the above-mentioned existing technologies, researching a triggered high-performance time-series data synchronization method and system has become a key task that needs to be solved urgently at present. Summary of the Invention
[0009] Aiming at the defects in the prior art, the purpose of the present invention is to provide a triggered high-performance time-series data synchronization method and system.
[0010] According to a triggered high-performance time-series data synchronization method provided by the present invention, it includes the following steps:
[0011] Step S1, the host driver obtains the collected configuration information, and according to the configuration information, the host requests the original data from the device at a fixed period, or waits for the device to actively push the original data;
[0012] Step S2, parse the obtained original data, and then allocate corresponding point tags to the parsed original data according to the point table configuration to obtain tag data;
[0013] Step S3, mark the timestamp of the current time of the server for the tag data to obtain a synchronization data packet, and then push the synchronization data packet to the data processing service of the host;
[0014] Step S4, the data processing service of the host receives the synchronization data packet, compares whether the tag data in the synchronization data packet is consistent with the tag data corresponding to the same point tag stored in the host before, and according to the comparison result, decides whether to update the tag data and whether to forward the synchronization data packet to the data processing service of the standby machine;
[0015] Step S5, after the data processing service of the standby machine receives the synchronization data packet, update the corresponding point tag, tag data and timestamp saved in the memory of the standby machine, and wait until the standby machine becomes the host, and then send the synchronization data packet to other services on the host that need the synchronization data packet.
[0016] Preferably, step S1 includes the following steps:
[0017] Step S1.1: The host driver reads the configuration information, which includes device name, device address, device port, polling period, and connection type. The connection type includes TcpClient mode and TcpServer mode. In TcpClient mode, the host driver, according to the time setting of the polling period, actively requests the original data from the device as a client. In TcpServer mode, the host driver acts as a server, waits for the device to configure the IP address and then initiates a connection to the driver side and pushes the original data.
[0018] Step S1.2: If the configured mode is TcpClient mode, the driver will regularly request the original data from the device according to the time configuration in the polling period. If the configured mode is TcpServer mode, the driver will match the source of the received original data with the device address in the configuration information, retain the original data within the device address range, and discard the original data outside the range.
[0019] Step S2 includes the following steps:
[0020] Step S2.1: Parse the original data.
[0021] Step S2.2: Pair the point tags.
[0022] Preferably, Step S2.1 includes: The obtained original data is a combination of several original data segments. Read and convert the original data according to the user's requirements in the point table configuration to form intermediate processed data. The point table configuration includes start position, data length, data type, sign flag, and byte order.
[0023] Preferably, Step S2.2 includes: The point tag is the unique identifier in the point table configuration, used to distinguish different intermediate processed data. Each time new intermediate processed data obtained in Step S2.1 is obtained, pair the intermediate processed data with the point tag to form tag data. If there is already tag data for the point tag, overwrite the original tag data with the newly generated tag data. The message content sent to other services later will include both the point tag and its corresponding tag data, which is convenient for subsequent processing.
[0024] Preferably, Step S2.1 includes: First, extract the corresponding original data segment from the original data according to the start position and data length. Then, perform corresponding transformations on the extracted original data segment according to the sign flag and byte order. Finally, convert the transformed original data segment into the data type required by the user to form intermediate processed data.
[0025] Preferably, Step S3 includes the following steps:
[0026] Step S3.1: Obtain the latest local timestamp in the format of yyyy - mm - dd HH:mm:ss.ms, and attach the obtained local timestamp to the point tags corresponding to the tag data formed in Step S2 to form a synchronization data packet consisting of point tags, tag data, and local timestamp;
[0027] Step S3.2: Send the synchronization data packet to the data processing service of the local machine through the TCP protocol.
[0028] Preferably, Step S4 includes the following steps:
[0029] Step S4.1: After the data processing service of the host receives the synchronization data packet in Step S3.2, look up the corresponding data in the memory according to the point tags in the synchronization data packet, and then compare whether the tag data in the synchronization data packet is consistent with the tag data in the memory. If the two are consistent, only update the timestamp in the synchronization data packet to the memory. If the two are inconsistent, update both the content and timestamp of the tag data in the memory;
[0030] Step S4.2: Decide whether to forward to the data processing service of the standby machine according to the judgment result of Step S4.1. If the judgment result is consistent, only send it to other services on the host that require point tags, tag data, and timestamp data. If the judgment result is inconsistent, in addition to sending it to other services on the host that require point tags, tag data, and timestamp data, also send the synchronization data packet to the data processing service of the standby machine through the TCP protocol.
[0031] Preferably, Step S5 includes the following steps:
[0032] Step S5.1: The data processing service of the standby machine receives the standby machine synchronization message in Step S4.2. Since the order of the data has been guaranteed by the TCP protocol, update the tag data and timestamp in the received message to the memory according to the point tags;
[0033] Step S5.2: The data processing service of the standby machine continuously judges the redundancy status of the host. Once it is found that the redundancy status changes from the standby machine to the host, fully push the tag data in the memory to other services on the local machine that require tag data.
[0034] The present invention also provides a trigger - type high - performance timing data synchronization system, including:
[0035] An acquisition configuration reading module, which is used for the host driver to obtain the acquired configuration information, and according to the configuration information, the host requests the original data from the device at a fixed period, or waits for the device to actively push the original data;
[0036] The data acquisition and parsing module is used to parse the acquired raw data, and then allocate corresponding point tags to the parsed raw data according to the point table to obtain tag data;
[0037] The acquisition and processing module is used to mark the timestamp of the current time of the server for the tag data to obtain a synchronized data packet;
[0038] The acquisition and sending module is used to push the synchronized data packet to the data processing service of the host;
[0039] The message processing module of the data processing service is used to receive the synchronized data packets sent by the acquisition and sending module and the data processing service sending module of the host, compare whether the tag data in the synchronized data packet is consistent with the tag data corresponding to the same point tag previously stored in the host, and obtain a comparison result.
[0040] The data processing service judgment module is used to decide whether to update the tag data according to the comparison result of the message processing module, and decide whether to forward the synchronized data packet to the data processing service of the standby machine;
[0041] The data processing service sending module is used to send the synchronized data packet to the data processing service of the standby machine. When the data processing service of the standby machine receives the synchronized data packet, it updates the corresponding point tag, tag data and timestamp saved in the memory of the standby machine, and waits for the standby machine to become the host, and then sends the synchronized data packet to other services on the host that need the synchronized data packet.
[0042] Compared with the prior art, the present invention has the following beneficial effects:
[0043] 1. In the present invention, data synchronization is triggered by the occurrence of data acquisition, ensuring the real-time nature of the data in the standby machine.
[0044] 2. The present invention uses the characteristics of the TCP protocol to ensure the timing of receiving data messages in the standby machine.
[0045] 3. The present invention only sends changed data, and on the one hand, reduces the occupation of network resources by writing the data into the memory through point tags, and on the other hand, avoids the excessive I / O occupation of the hard disk caused by frequent reading and writing of the database, greatly improving the performance of data synchronization. Description of the Drawings
[0046] By reading the detailed description of the non-restrictive embodiments with reference to the following drawings, other features, purposes and advantages of the present invention will become more obvious:
[0047] Figure 1 It is a flowchart of a trigger-based high-performance timing data synchronization method in an embodiment of the present invention;
[0048] Figure 2It is a framework diagram of a trigger - type high - performance timing data synchronization system in an embodiment of the present invention. Detailed implementation manners
[0049] The present invention will be described in detail below in conjunction with specific embodiments. The following embodiments will help those skilled in the art to further understand the present invention, but do not limit the present invention in any form. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several changes and improvements can still be made. These all fall within the protection scope of the present invention.
[0050] The present invention proposes a trigger - type high - performance timing data synchronization method and system, which effectively solves the common problems of data loss and disorder in the data synchronization process by optimizing the synchronization frequency and ensuring the data order, providing a solid guarantee for the stable operation of the industrial monitoring system.
[0051] Embodiment 1:
[0052] Figure 1 It is a flowchart of a trigger - type high - performance timing data synchronization method in an embodiment of the present invention.
[0053] As Figure 1 shown, this embodiment provides a trigger - type high - performance timing data synchronization method, including the following steps:
[0054] Step S1, the host driver obtains the collected configuration information, and according to the configuration information, the host requests the original data from the device at a fixed period, or waits for the device to actively push the original data.
[0055] Specifically, step S1 includes the following steps:
[0056] Step S1.1, the host driver reads the configuration information. The configuration information includes parameters such as device name, device address, device port, polling period, and connection type. The connection type includes TcpClient mode and TcpServer mode. In TcpClient mode, the host driver, according to the time setting of the polling period, actively requests the original data from the device as a client; in TcpServer mode, the host driver acts as a server and waits for the device to configure the IP address and then initiate a connection to the driver side and push the original data.
[0057] Step S1.2, if the configured mode is TcpClient mode, the driver will request the original data from the device regularly according to the time configuration in the polling period; if the configured mode is TcpServer mode, the driver will match the source of the received original data with the device address in the configuration information, retain the original data within the device address range, and discard the original data outside the range.
[0058] Step S2: Parse the acquired raw data, and then allocate corresponding point labels to the parsed raw data according to the point table configuration to obtain labeled data.
[0059] Specifically, step S2 includes the following steps:
[0060] Step S2.1: Parse the raw data. Specifically, to reduce the frequency of network interactions, the acquired raw data is a combination of several raw data segments, and the user's configuration is saved in the point table configuration. Read and convert the raw data according to the data types required by the user in the point table configuration to form intermediate processed data. The point table configuration includes configurations such as the starting position, data length, data type, sign, and byte order.
[0061] More specifically, first extract the corresponding raw data segment from the raw data according to the starting position and data length, then perform corresponding transformations on the extracted raw data segment according to the sign and byte order, and finally convert the transformed raw data segment into the data type required by the user to form intermediate processed data.
[0062] Step S2.2: Pair the point labels. Specifically, the point label is the unique identifier in the point table configuration, used to distinguish different intermediate processed data. Each time new intermediate processed data obtained in step S2.1 is obtained, pair the intermediate processed data with the point label to form labeled data. If there is already labeled data with the point label, overwrite the original labeled data with the newly generated labeled data. The message content sent to other services later will include both the point label and its corresponding labeled data, which is convenient for subsequent processing.
[0063] Step S3: Mark the timestamp of the current time of the server (the timestamp accuracy is accurate to milliseconds) for the labeled data to obtain a synchronized data packet, and then push the synchronized data packet to the data processing service of the host.
[0064] Specifically, step S3 includes the following steps:
[0065] Step S3.1: Obtain the latest local timestamp in the format of yyyy - mm - dd HH:mm:ss.ms, and attach the obtained local timestamp to the point label corresponding to the labeled data formed in step S2 to form a synchronized data packet composed of the point label, labeled data, and local timestamp.
[0066] Step S3.2: Send the synchronized data packet to the data processing service of the local machine through the TCP protocol.
[0067] Step S4: The data processing service of the host receives the synchronization data packet, compares whether the tag data in the synchronization data packet is consistent with the tag data corresponding to the same point tag previously stored in the host, and decides whether to update the tag data and whether to forward the synchronization data packet to the data processing service of the standby machine according to the comparison result.
[0068] Specifically, step S4 includes the following steps:
[0069] Step S4.1: After the data processing service of the host receives the synchronization data packet in step S3.2, it searches for the corresponding data in the memory according to the point tag in the synchronization data packet, and then compares whether the tag data in the synchronization data packet is consistent with the tag data in the memory. If the two are consistent, only update the timestamp in the synchronization data packet to the memory. If the two are inconsistent, update both the content and timestamp of the tag data in the memory.
[0070] Step S4.2: Decide whether to forward it to the data processing service of the standby machine according to the judgment result of step S4.1. If the judgment result is consistent, only send it to other services on the host that require point tag, tag data, and timestamp data. If the judgment result is inconsistent, in addition to sending it to other services on the host that require point tag, tag data, and timestamp data, also send the synchronization data packet to the data processing service of the standby machine through the TCP protocol.
[0071] Step S5: Since the TCP protocol guarantees the order of messages, after the data processing service of the standby machine receives the synchronization data packet, it directly updates the corresponding point tag, tag data, and timestamp saved in the memory of the standby machine without additional comparison. After waiting for the standby machine to become the host, it can send the synchronization data packet to other services on the host that require synchronization data packets immediately.
[0072] Specifically, step S5 includes the following steps:
[0073] Step S5.1: The data processing service of the standby machine receives the standby machine synchronization message in step S4.2. Since the order of the data is guaranteed by the TCP protocol, update the tag data and timestamp in the received message to the memory according to the point tag.
[0074] Step S5.2: The data processing service of the standby machine continuously judges the redundancy state of the host. Once it finds that the redundancy state changes from the standby machine to the host, it fully pushes the tag data in the memory to other services on the local machine that require tag data.
[0075] Specifically, the host and the standby machine mutually detect the high-frequency heartbeat messages sent by each other. If the standby machine does not receive the heartbeat message from the host within one second, it will change its own redundancy state from the standby machine to the host.
[0076] Embodiment 2:
[0077] The present invention also provides a trigger-based high-performance timing data synchronization system, and the trigger-based high-performance timing data synchronization system can be implemented by executing the process steps of the trigger-based high-performance timing data synchronization method. That is, those skilled in the art can understand the trigger-based high-performance timing data synchronization method as a preferred implementation manner of the trigger-based high-performance timing data synchronization system.
[0078] Figure 2 It is a framework diagram of a trigger-based high-performance timing data synchronization system in an embodiment of the present invention.
[0079] As Figure 2 shown, the trigger-based high-performance timing data synchronization system includes:
[0080] An acquisition configuration reading module, which is used for the host driver to obtain the acquired configuration information, and according to the configuration information, the host requests the original data from the device at a fixed period, or waits for the device to actively push the original data;
[0081] An acquisition data parsing module, which is used for parsing the obtained original data, and then allocating corresponding point tags to the parsed original data according to the point table configuration to obtain tag data;
[0082] An acquisition processing module, which is used for marking the timestamp of the current time of the server for the tag data to obtain a synchronization data packet;
[0083] An acquisition sending module, which is used for pushing the synchronization data packet to the data processing service of the host;
[0084] A message processing module of the data processing service, which is used for receiving the synchronization data packets sent by the acquisition sending module and the data processing service sending module of the host, comparing whether the tag data in the synchronization data packet is consistent with the tag data corresponding to the same point tag previously stored in the host, and obtaining a comparison result,
[0085] A data processing service judgment module, which is used for deciding whether to update the tag data according to the comparison result of the message processing module, and deciding whether to forward the synchronization data packet to the data processing service of the standby machine;
[0086] A data processing service sending module, which is used for sending the synchronization data packet to the data processing service of the standby machine. When the data processing service of the standby machine receives the synchronization data packet, it updates the corresponding point tag, tag data and timestamp saved in the memory of the standby machine, and waits for the standby machine to become the host, and then sends the synchronization data packet to other services on the host that require the synchronization data packet.
[0087] Those skilled in the art know that, in addition to implementing the system and its various devices, modules, and units provided by the present invention in the form of pure computer-readable program code, the method steps can be logically programmed to enable the system and its various devices, modules, and units provided by the present invention to be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers, etc., to achieve the same functions. Therefore, the system and its various devices, modules, and units provided by the present invention can be considered as a kind of hardware component, and the devices, modules, and units included therein for implementing various functions can also be regarded as the structures within the hardware component; the devices, modules, and units for implementing various functions can also be regarded as either software modules for implementing the method or structures within the hardware component.
[0088] The specific embodiments of the present invention have been described above. It should be understood that the present invention is not limited to the above specific implementation manners, and those skilled in the art can make various changes or modifications within the scope of the claims, which does not affect the essence of the present invention. Without conflict, the embodiments of the present application and the features in the embodiments can be combined with each other arbitrarily.
Claims
1. A triggered high-performance time series data synchronization method, characterized in that: The steps include: Step S1, the host driver obtains the collected configuration information, and according to the configuration information, the host requests the device for raw data at a fixed period, or waits for the device to actively push the raw data; Step S2, parsing the acquired raw data, and then assigning corresponding point labels to the parsed raw data according to the point table configuration to obtain label data; Step S3, marking the timestamp of the current time of the server for the tag data to obtain a synchronization data packet, and then pushing the synchronization data packet to the data processing service of the host; Step S4, the data processing service of the host receives the synchronization data packet, compares the label data in the synchronization data packet with the label data corresponding to the same point label previously stored in the host to see whether they are consistent, and determines whether the label data is updated according to the comparison result, and determines whether to forward the synchronization data packet to the data processing service of the standby machine; Step S5, after the data processing service of the standby machine receives the synchronization data packet, it updates the corresponding point label, label data and timestamp stored in the memory of the standby machine, waits for the standby machine to become the host machine, and then sends the synchronization data packet to other services on the host machine that require the synchronization data packet.
2. A triggered high-performance time series data synchronization method according to claim 1, characterized in that: The step S1 comprises the following steps: Step S1.1, the host driver reads the configuration information, the configuration information includes the device name, device address, device port, polling cycle and connection type, the connection type includes TcpClient mode and TcpServer mode, in the TcpClient mode, the host driver actively requests raw data from the device as a client according to the time setting of the polling cycle; In the TcpServer mode, the host driver acts as a server, waits for the device to configure an IP address, and then initiates a connection to the driver side and pushes raw data; Step S1.2, if the TcpClient mode is configured, the driver will periodically request raw data from the device according to the time configuration in the polling cycle; if the TcpServer mode is configured, the driver will match the source of the received raw data with the device address in the configuration information, retain the raw data within the device address range, and discard the raw data outside the range.
3. A triggered high-performance time series data synchronization method according to claim 2, characterized in that: The step S2 comprises the following steps: Step S2.1, parsing the original data; Step S2.2, pairing point labels.
4. A triggered high-performance time series data synchronization method according to claim 3, characterized in that: The step S2.1 includes: the acquired raw data is a combination of several raw data fragments, and the raw data is read and converted according to the user's requirements in the point table configuration to form intermediate processed data. The point table configuration includes the starting position, data length, data type, whether there is a sign and byte order.
5. A triggered high-performance time series data synchronization method according to claim 4, characterized in that: The step S2.2 includes: the point tag is a unique identifier in the point table configuration, which is used to distinguish different intermediate processing data. Each time the intermediate processing data of step S2.1 is newly obtained, the intermediate processing data is paired with the point tag to form label data. If label data of the point tag already exists, the original label data is overwritten with the newly generated label data. The message content subsequently sent to other services will contain both the point tag and its corresponding label data to facilitate subsequent processing.
6. A triggered high-performance time series data synchronization method according to claim 3, characterized in that: The step S2.1 includes: firstly, extracting the corresponding original data fragments from the original data according to the starting position and the data length, then performing corresponding transformation on the extracted original data fragments according to whether there are signs and byte order, and finally converting the transformed original data fragments into the data type required by the user to form intermediate processed data.
7. A triggered high-performance time series data synchronization method according to claim 1, characterized in that: The step S3 comprises the following steps: Step S3.1, obtaining the latest local timestamp in the format of yyyy-mm-dd HH:mm:ss.ms, and attaching the obtained local timestamp to the point tag corresponding to the tag data formed in step S2, to form a synchronization data packet consisting of the point tag, tag data and local timestamp; Step S3.2, sending the synchronization data packet to the local data processing service via TCP protocol.
8. A triggered high-performance time series data synchronization method according to claim 1, characterized in that: The step S4 comprises the following steps: Step S4.1, after the data processing service of the host receives the synchronization data packet in step S3.2, it searches for corresponding data in the memory according to the point tag in the synchronization data packet, and then compares whether the tag data in the synchronization data packet is consistent with the tag data in the memory. If the two are consistent, only the timestamp in the synchronization data packet is updated to the memory. If the two are inconsistent, the tag data content and the timestamp in the memory are updated at the same time; Step S4.2, decide whether to forward it to the data processing service of the backup machine based on the judgment result of step S4.
1. If the judgment result is consistent, it is only sent to the services of other demand point labels, label data and timestamp data on the host. If the judgment result is inconsistent, in addition to sending it to the services of other demand point labels, label data and timestamp data on the host, the synchronization data packet is also sent to the data processing service of the backup machine through the TCP protocol.
9. A triggered high-performance time series data synchronization method according to claim 1, characterized in that: The step S5 comprises the following steps: Step S5.1, the data processing service of the standby machine receives the standby machine synchronization message of step S4.2, and because the order of data is guaranteed by the TCP protocol, the tag data and timestamp in the received message are updated to the memory according to the point tag; Step S5.2: The data processing service of the standby machine continuously determines the redundancy status of the host machine. Once it finds that the redundancy status changes from the standby machine to the host machine, it pushes all the tag data in the memory to the other services of the local machine that require the tag data.
10. A triggered high-performance time series data synchronization system, using a triggered high-performance time series data synchronization method according to any one of claims 1 to 9, characterized in that: include: The acquisition configuration reading module is used for the host to drive the acquisition of the configuration information, and according to the configuration information, the host requests the device for raw data at a fixed period, or waits for the device to actively push the raw data; The acquisition data parsing module is used to parse the acquired raw data, and then assign corresponding point labels to the parsed raw data according to the point table configuration to obtain label data; A collection and processing module, used to mark the timestamp of the current time of the server for the tag data to obtain a synchronization data packet; A collection and sending module, used for pushing the synchronization data packet to the data processing service of the host; The message processing module of the data processing service is used to receive the synchronization data packet sent by the acquisition and sending module and the data processing service sending module of the host, compare the label data in the synchronization data packet with the label data corresponding to the same point label previously stored in the host to see whether they are consistent, and obtain a comparison result; A data processing service judgment module, used to determine whether the tag data is updated according to the comparison result of the message processing module, and whether to forward the synchronization data packet to the data processing service of the standby machine; A data processing service sending module is used to send the synchronization data packet to the data processing service of the standby machine. When the data processing service of the standby machine receives the synchronization data packet, it updates the corresponding point label, label data and timestamp stored in the memory of the standby machine, waits for the standby machine to become the host, and then sends the synchronization data packet to other services on the host that require the synchronization data packet.
Citation Information
Patent Citations
Data synchronization method and data synchronization system
CN112035577A