A synchronization method, device, equipment and storage medium

By receiving and weighting the trusted information of the synchronization node and adjusting the local time, the problem of time deviation of the communication network after the GNSS satellite time signal is lost is solved, and the stability and performance of the communication network are improved.

CN112511253BActive Publication Date: 2025-01-07ZTE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010209774.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-23
Publication Date
2025-01-07
Estimated Expiration
2040-03-23

AI Technical Summary

Technical Problem

In the case of lost or faulty GNSS satellite time signal, the time synchronization node of the communication network is prone to frequency accuracy errors due to relying on the atomic clock for timing, resulting in time deviations and error transmission, affecting the performance of the communication network, and even causing unavailability.

Method used

By receiving trusted synchronization information of each node to be synchronized and adjusting its local time according to the preset weighting algorithm, weighted synchronization between each node is achieved, error transmission is avoided, and the stability of the time synchronization network is ensured.

Benefits of technology

It effectively reduces error transmission in the time synchronization network, improves the performance and reliability of the communication network, and avoids the performance deterioration and unavailability of the synchronization network caused by GNSS satellite problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112511253B_ABST
    Figure CN112511253B_ABST
Patent Text Reader

Abstract

The present application proposes a synchronization method, device, equipment and storage medium. The method includes: receiving trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized; and adjusting the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to communications, and in particular to a synchronization method, apparatus, device and storage medium. Background Art

[0002] The time synchronization network relies heavily on the Global Navigation Satellite System (GNSS) satellites, including time sources for timing (e.g., time servers), end application nodes of the synchronization network (e.g., base stations), etc. In the event that the GNSS satellite time signal source is lost or fails, the nodes based on its timing are timed through their respective frequency sources. For example, the time server is timed based on the internal atomic clock, etc., and the synchronization transmission node equipment and base stations can be timed based on the frequency source of the frequency synchronization network (also an atomic clock). However, the atomic clock has frequency accuracy errors, and time deviations occur between synchronization nodes after a period of time. At the same time, the time synchronization network adopts a master-slave time synchronization method that is transmitted downward step by step. One of the drawbacks of this method is that the upstream errors are transmitted downstream, which causes the performance of the communication network to deteriorate or even become unavailable. Summary of the invention

[0003] The embodiments of the present application provide a synchronization method, apparatus, device and storage medium, which realize synchronization between various synchronization nodes.

[0004] The present application provides a synchronization method, including:

[0005] Receive the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized;

[0006] The local time of each node to be synchronized is adjusted according to a preset weighted algorithm and the trusted synchronization information.

[0007] The embodiment of the present application provides a synchronization device, including:

[0008] A receiver configured to receive trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized;

[0009] The adjustment module is configured to adjust the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information.

[0010] An embodiment of the present application provides a device, including: a communication module, a memory, and one or more processors;

[0011] The communication module is configured to perform communication interaction between the first communication node and the second communication node;

[0012] The memory is configured to store one or more programs;

[0013] When the one or more programs are executed by the one or more processors, the one or more processors implement the method described in any of the above embodiments.

[0014] An embodiment of the present application provides a storage medium, wherein the storage medium stores a computer program, and when the computer program is executed by a processor, the method described in any of the above embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0015] Figure 1 is a flowchart of a synchronization method provided by an embodiment of the present application;

[0016] Figure 2 It is a schematic diagram of establishing a time source synchronization network in a direct connection scenario provided by an embodiment of the present application;

[0017] Figure 3 It is a schematic diagram of establishing a time source synchronization network in a cross-node scenario provided by an embodiment of the present application;

[0018] Figure 4 It is a schematic diagram of establishing a synchronous network of synchronous transmission nodes provided by an embodiment of the present application;

[0019] Figure 5 is a structural block diagram of a synchronization device provided in an embodiment of the present application;

[0020] Figure 6 It is a structural schematic diagram of a device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0021] The embodiments of the present application will be described below with reference to the accompanying drawings.

[0022] Synchronous network, one of the support systems for the operation of communication network, provides synchronization control signals for the clock (or carrier) of communication equipment in the communication network to synchronize their working speed. Synchronous network is one of the basic networks of communication network. It is the key to ensure the timing performance of network and thus ensure the smooth development of business. With the development and application of technologies such as Synchronous Digital Hierarchy (SDH), Asynchronous Transmission Mode (ATM), Code Division Multiple Access (CDMA), Internet Protocol (IP), Synchronous Ethernet, Precision Time Protocol (PTP), satellite timing, etc., various new services / applications (such as positioning, Internet of Things, industrial automation, etc.) have higher and higher requirements for synchronization, from 1.5 microseconds of 4G, 260 nanoseconds of 5G to 30 nanoseconds and 3 nanoseconds of positioning.

[0023] In order to meet different needs and applications, corresponding synchronization accuracy levels are formulated for synchronization equipment with different functions. For example, the PRTC-A (PRTC Class A) accuracy of the time source is 100ns, and the ePRTC accuracy is 30ns; the T-BC Class B accuracy of the synchronization transmission equipment is 70ns, the T-BC Class C accuracy is 30ns, and the T-BC Class D accuracy is 5ns.

[0024] The main time synchronization protocol between nodes is IEEE 1588 (2008) (PTP), which uses master-slave tracking for synchronization. The PTP messages commonly used for synchronization are announcement messages, synchronization messages, delay request messages, and delay reply messages: Announce messages are mainly used for BMCA calculations to determine the reference time source and PTP port status (Master / Slave / Passive); Sync messages and Delay_Req messages mainly exchange timestamp information to calculate the time difference between nodes. When the two-step method is used to calculate the time difference, a follow-up message (Follow_Up message) is also required.

[0025] In order to reduce the impact of GNSS satellites, the embodiment of the present application provides a synchronization method, which not only realizes the rapid synchronization of each synchronization node, but also avoids the defects of error transmission in the prior art. At the same time, the application of this solution to the time source can largely avoid the deterioration of synchronization network performance and unavailability caused by GNSS satellite problems.

[0026] In one embodiment, a synchronization method is provided to achieve synchronization between synchronization nodes. Figure 1 This is a flow chart of a synchronization method provided by an embodiment of the present application. Figure 1 As shown, this embodiment includes S110 - S120 .

[0027] S110: Receive trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized.

[0028] In an embodiment, the node to be synchronized and the synchronization node can be one of a time source node, a synchronization transmission node, and an end application node. The number of synchronization nodes is at least one. In an embodiment, the trusted synchronization information refers to the synchronization information of other synchronization nodes that the node to be synchronized can receive.

[0029] S120: Adjust the local time of each node to be synchronized according to a preset weighted algorithm and trusted synchronization information.

[0030] In an embodiment, each node to be synchronized receives trusted synchronization information from other synchronization nodes adjacent to it or across nodes, and performs weighted synchronization based on the information of the node to be synchronized itself and other received trusted synchronization information. After the node to be synchronized and other synchronization nodes perform weighted synchronization, a synchronization network is formed. Exemplarily, in the case where the node to be synchronized and the synchronization node are both time source nodes, a time source synchronization network is formed after the node to be synchronized and the synchronization node perform weighted synchronization. In an embodiment, each node to be synchronized combines its own synchronization information and the received trusted synchronization information, and adjusts the local time of the node to be synchronized according to a preset weighted algorithm, thereby achieving time synchronization between each synchronization node.

[0031] In an embodiment, in a direct connection scenario, all synchronization nodes corresponding to each node to be synchronized are adjacent nodes of the node to be synchronized; in a cross-node scenario, all synchronization nodes corresponding to each node to be synchronized can be adjacent nodes of the node to be synchronized, or non-adjacent nodes of the node to be synchronized.

[0032] In one embodiment, the synchronization node corresponding to the trusted synchronization information is included in the trusted master terminal list configured by the weighted slave terminal of the node to be synchronized; wherein the weighted master terminal in the trusted master terminal list is used to participate in the time-weighted calculation of the node to be synchronized; the trusted master terminal list includes at least one of the following: manually configuring a specific master terminal, setting a master terminal obtained by screening under trusted conditions.

[0033] In an embodiment, when the node to be synchronized receives trusted synchronization information from other synchronization nodes, it means that the attribute of the port at which the node to be synchronized receives the trusted synchronization information can be a weighted slave mode, or a weighted master and weighted slave mode, that is, the node to be synchronized can receive trusted synchronization information from other synchronization nodes (i.e., the opposite device). The weighted master terminal in the trusted master terminal list refers to other synchronization nodes that can participate in the time-weighted calculation of the node to be synchronized, that is, the weighted master terminal is used to send its own trusted synchronization information to the node to be synchronized (i.e., the opposite device). In an embodiment, the synchronization nodes included in the trusted master terminal list can be specific synchronization nodes configured manually, or can be synchronization nodes screened after setting trusted conditions.

[0034] In one embodiment, in the case of receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, it also includes: configuring a synchronization mechanism between each node to be synchronized and all corresponding synchronization nodes.

[0035] In one embodiment, configuring a synchronization mechanism of each node to be synchronized and all corresponding synchronization nodes includes: configuring each port attribute of each node to be synchronized and all corresponding synchronization nodes;

[0036] The port attributes include at least one of the following: weighted master mode, weighted slave mode, weighted master and weighted slave mode; the weighted master mode is that the node to be synchronized sends its own synchronization information to the opposite synchronization node; the weighted slave mode is that the node to be synchronized receives the trusted synchronization information of the opposite synchronization node and performs weighted calculation; the weighted master and weighted slave mode is to both receive the trusted synchronization information of the opposite synchronization node and send its own synchronization information to the opposite synchronization node.

[0037] In an embodiment, the synchronization mechanism refers to the confirmation of the attributes of each port of each synchronization node. Each node to be synchronized may include one or two ports in the direction of each corresponding synchronization node, and the attributes of the ports are determined in the case of exchanging trusted synchronization information. Exemplarily, the attributes of the port that sends the trusted synchronization information of a synchronization node and a corresponding synchronization node are weighted master mode, and the attributes of the port that receives the trusted synchronization information of the opposite node are weighted slave mode.

[0038] In one embodiment, before receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, it also includes: determining the port enable function of each node to be synchronized and all corresponding synchronization nodes. In an embodiment, after starting the port enable function of each node to be synchronized and all synchronization nodes, the node to be synchronized and the synchronization node can perform the operation of sending or receiving synchronization information.

[0039] In one embodiment, adjusting the local time of each node to be synchronized according to a preset weighted algorithm and trusted synchronization information includes: determining the time difference between each node to be synchronized and all synchronization nodes corresponding to the node to be synchronized; determining the time difference value of each node to be synchronized according to the preset weighted algorithm and the time difference; and adjusting the local time of the corresponding node to be synchronized according to the time difference value. In an embodiment, adjusting the local time of the corresponding node to be synchronized using the determined time difference value means that the time difference value corresponding to each node to be synchronized is different.

[0040] In one embodiment, when the local time of each node to be synchronized is adjusted using the PTP protocol, the method further includes: receiving PTP messages of all synchronization nodes corresponding to each node to be synchronized, 1 bit or 2 bits in the PTP message header are used as an indicator bit to indicate whether weighted synchronization is performed, and the 2-bit indicator bit is used to indicate whether BMCA is performed.

[0041] In an embodiment, when the synchronization method is applied to a direct connection scenario, 1 bit in the header of the PTP message is used as an indicator bit for indicating whether weighted synchronization is used. In one embodiment, when the synchronization method is applied to a cross-node scenario, 2 bits in the header of the PTP message are used for whether weighted synchronization is used and whether BMCA is performed. In an embodiment, when the PTP protocol is used to implement time synchronization of the nodes to be synchronized, the extended type-length-value (Type-Length-Value, TLV) carries synchronization accuracy information, and the PTP port attributes are configured as weighted master mode and weighted slave mode. Table 1 is a bit schematic table of a PTP general header provided in an embodiment of the present application. As shown in Table 1, a plurality of reserved bits are included in the PTP general header.

[0042] Table 1 A bit diagram of a PTP general header

[0043]

[0044] In an embodiment, the reserved bits of 1-2 bits in the PTP header may be used as an indicator bit for indicating whether weighted synchronization is used or whether BMCA is performed. Exemplarily, the indicator bit for indicating whether weighted synchronization is used or whether BMCA is performed may be: the 4th and 5th bits of the 2nd byte; the 1st and 2nd bits of the 5th byte; the reserved bits in the flagField; the 1st and 2nd bits of the 8th byte, etc. In a scenario where only synchronization nodes are directly connected, 1 bit is used to indicate whether weighted synchronization is used; the PTP header is a general header, and messages such as Announce, Sync, and Delay_Req are distinguished in the header "messageType".

[0045] Table 2 is a description comparison table of an indication bit of 1 bit provided in an embodiment of the present application. As shown in Table 2, when 1 bit is 0, it indicates a non-weighted synchronization mode and BMCA is executed; when 1 bit is 1, it indicates a weighted synchronization mode and BMCA is not executed. Table 3 is a description comparison table of an indication bit of 2 bits provided in an embodiment of the present application. As shown in Table 3, when 2 bits are 00, it indicates a non-weighted synchronization mode and BMCA is executed; when 2 bits are 01, it indicates a time source weighted mode and BMCA is not executed; when 2 bits are 10, it indicates a synchronization node weighted mode and BMCA is not executed.

[0046] Table 2 A description comparison table of a 1-bit indication bit

[0047] 1 Bit describe 0 Unweighted synchronous mode, performing BMCA 1 Weighted synchronization mode, without BMCA

[0048] Table 3 A description comparison table of a 2-bit indication bit

[0049]

[0050] After determining that PTP is used for weighted synchronization through the pre-configured indicator bit, the time difference between the two synchronization nodes is calculated in the same way as the existing PTP time difference. The PTP protocol is used to transmit synchronization accuracy information, and the Announce message is used to extend the TLV. The tlvType is "Weighting_Synchronization TLV", and the tlvType value can be any reserved value. Table 4 is a schematic table of an extended TLV provided in an embodiment of the present application. As shown in Table 4, tlvType, lengthField, synchronization accuracy value and synchronization accuracy level are all represented by 8 bits.

[0051] Table 4 Schematic diagram of an extended TLV

[0052]

[0053] In one embodiment, the local time of each node to be synchronized is adjusted according to a preset weighted algorithm and trusted synchronization information, including: calculating the time difference between each node to be synchronized and all synchronization nodes corresponding to itself based on synchronization messages and delay request messages between each node to be synchronized and all synchronization nodes corresponding to itself; determining the time difference value of each node to be synchronized according to the preset weighted algorithm and the time difference; and adjusting the local time of the node to be synchronized according to the time difference value.

[0054] In one embodiment, the time difference value of each node to be synchronized is determined according to a preset weighted algorithm and the time difference, including: determining the weight of each node to be synchronized and all corresponding synchronization nodes according to a preset weighted algorithm; all synchronization nodes include one of the following: all synchronization nodes corresponding to the trusted synchronization information, all synchronization nodes obtained by screening by a preset threshold; determining the time difference value of each node to be synchronized according to the time difference between each node to be synchronized and all corresponding synchronization nodes, and the weight.

[0055] In one embodiment, the node to be synchronized and the synchronization node each include one of the following: a time source node, a synchronization transmission node, and an end application node.

[0056] In one embodiment, the trusted synchronization information includes: synchronization accuracy information; the synchronization accuracy information includes at least one of the following: a synchronization accuracy value, a synchronization accuracy level.

[0057] In one embodiment, the preset weighting algorithm includes one of the following: an equal weighting algorithm, a grade weighting algorithm, a grade and equal weighting algorithm;

[0058] The equal-weighted weighting algorithm is to have the same weight for the node to be synchronized and all corresponding synchronization nodes; the level-weighted algorithm is to determine the weight according to the synchronization accuracy information of each synchronization node; the level- and equal-weighted weighting algorithm is to first sort the accuracy according to the synchronization accuracy information, and then calculate the weight of the highest accuracy according to the equal-weighted weighting algorithm; or, screen all synchronization nodes according to a preset threshold, and calculate the weight of the synchronization nodes that meet the preset threshold according to the preset weighting algorithm.

[0059] In one embodiment, when a grade weighted algorithm is adopted, the weight of each synchronization node includes: the ratio of the synchronization accuracy ranking of each synchronization node to the sum of the synchronization accuracy rankings of all synchronization nodes; or, the synchronization accuracy information is classified according to the grade, and a corresponding weight is set for each grade. In an embodiment, each synchronization node (including the node to be synchronized) can be divided into different grades according to the synchronization accuracy value or synchronization accuracy grade, for example, divided into four grades of A, B, C, and D, and then an application weight is set for each grade.

[0060] In one embodiment, the time difference value of each node to be synchronized is

[0061] Where T is the time required for each node to be synchronized to adjust; t 1 ~t n , is the time difference between each synchronization node and the node to be synchronized; w 1 ~w n is the weight of each synchronized node.

[0062] In one embodiment, the application scenarios of the synchronization method include one of the following: establishing a time source synchronization network; a relative synchronization network established when all time sources or frequency sources are lost or fail, and weighted synchronization is performed between the node to be synchronized and all adjacent synchronization nodes; a synchronization network that is not configured with a time source or frequency source.

[0063] In one implementation, Figure 2 This is a schematic diagram of establishing a time source synchronization network in a direct connection scenario provided by an embodiment of the present application. In the embodiment, the process of establishing a time source synchronization network is described by taking the node to be synchronized as a time source node (referred to as a time source for short) and the synchronization nodes corresponding to the node to be synchronized are also time source nodes as an example.

[0064] In the embodiment, the synchronization between time sources (time source synchronization network) will not affect the timing and synchronization mechanism of each time source and its synchronization network. The carrier device under each time source constitutes a network, and the clock sources constitute an independent network. It is just that through the time source synchronization network, the timing time output by each time source is no longer the time of a single time source, but the time after weighting by the time source synchronization network.

[0065] like Figure 2 As shown, time sources 1, 3, 4 and 6 are main time sources, and time sources 2 and 5 are backup time sources. Table 5 is a time source synchronization accuracy information table provided in an embodiment of the present application. As shown in Table 5, each time source corresponds to a time source number, a synchronization accuracy value and a synchronization accuracy level.

[0066] Table 5 A time source synchronization accuracy information table

[0067] Time source number Synchronization accuracy value (ns) Synchronization accuracy level 1 30 ePRTC 2 40 PRTC-B 3 30 ePRTC 4 30 ePRTC 5 100 PRTC-A 6 40 ePRTC

[0068] For example, take time source 2 as the node to be synchronized. Figure 2 As shown, the adjacent time sources of time source 2 are time sources 1, 3, 4 and 5, that is, all synchronization nodes corresponding to time source 2 are time sources 1, 3, 4 and 5.

[0069] The synchronization process of this embodiment is as follows:

[0070] Each port attribute of each synchronization node can be set to one of the following three modes: weighted master mode, weighted slave mode, and weighted master + weighted slave mode. Among them, the "weighted master + weighted slave" mode requires a physical port to support both master and slave modes.

[0071] For example, two ports of time source 2 in the direction of time source 1 are respectively set to "weighted master" mode and "weighted slave" mode, or one port is simultaneously set to "weighted master" and "weighted slave" modes. Time source 2 is also set in the same way in the direction of time sources 3, 4 and 5.

[0072] Time source 2 receives the synchronization accuracy information of the four adjacent time sources from the weighted slave ports in four directions, and sorts the synchronization accuracy according to the synchronization accuracy value and / or the synchronization accuracy level (including the synchronization information of time source 2 itself). Table 6 is a synchronization accuracy sorting table of all synchronization nodes corresponding to a node to be synchronized provided in an embodiment of the present application. As shown in Table 6, the lower the synchronization accuracy value, the higher the accuracy, and the higher the synchronization accuracy ranking. Among them, the synchronization accuracy level in this embodiment can also be considered as the time source type.

[0073] Table 6: Ranking table of synchronization accuracy of all synchronization nodes corresponding to a node to be synchronized

[0074] Time source number Synchronization accuracy value (ns) Synchronization accuracy level Synchronous precision sorting 1 30 ePRTC 3 2 40 PRTC-B 2 3 30 ePRTC 3 4 30 ePRTC 3 5 100 PRTC-A 1

[0075] In an embodiment, a preset threshold may be set, and time sources that meet the preset threshold requirements are included in the weighted calculation process. At the same time, only time sources that meet the preset threshold requirements are included in the accuracy level sorting / classification, thereby improving time synchronization accuracy.

[0076] Time source 2 performs synchronization weighted calculation based on its own time synchronization accuracy information and the received time synchronization accuracy information of the four adjacent time sources (as shown in Table 6).

[0077] In the embodiment, the following four preset weighting algorithms are used: an equal weighting algorithm, a level weighting algorithm, a level and equal weighting algorithm, and a preset threshold and level weighting algorithm to sort the synchronization nodes and the synchronization accuracy information of the synchronization nodes.

[0078] When the preset weighting algorithm is an equal weighting algorithm, the weight of each synchronization node is calculated. In the embodiment, time source 2 has 5 time synchronization accuracy information (including the time of time source 2 itself), 1 / 5=20%; that is, no matter what the time accuracy of the time source is, the calculated weight is the same. Table 7 is a schematic table of the weights of each synchronization node obtained by an equal weighting algorithm provided in an embodiment of the present application. As shown in Table 7, the weights of the node to be synchronized (time source 2) and the corresponding all synchronization nodes (time sources 1, 3, 4 and 5) are the same.

[0079] Table 7 Schematic diagram of the weight of each synchronization node obtained by an equal weighted algorithm

[0080] Time source number Synchronization accuracy value (ns) Synchronization accuracy level Accuracy level sorting Weight 1 30 ePRTC 3 20% 2 40 PRTC-B 2 20% 3 30 ePRTC 3 20% 4 30 ePRTC 3 20% 5 100 PRTC-A 1 20%

[0081] When the preset weighting algorithm is a level weighting algorithm, the weight of each synchronization node is calculated. The synchronization accuracy information of the synchronization node is divided into several categories according to the level, for example, A, B, C, D, E. Each level is assigned or set a weight, for example, A-5, B-4, C-3, D-2, E-1.

[0082] In an embodiment, Table 8 is a schematic table of the weights of each synchronization node obtained by a hierarchical weighted algorithm provided in an embodiment of the present application. Time source 2 calculates the weight based on the sorting number: 1 / (3+2+3+3+1)=8.33% (i.e., the weight of 1 is 8.33%), and the weights of the node to be synchronized and each synchronization node are shown in Table 8.

[0083] Table 8 Schematic diagram of the weight of each synchronization node obtained by a level weighted algorithm

[0084] Time source number Synchronization accuracy value (ns) Synchronization accuracy level Accuracy level sorting Weight 1 30 ePRTC 3 3*8.33%=25% 2 40 PRTC-B 2 2*8.33%=16.67% 3 30 ePRTC 3 3*8.33%=25% 4 30 ePRTC 3 3*8.33%=25% 5 100 PRTC-A 1 1*8.33%=8.33%

[0085] When the preset weighting algorithm is the level and equal weighting algorithm, the weight of each synchronization node is calculated. First, the synchronization node with the highest level is selected according to the synchronization accuracy level, and then the equal weighting algorithm is performed on the synchronization node with the highest level. If all levels are equal, the equal weighting algorithm is used to calculate the corresponding weight.

[0086] In the embodiment, among the trusted synchronization accuracy information received by time source 2, the highest levels are time sources 1, 3 and 5. Since the synchronization accuracy level of time source 2 itself is not the highest, it is not included in the weight calculation. Table 9 is a schematic table of the weights of each synchronization node obtained by a level and an equal weighted algorithm provided in an embodiment of the present application. As shown in Table 9, the synchronization nodes with the highest accuracy level are time source 1, time source 3 and time source 4. The weights of these three time sources are calculated according to the equal weighted algorithm, and the weight of each time source is 33.33%.

[0087] Table 9 Schematic diagram of the weight of each synchronization node obtained by a level and equal weighting algorithm

[0088] Time source number Synchronization accuracy value (ns) Synchronization accuracy level Accuracy level sorting Weight 1 30 ePRTC 1 33.33% 2 40 PRTC-B 3 30 ePRTC 1 33.33% 4 30 ePRTC 1 33.33% 5 100 PRTC-A

[0089] When the preset weighted algorithm is a preset threshold and a level weighted algorithm, the weight of each synchronization node is calculated. In the embodiment, the level weighted algorithm plus the preset threshold is taken as an example, and other algorithms can also add thresholds, which will not be described one by one here.

[0090] In an embodiment, first, the synchronization nodes to be synchronized and the synchronization accuracy value of each synchronization node are screened according to a preset threshold, and then the synchronization nodes whose synchronization accuracy values ​​meet the preset threshold are included in the synchronization weight calculation. Exemplarily, assuming that the preset threshold is 70ns, that is, the time source with a synchronization accuracy value exceeding 70ns (or an accuracy ranking lower than ranking 2) cannot be included in the synchronization weight, that is, time source 5 is not included in the synchronization weight calculation, and is not included in the accuracy level ranking. Time source 2 directly calculates the weight based on the ranking number: 1 / (2+1+2+2)=14.28% (that is, the weight of 1 is 14.28%). Table 10 is a schematic table of the weights of each synchronization node obtained by a preset threshold and a level weighted algorithm provided in an embodiment of the present application. The weight of each synchronization node that meets the preset threshold is shown in Table 10.

[0091] Table 10 Schematic diagram of the weight of each synchronization node obtained by a preset threshold and level weighting algorithm

[0092] Time source number Synchronization accuracy value (ns) Synchronization accuracy level Accuracy level sorting Weight 1 30 ePRTC 2 2*14.28%=28.57% 2 40 PRTC-B 1 1*14.28%=14.29% 3 30 ePRTC 2 2*14.28%=28.57% 4 30 ePRTC 2 2*14.28%=28.57% 5 100 PRTC-A

[0093] In the embodiment, the time source 2 calculates the time difference value T that needs to be adjusted according to the following formula:

[0094]

[0095] Where T is the time that time source 2 needs to adjust; t i , is the time difference between time source 2 and other time sources included in the weight calculation, except time source 2 (because the time difference between time source 2 and itself is 0);

[0096] w i , is the weight of the other time sources participating in the weight calculation except time source 2 (because the time difference between time source 2 and itself is 0), and is the weight calculated according to the above preset weighting algorithm.

[0097] In an embodiment, each time source adjusts its own local time according to the above-mentioned preset weighted algorithm, so that the time of each time source gradually approaches each other and finally reaches the same time, thereby achieving time synchronization between each time source and forming a time source synchronization network.

[0098] In one implementation, Figure 3 This is a schematic diagram of establishing a time source synchronization network in a cross-node scenario provided by an embodiment of the present application. In the embodiment, the node to be synchronized is a time source node, and the synchronization node corresponding to the node to be synchronized is also a time source node as an example to illustrate the process of establishing a time source synchronization network in a cross-node scenario.

[0099] In an embodiment, in a scenario where there are synchronization transmission nodes across adjacent time sources, the synchronization accuracy value of the synchronization transmission node and the path synchronization accuracy value are added to the synchronization accuracy value of the interaction between the time sources to represent a more accurate accuracy value. For the sake of concise description, this embodiment only takes the synchronization accuracy value of the synchronization transmission node as an example. In an embodiment, weighted synchronization is achieved using the PTP protocol. Table 11 is a schematic table of synchronization accuracy values ​​of a time source node provided in an embodiment of the present application. Table 12 is a schematic table of synchronization accuracy values ​​of a synchronization transmission node provided in real time by the present application. As shown in Tables 11 and 12, this embodiment takes 6 time sources and 3 synchronization transmission nodes as an example to illustrate the process of establishing a time source synchronization network.

[0100] Table 11 Synchronization accuracy values ​​of a time source node

[0101] Time source number Synchronization accuracy value (ns) 1 30 2 40 3 30 4 30 5 100 6 40

[0102] Table 12 Synchronization accuracy value of a synchronous transmission node

[0103] Time transfer node number Synchronization accuracy value (ns) B1 5 B2 5 B3 30

[0104] Time source 2 sends PTP messages to and from time sources 1, 3, 4, and 5, and the message sending and processing are the same. For example, this embodiment is described by taking time source 2 as an example. The adjacent time sources of time source 2 are time sources 1, 3, 4, and 5. Among them, time source 2 passes through two synchronization transmission nodes B1 and B2 with time source 3, and passes through the B3 synchronization transmission node with time source 4.

[0105] The synchronization process of this embodiment is as follows:

[0106] For example, the two ports of time source 2 in the direction of time source 1 are respectively set to "weighted master" mode and "weighted slave" mode. The same settings are also applied to the directions of time sources 3, 4 and 5.

[0107] Time source 2 receives the corresponding synchronization accuracy information from these four adjacent time sources. In the actual communication process, time source 2 passes through two synchronization transmission nodes B1 and B2 with time source 3, and passes through B3 synchronization transmission node with time source 4. The synchronization accuracy values ​​in these two directions are increased by the synchronization accuracy value introduced by the synchronization transmission node.

[0108] In the embodiment, time source 2 is a weighted slave and time source 1 is a weighted master: time source 2 receives the PTPAnnounce message from time source 1, and the 2-bit indicator in the Announce message header is 01 (as shown in Table 3). Table 13 is an extended TLV schematic table of an Announce message provided in an embodiment of the present application.

[0109] Table 13 Schematic diagram of an extended TLV of an Announce message

[0110]

[0111] Time source 2 and time source 1 exchange Sync messages and Delay_Req messages (the 2 bits in the header are both 01) to calculate the time difference between time source 2 and time source 1. This time difference is calculated according to the weight obtained by the above preset weighting algorithm and is included in the time that time source 2 needs to adjust.

[0112] Likewise, the interaction between the weighted slave end of time source 2 and the weighted master end of time source 5 is the same as the interaction between time source 2 and time source 1 described above.

[0113] The weighted slave of time source 2 and the weighted master of time source 4: B3 receives the PTPAnnounce message sent by time source 4 to time source 2, and the 2-bit indicator in the header of the Announce message is 01 (described in Table 3).

[0114] Table 14 is a schematic table of another extended TLV of an Announce message provided in an embodiment of the present application. As shown in Table 14, the extended TLV of the Announce message is as follows.

[0115] Table 14: Schematic diagram of another extended TLV of Announce message

[0116]

[0117] Because B3 is not a time source, it only adds its own synchronization accuracy value to the message and then sends it downstream. At this time, the 2-bit indicator bit in the Announce message header is still 01, and the Announce message extended TLV is changed to that shown in Table 15. Table 15 is a schematic table of the extended TLV of another Announce message provided in an embodiment of the present application. Table 15 is the TLV sent by the synchronization transmission node B3 to the source 2. As shown in Table 15, the synchronization accuracy value is 60ns, which is the sum of the synchronization accuracy value of B3 and the synchronization accuracy value of the time source 4, that is, 30ns+30ns=60ns.

[0118] Table 15: Schematic diagram of another extended TLV of Announce message

[0119]

[0120] Time source 2 receives the PTP Announce message from time source 4, and the 2-bit indicator in the Announce message header is 01. Table 16 is a schematic table of the extended TLV of another Announce message provided in the embodiment of the application, and Table 16 is the TLV received by time source 2. As shown in Table 16, the synchronization accuracy value received by time source 2 is the sum of the synchronization accuracy value of B3 and the synchronization accuracy value of time source 4, that is, 60ns.

[0121] Table 16: Schematic diagram of another extended TLV of Announce message

[0122]

[0123] Time source 2 and time source 4 exchange Sync messages and Delay_Req messages (the 2 bits in the header are both 01) to calculate the time difference between time source 2 and time source 4. This time difference is calculated into the time that time source 2 needs to adjust according to the weight obtained by the unified weighting algorithm.

[0124] The interaction between the weighted slave end of time source 2 and the weighted master end of time source 3 is the same as the interaction between the above-mentioned time source 2 and time source 4. For example, assuming that the synchronization accuracy value of the synchronization transmission nodes B1 and B2 is 5ns, the synchronization accuracy value of time source 3 received by time source 2 is the sum of the synchronization accuracy values ​​of the three nodes, time source 3, B1 and B2, that is, 10ns (5ns+5ns) is added to the synchronization accuracy value of time source 3.

[0125] Time source 2 receives the time synchronization accuracy information of the four adjacent time sources from the weighted slave ports in four directions, and sorts the accuracy levels according to the synchronization accuracy values ​​(including the synchronization information of time source 2 itself). Table 17 is a synchronization accuracy sorting table of all synchronization nodes corresponding to another synchronization node provided in an embodiment of the present application, and the synchronization accuracy sorting of the five time sources is shown in Table 17.

[0126] Table 17 Synchronization accuracy ranking table of all synchronization nodes corresponding to another synchronization node

[0127] Time source number Synchronization accuracy value (ns) Synchronous precision sorting 1 30 4 2 40 3 3 40(30+5+5) 3 4 60(30+30) 2 5 100 1

[0128] Similarly, time source 2 performs synchronization weighted calculation based on its own time synchronization accuracy information and the time synchronization accuracy information received from four adjacent time sources (as shown in Table 17).

[0129] In this embodiment, the level weighted algorithm is used as an example. Time source 2 directly calculates the weight based on the sequence number: 1 / (4+3+3+2+1)=7.69% (ie, the weight of 1 is 7.69%), and the weights of the node to be synchronized and the corresponding synchronization nodes are shown in Table 18.

[0130] Table 18 Schematic diagram of the weight of each synchronization node obtained by another level weighted algorithm

[0131] Time source number Synchronization accuracy value (ns) Synchronous precision sorting Weight 1 30 4 4*7.69%=30.77% 2 40 3 3*7.69%=23.08% 3 30+5+5=40 3 3*7.69%=23.08% 4 30+30=60 2 2*7.69%=15.38% 5 100 1 1*7.69%=7.69%

[0132] Finally, time source 2 calculates the time difference value T that needs to be adjusted according to the following formula:

[0133]

[0134] Wherein, T is the time that time source 2 needs to be adjusted;

[0135] t 1 ~t 4 , are the time differences between time sources 1, 3, 4, 5 and time source 2 respectively;

[0136] w 1 ~w 4 , which are the weights of time sources 1, 3, 4, and 5, which are 30.77%, 23.08%, 15.38%, and 7.69% respectively.

[0137] In an embodiment, each time source adjusts its own local time according to the above-mentioned preset weighted algorithm, so that the time of each time source gradually approaches each other and finally reaches the same time, thereby achieving time synchronization between each time source and forming a time source synchronization network.

[0138] In one implementation, Figure 4 FIG. 1 is a schematic diagram of establishing a synchronous transmission node synchronization network provided by an embodiment of the present application. Figure 4 As shown, a synchronous transmission node synchronization network is established using adjacent synchronous transmission nodes.

[0139] This embodiment is applicable to, including but not limited to, the following synchronization scenarios: when all time sources are lost or fail, a relative synchronization network is established by weighted synchronization between a synchronization node and all adjacent synchronization nodes; and when a synchronization network is established in a network without a time source. Table 19 is a synchronization accuracy information table of a synchronization transmission node provided in an embodiment of the present application, and the synchronization accuracy level of each synchronization transmission node is shown in Table 19.

[0140] Table 19 Synchronization accuracy information table of a synchronous transmission node

[0141] Time transfer node number Synchronization accuracy level B1 T-BC Class D B2 T-BC Class C B3 T-BC Class D B4 T-BC Class B

[0142] Take the synchronous transmission node B2 as an example. Figure 4 As shown, the adjacent synchronous transmission nodes of B2 are B1 and B3.

[0143] The synchronization process in this embodiment is as follows:

[0144] One physical port of B2 in the direction of B1 is in both "weighted master" mode and "weighted slave" mode. The same setting is applied in the direction of B3.

[0145] B2 weighted slave and B1 weighted master: B2 receives the PTP Announce message from B1, and the 1-bit indicator in the Announce message header is 1 (described in Table 3). Table 20 is a schematic table of extended TLVs of an Announce message provided in an embodiment of the present application.

[0146] Table 20: Schematic diagram of an extended TLV of an Announce message

[0147]

[0148] B2 and B1 exchange Sync messages and Delay_Req messages (the 1-bit indicator bit in the header is all 1) to calculate the time difference between B2 and B1. This time difference is calculated according to the weight obtained by the unified weighting algorithm and is included in the time that B2 needs to adjust.

[0149] The interaction of the B2 weighted slave with the B3 weighted master is the same as the interaction between B2 and B1 described above.

[0150] B2 receives the corresponding time synchronization accuracy information from the two adjacent synchronization transmission nodes, and sorts the accuracy levels according to the synchronization accuracy value and / or the time synchronization accuracy level (including B2's own synchronization information). Table 21 is a synchronization accuracy sorting table of synchronization transmission nodes provided in an embodiment of the present application. As shown in Table 21, B1 and B3 have the highest synchronization accuracy levels.

[0151] Table 21: Ranking table of synchronization accuracy of a synchronous transmission node

[0152] Time transfer node number Synchronization accuracy level Synchronous precision sorting 1 T-BC Class D 2 2 T-BC Class C 1 3 T-BC Class D 2

[0153] B2 combines its own synchronization accuracy information and the received synchronization accuracy information of two adjacent synchronization transmission nodes (as shown in Table 21) to perform synchronization weighted calculation. This embodiment takes the level and weighted weighting algorithm as an example. First, the highest level is selected according to the synchronization accuracy level, and then the weighted algorithm is performed.

[0154] In the embodiment, among the trusted synchronization accuracy information received by B2, the highest levels are B1 and B3. That is, the synchronization accuracy level of B2 itself is not the highest and is not included in the weight calculation. Table 22 is a synchronization accuracy information table of a synchronization transmission node included in the weight calculation provided in the embodiment of the present application. As shown in Table 22, if the synchronization accuracy level of B2 itself is not the highest, it is not included in the weight calculation.

[0155] Table 22 Synchronization accuracy information table of a synchronization transmission node included in weight calculation

[0156] Time transfer node number Synchronization accuracy level Synchronous precision sorting Weight 1 T-BC Class D 1 50% 2 T-BC Class C 3 T-BC Class D 1 50%

[0157] Finally, B2 will calculate the adjusted time difference value T according to the following formula:

[0158]

[0159] Where T is the time required for synchronization transmission node B2 to adjust; t i , is the time difference between B2 and other synchronous transmission nodes included in the weight calculation, except B2 (because the time difference between B2 and itself is 0); w i , is the weight of the other synchronous transmission nodes participating in the weight calculation except B2 (because the time difference between B2 and itself is 0), and the weight is calculated according to the above-mentioned preset weighting algorithm.

[0160] In an embodiment, each synchronous transmission node adjusts its own local time according to a predetermined preset weighted algorithm, so that the time of each synchronous transmission node gradually approaches each other and eventually reaches the same time, thereby achieving time synchronization between each synchronous transmission node and forming a synchronous network of synchronous transmission nodes.

[0161] Figure 5 is a structural block diagram of a synchronization device provided in an embodiment of the present application. Figure 5 As shown, the synchronization device in this embodiment includes: a receiver 210 and an adjustment module 220 .

[0162] The receiver 210 is configured to receive the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized;

[0163] The adjustment module 220 is configured to adjust the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information.

[0164] The synchronization device provided in this embodiment is configured to implement Figure 1 The synchronization method of the illustrated embodiment and the synchronization device provided in this embodiment are similar in implementation principle and technical effect, and will not be described in detail here.

[0165] In one embodiment, the synchronization node corresponding to the trusted synchronization information is included in the trusted master terminal list configured by the weighted slave terminal of the node to be synchronized; wherein the weighted master terminal in the trusted master terminal list is used to participate in the time-weighted calculation of the node to be synchronized; the trusted master terminal list includes at least one of the following: manually configuring a specific master terminal, setting a master terminal obtained by screening under trusted conditions.

[0166] In one embodiment, in the case of receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, it also includes: configuring a synchronization mechanism between each node to be synchronized and all corresponding synchronization nodes.

[0167] In one embodiment, configuring a synchronization mechanism for each node to be synchronized and corresponding all synchronization nodes includes:

[0168] Configure each port attribute of each node to be synchronized and all corresponding synchronization nodes;

[0169] The port attributes include at least one of the following: weighted master mode, weighted slave mode, weighted master and weighted slave mode; the weighted master mode is that the node to be synchronized sends its own synchronization information to the opposite synchronization node; the weighted slave mode is that the node to be synchronized receives the trusted synchronization information of the opposite synchronization node and performs weighted calculation; the weighted master and weighted slave mode is to both receive the trusted synchronization information of the opposite synchronization node and send its own synchronization information to the opposite synchronization node.

[0170] In one embodiment, before receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, the method further includes:

[0171] Determine the port enabling function of each node to be synchronized and all corresponding synchronization nodes.

[0172] In one embodiment, adjusting the local time of each node to be synchronized according to a preset weighted algorithm and trusted synchronization information includes:

[0173] Determine the time difference between each node to be synchronized and all synchronization nodes corresponding to the node to be synchronized;

[0174] Determine the time difference value of each of the nodes to be synchronized according to a preset weighted algorithm and the time difference;

[0175] Adjust the local time of the corresponding node to be synchronized according to the time difference value.

[0176] In one embodiment, when the local time of each node to be synchronized is adjusted using the precise clock synchronization protocol PTP protocol, the synchronization method further includes:

[0177] The PTP messages of all synchronization nodes corresponding to each node to be synchronized are received, and 1 bit or 2 bits in the PTP message header are used as an indicator bit to indicate whether weighted synchronization is performed, and the 2-bit indicator bit is used to indicate whether BMCA is performed.

[0178] In one embodiment, adjusting the local time of each node to be synchronized according to a preset weighted algorithm and trusted synchronization information includes:

[0179] According to the synchronization messages and delay request messages between each node to be synchronized and all the synchronization nodes corresponding to itself, the time difference between each node to be synchronized and all the synchronization nodes corresponding to itself is calculated;

[0180] Determine the time difference value of each node to be synchronized according to the preset weighted algorithm and the time difference;

[0181] Adjust the local time of the node to be synchronized according to the time difference value.

[0182] In one embodiment, determining the time difference value of each node to be synchronized according to a preset weighted algorithm and the time difference includes:

[0183] Determine the weight of each node to be synchronized and all corresponding synchronization nodes according to a preset weighting algorithm; all synchronization nodes include one of the following: all synchronization nodes corresponding to the trusted synchronization information, all synchronization nodes obtained by screening by a preset threshold;

[0184] The time difference value of each node to be synchronized is determined according to the time difference between each node to be synchronized and all corresponding synchronization nodes, and the weight.

[0185] In one embodiment, the node to be synchronized and the synchronization node each include one of the following: a time source node, a synchronization transmission node, and an end application node.

[0186] In one embodiment, the trusted synchronization information includes: synchronization accuracy information;

[0187] The synchronization accuracy information includes at least one of the following: a synchronization accuracy value and a synchronization accuracy level.

[0188] In one embodiment, the preset weighting algorithm includes one of the following: an equal weighting algorithm, a grade weighting algorithm, a grade and equal weighting algorithm;

[0189] The equal weighted algorithm is that the weights of the node to be synchronized and all corresponding synchronization nodes are the same; the level weighted algorithm is to determine the weight according to the synchronization accuracy information of each synchronization node; the level and equal weighted algorithm is to first sort the accuracy according to the synchronization accuracy information, and then calculate the weight of the highest accuracy according to the equal weighted algorithm;

[0190] Alternatively, all synchronization nodes are screened according to a preset threshold, and the weights of the synchronization nodes that meet the preset threshold are calculated according to a preset weighting algorithm.

[0191] In one embodiment, when a level-weighted algorithm is adopted, the weight of each synchronization node includes: the ratio of the synchronization accuracy ranking of each synchronization node to the sum of the synchronization accuracy rankings of all synchronization nodes; or, the synchronization accuracy information is classified according to the level, and a corresponding weight is set for each level.

[0192] In one embodiment, the time difference value of each node to be synchronized is

[0193] Where T is the time required for each node to be synchronized to adjust; t 1 ~t n , is the time difference between each synchronization node and the node to be synchronized; w 1 ~w n is the weight of each synchronized node.

[0194] In one embodiment, the application scenarios of the synchronization method include one of the following: establishing a time source synchronization network; a relative synchronization network established when all time sources or frequency sources are lost or fail, and weighted synchronization is performed between the node to be synchronized and all adjacent synchronization nodes; a synchronization network that is not configured with a time source or frequency source.

[0195] Figure 6 Schematic diagram of a device provided in an embodiment of the present application. Figure 6 As shown, the device provided by the present application includes: a processor 310, a memory 320 and a communication module 330. The number of processors 310 in the device can be one or more. Figure 6 In the example, a processor 310 is used. The number of memories 320 in the terminal device may be one or more. Figure 6 A memory 320 is taken as an example. The processor 310, the memory 320 and the communication module 330 of the terminal device can be connected via a bus or other means. Figure 6 In the embodiment, the device is a time source (ie, a time server) for timing, or a terminal application (such as a base station) of a synchronization network.

[0196] The memory 320, as a computer-readable storage medium, may be configured to store software programs, computer executable programs, and modules, such as program instructions / modules corresponding to the device of any embodiment of the present application (e.g., a receiver and an adjustment module in a synchronization device). The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the device, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 320 may further include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0197] The communication module 330 is configured to communicate and interact with other synchronization nodes.

[0198] The device provided above can be configured to execute the synchronization method provided in any of the above embodiments, and has corresponding functions and effects.

[0199] An embodiment of the present application also provides a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute a synchronization method, the method comprising: receiving trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized; and adjusting the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information.

[0200] It will be appreciated by those skilled in the art that various embodiments of the present application may be implemented in hardware or dedicated circuits, software, logic, or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the present application is not limited thereto.

[0201] Embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example in a processor entity, or by hardware, or by a combination of software and hardware. The computer program instructions may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages.

[0202] The block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules and functions, or may represent a combination of program steps and logic circuits, modules and functions. A computer program may be stored on a memory. The memory may have any type suitable for the local technical environment and may be implemented using any suitable data storage technology, such as but not limited to read-only memory (ROM), random access memory (RAM), optical memory devices and systems (digital versatile discs (DVD) or compact disks (CD)), etc. Computer-readable media may include non-transient storage media. A data processor may be any type suitable for the local technical environment, such as but not limited to a general-purpose computer, a special-purpose computer, a microprocessor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FGPAs) and a processor based on a multi-core processor architecture.

[0203] The above description is only the preferred embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A synchronization method, characterized in that: include: Receive the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized; Adjusting the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information; Wherein, the node to be synchronized and the synchronization node each include one of the following: a time source node, a synchronization transmission node, and an end application node; the number of the synchronization node is at least one; The synchronization node corresponding to the trusted synchronization information is included in the trusted master terminal list configured by the weighted slave terminal of the node to be synchronized; wherein, the weighted master terminal in the trusted master terminal list is used to participate in the time-weighted calculation of the node to be synchronized; the trusted master terminal list includes at least one of the following: manually configuring a specific master terminal, setting a master terminal obtained by screening under trusted conditions.

2. The method according to claim 1, characterized in that In the case of receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, the method further includes: Configure the synchronization mechanism for each node to be synchronized and all corresponding synchronization nodes.

3. The method according to claim 2, characterized in that The configuration of the synchronization mechanism of each node to be synchronized and all corresponding synchronization nodes includes: Configure each port attribute of each node to be synchronized and all corresponding synchronization nodes; The port attributes include at least one of the following: weighted master mode, weighted slave mode, weighted master and weighted slave mode; the weighted master mode is that the node to be synchronized sends its own synchronization information to the opposite synchronization node; the weighted slave mode is that the node to be synchronized receives the trusted synchronization information of the opposite synchronization node and performs weighted calculation; the weighted master and weighted slave mode is that both the trusted synchronization information of the opposite synchronization node is received and the synchronization information of the same is sent to the opposite synchronization node.

4. The method according to claim 1, characterized in that: Before receiving the trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized, the method further includes: Determine the port enabling function of each node to be synchronized and all corresponding synchronization nodes.

5. The method according to claim 1, characterized in that The adjusting the local time of each node to be synchronized according to the preset weighted algorithm and the trusted synchronization information includes: Determine the time difference between each node to be synchronized and all synchronization nodes corresponding to the node to be synchronized; Determine the time difference value of each of the nodes to be synchronized according to a preset weighted algorithm and the time difference; The local time of the corresponding node to be synchronized is adjusted according to the time difference value.

6. The method according to claim 1, characterized in that In the case where the local time of each node to be synchronized is adjusted using the precise clock synchronization protocol PTP protocol, the method further includes: The PTP messages of all synchronization nodes corresponding to each node to be synchronized are received, wherein 1 bit or 2 bits in the header of the PTP message are used as an indicator bit to indicate whether weighted synchronization is performed, and the 2-bit indicator bit is used to indicate whether BMCA is performed.

7. The method according to claim 6, characterized in that The adjusting the local time of each node to be synchronized according to the preset weighted algorithm and the trusted synchronization information includes: According to the synchronization messages and delay request messages between each node to be synchronized and all the synchronization nodes corresponding to itself, the time difference between each node to be synchronized and all the synchronization nodes corresponding to itself is calculated; Determine the time difference value of each of the nodes to be synchronized according to a preset weighted algorithm and the time difference; The local time of the node to be synchronized is adjusted according to the time difference value.

8. The method according to claim 7, characterized in that Determining the time difference value of each node to be synchronized according to a preset weighted algorithm and the time difference includes: Determine the weight of each of the nodes to be synchronized and all corresponding synchronization nodes according to a preset weighting algorithm; the all synchronization nodes include at least one of the following: all synchronization nodes corresponding to the trusted synchronization information, and all synchronization nodes obtained by screening by a preset threshold; The time difference value of each node to be synchronized is determined according to the time difference between each node to be synchronized and all corresponding synchronization nodes, and the weight.

9. The method according to any one of claims 1 to 8, characterized in that: The trusted synchronization information includes: synchronization accuracy information; The synchronization accuracy information includes at least one of the following: a synchronization accuracy value and a synchronization accuracy level.

10. The method according to any one of claims 1 to 8, characterized in that: The preset weighting algorithm includes one of the following: an equal weighting algorithm, a grade weighting algorithm, a grade and equal weighting algorithm; The equal weighted algorithm is that the weights of the node to be synchronized and all corresponding synchronization nodes are the same; the level weighted algorithm is to determine the weight according to the synchronization accuracy information of each synchronization node; the level and equal weighted algorithm is to first sort the accuracy according to the synchronization accuracy information, and then calculate the weight of the highest accuracy according to the equal weighted algorithm; Alternatively, all synchronization nodes are screened according to a preset threshold, and the weights of the synchronization nodes that meet the preset threshold are calculated according to the preset weighting algorithm.

11. The method according to claim 10, characterized in that In the case of adopting the grade weighted algorithm, the weight of each synchronization node includes: the ratio of the synchronization accuracy ranking of each synchronization node to the sum of the synchronization accuracy rankings of all synchronization nodes; Alternatively, the synchronization accuracy information is classified according to levels, and a corresponding weight is set for each level.

12. The method according to claim 5, 7 or 8, characterized in that The time difference of each node to be synchronized is , Wherein, T is the time required for each node to be synchronized to adjust; t1~t n , is the time difference between each synchronization node and the node to be synchronized; w1~w n is the weight of each synchronized node.

13. The method according to any one of claims 1 to 8, characterized in that: The application scenarios of the synchronization method include one of the following: establishing a time source synchronization network; a relative synchronization network established when all time sources or frequency sources are lost or fail, and the node to be synchronized performs weighted synchronization with all adjacent synchronization nodes; a synchronization network that is not configured with a time source or frequency source.

14. A synchronization device, characterized in that: include: A receiver configured to receive trusted synchronization information of all synchronization nodes corresponding to each node to be synchronized; An adjustment module, configured to adjust the local time of each node to be synchronized according to a preset weighted algorithm and the trusted synchronization information; Wherein, the node to be synchronized and the synchronization node each include one of the following: a time source node, a synchronization transmission node, and an end application node; the number of the synchronization node is at least one; The synchronization node corresponding to the trusted synchronization information is included in the trusted master terminal list configured by the weighted slave terminal of the node to be synchronized; wherein, the weighted master terminal in the trusted master terminal list is used to participate in the time-weighted calculation of the node to be synchronized; the trusted master terminal list includes at least one of the following: manually configuring a specific master terminal, setting a master terminal obtained by screening under trusted conditions.

15. A communication device, characterized in that: include: A communication module, a memory, and one or more processors; The communication module is configured to communicate and interact with other synchronization nodes; The memory is configured to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 13.

16. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 13 is implemented.

Citation Information

Patent Citations

  • Time quasi-synchronization method for centerless distributed network

    CN109982425A