A mixed networking synchronization path decision method and device
By calibrating the time accuracy information of the time source and synchronization node, the downstream node is informed to determine the optimal synchronization path and node port status. This solves the problem of non-optimal synchronization error in the traditional BMC algorithm in hybrid networking and achieves optimal path selection and compatibility.
Patent Information
- Application Number
- CN202411484843.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2044-10-23
AI Technical Summary
In hybrid networking scenarios, traditional BMC algorithms cannot effectively select the synchronization path with the smallest time error, resulting in suboptimal synchronization error.
By calibrating the time accuracy information of the time source and synchronization node, and transmitting the time accuracy information of the time source and the time cumulative error information of the synchronization node to the downstream node, the downstream node determines the optimal synchronization path and the working state of the node port based on this information, including the master clock, slave clock and passive clock states.
In hybrid networking scenarios, it can select the optimal path with the smallest time error, adapt to time sources and synchronization nodes with different time precision, be compatible with the synchronization precision of existing devices, and adapt to devices with higher synchronization precision.
Smart Images

Figure CN119383713B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of time synchronization, in particular to a mixed networking synchronization path decision method and device. BACKGROUND
[0002] High-precision time synchronization is one of the key requirements of 5G bearing. According to different technical implementations or business scenarios, different synchronization precisions need to be provided. 5G synchronization requirements mainly manifest in three aspects: basic business time synchronization requirements, collaborative business time synchronization requirements and new business synchronization requirements, and synchronization applications in vertical industries.
[0003] The basic business time synchronization precision requirement of 5G is 3us, the collaborative business time synchronization precision requirement is 300ns, and the positioning and other new business time synchronization requirements are improved to 10ns. To cope with different synchronization requirements, the time precision of corresponding time sources and bearing nodes also appears different requirements. When synchronizing networking, nodes with different time synchronization precision indicators are running on the existing network at the same time, which will appear a mixed networking scenario.
[0004] The time synchronization network usually adopts the BC (Boundary Clock, boundary clock) model networking, relies on the BMC (Best Master Clock, best master clock) algorithm for time source selection, synchronization path decision and port synchronization working state decision. The BMC algorithm recommended in IEEE1588-2008 / 2019 or ITU-T G.8275.1 relies on the clock information carried by the synchronization announcement packet (Announce) and the local clock information for decision. For example: master clock priority 1 (GM_priority1), master clock clock level (GM_class), master clock offset scaled variance (GM_offsetScaledVariance), master clock priority 2 (GM_priority2), synchronization path hop count (StepsRemoved) and other information, through combination information comparison, the optimal tracking time source is decided, and the synchronization tracking direction is selected. When the received master time source parameters are all the same, the decisive parameter of the synchronization path decision is the synchronization path hop count (StepsRemoved), and the direction with less synchronization path hop count is selected for tracking through comparison.
[0005] However, when different time synchronization precision devices are mixed in networking, the selected tracking time source and synchronization tracking path according to the traditional BMC relying on time source precision and time source hop count will appear non-optimal phenomenon, that is, the synchronization error brought by the selected tracking time source and synchronization path is not the minimum. SUMMARY
[0006] The application provides a mixed networking synchronization path decision method and device, which can adapt to time sources and synchronization nodes with different time accuracies, and can decide an optimal path with minimum time error in a mixed networking scenario.
[0007] In a first aspect, the application provides a mixed networking synchronization path decision method, which comprises:
[0008] obtaining time accuracy information of a time source and synchronization nodes;
[0009] transferring the time accuracy information of the time source and the synchronization node time cumulative error information to downstream nodes;
[0010] deciding, by the downstream nodes, an optimal synchronization path and working states of node ports according to the time accuracy information of the time source, the synchronization node time cumulative error information, and local time accuracy information of the nodes, wherein the working states of the node ports include master clock states, slave clock states, and passive clock states.
[0011] In combination with the first aspect, in an implementation, deciding, by the downstream nodes, an optimal synchronization path and working states of node ports according to the time accuracy information of the time source, the synchronization node time cumulative error information, and local time accuracy information of the nodes comprises:
[0012] determining synchronization link time errors of each synchronization link corresponding to the downstream nodes according to a sum of the time accuracy of the time source and the synchronization node time cumulative error;
[0013] selecting a synchronization link with minimum synchronization link time error as a reference synchronization link;
[0014] calculating a difference value of the synchronization link time error of each synchronization link and the reference synchronization link, comparing the difference value with the local time accuracy information of the downstream nodes, and deciding an optimal synchronization path and working states of node ports.
[0015] In combination with the first aspect, in an implementation, calculating a difference value of the synchronization link time error of each synchronization link and the reference synchronization link, comparing the difference value with the local time accuracy information of the downstream nodes, and deciding an optimal synchronization path and working states of node ports comprises:
[0016] if the difference value is greater than the local time accuracy information of the downstream nodes, deciding that the reference synchronization link is the optimal synchronization path and is superior to the synchronization links participating in comparison;
[0017] in the downstream nodes, a port receiving optimal synchronization path information works in a slave clock state, and for the synchronization links participating in comparison, if the decision result is superior, a port receiving information of the synchronization link works in a master clock state.
[0018] In combination with the first aspect, in an implementation, the method further comprises:
[0019] If the difference value is equal to the local time precision information of the downstream node, it is further determined whether the sending port identification number of the last synchronization node of the synchronization link being compared is greater than the receiving port identification number of the current node.
[0020] If the sending port identification number is greater than the receiving port identification number, it is determined that the reference synchronization link is the optimal synchronization path, and the reference synchronization link is logically superior to the synchronization link being compared.
[0021] If the sending port identification number is less than the receiving port identification number, it is determined that the reference synchronization link is the optimal synchronization path, and the reference synchronization link is logically superior to the synchronization link being compared.
[0022] If the sending port identification number is equal to the receiving port identification number, it is returned that the decision is wrong.
[0023] In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the synchronization link being compared, if the decision result is superior, the port receiving the synchronization link information works in the master clock state, and if the decision result is logically superior, the port receiving the synchronization link information works in the passive clock state.
[0024] In combination with the first aspect, in an implementation, the method further comprises:
[0025] If the difference value is greater than zero but less than the local time precision information of the downstream node, it is determined that the reference synchronization link is the optimal synchronization path, and the reference synchronization link is logically superior to the synchronization link being compared.
[0026] In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the synchronization link being compared, if the decision result is logically superior, the port receiving the synchronization link information works in the passive clock state.
[0027] In combination with the first aspect, in an implementation, the computing the difference between each synchronization link and the synchronization link time error of the reference synchronization link, comparing the difference with the local time precision information of the downstream node, and determining the optimal synchronization path and the working state of the node port, comprises:
[0028] If the difference is equal to zero, further comparing the sending port identification number of the reference synchronization link and the compared synchronization link at the previous synchronization node;
[0029] If the sending port identification numbers are different, determining the synchronization link with the smaller sending port identification number as the optimal synchronization path, and determining that the logical state of the synchronization link with the smaller sending port identification number is superior to that of the other compared synchronization link; the synchronization link of the optimal synchronization path will block the other compared synchronization link;
[0030] If the sending port identification numbers are the same, further comparing the receiving port number of the reference synchronization link and the compared synchronization link at the current synchronization node;
[0031] If the receiving port numbers are different, determining the synchronization link with the smaller receiving port number as the optimal synchronization path, and determining that the logical state of the synchronization link with the smaller receiving port number is superior to that of the other compared synchronization link; the synchronization link of the optimal synchronization path will block the other compared synchronization link;
[0032] If the receiving port numbers are the same, returning a decision error;
[0033] In the downstream node, the port receiving the optimal synchronization path information works in a slave clock state, and for the compared synchronization link, if the decision result is that the logical state is superior, the port receiving the information of the synchronization link works in a passive clock state.
[0034] In combination with the first aspect, in an implementation, the time precision information of the time source and the synchronization node time cumulative error information are transmitted through an announcement message or TLV information.
[0035] In combination with the first aspect, in an implementation, the related inherent characteristic information of the reading device is read to determine the time precision information of the synchronization node.
[0036] The second aspect provides a mixed network synchronization path decision device, which comprises:
[0037] a calibration module, configured to calibrate the time precision information of the time source and the synchronization node;
[0038] a transmission module, configured to transmit the time precision information of the time source and the synchronization node time cumulative error information to a downstream node;
[0039] A decision module is configured to determine an optimal synchronization path and a working state of a node port according to time precision information of a time source, accumulated error information of a synchronization node, and local time precision information of the node.
[0040] In combination with the second aspect, in an embodiment, the decision module is configured to determine an optimal synchronization path and a working state of a node port according to time precision information of a time source, accumulated error information of a synchronization node, and local time precision information of the node, including:
[0041] determining synchronization link time error of each synchronization link corresponding to the downstream node according to a sum of the time precision of the time source and the accumulated error information of the synchronization node;
[0042] taking the synchronization link with the minimum synchronization link time error as the optimal synchronization path;
[0043] calculating a difference value of the synchronization link time error of each synchronization link and the optimal synchronization path, comparing the difference value with the local time precision information of the downstream node, and determining the working state of the node port.
[0044] The technical scheme provided by the embodiments of the present application has the following beneficial effects:
[0045] The time precision information of the time source and the synchronization node is calibrated, the time precision information of the time source and the accumulated error information of the synchronization node are transmitted to the downstream node, and the downstream node determines an optimal synchronization path and a working state of a node port according to time precision information of a time source, accumulated error information of a synchronization node, and local time precision information of the node, wherein the working state of the node port includes a master clock state, a slave clock state, and a passive clock state. Therefore, time sources and synchronization nodes with different time precisions can be adapted, in a mixed networking scenario, the optimal path with the minimum time error can be determined and selected, there is no limitation on the time precision of the time source and the synchronization node, the synchronization precision of existing devices can be compatible, and devices with higher synchronization precision in the future can also be adapted. BRIEF DESCRIPTION OF DRAWINGS
[0046] Figure 1 A first example of traditional synchronization tracking in a mixed-precision time source networking scenario;
[0047] Figure 2 A second example of traditional synchronization tracking in a mixed-precision time source networking scenario;
[0048] Figure 3 A flowchart of an embodiment of the mixed-networking synchronization path decision method of the present application;
[0049] Figure 4 For the mixed precision time source networking example of the present application;
[0050] Figure 5 For the functional module schematic diagram of an embodiment of the mixed networking synchronization path decision device of the present application. DETAILED DESCRIPTION
[0051] In order for those skilled in the art to better understand the scheme of the present application, the technical solutions in the embodiments of the present application will be described clearly and completely below in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0052] For the mixed networking of different time synchronization precision devices, the selected tracking time source and synchronization tracking path according to the traditional BMC rely on the time source precision and time source hop count, and the phenomenon of non-optimality may occur, that is, the synchronization error caused by the selected tracking time source and synchronization path is not the minimum. The technical problem is illustrated as follows:
[0053] Figure 1 For the example of tracking selection problem in the networking scene of different precision time sources. Two time sources, time source 1 and time source 2, are deployed in the network. The time precision of time source 1 is 30 ns, and the synchronization precision of time source 2 is 50 ns. Node 4 will only select the time source with high time precision according to the traditional BMCA, that is, time source 1 in the example. For node 4, the synchronization error caused by time source 1, node 1 and node 5 on the synchronization link is 90 ns. If node 4 can track time source 2, the synchronization error is only 50 ns, which is better than the decision of BMCA.
[0054] Figure 2 For the example of synchronization path selection problem in the mixed precision node networking scene. In the example, the synchronization precision of time source 1 is 30 ns, the time precision of node 1, node 2 and node 3 is 5 ns, and the time precision of node 4 and node 5 is 30 ns. For node 4, according to the hop count priority selection principle of the traditional BMCA, it will decide to select the direction of node 5 as the synchronization tracking direction. That is, the synchronization link is time source 1->node 1->node 5->node 4, and the statistical synchronization error of the link is 65 ns. Relative to the other existing synchronization link: time source 1->node 1->node 2->node 3->node 4, the statistical synchronization error of the link is 45 ns. The synchronization error of the latter synchronization link is smaller than that of the former synchronization link, but since the traditional BMCA takes hop count as the decision reference, it will select the first link with small hop count and large synchronization error.
[0055] To this end, the application adopts an innovative decision scheme based on synchronization link precision to realize selection of a time error minimum path and decision of a blocked port. To make the purposes, technical solutions and advantages of the application clearer, the embodiments of the application will be described in further detail below with reference to the drawings.
[0056] In a first aspect, the embodiments of the application provide a mixed networking synchronization path decision method.
[0057] In an embodiment, the mixed networking synchronization path decision method comprises the following steps. Figure 3 Figure 3 FIG. 1 is a flowchart of an embodiment of the mixed networking synchronization path decision method of the application. As shown in FIG. 1, the mixed networking synchronization path decision method comprises the following steps. Figure 3
[0058] S1, calibrating time source and synchronization node time precision information;
[0059] The precision information of the time source is calibrated by using a time precision (clockAccuracy) field in the existing scheme, and there is a clear coding rule.
[0060] The synchronization node time precision information is missing in the existing scheme and needs to be newly calibrated. The synchronization node time precision is associated with the implementation scheme of the device and belongs to the inherent characteristics of the device. Therefore, after the development of the device is completed, it can be stored as device information in the system and read when needed. The storage method is not limited, for example, EEPROM, or it can be configured through a management system. It can be accurately read at the time of decision. In the case of no calibration information, the scheme is processed according to the agreed default value.
[0061] The time precision information coding can be coded according to the precision level defined in the IEEE1588, G.8273.2, etc. standards, for example, 0x23 represents synchronization precision of 1us, 0x21 represents synchronization precision of 100ns, 0x1F represents synchronization precision of 10ns, etc. It should be noted that the coded data needs to be converted to direct precision data when used; another scheme is to directly calibrate the synchronization precision that can be achieved by the device. For example, if the device synchronization precision is 30ns, the precision information can be calibrated to 30ns. The advantage is that the data resolution is higher and can be used directly.
[0062] S2, transmitting the time precision information of the time source and the synchronization node time cumulative error information to the downstream node;
[0063] It is worth mentioning that the synchronization node time accumulation error information (sumTE_node) is the time error accumulation caused by the synchronization node in the synchronization link. The application accumulates the time accuracy of the synchronization node in the synchronization link, which represents the maximum time error caused by the synchronization node in the link.
[0064] The synchronization node time accumulation error information can be redefined as the existing message field carrying and delivering to the downstream node. For example, the Announce message field is redefined:
[0065] 1) The original "stepsRemoved" (2 bytes) field is redefined as the synchronization node time accumulation error information (sumTE_node). Considering the data bit limit and the synchronization network limit, the data precision unit can be set to 0.1 ns when storing the link error data using this scheme. For example, sumTE_node = 100 ns, the stored data is 0x3E8 (0.1 ns);
[0066] Or the TLV information scheme is used to carry and deliver the synchronization node time accumulation error information, which has better compatibility and data expansion in implementation, and is the preferred scheme. The specific description is as follows:
[0067] 1) Type (Type): indicates that the TLV information is the synchronization node time accumulation error information TLV;
[0068] 2) Length (Length): indicates the data length of the TLV information;
[0069] 3) Content (Value): the content carried is the synchronization node time accumulation error information (sumTE_node). The information byte number can be extended according to the accuracy requirement of synchronization. From the network accuracy limit and technical development, an 8-byte data storage scheme can be used, and the data precision unit is set to 2-16 ns;
[0070] In addition, the time accuracy information of the time source can also be delivered by using the above-mentioned announcement message and TLV. The time source node needs to correctly fill in the master clock accuracy information (GM_accuracy) when sending the announcement message according to the standard requirements. As the start of the synchronization link, the synchronization node time accumulation error information (sumTE_node) is filled in as "0". Or it does not carry this information, which is generated by the synchronization node connected thereto.
[0071] When the synchronization node forwards the synchronization node time accumulation error information (sumTE_node), the synchronization node time accumulation error information needs to be updated. The update rule is as follows:
[0072] The local time accuracy (TA_node_i) of the forwarding node i is added to the synchronization node time accumulation error information (sumTE_node), that is:
[0073] sumTE_node = sumTE_node + TA_node_i;
[0074] The information generated by the first synchronization node connected to the time source is:
[0075] sumTE_node = TA_node_i;
[0076] After the synchronization node time accumulation error information is generated, it is carried by the synchronization announcement message (Announce) and forwarded to the downstream node with the announcement message.
[0077] The synchronization link time error information (sumTE_line) is the sum of the time accumulation error in the synchronization link through the synchronization node and the master time accuracy information, that is:
[0078] sumTE_line = sumTE_node + GM_accuracy;
[0079] The synchronization link time error information is obtained from the received announcement message and calculated, and is stored in association with the time source information and the receiving port. It is used for subsequent synchronization link decision of the synchronization node.
[0080] S3, the downstream node decides the optimal synchronization path and the working state of the node port according to the time accuracy information of the time source, the synchronization node time accumulation error information, and the local time accuracy information of the node, the working state of the node port including the master clock state, the slave clock state and the passive clock state.
[0081] It is worth noting that the present application can realize the replacement of the data set comparison algorithm in the optimal master clock algorithm (BMCA) defined by IEEE1588 and G.8275.1, and realize the optimization of synchronization decision in the mixed networking scenario. Taking two synchronization links as an example, the specific scheme is as follows:
[0082] 1) The time source and the synchronization node time accumulation error information are transmitted through the announcement message. When the node receives more than two different announcement messages from different ports, it needs to be compared one by one to decide the optimal time source. For the convenience of explanation, the received announcement message is regarded as a synchronization link. Assuming that node i receives the message of synchronization link A at PTP port m and receives the message of synchronization link B at PTP port n, the advantages and disadvantages are decided between synchronization links A and B;
[0083] 2) The first part of the data comparison algorithm for node i is to compare the time source data sets of the synchronization links, sequentially comparing the master clock priority 1 (GM_priority1), master clock class (GM_class), master clock offset scaled variance (GM_offsetScaledVariance), master clock priority 2 (GM_priority2), master clock identification (GM_ID) parameters of the master clocks of synchronization links A and B to decide the superior time source. According to the comparison result, the decision result is that synchronization link A is superior to synchronization link B, or synchronization link B is superior to synchronization link A. In the present patent scheme, the first part of the data comparison algorithm for synchronization link time source data set comparison is different from the traditional scheme, and the master clock accuracy (GM_accuracy) is not compared. This data will be used in the second part of the data set comparison algorithm to achieve the optimization of link decision.
[0084] 3) If the superiority of synchronization links A and B cannot be determined in the first part of the decision, the second part of the decision of comparing the accumulated time error information of the synchronization links is entered. The decision method is as follows:
[0085] A. When the difference between the synchronization link time error (sumTE_line_A) of synchronization link A and the synchronization link time error (sumTE_line_B) of synchronization link B is greater than the time accuracy (TA_node_i) of node i, i.e.:
[0086] sumTE_line_A - sumTE_line_B > TA_node_i;
[0087] The decision result is that synchronization link B is superior to synchronization link A.
[0088] B. When the difference between the synchronization link time error (sumTE_line_B) of synchronization link B and the synchronization link time error (sumTE_line_A) of synchronization link B is greater than the time accuracy (TA_node_i) of node i, i.e.:
[0089] sumTE_line_B - sumTE_line_A > TA_node_i;
[0090] The decision result is that synchronization link A is superior to synchronization link B.
[0091] C. When the difference between the synchronization link time error (sumTE_line_A) of synchronization link A and the synchronization link time error (sumTE_line_B) of synchronization link B is equal to the time accuracy (TA_node_i) of node i, i.e.:
[0092] sumTE_line_A - sumTE_line_B = TA_node_i;
[0093] The decision result also needs to be associated with the comparison result of the port identification number (portID_sender_A) sent by the previous synchronization node and the port identification number (portID_receiver_A) received by the current node in the announcement message carrying the synchronization link A information. The port identification number is a parameter inherent to the synchronization node. The portID has specific rules in some standards, and the generated result is a unique ID number. The size of the portID is essentially the size of two strings of numbers. The specific decision result is as follows:
[0094] A) When (portID_sender_A > portID_receiver_A), the decision result is that the synchronization link B is superior to the synchronization link A;
[0095] B) When (portID_sender_A < portID_receiver_A), the decision result is that the synchronization link B is logically superior to the synchronization link A;
[0096] C) When (portID_sender_A = portID_receiver_A), return a decision error. At this time, there is an information error, and the decision cannot be made;
[0097] D. When the difference between the synchronization link time error (sumTE_line_B) of the synchronization link B and the synchronization link time error (sumTE_line_A) of the synchronization link A is equal to the time precision (TA_node_i) of the node i, that is:
[0098] sumTE_line_B - sumTE_line_A = TA_node_i;
[0099] The decision result also needs to be associated with the comparison result of the port identification number (portID_sender_B) sent by the previous synchronization node and the port identification number (portID_receiver_B) received by the current node in the announcement message carrying the synchronization link B information. The port identification number is a parameter inherent to the synchronization node. The specific decision result is as follows:
[0100] A) When (portID_sender_B > portID_receiver_B), the decision result is that the synchronization link A is superior to the synchronization link B;
[0101] B) When (portID_sender_B < portID_receiver_B), the decision result is that the synchronization link A is logically superior to the synchronization link B;
[0102] C) When (portID_sender_B = portID_sender_B), return decision error. There is information error at this time, and decision cannot be made;
[0103] E. When the difference between the synchronization link time error of synchronization link A (sumTE_line_A) and the synchronization link time error of synchronization link B (sumTE_line_B) is less than the time precision of node i (TA_node_i) and greater than "0", i.e.:
[0104] 0 < sumTE_line_A - sumTE_line_B < TA_node_i;
[0105] The decision result is that the logical of synchronization link B is superior to that of synchronization link A.
[0106] F. When the difference between the synchronization link time error of synchronization link B (sumTE_line_B) and the synchronization link time error of synchronization link A (sumTE_line_A) is less than the time precision of node i (TA_node_i) and greater than "0", i.e.:
[0107] 0 < sumTE_line_B - sumTE_line_A < TA_node_i;
[0108] The decision result is that the logical of synchronization link A is superior to that of synchronization link B.
[0109] G. When the difference between the synchronization link time error of synchronization link B (sumTE_line_B) and the synchronization link time error of synchronization link A (sumTE_line_A) is "0", i.e.:
[0110] sumTE_line_A = sumTE_line_B;
[0111] The decision result also needs to associate the comparison result of the sending port identification number (portID_sender_A) of the announcement message carrying the information of synchronization link A at the last synchronization node and the sending port identification number (portID_sender_B) of the announcement message carrying the information of synchronization link B. The port identification number is a fixed parameter of the synchronization node. The specific decision result is as follows:
[0112] A) When (portID_sender_A > portID_sender_B), the decision result is that the logical of synchronization link B is superior to that of synchronization link A;
[0113] B) When (portID_sender_B > portID_sender_A), the decision result is that the logical of synchronization link A is superior to that of synchronization link B;
[0114] C) When (portID_sender_B = portID_sender_A), the decision result needs to further compare the receiving port number of synchronization link A information (portNum_receiver_A) and the receiving port number of synchronization link B information (portNum_receiver_B) of the current synchronization node. The port number is a parameter inherent to the synchronization node. The specific decision result is as follows:
[0115] a. When (portNum_receiver_A > portNum_receiver_B), the decision result is that the logical of synchronization link B is superior to that of synchronization link A;
[0116] b. When (portNum_receiver_B > portNum_receiver_A), the decision result is that the logical of synchronization link A is superior to that of synchronization link B;
[0117] c. When (portNum_receiver_A = portNum_receiver_B), return an error. At this time, there is an information error, and the decision cannot be made;
[0118] The above decision results of synchronization link A and B can be directly applied to the original port decision of BMCA as input data, without the need to revise the original port decision algorithm. For a synchronization node, the synchronization link information received from different ports is compared one by one, and the optimal path information is decided. That is, the comparison decision result of the synchronization link information and other synchronization link information is "superior" or "logically superior". The subsequent decision of the port synchronization working state of the node is divided into two steps:
[0119] 1) The port is the port receiving the optimal synchronization link information, and the decision is that the port works in the slave clock state (Slave);
[0120] 2) The other ports, the received synchronization link information is compared with the optimal synchronization link information of the node. If the optimal path information receiving port comparison decision is "superior", the port is decided to work in the master clock state (Master); if the optimal path information receiving port comparison decision is "logically superior", the port is decided to work in the passive clock state (Passive).
[0121] It is worth mentioning that, when three or more synchronization links need to be selected, the synchronization link with the minimum time error should be selected as the reference synchronization link, and then the remaining synchronization links are selected in turn according to the above method.
[0122] The above steps will be further described in combination with specific examples:
[0123] Referring to Figure 4 As shown in the figure, a synchronization network is composed of time source 1 and time source 2, and four synchronization nodes. Among them, the time accuracy of time source 1 is 20 ns; the time accuracy of time source 2 is 30 ns; the time accuracy of node 1 and node 2 is 5 ns; the time accuracy of node 3 and node 4 is 10 ns. The decision-making process of each node on the link is as follows:
[0124] 1. Node 1 receives the announcement message sent by time source 1 from n1p1 port, and receives the announcement message sent by time source 2 through node 4, node 3, node 2 from n1p2 port.
[0125] 1) Calculate the time error of the synchronization link respectively:
[0126] sumTE_line_n1p1=20ns;
[0127] sumTE_line_n1p2=30ns+10ns+10ns+5ns=55ns;
[0128] 2) Compare the results:
[0129] sumTE_line_n1p2-sumTE_line_n1p1=35ns;
[0130] 3) The difference is greater than the synchronization accuracy of node 1 (TA_node_1=5ns), and the synchronization link information received by n1p1 port is better than that received by n1p2 port. Based on this decision result, the port state decision of node 1 is that n1p1 port works in slave clock state and n1p2 port works in master clock state.
[0131] 2. The decision-making of node 2 is similar to that of node 1:
[0132] 1) Calculate the time error of the synchronization link:
[0133] sumTE_line_n2p1=20ns+5ns=25ns;
[0134] sumTE_line_n2p2=30ns+10ns+10ns=50ns;
[0135] 2) comparison result:
[0136] sumTE_line_n2p2 - sumTE_line_n2p1 = 25ns;
[0137] 3) the difference of comparison is greater than the synchronization accuracy of node 2 (TA_node_2 = 5ns), and it is decided that the synchronization link information received by the n2p1 port is superior to that received by the n2p2 port. Based on this decision result, the port state decision of node 2 is that the n2p1 port works in the slave clock state, and the n2p2 port works in the master clock state.
[0138] 3) the decision of node 3 is as follows:
[0139] 1) the synchronization link time error is calculated as:
[0140] sumTE_line_n3p1 = 20ns + 5ns + 5ns = 30ns;
[0141] sumTE_line_n3p2 = 30ns + 10ns = 40ns;
[0142] 2) comparison result:
[0143] sumTE_line_n3p2 - sumTE_line_n3p1 = 10ns;
[0144] 3) the difference of comparison is equal to the synchronization accuracy of node 3 (TA_node_3 = 10ns). According to the scheme, it is necessary to associate and compare the port identification numbers of the synchronization link information receiving and transmitting ports to make a decision:
[0145] a) in this example, sumTE_line_n3p2 > sumTE_line_n3p1, according to the scheme, the port identification number of the n3p2 port (n3p2_portID) and the port identification number of the n4p1 port of node 4 corresponding to node 4 (n4p1_portID) need to be obtained. n3p2_portID is a inherent parameter of node 3, which can be queried and obtained. n4p1_portID is a inherent parameter of node 4, which is transmitted to node 3 through the announcement message when the n4p1 port sends the time source 2 synchronization link announcement information.
[0146] b) the decision result is as follows:
[0147] I. if n3p2_portID > n4p1_portID, the decision result is that sumTE_line_n3p1 is logically superior to sumTE_line_n3p2. According to the port working state decision, the n3p1 port works in the slave clock state, and the n3p2 port works in the passive clock state;
[0148] II. If n4p1_portID > n3p2_portID, the decision result is sumTE_line_n3p1 is better than sumTE_line_n3p2. According to the port working state decision, n3p1 port works in slave clock state, and n3p2 port works in master clock state;
[0149] III. If n4p1_portID = n3p2_portID, the decision exists information error, and cannot be decided. Return error information.
[0150] 4, The decision of node 4 is as follows:
[0151] 1) Calculate the synchronization link time error as:
[0152] sumTE_line_n4p1 = 20ns + 5ns + 5ns + 10ns = 40ns;
[0153] sumTE_line_n4p2 = 30ns;
[0154] 2) Comparison result:
[0155] sumTE_line_n4p1 - sumTE_line_n4p2 = 10ns;
[0156] 3) The comparison difference is equal to the synchronization accuracy of node 4 (TA_node_4 = 10ns). According to the scheme, the port identification number of the synchronization link information receiving and sending needs to be associated and compared for decision:
[0157] a) In this example, sumTE_line_n4p1 > sumTE_line_n4p2. According to the scheme, the port identification number (n4p1_portID) of n4p1 port of node 4 and the port identification number (n3p2_portID) of n3p2 port of node 3 corresponding to the node 3 need to be obtained. n4p1_portID is the inherent parameter of node 4, which can be obtained by inquiry. n3p2_portID is the inherent parameter of node 3, which is transmitted to node 4 through the announcement message when n3p2 port sends time source 1 synchronization link announcement information.
[0158] b) The decision result is as follows:
[0159] I. If n4p1_portID > n3p2_portID, the decision result is sumTE_line_n3p1 is better than sumTE_line_n3p2. According to the port working state decision, n3p1 port works in slave clock state, and n3p2 port works in master clock state;
[0160] II. If n3p2_portID > n4p1_portID, the decision result is that sumTE_line_n4p2 is better than sumTE_line_n4p1. The port working state decision is that the n4p2 port works in the slave clock state and the n4p1 port works in the master clock state;
[0161] III. If n4p1_portID = n3p2_portID, it is determined that there is an information error and no decision can be made, and an error information is returned.
[0162] From the decision result, node 1, node 2 and node 3 select to track time source 1, and node 4 selects to track time source 2, which are both from the perspective of the node to select a synchronization link with relatively small error. In addition, other scenarios can also be implemented according to the scheme of the present application.
[0163] In summary, the mixed networking synchronization path decision method in the present application calibrates the time precision information of the time source and the synchronization node, transmits the time precision information of the time source and the time cumulative error information of the synchronization node to the downstream node, and the downstream node decides the optimal synchronization path and the working state of the node port according to the time precision information of the time source, the time cumulative error information of the synchronization node and the local time precision information of the node, wherein the working state of the node port includes the master clock state, the slave clock state and the passive clock state. Thus, the mixed networking synchronization path decision method in the present application can adapt to time sources and synchronization nodes with different time precision, can decide the optimal path with the smallest time error in the mixed networking scenario, has no limitation on the time precision of the time source and the synchronization node, can be compatible with the synchronization precision of existing devices, and can also be adapted to subsequent devices with higher synchronization precision.
[0164] In a second aspect, the embodiment of the present application further provides a mixed networking synchronization path decision device.
[0165] In an embodiment, the mixed networking synchronization path decision device comprises a calibration module, a transmission module and a decision module. Figure 5 , Figure 5 FIG. 1 is a schematic diagram of the functional modules of an embodiment of the mixed networking synchronization path decision device of the present application. As shown in FIG. 1, the mixed networking synchronization path decision device comprises: Figure 5
[0166] The calibration module is configured to calibrate the time precision information of the time source and the synchronization node.
[0167] The transmission module is configured to transmit the time precision information of the time source and the time cumulative error information of the synchronization node to the downstream node.
[0168] A decision module is configured to determine an optimal synchronization path and a working state of a node port according to time precision information of a time source, accumulated error information of a synchronization node, and local time precision information of the node.
[0169] Further, in an embodiment, the decision module is configured to determine the optimal synchronization path and the working state of the node port according to the time precision information of the time source, the accumulated error information of the synchronization node, and the local time precision information of the node, including:
[0170] determining a synchronization link time error of each synchronization link corresponding to the downstream node according to a sum of the time precision of the time source and the accumulated error of the synchronization node;
[0171] taking the synchronization link with the minimum synchronization link time error as the optimal synchronization path;
[0172] calculating a difference between the synchronization link time error of each synchronization link and the optimal synchronization path, comparing the difference with the local time precision information of the downstream node, and determining the working state of the node port.
[0173] Further, in an embodiment, the decision module calculates a difference between the synchronization link time error of each synchronization link and the optimal synchronization path, compares the difference with the local time precision information of the downstream node, and determines the optimal synchronization path and the working state of the node port, including:
[0174] if the difference is greater than the local time precision information of the downstream node, determining that the reference synchronization link is the optimal synchronization path and is superior to the synchronization link being compared;
[0175] in the downstream node, a port receiving the optimal synchronization path information works in a slave clock state, and for the synchronization link being compared, if the determination result is superior, a port receiving the synchronization link information works in a master clock state.
[0176] Further, in an embodiment, the decision module calculates a difference between the synchronization link time error of each synchronization link and the optimal synchronization path, compares the difference with the local time precision information of the downstream node, and determines the optimal synchronization path and the working state of the node port, further including:
[0177] if the difference is equal to the local time precision information of the downstream node, further determining a size relationship between a sending port identification number of a previous synchronization node and a receiving port identification number of the node for the synchronization link being compared;
[0178] If the sending port identification number is greater than the receiving port identification number, the decision reference synchronization link is the optimal synchronization path, and the decision logic is superior to the compared synchronization link;
[0179] If the sending port identification number is less than the receiving port identification number, the decision reference synchronization link is the optimal synchronization path, and the decision logic is superior to the compared synchronization link, and the reference synchronization link will be blocked in the compared synchronization link;
[0180] If the sending port identification number is equal to the receiving port identification number, return a decision error;
[0181] In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the compared synchronization link, if the decision result is superior, the port receiving the synchronization link information works in the master clock state, and if the decision result is logical superior, the port receiving the synchronization link information works in the passive clock state.
[0182] Further, in an embodiment, the decision module calculates the difference between the synchronization link time error of each synchronization link and the reference synchronization link, compares the difference with the local time precision information of the downstream node, and decides the optimal synchronization path and the working state of the node port, and further includes:
[0183] If the difference is greater than zero but less than the local time precision information of the downstream node, the decision reference synchronization link is the optimal synchronization path, and the decision logic is superior to the compared synchronization link, and the reference synchronization link will be blocked in the compared synchronization link;
[0184] In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the compared synchronization link, if the decision result is logical superior, the port receiving the synchronization link information works in the passive clock state.
[0185] Further, in an embodiment, the decision module calculates the difference between the synchronization link time error of each synchronization link and the reference synchronization link, compares the difference with the local time precision information of the downstream node, and decides the optimal synchronization path and the working state of the node port, and further includes:
[0186] If the difference is equal to zero, further compare the size of the sending port identification number of the reference synchronization link and the compared synchronization link in the last synchronization node;
[0187] If the sending port identification numbers are different, the synchronization link with the smaller sending port identification number is decided as the optimal synchronization path, and the decision logic is superior to the other compared synchronization link, and the synchronization link as the optimal synchronization path will be blocked in the other compared synchronization link;
[0188] If the sending port identification numbers are the same, then the reference synchronization link and the synchronization link being compared are further compared in terms of the size of the receiving port number at the last synchronization node;
[0189] If the receiving port numbers are different, the synchronization link with the smaller receiving port number is determined to be the optimal synchronization path, and the decision logic is superior to the other synchronization link being compared, and the synchronization link determined to be the optimal synchronization path will block the other synchronization link being compared;
[0190] If the receiving port numbers are the same, then the decision error is returned;
[0191] In the downstream node, the port receiving the optimal synchronization path information is determined to operate in the slave clock state, and for the synchronization links participating in the comparison, if the decision result is that the decision logic is superior, the port receiving the synchronization link information is determined to operate in the passive clock state.
[0192] Further, in an embodiment, the delivery module is configured to:
[0193] The time precision information and the synchronization node time accumulation error information of the time source are delivered through an announcement message or using TLV information.
[0194] Further, in an embodiment, the calibration module determines the time precision information of the synchronization node by reading the relevant inherent characteristic information of the device at the time of implementation.
[0195] The functions of each module in the above hybrid networking synchronization path decision device correspond to the steps in the above hybrid networking synchronization path decision method embodiment, and the functions and implementation processes will not be repeated here.
[0196] It should be noted that the above sequence numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0197] The terms "include" and "have" and any variations thereof in the specification and claims of the present application and the above drawings are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but can optionally include other steps or units not listed or can optionally include other steps or units inherent to the process, method, product or device. The terms "first", "second" and "third" and the like descriptions are used to distinguish different objects, and do not represent the order or limit the types of "first", "second" and "third".
[0198] In the description of the embodiments of the present application, "exemplary", "for example", "e.g." or "for instance" are used on the basis that a person of ordinary skill in the art will be able to bring to mind many examples of a given implementation as the implementation described in the embodiments of the present application is exemplary. Any embodiment or design scheme described as "exemplary", "for example" or "for instance" in the embodiments of the present application should not be interpreted as being more preferred than other embodiments or design schemes. Rather, the use of "exemplary", "for example", "e.g." or "for instance" is intended to present concepts in a particular manner.
[0199] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text only describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B can mean that A exists alone, A and B exist together, and B exists alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.
[0200] In some processes described in the embodiments of the present application, a plurality of operations or steps are included in a specific order, but it should be understood that these operations or steps can be executed or executed in parallel without the order in which they appear in the embodiments of the present application. The serial number of the operation is only used to distinguish different operations, and the serial number itself does not represent any execution order. In addition, these processes can include more or fewer operations, and these operations or steps can be executed in sequence or in parallel, and these operations or steps can be combined.
[0201] From the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, an optical disk) as described above, and includes a plurality of instructions for making a terminal device execute the method described in each embodiment of the present application.
[0202] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the specification and drawings of the present application, or direct or indirect application in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A hybrid networked synchronization path decision method, characterized in that, The mixed-network synchronization path decision method comprises: Calibrating time source and time precision information of a synchronization node; Transferring the time precision information of the time source and the synchronization node time cumulative error information to a downstream node; The downstream node determines the synchronization link time error of each synchronization link corresponding to the downstream node according to the sum of the time precision of the time source and the synchronization node time cumulative error, selects the synchronization link time error with the minimum value as a reference synchronization link, calculates the difference value of the synchronization link time error of each synchronization link and the reference synchronization link, compares the difference value with the local time precision information of the downstream node, and decides the optimal synchronization path and the working state of the node port, wherein the working state of the node port comprises a master clock state, a slave clock state and a passive clock state.
2. The hybrid networking synchronization path decision method of claim 1, wherein, The calculation of the difference value of the synchronization link time error of each synchronization link and the reference synchronization link, the comparison of the difference value with the local time precision information of the downstream node, and the decision of the optimal synchronization path and the working state of the node port comprise: If the difference value is greater than the local time precision information of the downstream node, the reference synchronization link is decided as the optimal synchronization path, and it is determined that the reference synchronization link is superior to the synchronization link being compared; In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the synchronization link being compared, if the decision result is superior, the port receiving the synchronization link information works in the master clock state.
3. The hybrid networking synchronization path decision method of claim 1, wherein, The calculation of the difference value of the synchronization link time error of each synchronization link and the reference synchronization link, the comparison of the difference value with the local time precision information of the downstream node, and the decision of the optimal synchronization path and the working state of the node port comprise: If the difference value is equal to the local time precision information of the downstream node, it is further determined that the synchronization link being compared is superior to the synchronization link being compared in the size of the sending port identification number of the last synchronization node and the receiving port identification number of the current node; If the sending port identification number is greater than the receiving port identification number, the reference synchronization link is decided as the optimal synchronization path, and it is determined that the reference synchronization link is superior to the synchronization link being compared; If the sending port identification number is less than the receiving port identification number, the reference synchronization link is decided as the optimal synchronization path, and it is determined that the reference synchronization link is logically superior to the synchronization link being compared, and the reference synchronization link will be blocked on the synchronization link being compared; If the sending port identification number is equal to the receiving port identification number, the decision error is returned; In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the synchronization link being compared, if the decision result is superior, the port receiving the synchronization link information works in the master clock state, and if the decision result is logically superior, the port receiving the synchronization link information works in the passive clock state.
4. The method of claim 1, wherein the step of determining the synchronization path further comprises the step of: determining the synchronization path based on the network topology information and the network status information. The calculation of the difference value of the synchronization link time error of each synchronization link and the reference synchronization link, the comparison of the difference value with the local time precision information of the downstream node, and the decision of the optimal synchronization path and the working state of the node port comprise: If the difference is greater than zero but less than the local time precision information of the downstream node, it is determined that the reference synchronization link is the optimal synchronization path, and the decision logic is superior to the comparison synchronization link, and the reference synchronization link will block the comparison synchronization link; In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the comparison synchronization link, if the decision result is logical superiority, the port receiving the synchronization link information works in the passive clock state.
5. The method of claim 1, wherein the step of determining the synchronization path further comprises the step of: determining the synchronization path based on the network topology information and the network status information. The difference between the synchronization link time error of each synchronization link and the synchronization link time error of the reference synchronization link is calculated, the size relationship between the difference and the local time precision information of the downstream node is compared, and the optimal synchronization path and the working state of the node port are determined, including: If the difference is equal to zero, the size of the sending port identification number of the reference synchronization link and the comparison synchronization link at the last synchronization node is further compared; If the sending port identification numbers are different, the synchronization link with the smaller sending port identification number is determined as the optimal synchronization path, and the decision logic is superior to the other comparison synchronization link, and the synchronization link as the optimal synchronization path will block the other comparison synchronization link; If the sending port identification numbers are the same, the size of the receiving port number of the reference synchronization link and the comparison synchronization link at the current synchronization node is further compared; If the receiving port numbers are different, the synchronization link with the smaller receiving port number is determined as the optimal synchronization path, and the decision logic is superior to the other comparison synchronization link, and the synchronization link as the optimal synchronization path will block the other comparison synchronization link; If the receiving port numbers are the same, the decision error is returned; In the downstream node, the port receiving the optimal synchronization path information works in the slave clock state, and for the comparison synchronization link, if the decision result is logical superiority, the port receiving the synchronization link information works in the passive clock state.
6. The mixed network synchronization path decision method of claim 1, wherein: The time precision information of the time source and the synchronization node time cumulative error information are transmitted through an announcement message or using TLV information.
7. The mixed network synchronization path decision method of claim 1, wherein: The time precision information of the synchronization node is determined by reading the relevant inherent characteristic information of the implementation device.
8. A hybrid networked synchronization path decision apparatus, characterized by, The mixed network synchronization path decision device comprises: A calibration module for calibrating the time precision information of the time source and the synchronization node; A transmission module for transmitting the time precision information of the time source and the synchronization node time cumulative error information to the downstream node; A decision module for determining the synchronization link time error of each synchronization link corresponding to the downstream node according to the sum of the time precision of the time source and the synchronization node time cumulative error in the downstream node, selecting the synchronization link with the smallest synchronization link time error as the reference synchronization link, calculating the difference between the synchronization link time error of each synchronization link and the synchronization link time error of the reference synchronization link, comparing the size relationship between the difference and the local time precision information of the downstream node, and determining the optimal synchronization path and the working state of the node port, including the master clock state, the slave clock state and the passive clock state.
Citation Information
Patent Citations
Link information processing method, network node, storage medium and computer program product
CN118804259A