Dynamic redundancy system and method in distributed network

By digitizing the physical nodes and sending logical node data in the Internet of Things and distributed control systems, using heartbeat data for troubleshooting and switching, the limitation of node count, high cost and low flexibility in traditional redundant deployment methods is solved. The problem of dynamic redundant policy deployment and switching is realized, reducing costs and improving efficiency and flexibility.

CN119109730APending Publication Date: 2024-12-10BEIJING PHILISENSE ELECTRONICS TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411211020.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-30
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

Traditional redundant deployment methods have problems such as limiting the number of nodes, high cost, low flexibility and low operation and maintenance efficiency in the Internet of Things and distributed control systems, and it is difficult to adapt to complex and changeable environments and real-time needs.

Method used

Grouping and logical node data issuing physical nodes through modeling and digitalization, realizing dynamic redundant deployment and policy adjustment, using heartbeat data for fault diagnosis and master-slave switching, multiplexing physical nodes in the network, reducing costs and increasing costs Flexibility and efficiency.

Benefits of technology

It realizes the deployment and switching of dynamic redundancy policies of physical nodes, reduces the cost of hardware equipment, improves the efficiency and flexibility of redundant deployment, and makes operation management more vivid and simple.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119109730A_ABST
    Figure CN119109730A_ABST
Patent Text Reader

Abstract

The invention discloses a dynamic redundancy system and method in a distributed network, and belongs to the field of Internet of Things and distributed control. The system and the method comprise one or more physical node groups, wherein each physical node group comprises at least two physical nodes; each physical node group runs a group of logic nodes, and the group of logic nodes are configured on each physical node; each physical node can activate one or more logic nodes at the same time, the activated logic nodes provide data and logic support for controlling corresponding equipment, the non-activated logic nodes serve as redundant nodes, and each piece of equipment is controlled by only one activated logic node at the same time; the physical nodes are arranged according to an ip ascending order to form a one-way ring, when any physical node breaks down, the logic node corresponding to the physical node which breaks down is activated in the forward recent healthy physical nodes, the forward recent healthy physical nodes take over all devices under the logic nodes to provide a monitoring function, and a redundancy strategy is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of Internet of Things and distributed control technology, and mainly to a dynamic redundancy system and method in a distributed network. Background Art

[0002] In the Internet of Things and distributed control systems, the stability and reliability of physical nodes are crucial to the normal operation of the entire system. However, traditional physical node deployment methods often lack flexibility and scalability. Once a physical node fails, it may cause the entire system or some functions to fail. In addition, with the rapid growth of the number of IoT devices and the complexity of application scenarios, higher requirements are also placed on the management, monitoring and adjustment of physical nodes.

[0003] At present, the redundant deployment of physical nodes mainly relies on hardware backup and manual intervention. Although hardware backup can improve the reliability of the system to a certain extent, it is costly and inflexible, and it is difficult to adapt to the complex and changing IoT environment. Manual intervention has problems such as slow response speed and low efficiency, and cannot meet the requirements of real-time and dynamic performance. In addition, when there are many physical nodes in a distributed network, the traditional hardware backup redundancy mechanism will cause greater costs, and operation and maintenance management will also be more complex and difficult, requiring a digital remote operation and maintenance method.

[0004] The Chinese patent application with publication number CN 117311136 A discloses a "dual-machine operation method and device based on interconnected heartbeat monitoring mechanism". The method achieves dual-machine redundancy at a relatively low hardware cost without introducing an additional arbitration module. However, it is mainly limited to the scope of two host nodes, and the redundant switching method is fixed and inflexible. The Chinese patent application with publication number CN 114500168B discloses "a distributed control system cross-wide area network communication method and gateway". The method solves the problem of network interruption when a single device fails by setting redundant devices and redundant interfaces on the devices, thereby increasing network reliability. However, it adopts a hardware backup method, lacks flexibility, and requires a lot of cost; and when the redundancy strategy of the distributed control network is adjusted, a complex operation process is also required. Summary of the invention

[0005] The purpose of the present invention is to solve the problems of limited node quantity and high cost, low flexibility and low operation and maintenance efficiency caused by multiple hardware redundancy in traditional redundant deployment methods; by modeling physical nodes in a modeling and digital way, and by grouping and sending logical node data, dynamic redundant deployment and strategy adjustment of physical nodes are realized.

[0006] Specifically, the present invention provides a dynamic redundant system in a distributed network, wherein the dynamic redundant system in the distributed network includes one or more physical node groups, each physical node group includes at least two physical nodes;

[0007] Each physical node runs a group of logical nodes, and the group of logical nodes is configured on each physical node;

[0008] Each physical node can activate one or more logical nodes at the same time. The activated logical nodes provide data and logic support for controlling the corresponding devices. The unactivated logical nodes serve as redundant nodes. Each device is controlled by only one activated logical node at a time.

[0009] The physical nodes are arranged in ascending order of IP to form a unidirectional ring. When any physical node fails, the logical node corresponding to the failed physical node is activated in the nearest healthy physical node, and the nearest healthy physical node takes over the monitoring function of all devices under these logical nodes to implement the redundancy strategy.

[0010] Furthermore, the physical nodes in the physical node group send heartbeat data bidirectionally between each other;

[0011] The sending information record of the heartbeat request node includes the sending time, the receiving node and the response information of the receiving node;

[0012] At the same time, the node will also receive heartbeat request information from other nodes, and the received information record includes the receiving time and the requesting node;

[0013] When the heartbeat requesting node receives the response information from the receiving node, the heartbeat requesting node will save the heartbeat status of the receiving node as 1. If it does not receive the response information, the heartbeat status will be 0.

[0014] Furthermore, each physical node in the physical node group is synchronized to the inactivated logical nodes on other redundant physical nodes according to the data of the activated logical nodes running on the physical node.

[0015] Furthermore, the physical nodes in the physical node group diagnose the fault status of the next physical node in a one-way closed loop in ascending order of communication addresses, and the last physical node detects the fault status of the first physical node;

[0016] The current physical node searches for the heartbeat status in the information record sent;

[0017] The current physical node locally searches for the heartbeat status of the next physical node in the sent information record. If the heartbeat status is not 1, and the last heartbeat request received from the next physical node in the received information record is before the current physical node sends 3 heartbeat cycles to the next physical node, then the next physical node is determined to be in an abnormal state, otherwise the next physical node is determined to be in a normal state.

[0018] Furthermore, the fault condition detection process includes:

[0019] The physical node periodically sends heartbeat request information to all redundant physical nodes. The heartbeat request information includes the sending time and the receiving party's IP. After sending the heartbeat request, the corresponding request node will receive the response information, and the heartbeat status of the redundant physical node will be recorded as 1. At the same time, the sending and response information will be saved in the sqlite database;

[0020] The physical node will also receive the heartbeat request information sent by other physical nodes and store the received information in the sqlite database;

[0021] Fault diagnosis is performed every three heartbeat cycles. During fault diagnosis, the current physical node searches for the heartbeat status of the next physical node in the local information record. If the heartbeat status is 1, the next physical node is marked as normal.

[0022] If the heartbeat status of the next physical node is not 1, the current physical node queries the SQLite database to see whether there is a heartbeat request message sent by the next physical node to the current physical node within three cycles of the current time in the received information record. If the heartbeat request message is not included, the status of the next physical node is recorded as abnormal in the designated file of the current physical node, and the fault time is updated. The current physical node is set to activate the activated logical node in the next faulty physical node, and the current physical node monitors all devices through the data and logic of these logical nodes.

[0023] Furthermore, after the logical node corresponding to the next physical node in the current physical node is activated, the current physical node continues to diagnose the next physical node and starts to diagnose the physical nodes after the next physical node.

[0024] Furthermore, if the current physical node receives the heartbeat signal of the normal state of the next physical node again, the state of the next physical node is updated in the sqlite database to be normal, the abnormal time of the next physical node in the record is cleared, and the recovery time of the next physical node is updated.

[0025] A dynamic redundancy method in a distributed network is also provided, the dynamic redundancy method in a distributed network comprising the following steps:

[0026] Step 1: Configure physical nodes and logical nodes in the distributed network;

[0027] The dynamic redundant system in the distributed network includes one or more physical node groups, each physical node group includes at least two physical nodes, and the physical nodes are arranged in ascending order of IP to form a unidirectional ring;

[0028] Each physical node runs a group of logical nodes, and the group of logical nodes is configured on each physical node; each physical node can activate one or more logical nodes at the same time. The activated logical nodes provide data and logic support for controlling the corresponding devices. The inactivated logical nodes serve as redundant nodes. Each device is controlled by only one activated logical node at the same time.

[0029] Step 2, the physical node periodically sends a heartbeat request message to all mutually redundant physical nodes. The heartbeat request message includes the sending time and the recipient's IP address. After sending the heartbeat request, the response message of the corresponding requesting node will be received, and the heartbeat status of the mutually redundant physical nodes will be recorded as 1. At the same time, the sending and response information will be saved in the sqlite database.

[0030] Step 3: The physical node will also receive the heartbeat request information sent by other physical nodes and store the received information in the sqlite database;

[0031] Step 4: perform fault diagnosis every three heartbeat cycles. During fault diagnosis, the current physical node searches for the heartbeat status of the next physical node in the local information record. If the heartbeat status is 1, the next physical node is marked as normal.

[0032] Step 5, if the heartbeat status of the next physical node is not 1, the current physical node queries the sqlite database to see whether there is a heartbeat request information sent by the next physical node to the current physical node within three cycles of the current time in the received information record. If the heartbeat request information is not included, the status of the next physical node is recorded as abnormal in the designated file of the current physical node, and the fault time is updated. The current physical node is set to activate the activated logical node in the next faulty physical node, and the current physical node monitors all devices through the data and logic of these logical nodes.

[0033] Furthermore, the dynamic redundancy method in the distributed network comprises the following steps:

[0034] Step 6: If the physical node in the abnormal state is changed to the normal state, the state of the physical node is updated in the corresponding file to be normal, and the abnormal time and recovery time of the physical node are cleared.

[0035] The beneficial effects achieved by the present invention are:

[0036] The present invention parameterizes the redundancy strategy, performs digital management on the physical nodes in the distributed network, and realizes dynamic redundancy strategy deployment and switching of the physical nodes in the same group by grouping and remotely issuing the logical nodes.

[0037] The present invention does not set up a separate physical slave node, but reuses other physical nodes in the network, thereby saving and better utilizing physical resources and reducing costs.

[0038] Compared with the general cluster mode, the present invention is more lightweight, and through modeling and digital definition, the redundant strategy configuration operation is more vivid and simple, and the dynamic and real-time adjustment of the redundant strategy can be easily realized, thereby improving flexibility and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0039] Figure 1 A business framework diagram of a dynamic redundant system in a distributed network provided by the present invention;

[0040] Figure 2 A redundancy mechanism fault diagnosis flow chart in a dynamic redundancy system in a distributed network provided by the present invention;

[0041] Figure 3 The present invention provides a flow chart of a dynamic redundancy method in a distributed network. DETAILED DESCRIPTION

[0042] The technical solution of the present invention is described in more detail below in conjunction with the accompanying drawings. The present invention includes but is not limited to the following embodiments.

[0043] like Figure 1 As shown, the present invention provides a dynamic redundant system in a distributed network. The dynamic redundant system in the distributed network includes two or more physical nodes in a product network environment that requires distributed deployment, and these physical nodes are grouped and managed according to redundancy requirements.

[0044] In the configuration software, logical node models are constructed for all physical nodes, and the operating parameters and strategies of the logical nodes are configured. Under the logical nodes, one or more devices to be controlled by the logical nodes are created. After the logical nodes are running, data of the devices under the nodes can be collected and the devices can be remotely controlled.

[0045] Install and deploy distributed software systems on physical nodes.

[0046] Logical nodes and physical nodes carrying corresponding logical nodes are grouped according to redundancy requirements. Only logical node groupings that are consistent with physical node groupings can be sent to physical nodes with the same group name.

[0047] The grouped logical nodes are sent to the physical nodes in the same group. The sending method is group-by-group, that is, in each physical node in the same group, all the corresponding logical nodes in the group are sent. After the physical node system is initialized, the physical nodes in the same group are mutually redundant. The logical nodes are sent in groups. When receiving the logical nodes, the physical nodes will configure the master-slave status of a certain logical node in a certain physical node. The activated logical nodes in the physical nodes are the master logical nodes, and the unactivated logical nodes are the slave logical nodes used for redundancy.

[0048] The method for dynamic redundancy processing in a distributed network comprises the following steps:

[0049] 1) Master-slave state configuration: Arrange the communication addresses of redundant physical nodes in ascending order according to IP to form a one-way loop and store them in array A, which contains the addresses of physical node 1, physical node 2...physical node N. Arrange the identifiers of redundant logical nodes in ascending order and store them in array B, which contains the identifiers of logical node 1, logical node 2...logical node N. Loop A assigns a physical node to each logical node in B in turn, and the logical node is activated in the physical node to set the master-slave state to master, and the logical node is not activated in other physical nodes to set the master-slave state to slave.

[0050] The master-slave state here refers to the state of the logical node relative to the physical node. At the same time, the same logical node will only be the master on a certain physical node and the slave on other physical nodes. Logical node 1 is activated on physical node 1. Running logical node 1 can realize data collection and remote control operations on the devices under logical node 1 through physical host 1. Logical node 2 is not activated on physical node 1. It only runs logical node 2 and does not collect data or control operations on the devices under logical node 2.

[0051] Heartbeat monitoring: Physical nodes in the same group send heartbeats bidirectionally between each other, and the communication is in the form of a grid. The optional values ​​of the heartbeat status are 1 (yes) and 0 (no). The heartbeat requester saves the sending time, the receiving party, and the response information of the receiving node by sending information records. The heartbeat receiver saves the receiving time and the sender by receiving information records. The response information record is the data basis for diagnosing whether the physical node is faulty or not. If the heartbeat request node receives the response information of the receiving node, the heartbeat request node will save the heartbeat status of the receiving node as 1. If it does not receive the response information, the heartbeat status is 0.

[0052] The heartbeat request node implements heartbeat data interaction based on the long connection technology of the application layer TCP / IP protocol, uses the sqlite database for data storage and management, and uses the ring + long connection technology to implement diagnosis and improve the reliability of heartbeat monitoring.

[0053] 2) Data synchronization: The optional values ​​of the master-slave status are 1 (master) and 0 (slave). The data that needs to be synchronized is collected by the "activated logical node" and then synchronized to the "inactivated logical node". The "slave logical node" refers to the same logical node in the slave state on other redundant physical nodes. Data synchronization is performed between physical nodes through TCP long links. The data that needs to be synchronized includes the collected data and downlink data of the device.

[0054] If logical node 1 is the master on physical node 1, then logical node 1 in physical node 1 is activated, and data collection and remote control operations for all devices under logical node 1 are performed. New data of logical node 1 will be synchronized to slave logical node 1 on physical node 2 and slave logical node 1 on physical node 3 to ensure data consistency after fault diagnosis and master-slave switching.

[0055] 4) Fault diagnosis. The physical nodes in the same group diagnose the next physical node in ascending order of the communication address (i.e., Group A), i.e., physical node 1→physical node 2→…physical node N→physical node 1, in the form of a closed loop. The optional values ​​of the fault status are 1 (fault) and 0 (not faulty). The logic of fault diagnosis is that physical node 1 periodically diagnoses the heartbeat status of physical node 2 in the response information of physical node 2 in the information record sent by physical node 1. If the heartbeat status of the current cycle is not 1, and the last heartbeat request of physical node 2 received in the received information record is before physical node 1 sends 3 heartbeats to it, then the fault status of physical node 2 is determined to be 1, otherwise the fault status of physical node 2 is determined to be 0. The fault diagnosis logic of physical node 2 for physical node 3 and the fault diagnosis logic of physical node 3 for physical node 1 are the same.

[0056] Ring diagnostic mechanism such as Figure 2 Take physical node 1 monitoring physical node 2 as an example:

[0057] Step 1: Physical node 1 periodically sends heartbeat request information to physical host 2 (to all redundant hosts), including the sending time and the recipient's IP. After sending the heartbeat request, it will receive the response information of the corresponding request node, and record the heartbeat status of the redundant physical node as 1, and save the sent information to the sqlite database.

[0058] Step 2: Physical node 1 will also receive the heartbeat request information from physical node 2 (all redundant hosts) and store the received information in the sqlite database.

[0059] Step 3: Perform fault diagnosis every three heartbeat cycles. During fault diagnosis, physical node 1 searches for the heartbeat status of physical node 2 in the local information record. If the heartbeat status is 1, physical node 2 is marked as normal. The fault diagnosis logic between other physical nodes is the same.

[0060] Step 4: Perform fault diagnosis every 3 cycles, query the response information received by physical node 1 from physical node 2 in the latest cycle, and if the heartbeat status contains information other than status 1, proceed to step 5. Otherwise, mark the status of physical node 2 as normal.

[0061] Step 5: The database of the server of physical node 1 queries whether there is any heartbeat request information sent by physical node 2 to physical node 1 in the first three heartbeat cycles of the current cycle. If there is no heartbeat request information within three cycles, the state of physical node 2 is recorded as abnormal in the designated file of physical node 1, and the fault time is updated. Logical node 2 in physical node 1 is activated, and the device under logical node 2 in physical node 2 is taken over. Physical node 1 continues to diagnose physical node 2, and starts to diagnose the physical node after physical node 2, which is physical node 3 in this case. The logic is the same as step 3. Until a host in normal state is found.

[0062] Step 6: If the original status of physical node 2 is abnormal and the current status is changed to normal, update the status of physical node 2 in the specified file of physical node 1 to be normal, clear the abnormal time of physical node 2, and update the recovery time of physical node 2.

[0063] 5) Master-slave switching: If the fault status of physical node 1 is 0, the fault status of physical node 2 is 1, and the fault status of physical node 3 is 0, then logical node 2 is set as the master in the master-slave status of physical node 1, and physical node 1 takes over the equipment of physical node 2, that is, monitoring after the actual connection is established. That is, at this time, logical node 1 and logical node 2 on physical node 1 are both masters, and physical node 1 controls all devices under logical node 1 and logical node 2 at the same time. Physical node 1 and physical node 3 still heartbeat detect physical node 2, and physical node 1 still fault diagnoses physical node 2 and physical node 3. If physical node 1 diagnoses that physical node 2 is normal, physical node 3 will no longer be diagnosed.

[0064] 6) Synchronous recovery: Physical node 2 resumes sending heartbeat requests, physical node 1 fault diagnoses the fault status of physical node 2 to 0, synchronizes incremental data (data that needs to be synchronized during runtime that is newly added or modified after the fault time of physical node 2) to physical node 2 and sets the master-slave status of logical node 2 in physical node 2 to 1, physical node 2 takes over the device of logical node 2, that is, monitors after the actual connection is established; sets the master-slave status of logical node 2 in physical node 1 to 0, physical node 1 no longer monitors the device of logical node 2, that is, disconnects, and at the same time physical node 1 fault diagnoses physical node 2, and no longer fault diagnoses physical node 3.

[0065] The process of dynamically modifying the redundancy strategy is as follows:

[0066] When redundancy requirements change, regroup logical nodes in the configuration software or modify logical node operating parameters;

[0067] The logical nodes are re-distributed to the physical nodes in the same group. After the system is initialized, the new redundancy strategy takes effect and the physical nodes in the same group are mutually redundant.

[0068] As attached Figure 3 As shown, the present invention also provides a dynamic redundancy method in a distributed network, and the dynamic redundancy method in a distributed network comprises the following steps:

[0069] Step 1: Configure physical nodes and logical nodes in the distributed network;

[0070] A dynamic redundant system in a distributed network includes one or more physical node groups, each physical node group includes at least two physical nodes, and the physical nodes are arranged in ascending order of IP to form a unidirectional ring;

[0071] Each physical node runs a group of logical nodes, and the group of logical nodes is configured on each physical node; each physical node can activate one or more logical nodes at the same time. The activated logical nodes provide data and logic support for controlling the corresponding devices. The inactivated logical nodes serve as redundant nodes. Each device is controlled by only one activated logical node at the same time.

[0072] Step 2, the physical node periodically sends a heartbeat request message to all mutually redundant physical nodes. The heartbeat request message includes the sending time and the recipient's IP address. After sending the heartbeat request, the response message of the corresponding requesting node will be received, and the heartbeat status of the mutually redundant physical nodes will be recorded as 1. At the same time, the sending and response information will be saved in the sqlite database.

[0073] Step 3: The physical node will also receive the heartbeat request information sent by other physical nodes and store the received information in the sqlite database;

[0074] Step 4: perform fault diagnosis every three heartbeat cycles. During fault diagnosis, the current physical node searches for the heartbeat status of the next physical node in the local information record. If the heartbeat status is 1, the next physical node is marked as normal.

[0075] Step 5, if the heartbeat status of the next physical node is not 1, the current physical node queries the sqlite database to see whether there is a heartbeat request information sent by the next physical node to the current physical node within three cycles of the current time in the received information record. If the heartbeat request information is not included, the status of the next physical node is recorded as abnormal in the designated file of the current physical node, and the fault time is updated. The current physical node is set to activate the activated logical node in the next faulty physical node, and the current physical node monitors all devices through the data and logic of these logical nodes.

[0076] Step 6: If the physical node in the abnormal state is changed to the normal state, the state of the physical node is updated in the corresponding file to be normal, and the abnormal time and recovery time of the physical node are cleared.

[0077] The present invention is based on the digitization, modeling and remote grouping of physical nodes to achieve dynamic redundant strategy deployment and switching of physical nodes, reuse other physical nodes in the network, reduce hardware equipment costs, improve the efficiency and flexibility of redundant deployment, and make operation management more vivid and simple.

[0078] The present invention is not limited to the above-mentioned specific implementation modes. A person skilled in the art may implement the present invention in various other specific implementation modes according to the embodiments and the disclosure of the drawings. Therefore, any design that adopts the design structure and concept of the present invention and makes some simple transformations or changes shall fall within the scope of protection of the present invention.

Claims

1. A dynamic redundant system in a distributed network, characterized in that: The dynamic redundant system in the distributed network includes one or more physical node groups, each physical node group includes at least two physical nodes; Each physical node runs a group of logical nodes, and the group of logical nodes is configured on each physical node; Each physical node can activate one or more logical nodes at the same time. The activated logical nodes provide data and logic support for controlling the corresponding devices. The unactivated logical nodes serve as redundant nodes. Each device is controlled by only one activated logical node at a time. The physical nodes are arranged in ascending order of IP to form a unidirectional ring. When any physical node fails, the logical node corresponding to the failed physical node is activated in the nearest healthy physical node, and the nearest healthy physical node takes over the monitoring function of all devices under these logical nodes to implement the redundancy strategy.

2. The dynamic redundant system in a distributed network according to claim 1, characterized in that: The physical nodes in the physical node group send heartbeat data bidirectionally between each other; The sending information record of the heartbeat request node includes the sending time, the receiving node and the response information of the receiving node; At the same time, the node will also receive heartbeat request information from other nodes, and the received information record includes the receiving time and the requesting node; When the heartbeat requesting node receives the response information from the receiving node, the heartbeat requesting node will save the heartbeat status of the receiving node as 1. If it does not receive the response information, the heartbeat status will be 0.

3. The dynamic redundant system in a distributed network according to claim 1, characterized in that: Each physical node in the physical node group is synchronized to the inactivated logical nodes on other redundant physical nodes according to the data of the activated logical nodes running on the physical node.

4. The dynamic redundant system in a distributed network according to claim 2, characterized in that: The physical nodes in the physical node group diagnose the fault status of the next physical node in a one-way closed loop in ascending order of communication addresses, and the last physical node detects the fault status of the first physical node; The current physical node searches for the heartbeat status in the information record sent; The current physical node locally searches for the heartbeat status of the next physical node in the sent information record. If the heartbeat status is not 1, and the last heartbeat request received from the next physical node in the received information record is before the current physical node sends 3 heartbeat cycles to the next physical node, then the next physical node is determined to be in an abnormal state, otherwise the next physical node is determined to be in a normal state.

5. The dynamic redundant system in a distributed network according to claim 4, characterized in that: The fault status detection process includes: The physical node periodically sends heartbeat request information to all redundant physical nodes. The heartbeat request information includes the sending time and the receiving party's IP. After sending the heartbeat request, the corresponding request node will receive the response information, and the heartbeat status of the redundant physical node will be recorded as 1. At the same time, the sending and response information will be saved in the sqlite database; The physical node will also receive the heartbeat request information sent by other physical nodes and store the received information in the sqlite database; Fault diagnosis is performed every three heartbeat cycles. During fault diagnosis, the current physical node searches for the heartbeat status of the next physical node in the local information record. If the heartbeat status is 1, the next physical node is marked as normal. If the heartbeat status of the next physical node is not 1, the current physical node queries the SQLite database to see whether there is a heartbeat request message sent by the next physical node to the current physical node within three cycles of the current time in the received information record. If the heartbeat request message is not included, the status of the next physical node is recorded as abnormal in the designated file of the current physical node, and the fault time is updated. The current physical node is set to activate the activated logical node in the next faulty physical node, and the current physical node monitors all devices through the data and logic of these logical nodes.

6. The dynamic redundant system in a distributed network according to claim 5, characterized in that: After the logical node corresponding to the next physical node in the current physical node is activated, the current physical node continues to diagnose the next physical node and starts to diagnose the physical nodes after the next physical node.

7. The dynamic redundant system in a distributed network according to claim 5, characterized in that: If the current physical node receives the heartbeat signal of the normal state of the next physical node again, the sqlite database is updated to record the state of the next physical node as normal, the abnormal time of the next physical node in the record is cleared, and the recovery time of the next physical node is updated.

8. A dynamic redundancy method in a distributed network based on the dynamic redundancy system in a distributed network according to any one of claims 1 to 7, characterized in that: The dynamic redundancy method in the distributed network comprises the following steps: Step 1: Configure physical nodes and logical nodes in the distributed network; The dynamic redundant system in the distributed network includes one or more physical node groups, each physical node group includes at least two physical nodes, and the physical nodes are arranged in ascending order of IP to form a unidirectional ring; Each physical node runs a group of logical nodes, and the group of logical nodes is configured on each physical node; each physical node can activate one or more logical nodes at the same time. The activated logical nodes provide data and logic support for controlling the corresponding devices. The inactivated logical nodes serve as redundant nodes. Each device is controlled by only one activated logical node at the same time. Step 2, the physical node periodically sends a heartbeat request message to all mutually redundant physical nodes. The heartbeat request message includes the sending time and the recipient's IP address. After sending the heartbeat request, the response message of the corresponding requesting node will be received, and the heartbeat status of the mutually redundant physical nodes will be recorded as 1. At the same time, the sending and response information will be saved in the sqlite database. Step 3: The physical node will also receive the heartbeat request information sent by other physical nodes and store the received information in the sqlite database; Step 4: perform fault diagnosis every three heartbeat cycles. During fault diagnosis, the current physical node searches for the heartbeat status of the next physical node in the local information record. If the heartbeat status is 1, the next physical node is marked as normal. Step 5, if the heartbeat status of the next physical node is not 1, the current physical node queries the sqlite database to see whether there is a heartbeat request information sent by the next physical node to the current physical node within three cycles of the current time in the received information record. If the heartbeat request information is not included, the status of the next physical node is recorded as abnormal in the designated file of the current physical node, and the fault time is updated. The current physical node is set to activate the activated logical node in the next faulty physical node, and the current physical node monitors all devices through the data and logic of these logical nodes.

9. The dynamic redundancy method in a distributed network according to claim 8, characterized in that:The dynamic redundancy method in the distributed network comprises the following steps: Step 6: If the physical node in the abnormal state is changed to the normal state, the state of the physical node is updated in the corresponding file to be normal, and the abnormal time and recovery time of the physical node are cleared.

Citation Information

Patent Citations

  • A method and gateway for cross-wide area network communication in a distributed control system

    CN114500168B

  • Dual-computer operation method and device based on interconnected heartbeat monitoring mechanism

    CN117311136A