Distributed full-peer real-time database synchronization method
By dividing the storage space on each device node and using multicast notification to achieve data synchronization, the redundant backup problem of the distributed real-time database is solved, and the reliability of the system and the efficiency of data integration are improved.
Patent Information
- Application Number
- CN202111471368.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-04
- Publication Date
- 2025-09-26
- Estimated Expiration
- 2041-12-04
Smart Images

Figure CN114817277B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data synchronization, and in particular to a distributed full-peer real-time database synchronization method. Background Art
[0002] Automated ship control technology has made tremendous progress over the past decade. A major improvement has been the integration of established, decentralized control systems with computer network technology, enabling full connectivity from the bottom layer to the top layer of monitoring and control, forming a comprehensive monitoring and control system that integrates monitoring, control, management, and decision-making. However, due to various technological developments, the network is now populated with diverse monitoring systems from different manufacturers. Each system can only collect and manage its own devices or equipment, generating real-time data during operation. There is no redundancy or backup between systems, resulting in low reliability and complex integration. Therefore, a unified data platform is urgently needed to integrate data from various control systems and provide support for real-time, highly reliable monitoring and control.
[0003] Distributed real-time databases emerged to address this issue. They effectively solved the data storage problem for each monitoring system, enabling efficient storage and processing of each system's real-time data. However, the distributed nature of each system meant that the real-time database only stored data for that system and could not provide redundant backups with other systems. Summary of the Invention
[0004] In order to solve the above technical problem or at least partially solve the above technical problem, the present invention provides a distributed full-peer real-time database synchronization method.
[0005] The present invention provides a distributed full-peer real-time database synchronization method, which is applied to a ship integrated monitoring and control system. A real-time database is deployed on each device node in the ship integrated monitoring and control system. The real-time database on each device node is divided into N storage spaces, where N is the number of device nodes with control functions in the ship integrated monitoring and control system. The N storage spaces are used to store data from the N device nodes with control functions.
[0006] The method includes: a first data synchronization process corresponding to each running device node, the first data synchronization process including:
[0007] Each device node obtains the latest measurement point data from the corresponding data collector, updates the corresponding storage space in the real-time database on the device node using the latest measurement point data, and multicasts a first notification of the device node updated data to the ship integrated monitoring and control system;
[0008] The device node that receives the first notification obtains data from the storage space corresponding to the sending node of the first notification in the real-time database of the device node that sends the first notification, and stores the obtained data in the storage space corresponding to the sending node of the first notification in the real-time database of the receiving node of the first notification, so as to realize data update between each device node.
[0009] The distributed full-peer real-time database synchronization method provided in this embodiment is that after a node obtains the latest measurement point data through its data collector, the data in the storage space corresponding to the node in the real-time database of the node is updated to realize the update of the node. Then the first notification is broadcasted to inform each node in the system. The node that receives the first notification will obtain data from the storage space corresponding to the notification sending node in the real-time database of the notification sending node, and then copy the obtained data to the storage space corresponding to the notification sending node in the real-time database of the receiving node, to realize the data update of the notification receiving node, thereby realizing the synchronous update of data between each node. The data in the real-time databases distributed on different nodes are synchronized to achieve the purpose of full-peer synchronization of data in the distributed real-time database, thereby realizing redundant backup and distributed control functions between distributed real-time databases. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0011] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0012] Figure 1 This is a system architecture diagram of a ship integrated monitoring and control system according to an embodiment of the present invention;
[0013] Figure 2 Schematic diagram of the distribution of a distributed full-peer real-time database in a ship integrated monitoring and control system according to an embodiment of the present invention;
[0014] Figure 3 Schematic diagram of the spatial division of a distributed full-peer real-time database in an embodiment of the present invention;
[0015] Figure 4 1 is a flow chart of a first data synchronization process in a distributed full-peer real-time database synchronization method according to an embodiment of the present invention;
[0016] Figure 5 The figure is a schematic diagram of the overall process of the distributed full-peer real-time database synchronization method in an embodiment of the present invention. DETAILED DESCRIPTION
[0017] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts shall fall within the scope of protection of the present invention.
[0018] The present invention provides a distributed full-peer real-time database synchronization method, which is applied to a ship integrated monitoring and control system. A real-time database is deployed on each device node in the ship integrated monitoring and control system. The real-time database on each device node is divided into N storage spaces, where N is the number of device nodes with control functions in the ship integrated monitoring and control system. The N storage spaces are used to store data from the N device nodes with control functions.
[0019] In the specific implementation, see Figure 1 The integrated ship monitoring and control system can be divided into a monitoring management layer, a communication layer and a field processing layer. The monitoring management layer and the field processing layer include at least one device node, wherein:
[0020] The device nodes in the monitoring management layer can be used to: receive collected data from each device node in the field processing layer through the communication layer; receive operation instructions from operators, and send the operation instructions to the corresponding device nodes in the field processing layer through the communication layer;
[0021] The device nodes in the field processing layer can be used to: receive operation instructions from the communication layer and perform actions according to the operation instructions; collect relevant data and send the collected relevant data to the device nodes of the monitoring management layer through the communication layer.
[0022] Among them, the monitoring management layer can provide the monitoring information, management information, events and alarms of the field equipment collected by the field processing layer to the operator in the form of a human-computer interaction interface, and at the same time accept the operator's control instructions, and send these control instructions to the field processing layer through the communication layer for corresponding processing. The main component equipment in the monitoring management layer is the console.
[0023] Among them, the communication layer is mainly responsible for transmitting the information collected by the field processing layer to the monitoring management layer, and outputting the instructions of the monitoring management layer to the field processing layer. The main components of the communication layer are switches, gateways, etc.
[0024] Among them, the field processing layer mainly completes the functions of collecting field signals, solving application control sequences, real-time data processing, and executing control instructions. The main component of the field processing layer is the field control box. Figure 1 As shown, the field control box in the field processing layer is connected to the diesel engine gearbox, auxiliary equipment, power distribution equipment of the generator set, etc.
[0025] In order to achieve efficient and unified monitoring and control, each field control box in the field control layer and each console in the monitoring management layer are regarded as a device node. A real-time database can be deployed on each device node for high-speed storage and real-time processing and display of real-time data. The structure of each console and field control box abstracted can be seen in Figure 2 ,exist Figure 2 In the system, each device node has a real-time database. The control and display application on the device node is used for personnel to perform related operations and display related data. The communication component is used for data communication between the upper and lower layers. The field control application is used to perform related actions according to the operating instructions.
[0026] In specific implementation, the device nodes included in the field processing layer may include at least one device node with a control function and at least one device node with a data monitoring function. The device node with a control function can generate real-time data, and the device node with a data monitoring function does not generate real-time data.
[0027] For example, in a ship integrated monitoring and control system, there are four distributed fully peer-to-peer real-time databases A, B, C, and D. Among them, A and D are device nodes at the monitoring management level. Node A has a control function (that is, it can generate control-type real-time data), and node D only has a data monitoring function (that is, it does not generate new real-time data). Nodes B and C are nodes at the field control level, and both B and C can collect real-time data.
[0028] In this example, the space division of the real-time database on each device node can be seen in Figure 3 ,exist Figure 3In the example, since three nodes generate real-time data, the real-time database on each node is divided into three storage spaces, effectively dividing the real-time database into three parts. Since node D, among these four nodes, is connected to the system but does not generate real-time data, it is not included in the statistics and does not require a storage space. This shows that the storage space in the real-time database is determined by the maximum number of nodes in the entire system capable of generating real-time data, that is, the maximum number of data source nodes. Even if one or more nodes are powered off and not running at a given moment, as long as they are capable of generating real-time data while running, they will be included in the statistics.
[0029] After each real-time database is divided into three parts, the first part of the storage space is used to store the data generated by node A, the second part of the storage space is used to store the data generated by node B, and the third part of the storage space is used to store the data generated by node C. Among them, although node D does not generate real-time data, the real-time database on node D is also divided into three parts, storing the real-time data generated by nodes A, B, and C respectively. It can be seen that the storage space distribution and structure of the real-time database on each device node are the same, that is, the storage space of the real-time database of node A stores the three parts of data A, B, and C, and the storage space of the real-time database of node B also stores the three parts of data A, B, and C. The same is true for nodes C and D. This constitutes a fully peer-to-peer and fully distributed database. This storage structure is the basis for the synchronization of distributed real-time databases. Among them, each real-time database can be connected via Ethernet.
[0030] The method provided by the present invention comprises:
[0031] S100, the first data synchronization process corresponding to each running device node; wherein, see Figure 4 and Figure 5 , the first data synchronization process includes:
[0032] S110, each device node obtains the latest measurement point data from the corresponding data collector, uses the latest measurement point data to update the corresponding storage space in the real-time database on the device node, and multicasts a first notification of the device node's updated data to the ship integrated monitoring and control system;
[0033] S120. The device node that receives the first notification obtains data from the storage space corresponding to the sending node of the first notification in the real-time database of the device node that sends the first notification, and stores the obtained data in the storage space corresponding to the sending node of the first notification in the real-time database of the receiving node of the first notification, so as to realize data update between each device node.
[0034] For example, node A obtains the latest measurement point data from its data collector, and then stores the latest measurement point data in the storage space corresponding to node A in node A's real-time database, thereby updating the data of node A in node A's real-time database. Furthermore, a notification is sent to other nodes via multicast, informing them that node A has completed the data update, i.e., the first notification.
[0035] When any other node receives the first notification, for example, node C, it will obtain the latest measurement point data from the storage space corresponding to node A in node A's real-time database, and then store the obtained latest measurement point data in the storage space of node A in node C's real-time database, thereby updating the data in node A's storage space on node C. The same is true for nodes B and D that receive the first notification. In this way, nodes B and D also update the data in the storage space of node A in their respective real-time databases.
[0036] That is to say, the real-time database of each data source node is responsible for updating the data in the storage space corresponding to this node, and further multicasting data publishing. The node that receives the multicast notification copies the updated data of the data source node to the corresponding storage space of the real-time database of this node, thereby achieving data synchronization with the data source node.
[0037] It is understandable that after a node obtains the latest measurement point data through its data collector, it updates the data in the storage space corresponding to the node in the real-time database of the node to achieve the update of the node. Then, the first notification is broadcasted to inform each node in the system. The node that receives the first notification will obtain data from the storage space corresponding to the notification sending node in the real-time database of the notification sending node, and then copy the obtained data to the storage space corresponding to the notification sending node in the real-time database of the receiving node, to achieve the data update of the notification receiving node, thereby achieving the data synchronization update between each node. The data in the real-time databases distributed on different nodes are synchronized to achieve the purpose of full peer-to-peer synchronization of data in the distributed real-time database, thereby achieving redundant backup and distributed control functions between distributed real-time databases.
[0038] It is understandable that the above S100 is performed between various device nodes during operation to ensure data synchronization between various running device nodes.
[0039] In specific implementation, the method provided by the present invention may further include:
[0040] S000: A second data synchronization process corresponding to when the device node is powered on.
[0041] The second data synchronization process includes:
[0042] S010. After the first device node is powered on, the first device node determines, through a heartbeat message, whether there is a powered-on device node in the integrated ship monitoring and control system;
[0043] S020. If it does not exist, the first device node obtains the latest measurement point data through the corresponding data collector, uses the latest measurement point data to update the storage space corresponding to the first device node in the real-time database of the first device node, marks the data in the remaining storage space in the real-time database of the first device node as unknown, starts the real-time database service on the first device node, and multicasts a second notification that the first device node has been started to the ship integrated monitoring and control system.
[0044] It is understandable that S000 is executed when any device node is powered on.
[0045] For example, assuming that the real-time database of node B was previously in a shutdown state, after node B is powered on, it first uses a heartbeat message to check whether there is a real-time database node that has been powered on on the network. If node B is the first to be powered on, and there is no real-time database node that has been powered on at this time, node B begins to execute the initialization process as the first real-time database node to be powered on. Node B first initializes the real-time database of the node, uses the data collector of this node to obtain the latest measurement point data, and updates the data in the storage space corresponding to node B in the real-time database of this node. Finally, the data in the storage space corresponding to nodes A and C in the real-time database of this node are marked as unknown, the real-time database service on this node is started, and the notification that node B has completed the startup is multicast to the entire system, that is, the second notification, so as to achieve data synchronization of node B when it is powered on.
[0046] In a specific implementation, the first device node obtains the latest measurement point data through a corresponding data collector, which may specifically include:
[0047] S1. Determine whether the data collector corresponding to the first device node is working normally;
[0048] S2. If yes, obtain the latest measurement point data through the data collector corresponding to the first device node;
[0049] S3. Otherwise, restart the data collector corresponding to the first device node and return to S1.
[0050] For example, when node B obtains the latest measurement point data through its data collector, it first determines whether the data collector of node B is in normal working state. If it is in normal working state, the latest measurement point data can be obtained through the data collector. If it is in abnormal working state, the data collector is restarted, and then the process returns to S1 to determine whether the restarted data collector is in normal working state.
[0051] In specific implementation, based on the above, if it is still determined to be an abnormal working state after multiple restarts, an alarm can be issued to enable the staff to perform the data synchronization process after the fault is resolved.
[0052] In a specific implementation, the second data synchronization process may further include:
[0053] If there are powered-on device nodes in the ship integrated monitoring and control system, each powered-on device node is treated as a second device node, and each second device node is accessed to obtain data from the storage space corresponding to the second device node in the real-time database of each second device node, and the obtained data is stored in the storage space corresponding to the second device node in the real-time database of the first device node, thereby realizing data synchronization between the first device node and each second device node; the first device node obtains the latest measurement point data through the corresponding data collector, uses the latest measurement point data to update the storage space corresponding to the first device node in the real-time database of the first device node, starts the service of the real-time database on the first device node, and multicasts a second notification that the first device node has been started to the ship integrated monitoring and control system.
[0054] For example, when node A starts up, nodes B and C have already started. Node A learns from heartbeat messages that nodes B and C are operating normally, and then begins the startup synchronization process. Node A sequentially accesses nodes B and C, obtaining data from the storage space corresponding to node B in node B's real-time database and from the storage space corresponding to node C in node C's real-time database. Node A then stores the data obtained from node B's real-time database in the storage space corresponding to node B in node A's real-time database, and stores the data obtained from node C's real-time database in the storage space corresponding to node C in node A's real-time database, achieving data synchronization with the already started nodes. Node A also obtains the latest measurement point data through its data collector and stores it in the storage space corresponding to node A in node A's real-time database, achieving data synchronization for this node. Node A can then start its real-time database service and notify other nodes via multicast that its startup has been completed.
[0055] In a specific implementation, accessing each second device node may include:
[0056] Determining whether the second device node is in an idle state;
[0057] If yes, access the second device node;
[0058] Otherwise, the next second device node is accessed until data acquisition for all second device nodes is completed.
[0059] For example, when node A accesses node B, it first determines whether node B is idle. If so, it accesses node B. If node B is not idle, it determines whether node C is idle. If so, it accesses node C. Otherwise, it waits until node C is idle before accessing it. After accessing node C, it determines whether node B is idle. If so, it accesses node B. If not, it waits until node B is idle before accessing it.
[0060] In specific implementation, in order to ensure that each node can know which nodes in the entire system are in normal operation and facilitate data synchronization between normally operating nodes, each device node can maintain a node list, which includes the identification information of each device node that is operating normally.
[0061] In specific implementation, the method provided by the present invention may further include:
[0062] S200, exception handling process.
[0063] The exception handling process includes:
[0064] S210. When the third device node discovers through the multicast heartbeat instruction that the fourth device node has an abnormal offline problem, the third device node marks the fourth device node that has abnormally disconnected as an abnormal node, marks the data in the storage space corresponding to the abnormal node in the real-time database of the third device node as unknown, deletes the identification information of the abnormal node from the node list, and multicasts a third notification of the abnormal node to the ship integrated monitoring and control system;
[0065] S220: The device nodes that receive the third notification delete the identification information of the abnormal node in the node list they maintain.
[0066] It is understandable that a node list is maintained on each node, and the node list contains the identification information of all nodes that are operating normally. However, at a certain moment, node A senses through the heartbeat instruction that node C in the node list is abnormally offline on the network, then the node C that has been abnormally offline is marked as an abnormal node, and the data in the storage space corresponding to node C in the real-time database of node A is marked as an unknown state, and then the identification information of node C is deleted from the node list maintained by node A, and notified to the remaining nodes through multicast. When nodes B and D receive the third notification, they will delete the identification information of node C in the node list they maintain, thereby updating the node list of each node, so that what is stored is the identification information of the normally operating node, so that node C is no longer synchronized with other nodes, and prevents it from affecting the entire distributed database.
[0067] In specific implementation, the method provided by the present invention may further include:
[0068] S300, node recovery process.
[0069] The node recovery process includes:
[0070] S310: After the fault of the fourth device node, which is the abnormal node, is resolved, the fourth device node obtains a node list maintained on the remaining device nodes, obtains data from a storage space corresponding to each fifth device node having a control function in the node list from a real-time database of the fifth device node, stores the obtained data in the storage space corresponding to the fifth node in the real-time database of the fourth device node, obtains the latest measurement point data from a data collector corresponding to the fourth device node, stores the latest measurement point data in the storage space corresponding to the fourth node in the real-time database of the fourth device node, starts a service of the real-time database of the fourth node, and multicasts a fourth notification indicating that the fourth node has returned to normal to the ship integrated monitoring and control system.
[0071] S320: Each device node that receives the fourth notification adds identification information of the fourth device node to a node list maintained by the respective device nodes, and opens a channel for receiving data from the fourth device node.
[0072] It is understandable that when a distributed real-time database node fails and is excluded from the node list by the system, the fault needs to be resolved and then reconnected to the system. The reconnection process is the process of synchronous recovery.
[0073] For example, suppose node B enters the recovery process after experiencing an abnormality. Node B first obtains the system's node list, which includes nodes A, C, and D. Because node D does not generate real-time data, the only fifth device nodes with control functionality are nodes A and C. Node B first obtains data from the storage space corresponding to node A in node A's real-time database and copies the obtained data to the storage space corresponding to node A in node B's real-time database. Node B then obtains data from the storage space corresponding to node C in node C's real-time database and copies the obtained data to the storage space corresponding to node C in node B's real-time database. Node B then obtains the latest measurement point data from node B's data collector and stores it in the storage space corresponding to node B in node B's real-time database, thus updating node B's real-time database. Node B then activates the real-time database service and multicasts a fourth notification to the system stating that node B has returned to normal. Of course, node B can also add its identification information to the obtained node list in the system to form its own node list.
[0074] After receiving the fourth notification, nodes A, C, and D add node B's identification information to their respective node lists and begin receiving data from node B. Node B becomes a normally operating node, and the entire distributed real-time database enters a stable synchronous operation state.
[0075] It is understandable that the first device node, the second device node, the third device node, the fourth device node, and the fifth device node in the present invention are only used to distinguish the device nodes in different scenarios for the convenience of description.
[0076] It is understood that the method provided by the present invention can synchronize data in the real-time databases of each node in an industrial control network, achieving synchronization at startup, synchronization during runtime, synchronization exception handling, synchronization recovery, etc., synchronizing data in real-time databases distributed across different nodes, achieving the goal of full peer-to-peer synchronization of data in distributed real-time databases, thereby realizing redundant backup and distributed control functions between distributed real-time databases. The present invention is targeted at real-time databases distributed across different nodes, achieving data synchronization updates in the real-time databases of each node, anomaly monitoring, and automatically joining the system operation after the abnormal node returns to normal.
[0077] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0078] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0079] Through the above description of the embodiments, those skilled in the art will clearly understand that the above-mentioned embodiments and methods can be implemented using software plus the necessary general-purpose hardware platform. Of course, hardware can also be used, but in many cases the former is a more preferred embodiment. Based on this understanding, the technical solution of the present invention, or the portion that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as RON / RAN, magnetic disk, or optical disk) and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in various embodiments of the present invention.
[0080] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are protected by the present invention.
Claims
1. A distributed full-peer real-time database synchronization method, characterized in that: The method is applied to a ship integrated monitoring and control system, wherein a real-time database is deployed on each device node in the ship integrated monitoring and control system, and the real-time database on each device node is divided into N storage spaces, where N is the number of device nodes with control functions in the ship integrated monitoring and control system, and the N storage spaces are used to store data from the N device nodes with control functions; The method includes: a first data synchronization process corresponding to each running device node, the first data synchronization process including: Each device node obtains the latest measurement point data from the corresponding data collector, updates the corresponding storage space in the real-time database on the device node using the latest measurement point data, and multicasts a first notification of the device node updated data to the ship integrated monitoring and control system; The device node that receives the first notification obtains data from the storage space corresponding to the sending node of the first notification in the real-time database of the device node that sends the first notification, and stores the obtained data in the storage space corresponding to the sending node of the first notification in the real-time database of the receiving node of the first notification, so as to realize data update between each device node.
2. The method according to claim 1, characterized in that The method further includes: a second data synchronization process corresponding to when the device node is powered on, the second data synchronization process including: After the first device node is powered on, the first device node determines, through a heartbeat message, whether there is a powered-on device node in the ship integrated monitoring and control system; If it does not exist, the first device node obtains the latest measurement point data through the corresponding data collector, uses the latest measurement point data to update the storage space corresponding to the first device node in the real-time database of the first device node, marks the data in the remaining storage space in the real-time database of the first device node as unknown, starts the real-time database service on the first device node, and multicasts a second notification to the ship integrated monitoring and control system that the first device node has been started.
3. The method according to claim 2, characterized in that The first device node obtains the latest measurement point data through the corresponding data collector, including: S1. Determine whether the data collector corresponding to the first device node is working normally; S2. If yes, obtain the latest measurement point data through the data collector corresponding to the first device node; S3. Otherwise, restart the data collector corresponding to the first device node and return to S1.
4. The method according to claim 2, characterized in that The second data synchronization process further includes: If there are powered-on device nodes in the ship integrated monitoring and control system, each powered-on device node is treated as a second device node, and each second device node is accessed to obtain data from the storage space corresponding to the second device node in the real-time database of each second device node, and the obtained data is stored in the storage space corresponding to the second device node in the real-time database of the first device node, thereby realizing data synchronization between the first device node and each second device node; the first device node obtains the latest measurement point data through the corresponding data collector, uses the latest measurement point data to update the storage space corresponding to the first device node in the real-time database of the first device node, starts the service of the real-time database on the first device node, and multicasts a second notification that the first device node has been started to the ship integrated monitoring and control system.
5. The method according to claim 4, characterized in that The accessing each second device node includes: Determining whether the second device node is in an idle state; If yes, access the second device node; Otherwise, the next second device node is accessed until data acquisition for all second device nodes is completed.
6. The method according to claim 1, wherein Each device node maintains a node list, which includes identification information of each device node that is operating normally.
7. The method according to claim 6, characterized in that The method further includes: an exception handling process, wherein the exception handling process includes: When the third device node discovers that the fourth device node has an abnormal offline problem through the multicast heartbeat instruction, the fourth device node that has abnormally disconnected is marked as an abnormal node, the data in the storage space corresponding to the abnormal node in the real-time database of the third device node is marked as an unknown state, the identification information of the abnormal node is deleted from the node list, and a third notification of the abnormal node is multicast to the ship integrated monitoring and control system; The device nodes that receive the third notification delete the identification information of the abnormal node from the node list maintained by each of them.
8. The method according to claim 7, characterized in that The method further includes: a node recovery process, wherein the node recovery process includes: After the fault of the fourth device node, which is the abnormal node, is resolved, the fourth device node obtains a node list maintained on the remaining device nodes, obtains data from a storage space corresponding to each fifth device node having a control function in the node list from a real-time database of the fifth device node, stores the obtained data in the storage space corresponding to the fifth device node in the real-time database of the fourth device node, obtains the latest measurement point data from a data collector corresponding to the fourth device node, stores the latest measurement point data in the storage space corresponding to the fourth device node in the real-time database of the fourth device node, starts a service of the real-time database of the fourth device node, and multicasts a fourth notification indicating that the fourth device node has returned to normal to the ship integrated monitoring and control system; Each device node that receives the fourth notification adds the identification information of the fourth device node to the node list maintained by each device node, and opens a channel for receiving data from the fourth device node.
9. The method according to claim 1, characterized in that The integrated ship monitoring and control system is divided into a monitoring management layer, a communication layer, and a field processing layer. The monitoring management layer and the field processing layer include at least one device node, wherein: The device nodes in the monitoring management layer are used to: receive collected data from each device node in the field processing layer through the communication layer; receive operation instructions from the operator, and send the operation instructions to the corresponding device nodes in the field processing layer through the communication layer; The device nodes in the field processing layer are used to: receive operation instructions from the communication layer and perform actions according to the operation instructions; collect relevant data and send the collected relevant data to the device nodes in the monitoring management layer through the communication layer.
10. The method according to claim 9, characterized in that The device nodes included in the field processing layer include at least one device node with a control function and at least one device node with a data monitoring function. The device node with a control function can generate real-time data, and the device node with a data monitoring function does not generate real-time data.
Citation Information
Patent Citations
Distributed database synchronization system, synchronization method and node management method
CN102693324A
Data synchronization method, distributed system and application node
CN109408224A