CN114070448A - Master clock selection method based on multi-attribute decision - Google Patents

Master clock selection method based on multi-attribute decision Download PDF

Info

Publication number
CN114070448A
CN114070448A CN202111511831.1A CN202111511831A CN114070448A CN 114070448 A CN114070448 A CN 114070448A CN 202111511831 A CN202111511831 A CN 202111511831A CN 114070448 A CN114070448 A CN 114070448A
Authority
CN
China
Prior art keywords
clock
node
attribute
nodes
decision
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.)
Granted
Application number
CN202111511831.1A
Other languages
Chinese (zh)
Other versions
CN114070448B (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.)
Chongqing University of Post and Telecommunications
Original Assignee
Chongqing University of Post and Telecommunications
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 Chongqing University of Post and Telecommunications filed Critical Chongqing University of Post and Telecommunications
Priority to CN202111511831.1A priority Critical patent/CN114070448B/en
Publication of CN114070448A publication Critical patent/CN114070448A/en
Application granted granted Critical
Publication of CN114070448B publication Critical patent/CN114070448B/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/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/11Identifying congestion
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L47/00Traffic control in data switching networks
    • H04L47/10Flow control; Congestion control
    • H04L47/13Flow control; Congestion control in a LAN segment, e.g. ring or bus
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Small-Scale Networks (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention relates to the technical field of clock synchronization communication of an industrial time sensitive network, in particular to a master clock selection method based on multi-attribute decision, which comprises the steps of adding a synchronous centralized control node in a clock synchronization domain, wherein the node is responsible for the synchronous configuration of all time sensitive nodes in the network and the issuing of master clock node information; the synchronous centralized control node receives the state information messages reported by each time-sensitive node in the clock synchronous domain and calculates the state information of the nodes according to the state information messages; the synchronous centralized control node calculates the weight value of each state information through a multi-attribute decision algorithm, calculates the clock attribute value of the node, and selects the clock corresponding to the node with the maximum clock attribute value as a global clock reference; the invention can select the main clock node with the smallest hop count from any node of the whole network on the premise of ensuring the clock source precision, thereby reducing the accumulated error caused by the hop count and achieving the effect of improving the synchronization precision.

Description

Master clock selection method based on multi-attribute decision
Technical Field
The invention relates to the technical field of clock synchronization communication of an industrial time sensitive network, in particular to a master clock selection method based on multi-attribute decision.
Background
With the continuous development of the industrial internet of things technology, emerging services, especially time-sensitive services, are also continuously emerging, which poses strict challenges to the real-time performance and reliability of the conventional industrial network. To address this problem, the IEEE802.1 working group proposes a time-sensitive networking (TSN) protocol. The Time Sensitive Network (TSN) technology has the functions of periodical traffic shaping and scheduling, data seamless redundant transmission, path reservation, network configuration and the like based on time synchronization, so that the requirements of time sensitive services on relevant indexes such as data transmission delay, packet loss and the like can be met. The global clock synchronization is used as the premise of the TSN standard, and is used for ensuring the correct matching of the transmission time slots of the data frames in each device and meeting the requirements of end-to-end deterministic delay and queueless transmission of communication streams. In order to meet the requirement of clock synchronization precision, the TSN adopts an IEEE802.1AS protocol to perform time synchronization. The IEEE802.1AS protocol has the advantages of simple structure, strong expansibility, easy deployment and nanosecond-level accurate synchronization precision, and provides high-precision clock synchronization service for various fields such AS automation factories, automobile control, audio and video transmission and the like.
The IEEE802.1AS is used AS a clock synchronization protocol in a Time Sensitive Network (TSN) and works in a data link layer of a full-duplex ethernet, and high-precision clock synchronization is realized by a timestamp transmission mode. The protocol can be divided into three major parts, namely main clock selection, link delay measurement and main-slave synchronization error measurement correction. In the master clock selection stage, each node selects the optimal master clock node through BMCA and generates a corresponding clock tree. The nodes carry out path delay measurement through interactive delay measurement messages, meanwhile, the master node sends a sync message and a follow message to the slave nodes in a two-step mode, and after the slave nodes receive the messages, the slave nodes carry out synchronous error calculation by combining the path delay measurement values and correct local time according to the synchronous error calculation.
One of the main factors affecting the ieee 802.11 as protocol is link asymmetry. The data transmission delay, data processing delay and synchronization parameter configuration of each node in the synchronization domain may be different, and corresponding errors may be caused by adopting a delay peer-to-peer mechanism, and such errors are also accumulated as the hop count of the master node and the slave node increases. When the network scale is enlarged, the influence of a network topology structure and the congestion degree of a link is not considered by adopting a mode of fixing a master clock, and the problem that the synchronization requirement of a time-sensitive node cannot be met due to the fact that the hop number of the master clock node from other nodes is too large, and path asymmetry errors are accumulated. Therefore, a flexible master clock selection method is necessary. The master clock selection algorithm considering information such as link congestion, network topology, clock source parameters and the like can effectively reduce accumulated errors caused by path asymmetry by selecting the master clock node with the smallest hop count away from any node in the whole network.
In summary, it is necessary to introduce the TSN technology to ensure deterministic delay transmission of time-sensitive traffic in the multi-hop industrial ethernet. Meanwhile, in order to achieve deterministic delay transmission of time-sensitive services, a synchronization error within 7 hops of less than 1us is a basic requirement, so that an IEEE802.1AS protocol adopting ns-level synchronization precision is a good choice. However, the BMCA adopted by the protocol in the master clock selection stage does not consider network information, so that the hop count of the master node and the slave node of the clock tree generated by the selected optimal master clock may be too large, the accumulated error increase caused by the link asymmetry can reduce the synchronization precision in the network, and how to minimize the hop count of the selected master clock node from any node in the whole network becomes a research focus on ensuring the clock source precision.
Disclosure of Invention
Based on the problems existing in the existing protocol, the invention provides a master clock selection method based on multi-attribute decision, which comprises the following steps:
adding a synchronous centralized control node in a clock synchronization domain, wherein the node is responsible for synchronous configuration of all time-sensitive nodes in a network and issuing master clock node information;
the synchronous centralized control node receives a state information message reported by each time-sensitive node in a clock synchronization domain, and calculates the clock source quality coefficient, the link congestion coefficient and the node topology attribute of the node according to the state information message;
the synchronous centralized control node calculates a clock source quality coefficient, a link congestion coefficient and a weighted value of a node topology attribute through a multi-attribute decision algorithm, calculates a clock attribute value of the node, and selects a clock corresponding to the node with the maximum clock attribute value as a global clock reference.
Further, the clock attribute value of a node is expressed as:
HB=ωaUabUbcUc
wherein HBIs the clock attribute value of the node; u shapea、Ub、UcThe link congestion coefficient, the topological structure attribute value and the number of clock source parameters of the local node which are superior to those of the neighbor nodes account for the proportion of the total neighbor nodes; omegaa、ωb、ωcAnd respectively representing the link congestion coefficient, the topological structure attribute value and the weight of the number of the clock source parameters superior to the neighbor nodes in the proportion of the total neighbor nodes.
Further, the calculating of the link congestion coefficient of the local node includes:
the node estimates the link congestion situation by sending a link detection packet based on a synchronous request-response mechanism defined in an IEEE802.1AS protocol, and calculates the leaving interval time and the arrival interval time of a data packet according to a recorded timestamp;
setting a link delay threshold, comparing whether the difference between the leaving interval time and the arrival interval time of the data packet exceeds the threshold, if so, determining that link congestion occurs, and if not, determining that the data packet is a survival message;
calculating link congestion coefficient U by calculating the ratio of the number of the survivor messages to the total number of the messagesaExpressed as:
Figure BDA0003394814810000031
wherein n issaveRepresenting the number of surviving packets, NpRepresenting the total number of probe messages.
Further, the calculation of the ratio of the number of the clock source parameters of the local node superior to the number of the neighbor nodes to the total neighbor nodes includes:
Ub=α1N12N23N3+...+αnNn
α123+...+αn=1;
N1+N2+N3+...+Nn=1;
wherein N is1,N2,N3,...,NnThe number of nodes from 1 hop to 2 hops to n hops in the topological structure accounts for the proportion of the total nodes, alpha123,...,αnIs its corresponding weight value.
Further, the clock information of each node is sequentially compared by adopting a data set comparison algorithm to obtain a real-time clock source quality coefficient UcExpressed as:
Figure BDA0003394814810000032
wherein alpha is the optimum proportion, NallNumber of nodes received, NgoodThe number of nodes is better than itself.
Further, the process of selecting the link congestion coefficient, the topology attribute value and the weight of the number of the clock source parameters superior to the neighbor nodes in proportion to the total neighbor nodes comprises the following steps:
101. candidate set Ci( i 1, 2.. times.n), each clock node having an attribute of aj(j ═ 1,2,3), mixing U witha、Ub、UcRespectively as attribute values of three attributes to establish decision matrix
Figure BDA0003394814810000041
102. The weight vector for each decision attribute is
Figure BDA0003394814810000042
Under the action of the weight vector, a weight normalization decision matrix is constructed
Figure BDA0003394814810000043
103. Compute clock node CiThe total attribute evaluation value is
Figure BDA0003394814810000044
104. For attribute AjAccording to clock node CiTotal attribute evaluation value calculation clock node CiWith other nodes CkAnd the total dispersion of all clock nodes in the candidate solution set;
105. constructed to maximize clock node CiSolving the target by adopting a target function of the total dispersion of all attributes and adopting a Lagrange function to obtain the weight corresponding to the attributes;
wherein the content of the first and second substances,
Figure BDA0003394814810000045
representing candidate CiCorresponding decision attribute AjWeight vector of, muijRepresenting candidate CiCorresponding decision attribute AjThe attribute value of (2).
Further, to maximize clock node CiThe objective function of the total dispersion of all attributes is expressed as:
Figure BDA0003394814810000046
constraint 1:
Figure BDA0003394814810000047
constraint 2:
Figure BDA0003394814810000048
wherein e isj(w) represents the total dispersion of all clock nodes in the candidate set for attribute j.
Further, for attribute j, the total dispersion e of all clock nodes in the candidate setj(w) is expressed as:
Figure BDA0003394814810000049
wherein the content of the first and second substances,
Figure BDA00033948148100000410
is a clock node CiWith other nodes CkDispersion of (2);
Figure BDA00033948148100000411
the number of time-sensitive nodes in the clock synchronization domain.
Further, candidate CiCorresponding decision attribute AjThe calculation of the attribute value of (2) includes:
defining clock nodes in a network topology as candidate optimal master clock schemes and denoted Ci( i 1, 2.., n), where n is the number of nodes in the network topology;
defining the degree of the neighbor node and the local clock data set as a multi-attribute decision attribute and expressing the attribute as Aj(j equals 1,2,3), where j equals 1 represents a link congestion coefficient, j equals 2 represents a topology attribute, and j equals 3 represents a ratio of the number of the self clock source parameters better than the number of the neighbor nodes to the total neighbor nodes;
candidate CiCorresponding decision attribute AjHas an attribute value of μijDue to Ua、Ub、UcAll values are between [0,1]The decision matrix is:
Figure BDA0003394814810000051
further, after clock attribute values of nodes of all nodes are obtained, a node with the maximum clock attribute value is used as a root node to generate a whole network clock tree, and the tree is packaged and then issued to other nodes; dividing the ports of the nodes into a Master, a Slave and a Disable, setting all the ports of the node with the maximum clock attribute value as the Master, setting one port of the other nodes close to the node with the maximum clock attribute value as the Master, and setting the other ports as the Slave; if the port of the node is in a Master state, the port sends a synchronous message outwards; if the port of the node is in the Slave state, waiting for a synchronous message sent by a master clock, and calculating and correcting a local clock error after receiving the synchronous message; if the port of the node is in a Disable state, the port does not participate in the master clock selection.
The invention adopts the role of designing the synchronous centralized control node to change the original distributed selection into centralized reporting, and the synchronous centralized control node calculates the optimal attribute value of the clock to select the optimal master clock, thereby reducing the selection time of the master clock; by comprehensively considering network information such as link congestion and node topology attribute values and clock source quality factors by adopting a multi-attribute decision-making master clock selection method, a master clock node with the smallest hop count from any node in the whole network can be selected on the premise of ensuring the clock source precision, so that the accumulated error caused by the hop count is reduced, and the effect of improving the synchronization precision is achieved.
Drawings
FIG. 1 is a diagram of an industrial TSN network scenario in accordance with the present invention;
FIG. 2 is a flow chart of a method for selecting a master clock for multi-attribute decision making according to the present invention;
FIG. 3 is a flow chart of link propagation delay measurement in the present invention;
FIG. 4 is a node status message format in the present invention;
FIG. 5 is a flow chart of the present invention for a synchronous centralized control node to calculate and generate an optimal attribute value of a clock;
FIG. 6 is a clock tree information table employed in the present invention;
fig. 7 is a flow chart of synchronization of each node through clock tree information in the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a master clock selection method based on multi-attribute decision, which comprises the following steps:
adding a synchronous centralized control node in a clock synchronization domain, wherein the node is responsible for synchronous configuration of all time-sensitive nodes in a network and issuing master clock node information;
the synchronous centralized control node receives a state information message reported by each time-sensitive node in a clock synchronization domain, and calculates the clock source quality coefficient, the link congestion coefficient and the node topology attribute of the node according to the state information message;
the synchronous centralized control node calculates a clock source quality coefficient, a link congestion coefficient and a weighted value of a node topology attribute through a multi-attribute decision algorithm, calculates a clock attribute value of the node, and selects a clock corresponding to the node with the maximum clock attribute value as a global clock reference.
In this embodiment, each node estimates the link congestion condition by sending a link probe packet based on a synchronization request-response mechanism defined in the ieee 802.11 as protocol. And the link detection message is sent along with the delay measurement message, and the leaving interval time and the arrival interval time of the data packet are calculated according to the recorded timestamp and are used for estimating the data packet queuing and link congestion conditions. And setting a link delay threshold, comparing whether the difference between the leaving interval time and the arrival interval time of the data packet exceeds the threshold, if so, judging that the link congestion occurs, and if not, judging that the data packet is a survival message.
In the invention, each node reports a state information message composed of network information such as a neighbor node clock identification number and a neighbor link congestion coefficient and local node clock source information such as a local clock source grade, a clock source jitter error and a local clock identification number and the like to a synchronous centralized control node, and the synchronous centralized control node comprises the following functions:
the synchronous centralized control node generates a global network topology structure according to the collected network information and calculates node topology attribute values corresponding to the nodes;
the synchronous centralized control nodes compare and calculate according to the collected clock source parameter information to obtain a time clock source quality coefficient corresponding to each node;
the synchronous centralized control node calculates the optimal weight value corresponding to each factor according to a multi-attribute decision algorithm; substituting the weight values corresponding to the factors for calculation, comparing the optimal attribute values of the nodes until the optimal master clock node is selected, packaging clock tree information generated by the optimal master clock node into a configuration message and issuing the configuration message to each node in a clock domain, and extracting the clock tree information by each node to determine the role of each port of the node and perform clock synchronization.
Fig. 1 is a schematic diagram of an industrial lan scenario adopted by an embodiment of the present invention, which is divided into an inter-vehicle application and a field application according to a network architecture and a location of a switch in a network, as shown in fig. 1. The workshop level mainly aims at user levels such as engineers and operators and comprises a human-computer interface and data acquisition and monitoring equipment. The field level is mainly a plurality of terminal devices, such as a PLC, an engine, a camera, a mechanical arm, a numerical control airport and the like. The inter-vehicle application communicates with the field level terminal equipment below through an intermediate industrial TSN local area network, the upper level application sends a configuration instruction and an operation instruction to the lower level application, and meanwhile, the audio and video stream fed back by the lower level application and the time-sensitive service stream such as state information are collected and monitored. In order to meet the synchronization requirement that the synchronization error of a master node and a slave node is below 1us within 7 hops, an IEEE802.1AS protocol is adopted for clock synchronization, wherein the protocol provides that each network node should support the protocol.
Fig. 2 is a flowchart of a method for selecting a master clock based on a multi-attribute decision in the present invention, where the method for selecting a master clock based on a multi-attribute decision specifically includes:
s1, each node estimates the link congestion situation by sending link detection packets based on the synchronous request-response mechanism defined in the IEEE802.1AS protocol;
and the link detection message is sent along with the delay measurement message, and the leaving interval time and the arrival interval time of the data packet are calculated according to the recorded timestamp so as to be used for estimating the data packet queuing and the link congestion condition. And setting a link delay threshold, comparing whether the difference between the leaving interval time and the arrival interval time of the data packet exceeds the threshold, if so, judging that the link congestion occurs, and if not, judging that the data packet is a survival message. Calculating link congestion coefficient U by calculating the ratio of the number of the survivor messages to the total number of the messagesa
Figure BDA0003394814810000081
Wherein n issaveRepresenting the number of surviving packets, NpRepresenting the total number of probe messages.
S2, each node constructs the status information report to the synchronous centralized control node
Each time-sensitive node in the network collects network information such as a clock identification number of a neighbor node and a congestion coefficient of an adjacent link, and combines local node clock source information of a local clock source grade, a clock source jitter error and a local clock identification number to construct a state information message and report the state information message to a synchronous centralized control node; fig. 4 shows a node status message format in the present invention, and as shown in fig. 4, each report message includes a clock source parameter of the node itself, a clock identification number of the node itself, and an identification number of a neighboring node. In the master clock selection stage, each node needs to report its own network information and clock source parameter information like a synchronous centralized control node.
S3, the synchronous centralized control node extracts state information to calculate the topological attribute value of each node;
the synchronous centralized control node extracts the neighbor node information of each node contained in the received state message, generates a topological structure of a clock tree by taking each node as a root node through comparing and expanding the topological structures of the nodes, and selects the lowest hop count as a network topological hierarchy where the node is located when a certain node has results of different hop counts simultaneously during query comparison. The topology attribute values of each node are calculated as follows:
node topology attribute value UbExpressed as:
Ub=α1N12N23N3+...+αnNn
n thereof1,N2,N3,...,NnThe number of nodes from 1 hop to 2 hops to n hops in the topological structure accounts for the proportion of the total nodes, alpha123,...,αnFor its corresponding weight values, there are:
α123+...+αn=1;
N1+N2+N3+...+Nn=1;
s4, the synchronous centralized control node extracts state information and calculates the value of the master clock coefficient of each node;
and after the synchronous centralized control node receives the state messages reported by the nodes, comparing the clock source parameters of the nodes one by adopting a data set comparison algorithm to obtain the main clock coefficient value.
Quality coefficient of clock source UcExpressed as:
Figure BDA0003394814810000091
alpha is an optimum ratio, NallNumber of nodes received, NgoodThe number of nodes is better than itself.
S5, the synchronous centralized control node calculates the optimal weight based on a multi-attribute decision algorithm;
through analysis of the optimal master clock selection problem for multi-clock nodes, the multi-attribute decision-making basic elements defined herein are as follows:
candidate scheme set: defining clock nodes in a network topology as candidate optimal master clock schemes and expressing the schemes
Ci( i 1, 2.., n), where n is the number of nodes in the network topology.
Decision attributes: through the analysis of the optimality of the clock node in the network topology, the degree of the neighbor node and the local clock data set are defined as a multi-attribute decision attribute and are expressed as Aj(j=1,2,3)。
A decision matrix: candidate CiCorresponding decision attribute AjHas an attribute value of μijDue to Ua、Ub、UcAll values are between [0,1]Then μij∈[0,1]And the decision matrix is:
Figure BDA0003394814810000092
attribute weight: definition of ωa、ωb、ωcRespectively represent candidate CiCorresponding to the degree of the decision attribute neighbor node and the weight of the local clock data set, and meeting omegaabc=1;
Based on the maximum dispersion method, the weight is calculated by the adaptive maximum dispersion method in the topological scene designed by the method, wherein the method comprises the following specific steps:
step 1: scene initialization, candidate set Ci( i 1, 2.. times.n), each clock node having an attribute of aj(j ═ 1,2,3), and according to Ua、Ub、UcObtaining the attribute value corresponding to the clock node, and then establishing a decision matrix
Figure BDA0003394814810000093
Step 2: assume a weight vector for each decision attribute of
Figure BDA0003394814810000101
Under the action of the weight vector, a weight normalization decision matrix is constructed
Figure BDA0003394814810000102
And step 3: compute clock node CiThe total attribute evaluation value is
Figure BDA0003394814810000103
And 4, step 4: for attribute AjCalculating clock node CiWith other nodes CkHas a dispersion of
Figure BDA0003394814810000104
And 5: for attribute AjCalculating the total dispersion of all clock nodes in the candidate set as
Figure BDA0003394814810000105
Step 6: calculating the total dispersion of all attributes in all candidate clock node sets as
Figure BDA0003394814810000106
And 7: according to constraints
Figure BDA0003394814810000107
And
Figure BDA0003394814810000108
constructing a dispersion maximization objective function of
Figure BDA0003394814810000109
And 8: construction of Lagrangian functions
Figure BDA00033948148100001010
And step 9: separate derivation of the lagrange function
Figure BDA00033948148100001011
And
Figure BDA00033948148100001012
step 10: obtaining two optimal weight optimal solutions omegaa、ωb、ωc
S6, synchronizing the centralized control nodes according to the obtained optimal weight omegaa、ωb、ωcComputing clock optimal attribute values
Considering the best main clock weight coefficient H by three factors such as time clock source quality coefficient, link congestion coefficient and node topology attribute valueBModeling is carried out, and the synchronous centralized control node selects the optimal master clock by comparing the clock optimality attribute values:
HB=ωaUabUbcUc
wherein, Ua、Ub、UcThe link congestion coefficient, the attribute value of the topological structure and the proportion of the number of clock source parameters of the local node superior to the number of the neighbor nodes to the total neighbor nodes are omegaa、ωb、ωcWeights representing link congestion coefficients, topology attribute values, and local clock data set optimality, respectively.
S7, comparing the optimal attribute values of the clocks by the synchronous centralized control node to select the optimal master clock
Fig. 5 is a flowchart of computing and generating an optimal attribute value of a clock by a synchronous centralized control node according to the present invention. As shown in the figure, the synchronous centralized control node compares the optimal attribute values corresponding to the nodes obtained by the calculation, so as to select the optimal master clock as the global clock reference, and simultaneously, the clock tree generated by taking the node as the root node is adopted as the whole network clock tree.
S8, the synchronous centralized control node generates clock tree information and sends the clock tree information to other nodes
And the synchronous centralized control node generates a network topology structure by the information contained in the configuration message, and outputs a corresponding clock tree after selecting the optimal master clock. Fig. 6 is a clock tree information table used in the present invention, and as shown in the figure, the table entry includes clock roles corresponding to each port in each node. The clock roles are divided into three types: master, Slave, Disable, all ports of the Master clock node are in the Master state and send synchronous messages to the outside, the other nodes have the Slave role close to the ports at the Master clock side, and the other ports are masters.
S9, each node carries out clock synchronization through clock tree information
Fig. 7 is a flow chart of synchronization of each node through clock tree information in the present invention, as shown in the figure, after receiving the clock tree information, the node queries the corresponding consistent role of each port of the node according to the own clock source identification number. If each port of the node is Master, the node is the optimal Master clock node, and all the ports send out synchronous messages. If the node is not the optimal Master clock node, traversing the state of each port, if the port is in a Master state, sending a synchronous message outwards, if the port is in a Slave state, waiting for the synchronous message sent by the Master clock, and calculating and correcting the local clock error after receiving the synchronous message.
The invention mainly relates to a master clock selection algorithm based on multi-attribute decision; the invention selects the master clock in a centralized way by adding the synchronous centralized control node, thereby reducing the time for selecting the master clock. By comprehensively considering the network topology and the clock source quality, calculating the optimal weight corresponding to each factor based on multi-attribute decision, substituting the optimal weight into the optimal clock attribute value of each node, and comparing the generated optimal clock attribute values to select the optimal master clock, the hop count from the selected master clock node to any node in the network is minimized on the premise of ensuring the clock source precision, and the clock synchronization error accumulated by the asymmetric link delay is further reduced.
Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that changes, modifications, substitutions and alterations can be made in these embodiments without departing from the principles and spirit of the invention, the scope of which is defined in the appended claims and their equivalents.

Claims (10)

1. A master clock selection method based on multi-attribute decision is characterized by comprising the following steps:
adding a synchronous centralized control node in a clock synchronization domain, wherein the node is responsible for synchronous configuration of all time-sensitive nodes in a network and issuing master clock node information;
the synchronous centralized control node receives a state information message reported by each time-sensitive node in a clock synchronization domain, and calculates the clock source quality coefficient, the link congestion coefficient and the node topology attribute of the node according to the state information message;
the synchronous centralized control node calculates a clock source quality coefficient, a link congestion coefficient and a weighted value of a node topology attribute through a multi-attribute decision algorithm, calculates a clock attribute value of the node, and selects a clock corresponding to the node with the maximum clock attribute value as a global clock reference.
2. The method of claim 1, wherein the clock attribute values of the nodes are expressed as:
HB=ωaUabUbcUc
wherein HBIs the clock attribute value of the node; u shapea、Ub、UcThe link congestion coefficient, the topological structure attribute value and the number of clock source parameters of the local node which are superior to those of the neighbor nodes account for the proportion of the total neighbor nodes; omegaa、ωb、ωcAnd respectively representing the link congestion coefficient, the topological structure attribute value and the weight of the number of the clock source parameters superior to the neighbor nodes in the proportion of the total neighbor nodes.
3. The method of claim 2, wherein the calculating the link congestion factor of the local node comprises:
the node estimates the link congestion situation by sending a link detection packet based on a synchronous request-response mechanism defined in an IEEE802.1AS protocol, and calculates the leaving interval time and the arrival interval time of a data packet according to a recorded timestamp;
setting a link delay threshold, comparing whether the difference between the leaving interval time and the arrival interval time of the data packet exceeds the threshold, if so, determining that link congestion occurs, and if not, determining that the data packet is a survival message;
calculating link congestion coefficient U by calculating the ratio of the number of the survivor messages to the total number of the messagesaExpressed as:
Figure FDA0003394814800000011
wherein n issaveRepresenting the number of surviving packets, NpRepresenting the total number of probe messages.
4. The method of claim 2, wherein the calculating of the ratio of the number of the local node clock source parameters better than the number of the neighbor nodes to the total neighbor nodes comprises:
Ub=α1N12N23N3+...+αnNn
α123+...+αn=1
N1+N2+N3+...+Nn=1
wherein N is1,N2,N3,...,NnThe number of nodes from 1 hop to 2 hops to n hops in the topological structure accounts for the proportion of the total nodes, alpha123,...,αnIs its corresponding weight value.
5. The method of claim 2, wherein the clock information of each node is sequentially compared by using a data set comparison algorithm to obtain a real-time clock source quality coefficient UcExpressed as:
Figure FDA0003394814800000021
wherein alpha is the optimum proportion, NallNumber of nodes received, NgoodThe number of nodes is better than itself.
6. The method for selecting the master clock based on the multi-attribute decision as claimed in claim 2, wherein the process of selecting the link congestion coefficient, the topology attribute value and the weight of the number of the self clock source parameters superior to the number of the neighbor nodes in the proportion of the total neighbor nodes comprises:
101. candidate set Ci(i 1, 2.. times.n), each clock node having an attribute of aj(j ═ 1,2,3), mixing U witha、Ub、UcRespectively as attribute values of three attributes to establish decision matrix
Figure FDA0003394814800000022
102. The weight vector for each decision attribute is
Figure FDA0003394814800000023
Under the action of the weight vector, a weight normalization decision matrix is constructed
Figure FDA0003394814800000024
103. Compute clock node CiThe total attribute evaluation value is
Figure FDA0003394814800000025
104. For attribute AjAccording to clock node CiTotal attribute evaluation value calculation clock node CiWith other nodes CkAnd the total dispersion of all clock nodes in the candidate solution set;
105. constructed to maximize clock node CiAnd solving the target by adopting a Lagrange function to obtain a weight corresponding to the attributeWeighing;
wherein the content of the first and second substances,
Figure FDA0003394814800000031
representing candidate CiCorresponding decision attribute AjWeight vector of, muijRepresenting candidate CiCorresponding decision attribute AjThe attribute value of (2).
7. The method of claim 6, wherein the clock node C is maximizediThe objective function of the total dispersion of all attributes is expressed as:
Figure FDA0003394814800000032
constraint 1:
Figure FDA0003394814800000033
constraint 2:
Figure FDA0003394814800000034
wherein e isj(w) represents the total dispersion of all clock nodes in the candidate set for attribute j.
8. A multi-attribute decision-based master clock selection method according to claim 6 or 7, wherein for attribute j, the total dispersion e of all clock nodes in the candidate solution setj(w) is expressed as:
Figure FDA0003394814800000035
wherein the content of the first and second substances,
Figure FDA0003394814800000036
is a clock node CiWith other nodes CkDispersion of (2);
Figure FDA0003394814800000037
the number of time-sensitive nodes in the clock synchronization domain.
9. The method of claim 6, wherein candidate C is selected from the group consisting ofiCorresponding decision attribute AjThe calculation of the attribute value of (2) includes:
defining clock nodes in a network topology as candidate optimal master clock schemes and denoted CiI ═ 1,2, …, n, where n is the number of nodes in the network topology;
defining the degree of the neighbor node and the local clock data set as a multi-attribute decision attribute and expressing the attribute as AjWhen j is 1, the link congestion coefficient is represented, when j is 2, the topology structure attribute is represented, and when j is 3, the number of the clock source parameters superior to the neighbor nodes accounts for the proportion of the total neighbor nodes;
candidate CiCorresponding decision attribute AjHas an attribute value of μijThe decision matrix is:
Figure FDA0003394814800000041
10. the method for selecting a master clock based on multi-attribute decision as claimed in claim 1, wherein after the clock attribute values of the nodes of all the nodes are obtained, the node with the largest clock attribute value is used as a root node to generate a whole network clock tree, and the tree is encapsulated and then issued to other nodes; dividing the ports of the nodes into a Master, a Slave and a Disable, setting all the ports of the node with the maximum clock attribute value as the Master, setting one port of the other nodes close to the node with the maximum clock attribute value as the Master, and setting the other ports as the Slave; if the port of the node is in a Master state, the port sends a synchronous message outwards; if the port of the node is in the Slave state, waiting for a synchronous message sent by a master clock, and calculating and correcting a local clock error after receiving the synchronous message; if the port of the node is in a Disable state, the port does not participate in the master clock selection.
CN202111511831.1A 2021-12-06 2021-12-06 Main clock selection method based on multi-attribute decision Active CN114070448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111511831.1A CN114070448B (en) 2021-12-06 2021-12-06 Main clock selection method based on multi-attribute decision

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111511831.1A CN114070448B (en) 2021-12-06 2021-12-06 Main clock selection method based on multi-attribute decision

Publications (2)

Publication Number Publication Date
CN114070448A true CN114070448A (en) 2022-02-18
CN114070448B CN114070448B (en) 2023-07-25

Family

ID=80229148

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111511831.1A Active CN114070448B (en) 2021-12-06 2021-12-06 Main clock selection method based on multi-attribute decision

Country Status (1)

Country Link
CN (1) CN114070448B (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980450A (en) * 2023-09-22 2023-10-31 江苏未来网络集团有限公司 Industrial Internet data acquisition control system and computer equipment
CN117318871A (en) * 2023-11-29 2023-12-29 四川蜀能电科能源技术有限公司 Time protection method, equipment and medium for power monitoring system

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090319977A1 (en) * 2008-06-24 2009-12-24 Synopsys, Inc. Interconnect-Driven Physical Synthesis Using Persistent Virtual Routing
CN101931656A (en) * 2010-09-16 2010-12-29 武汉大学 ISP-friendly distributed service node selection and update method
CN107040326A (en) * 2015-12-22 2017-08-11 英特尔公司 Trillion secondary structure time synchronized
CN111682919A (en) * 2020-06-25 2020-09-18 安徽理工大学 Time synchronization method for underground sensing equipment based on time sensitive network
CN112165369A (en) * 2020-09-11 2021-01-01 上海创时汽车科技有限公司 Time sensitive network redundant clock synchronization method and synchronization system thereof

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090319977A1 (en) * 2008-06-24 2009-12-24 Synopsys, Inc. Interconnect-Driven Physical Synthesis Using Persistent Virtual Routing
CN101931656A (en) * 2010-09-16 2010-12-29 武汉大学 ISP-friendly distributed service node selection and update method
CN107040326A (en) * 2015-12-22 2017-08-11 英特尔公司 Trillion secondary structure time synchronized
CN111682919A (en) * 2020-06-25 2020-09-18 安徽理工大学 Time synchronization method for underground sensing equipment based on time sensitive network
CN112165369A (en) * 2020-09-11 2021-01-01 上海创时汽车科技有限公司 Time sensitive network redundant clock synchronization method and synchronization system thereof

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
ALEXANDER SHPINER; YORAM REVAH; TAL MIZRAHI: "Multi-path Time Protocols", 2013 IEEE INTERNATIONAL SYMPOSIUM ON PRECISION CLOCK SYNCHRONIZATION FOR MEASUREMENT, CONTROL AND COMMUNICATION (ISPCS) PROCEEDINGS *
任昕旸: "基于PTP的高精度网络时间同步系统的研究与优化", 中国优秀硕士学位论文全文数据库 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116980450A (en) * 2023-09-22 2023-10-31 江苏未来网络集团有限公司 Industrial Internet data acquisition control system and computer equipment
CN117318871A (en) * 2023-11-29 2023-12-29 四川蜀能电科能源技术有限公司 Time protection method, equipment and medium for power monitoring system
CN117318871B (en) * 2023-11-29 2024-02-27 四川蜀能电科能源技术有限公司 Time protection method, equipment and medium for power monitoring system

Also Published As

Publication number Publication date
CN114070448B (en) 2023-07-25

Similar Documents

Publication Publication Date Title
WO2023134091A1 (en) Joint optimization method for path selection and gate scheduling in time-sensitive networking
CN109039897B (en) Software defined backhaul network routing method based on service awareness
CN114070448B (en) Main clock selection method based on multi-attribute decision
CN115460130B (en) Multipath joint scheduling method in time sensitive network
CN114553697B (en) Industrial wireless and TSN fusion-oriented network scheduling method
Garner et al. Synchronization of audio/video bridging networks using IEEE 802.1 AS
CN106161102B (en) A kind of IP RAN network optimization emulation mode and system
CN110278048B (en) Hierarchical Ad Hoc network time synchronization method based on clustering algorithm
CN110461018B (en) Opportunistic network routing forwarding method based on computable AP
EP4152703A1 (en) Network control method and device
CN101854697A (en) Multi-constraint quality-of-service control routing method and system for wireless mesh network
CN114666280B (en) Industrial Internet time delay optimization method based on time-sensitive software defined network
US20230051166A1 (en) Delay Sensitive Network Estimation System
CN111130928A (en) Network measurement method based on in-band detection in wide area network
CN115632939B (en) Automatic network selection and routing method for achieving multi-target achievement of computational power network
CN113630893A (en) 5G and TSN joint scheduling method based on wireless channel information
CN114745227B (en) Electric power business network slicing time delay calculation method and device based on FlexE and SPN technologies
CN105472484A (en) Wave channel balancing route wavelength allocation method of power backbone optical transport network
CN114827195B (en) Power 5G low-delay jitter implementation method for distribution network stable protection
CN104410443A (en) Task-oriented ad hoc network algorithm in combination with satellite node availability in satellite network
CN108989148A (en) A kind of relaying multipath flow allocation method that propagation delay time minimizes
CN114389735A (en) Clock synchronization method based on IEEE802.1AS redundant master clock
CN114423020A (en) LoRaWAN network downlink route control method and system
CN102379136B (en) Method and device for online computation of the feasible rates region of a random access network
CN117118917A (en) Cross-domain deterministic network, scheduling method, device and cross-domain control orchestrator

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