CN108259110B - Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network - Google Patents

Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network Download PDF

Info

Publication number
CN108259110B
CN108259110B CN201711438530.4A CN201711438530A CN108259110B CN 108259110 B CN108259110 B CN 108259110B CN 201711438530 A CN201711438530 A CN 201711438530A CN 108259110 B CN108259110 B CN 108259110B
Authority
CN
China
Prior art keywords
node
nodes
synchronization
ring network
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201711438530.4A
Other languages
Chinese (zh)
Other versions
CN108259110A (en
Inventor
石景海
胡炯
陈秋荣
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sifang Automation Co Ltd
Original Assignee
Beijing Sifang Automation Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sifang Automation Co Ltd filed Critical Beijing Sifang Automation Co Ltd
Priority to CN201711438530.4A priority Critical patent/CN108259110B/en
Publication of CN108259110A publication Critical patent/CN108259110A/en
Application granted granted Critical
Publication of CN108259110B publication Critical patent/CN108259110B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/08Intermediate station arrangements, e.g. for branching, for tapping-off
    • H04J3/085Intermediate station arrangements, e.g. for branching, for tapping-off for ring networks, e.g. SDH/SONET rings, self-healing rings, meashed SDH/SONET networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0685Clock or time synchronisation in a node; Intranode synchronisation
    • H04J3/0697Synchronisation in a packet node

Abstract

A synchronous master selection method for keeping synchronization among multiple nodes in a bidirectional redundant ring network is disclosed, wherein the first priority condition of the method is the number of nodes which can be sent by a node message, the second priority condition is the number of slave nodes, and the third priority condition is the node hardware number; the number of nodes to which the first priority condition node message of the core method of the synchronization master selection method can be sent is that the node with the largest number of nodes to which the message can be sent is selected as the synchronization master during the incomplete link or the change of the link; the second priority of the core method of the synchronization master selection method is that the number of the slave nodes is different, which means that when the nodes meeting the first priority condition are not unique, the node with the largest number of the slave nodes is selected as the synchronization master; the third priority of the core method of the synchronization master selection method is that the hardware number of the node is that when the nodes meeting the first priority condition and the second priority condition are not unique, the node with the minimum hardware identification number is selected as the synchronization master; the method has the characteristics of good synchronization effect, strong adaptability, simple rule, high reliability and the like.

Description

Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network
Technical Field
The invention relates to the technical field of electrician, in particular to an electrician communication technology, in particular to a synchronous master selection method for keeping synchronization among multiple nodes in a bidirectional redundant ring network, which is used for solving the synchronous master selection problem when the link of the bidirectional redundant ring network changes.
Background
As bidirectional redundant ring networks are applied more and more widely in the field of electrical engineering, other related technologies based on the network architecture gradually start to enter the field of vision of people, and a synchronization technology is the most basic and key ring.
The simplest mode of synchronization among a plurality of node devices forming a ring network is a mode of manually designating a host and one master and a plurality of slaves, but the mode can lead to the paralysis of the whole system when the host fails, so that the usability is not high; synchronization based on an external clock or a celestial satellite is a simple synchronization method, but the method cannot be accepted by devices with high reliability requirements due to dependence on external devices, and a method independent of any external device is desired, so that synchronization among a plurality of node devices forming a ring network is maintained, and the method is independent of a specific host.
The corresponding mathematical model of the technical problem is the election algorithm problem. Elections are a common type of computation in distributed systems that choose one process from a set of processes to perform a particular task. For example, after a distributed system fails, it is often necessary to reorganize the active nodes so that they continue to perform useful tasks. During this reorganization and configuration, a coordinator is selected to manage the operations. The detection of faults is typically based on a timeout mechanism. If a process does not receive a coordinator response for more than a certain amount of time, it suspects that the coordinator has failed and initiates the election process. Elections are widely applied in the fields of group servers, load balancing, repeated data updating, emergency recovery, connection groups, mutual exclusion and the like. Each process has the same local algorithm in the implementation of the election algorithm; the algorithm is decentralized, i.e., any non-empty subset of processes can start a computation; in each calculation, the algorithm reaches a termination configuration. In each reachable termination configuration, only one process is in the leader state, while all other processes are in the failure state. The last property can be weakened, requiring only one process to be in the leader state.
In the conventional election algorithm, the network is assumed to be in a normal operation state or a bidirectional simultaneous on-off working state, but in the bidirectional redundant ring network, network links are likely to be unidirectional and blocked, so that the conventional algorithm has insufficient statistical information or cannot inform all members in the ring network of an election result when the election is realized. The technical scheme provided by the invention can avoid the problems to the greatest extent, and is particularly suitable for the working condition that a plurality of nodes on the bidirectional redundant ring network keep synchronous mutually. Especially, when the network state is incomplete, the technical advantages and effects can be brought into full play.
Disclosure of Invention
The invention discloses a synchronous master selection method for keeping synchronization among multiple nodes in a bidirectional redundant ring network, which is used for solving the synchronous master selection problem when links of the bidirectional redundant ring network change.
In order to solve the technical problems, the invention adopts the following technical scheme.
A synchronization master selection method for maintaining synchronization among multiple nodes in a bidirectional redundant ring network is characterized by comprising the following steps:
step 1: each node on the bidirectional redundant ring network receives synchronous state information messages sent by all nodes on the ring network, and the synchronous state information messages comprise the synchronous state information message statistics received by the node and a synchronous main node selected by the node; the content of the synchronous state information message is the original data used by all subsequent steps, and the synchronous state information message is also called as an original message;
step 2: selecting a synchronization master according to a first priority condition from all the original messages received in the step 1, namely: counting the reachability of each node message to obtain a node with the maximum number of message reachable nodes, and if the node with the maximum number of reachable nodes is unique, selecting the node as a synchronization master and finishing the execution of the synchronization master selection method; if the number of the nodes meeting the conditions is not unique, entering step 3;
and step 3: selecting a synchronization master according to a second priority condition, namely selecting the node with the largest number of slave nodes as the synchronization master; if the node with the maximum number of the slave nodes is unique, the node is the synchronization master; if the number of the nodes with the maximum number of the slave nodes is multiple, continuing to execute the step 4, and selecting the synchronization master according to a third priority condition;
and 4, step 4: and selecting the synchronization master according to a third priority condition, namely selecting the node with the minimum hardware identification number as the synchronization master.
The invention further comprises the following preferred embodiments:
in step 2, if the synchronous data packet, i.e. the node packet, of a certain node a can be sent to all other nodes in the ring network, the number of the reachable nodes of the node a is the largest.
In step 3, the synchronization data of a node B is accepted by M ring network nodes as synchronization master nodes, and then the number of slave nodes of the node B is M; if the number of the nodes with the maximum number M of the slave nodes is multiple, the subsequent steps are continuously executed, and the synchronization master is selected according to a third priority condition.
In step 4, the hardware identification number is a hardware initialization number used for identifying each node in the ring network, and the number has uniqueness in the ring network and is not repeated; the hardware initialization number may be implemented using the media access control address (MAC address) of each node or other customized node configuration number with ring network uniqueness.
The steps 2-4 are independently executed on each node, and the execution interval recommended value is 1 second; the execution interval may be extended appropriately if the load is too heavy at intervals of 1 second.
Compared with the prior art in the background art, the invention has the following advantages:
1. each node completes election and election independently, does not need a uniform election process, and is suitable for an asynchronous environment;
2. the election result does not depend on the broadcast message issuing, and the broadcast message occasionally loses frames and can not cause the node inconsistency;
3. the adaptability to an incomplete network environment is good, and the performance is excellent;
4. the realization is convenient, reasonable in design, and the reliability is high.
Drawings
FIG. 1 is a schematic flow chart of a synchronization master selection method for maintaining synchronization between multiple nodes in a bidirectional redundant ring network according to the present invention;
fig. 2 is a schematic diagram of an incomplete operation state of a four-node bidirectional redundant ring network.
Detailed Description
The invention is explained in more detail below with reference to the figures and the examples of embodiment.
As shown in fig. 1, a schematic flow chart of a synchronization master selection method for maintaining synchronization among multiple nodes in a bidirectional redundant ring network according to the present invention is shown, where the synchronization master selection method includes the following steps:
step 1: each node on the bidirectional redundant ring network receives synchronous state information messages sent by all nodes on the ring network, and the synchronous state information messages comprise the synchronous state information message statistics received by the node and a synchronous main node selected by the node; the content of the synchronous state information message is the original data used by all subsequent steps; taking the bi-directional redundant ring network four-node system shown in fig. 2 as an example, if the optical fiber links are shown in the figure, three optical fibers are disconnected, that is: the direct connection channel between the node 1 and the node 2 is disconnected in two directions, and the node 4 is disconnected from the node 3 in one direction. At this time, node 1 may receive data of node 1,2,3, 4; the node 2 can only receive the data of the node 2 and the node 3; the node 3 can only receive the data of the nodes 2 and 3; the node No. 4 can receive the data of the node No. 1,2,3 and 4;
step 2: counting the reachability of each node message from all the original messages received in the step 1, and selecting the node with the largest number of message reachability nodes as a synchronization master; if the synchronous data packet of a certain node A can be sent to all other nodes in the ring network, the number of the reachable nodes of the node A is the maximum; the node or nodes with the largest number of reachable nodes can be calculated by counting the receiving of each node in the ring network; if the node with the maximum number of the reachable nodes is unique, the node is selected as a synchronization master, and the synchronization master selection method is executed; if the number of the nodes meeting the conditions is not unique, continuing the subsequent steps; continuing to take the bidirectional redundant ring network four-node system shown in fig. 2 as an example, the condition of the node 2 is similar to that of the node 3, and the data of the nodes 2 and 3 can be received, and according to the priority condition, the screening result is not unique, and the result is the node 2 and 3; the node 1 is similar to the node 4, can receive the data of all 4 nodes, the screening result is not unique according to the priority condition-screening result proposed by the patent, and the result is the node 2, 3;
and step 3: the node with the largest number of the message which can be sent to the node and is counted in the step 2 is not unique, and a plurality of nodes which meet the conditions exist, and then the node with the largest number of the slave nodes is selected as a synchronization master; for example, if the synchronous data of a certain node A is accepted by N ring network nodes as a synchronous master node, the number of slave nodes of the node A is N; if the node with the maximum N is unique, the node is the synchronization master; if the N is the maximum, continuing to execute the subsequent steps and selecting according to a third priority condition; continuing to take the bidirectional redundant ring network four-node system shown in fig. 2 as an example, step 2 reduces the screening range of all four nodes to node 2 and node 3, and selects the synchronous master from the secondary node 2 and node 3 according to the priority condition proposed by the present patent, at this time, there may be two situations, one of which is that the number of the secondary nodes of nodes 2 and 3 is different, the node with the large number of secondary nodes is selected as the master node, and the selection process is successfully ended; the other condition is that the screening results of the nodes 2 and 3 with the same number of the slave nodes are not unique, and the following steps are continued; and 4, step 4: if the nodes which meet the first priority condition and the second priority condition simultaneously and are counted by the step 3 are not unique, namely a plurality of nodes meeting the conditions exist simultaneously, the node with the minimum hardware identification number is selected as a synchronization master; the hardware identification number is a hardware initialization number used for identifying each node in the ring network, and the number has uniqueness in the ring network and is not repeated; the number can be realized by using a media access control address (MAC address) of each node or other self-defined node configuration numbers with ring network uniqueness; continuing to take the four-node system of the bidirectional redundant ring network shown in fig. 2 as an example, now assume that the node number is used as the hardware identification number, and according to the third priority condition proposed in this patent, the node No. 2 with the smallest node number is selected as the master node, and the selection process is successfully ended; the steps are independently executed on each node, and the execution interval recommended value is 1 second; if the load is too heavy at intervals of 1 second, the execution interval can be properly prolonged;
taking the bidirectional redundant ring network four-node system shown in fig. 2 as an example, if the optical fiber connections in all directions are normal, and if the three disconnected optical fibers drawn in the figure are also normally connected and not disconnected, then according to the synchronous master selection method of the present invention, the four nodes of the first priority selection condition are all satisfied, the four nodes of the second priority selection condition are all satisfied, and finally, the node with the minimum hardware identification number is selected as the synchronous master according to the third priority condition; other cases are not analyzed one by one.
While the best mode for carrying out the invention has been described in detail and illustrated in the accompanying drawings, it is to be understood that the same is by way of illustration and example only and is not to be taken by way of limitation, the scope of the invention should be determined by the appended claims and any changes or modifications which fall within the true spirit and scope of the invention should be construed as broadly described herein.

Claims (5)

1. A synchronization master selection method for maintaining synchronization among multiple nodes in a bidirectional redundant ring network is characterized by comprising the following steps:
step 1: each node on the bidirectional redundant ring network receives synchronous state information messages sent by all nodes on the ring network, and the synchronous state information messages comprise synchronous state information message statistics sent by the nodes sending the messages to the nodes receiving the messages and synchronous master nodes selected by the nodes sending the messages; the content of the synchronous state information message is the original data used by all subsequent steps;
step 2: selecting a synchronization master according to a first priority condition from all the synchronization state information messages received in the step 1, namely: counting the accessibility of the synchronous state information message of each node to obtain the node with the maximum number of the reachable nodes of the synchronous state information message, if the node with the maximum number of the reachable nodes is unique, selecting the node as a synchronous master, and finishing the execution of the synchronous master selection method; if the number of the nodes meeting the conditions is not unique, entering step 3;
and step 3: selecting a synchronization master according to a second priority condition, namely selecting the node with the largest number of slave nodes as the synchronization master; if the node with the maximum number of the slave nodes is unique, the node is the synchronization master; if the number of the nodes with the maximum number of the slave nodes is multiple, continuing to execute the step 4, and selecting the synchronization master according to a third priority condition;
and 4, step 4: and selecting the synchronization master according to a third priority condition, namely selecting the node with the minimum hardware identification number as the synchronization master.
2. The method of claim 1, wherein the method comprises:
in step 2, if the synchronization status information packet of a node a can be sent to all other nodes in the ring network, the number of reachable nodes of the node a is the largest.
3. The method of claim 1, wherein the method comprises:
in step 3, the synchronization state information message of a certain node B is accepted by M ring network nodes as a synchronization master node, and then the number of slave nodes of the node B is M; if the number of the nodes with the maximum number M of the slave nodes is multiple, the subsequent steps are continuously executed, and the synchronization master is selected according to a third priority condition.
4. The method of claim 1, wherein the method comprises:
in step 4, the hardware identification number is a hardware initialization number used for identifying each node in the ring network, and the number has uniqueness in the ring network and is not repeated; the hardware initialization number may be implemented using the media access control address (MAC address) of each node or other customized node configuration number with ring network uniqueness.
5. The method of claim 1, wherein the method comprises:
the steps 2-4 are independently executed on each node, and the execution interval recommended value is 1 second; the execution interval may be extended appropriately if the load is too heavy at intervals of 1 second.
CN201711438530.4A 2017-12-27 2017-12-27 Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network Active CN108259110B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711438530.4A CN108259110B (en) 2017-12-27 2017-12-27 Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711438530.4A CN108259110B (en) 2017-12-27 2017-12-27 Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network

Publications (2)

Publication Number Publication Date
CN108259110A CN108259110A (en) 2018-07-06
CN108259110B true CN108259110B (en) 2020-02-28

Family

ID=62724015

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711438530.4A Active CN108259110B (en) 2017-12-27 2017-12-27 Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network

Country Status (1)

Country Link
CN (1) CN108259110B (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8004966B2 (en) * 2008-04-25 2011-08-23 Calix, Inc. Efficient management of ring networks
CN102014001B (en) * 2010-12-08 2012-10-17 迈普通信技术股份有限公司 Method and exchange equipment for realizing fast Ethernet ring
CN107359939A (en) * 2016-05-09 2017-11-17 中兴通讯股份有限公司 A kind of light adjusts the transmission method and device of top signal

Also Published As

Publication number Publication date
CN108259110A (en) 2018-07-06

Similar Documents

Publication Publication Date Title
US11134029B2 (en) Communication method, communications device, and storage medium
EP3599521B1 (en) System and method of communicating data over high availability industrial control systems
US7920464B2 (en) Method of redundancy of ring network
Kopetz A solution to an automotive control system benchmark
CN101483571B (en) RRPP configuring method, system and device
CN104468231A (en) SDN interchanger and controller dynamic registration method
GB2505230B (en) Leader node appointment
CN110912815A (en) Network element ring formation preventing method, device, equipment and readable storage medium
CN108259110B (en) Synchronous master selection method for keeping synchronization among multiple nodes in bidirectional redundant ring network
CN108667640B (en) Communication method and device, and network access system
CN105763483A (en) Message sending method and message sending device
US7162544B2 (en) Message transfer method and apparatus
US10187365B2 (en) Method for exchanging numerical data frames and associated communication system
CN109194592B (en) Method and system for solving island problem in multi-link network
Maxemchuk et al. A comparison of linear and mesh topologies-DQDB and the Manhattan street network
US11889244B2 (en) Passive optical network for utility infrastructure resiliency
CN103532856A (en) Message transmission method and equipment
CN103414591A (en) Method and system for fast converging when port failure is recovered
CN101094238A (en) Cluster system with multiple machine frames, and machine frame
JP3120910B2 (en) Network synchronization setting method in loop type LAN
CN104219126A (en) Automatic learning method and equipment for subring protocol VLAN (virtual local area network) in virtual channel mode
CN109617777A (en) A kind of the business datum retransmission method and device of RPR intersecting ring
US20230412510A1 (en) Position aware load balancing in a ring network
CN109873676B (en) CAN bus asynchronous communication method and network based on optical fiber
JP2867865B2 (en) Protection line switching control method

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant