Clock main and standby synchronization path selection method and device based on node decision
Through the clock main and standby synchronization path selection method based on node decision-making, the problem that the clock synchronization path cannot be automatically synchronized in the existing technology is solved, and dynamic path decision after network topology changes is realized, configuration efficiency and reliability are improved, and adaptable 5G network scale demand.
Patent Information
- Application Number
- CN202411062185.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-05
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2044-08-05
AI Technical Summary
The existing technology cannot automatically synchronize the clock synchronization path, resulting in the clock synchronization path being unable to automatically synchronize when the network topology changes dynamically. The configuration efficiency is low and error-prone, and it cannot meet the needs of 5G scale applications.
Using the clock main and standby synchronization path selection method based on node decision-making, the synchronization information is periodically sent, and the synchronization information set is updated and forwarded. The node generates the clock main and standby synchronization path based on the port-related information to realize dynamic path decisions without obtaining network topology information in advance. .
It realizes automatic decision-making of the main and backup synchronization path after the network topology changes, adapts to network topology changes, improves configuration efficiency, reduces manual intervention, and enhances the dynamic planning capabilities of the synchronization network.
Smart Images

Figure CN119030652A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of clock synchronization, and in particular to a method and device for selecting a clock master-slave synchronization path based on node decision. Background Art
[0002] High-precision synchronization is one of the three major performance indicators of the 5G bearer network. As a key component of the 5G bearer network, the synchronization network is an indispensable basic support network. In addition to supporting the synchronization requirements of 5G basic services and meeting the high-precision synchronization requirements of collaborative services, synchronization also needs to provide synchronization support for voice core networks, OTN / SDH networks, IT support systems, etc. More new application requirements have also emerged in terms of delay measurement, service delay control, and service monitoring.
[0003] The synchronization network can be divided into two levels: time synchronization network and frequency synchronization network. In practical applications, most of them are based on the physical layer frequency synchronization network to support the operation of the PTP time synchronization network. The frequency synchronization network achieves synchronization based on point-by-point tracking of the physical layer frequency and relies on SSM to transmit quality information to achieve path switching.
[0004] The frequency network and the time network need to select synchronization paths separately. The time synchronization network relies on the BMC algorithm to implement synchronization path selection, while the frequency synchronization network needs to select the primary and backup synchronization paths at the same time to meet the clock performance requirements when switching paths. The single path selection strategy adopted by the time synchronization network is not applicable to the frequency synchronization network. Due to the lack of automatic planning methods for primary and backup synchronization paths, it is often necessary to manually select and configure the primary and backup paths in engineering. On the one hand, professional support is required, and on the other hand, as the network scale expands, the network topology becomes complex, the configuration efficiency is low, and it is easy to make mistakes, which cannot meet the needs of 5G large-scale applications.
[0005] Auxiliary planning based on the control plane cannot achieve real-time dynamic planning because it needs to obtain network topology information in advance. It has poor support for synchronous network protection and recovery scenarios. In addition, it is complex to deploy, the configuration data is not reliable, and it is difficult to apply in practice.
[0006] In view of this, how to overcome the defects of the prior art and solve the problem that the clock synchronization path cannot automatically change synchronously when the network topology changes dynamically is a problem to be solved in this technical field. Summary of the invention
[0007] In view of the above defects or improvement requirements of the prior art, the present invention solves the problem that the clock synchronization path cannot automatically change synchronously when the network topology changes dynamically.
[0008] The embodiment of the present invention adopts the following technical solution:
[0009] In the first aspect, the present invention provides a method for selecting a clock master-slave synchronization path based on node decision, specifically: a node periodically sends synchronization information to other ports through a port; a node that receives the synchronization information updates a synchronization information set, and updates its own port-related information into the synchronization information, and forwards the updated synchronization information to other nodes; the node obtains port-related information based on the updated synchronization information set, and generates the clock master-slave synchronization path of this node based on the port-related information.
[0010] Preferably, when the synchronization information is a loop detection message, the node periodically sends the synchronization information to other ports through the port; the node that receives the synchronization information updates the synchronization information set, and updates its own port-related information into the synchronization information, specifically including: the node that needs to perform clock synchronization generates a loop detection message, and periodically sends the loop detection message to all synchronization ports; the port that receives the loop detection message adds the number of hops in the loop detection message to itself, and forwards the updated loop detection message to ports other than the port; when the node that receives the loop detection message is the sending node of the loop detection message, the data with the smallest number of hops in the received loop detection message is recorded; according to the number of hops, receiving port and sending port of each group of loop detection messages, the loop information of the sending port and the receiving port of the loop detection message is generated.
[0011] Preferably, the port that receives the loop detection message adds the hop count in the loop detection message to itself, and forwards the updated loop detection message to ports other than the current port, specifically including: for two loop detection messages with different sending ports and receiving ports, when the sending port and the receiving port are dual and have the same hop count, the sending port and the receiving port of the loop detection message are dual port rings; for the loop detection message with the same sending port and the receiving port, the sending port and the receiving port of the loop detection message are single port rings.
[0012] Preferably, the node obtains port-related information according to the updated synchronization information set, and generates the clock master-slave synchronization path of this node according to the port-related information, specifically including: each node receives the clock source information of this cycle, compares the clock source information of this cycle, the stored clock source information and the loop detection message, updates the stored clock source information according to the comparison result, and forwards the updated clock source information according to the comparison result; according to the stored clock source information, selects the optimal direction as the main synchronization path, and selects the suboptimal method as the backup synchronization path.
[0013] Preferably, the clock source information of the current cycle, the stored clock source information and the loop detection message are compared, and the stored clock source information is updated according to the comparison result, specifically including: when the receiving port is a dual port ring or a single port ring, obtaining the difference between the number of hops in the clock source information of the current cycle and the number of hops of the clock information when the dual loop port is sent, if the difference in the number of hops is different from the number of hops in the loop detection message, using the clock source information of the current cycle to update the stored clock source information, and forwarding the clock source information of the current cycle; when the receiving port is a non-loop port, and the clock source information of the current cycle is the optimal or suboptimal information in the clock source information received by the port, using the clock source information of the current cycle to update the stored clock source information, and forwarding the clock source information of the current cycle.
[0014] Preferably, when the synchronization information is clock source information, the node receiving the synchronization information updates the synchronization information set, updates its own port-related information into the synchronization information, and forwards the updated synchronization information to other nodes, specifically including: the clock source node or the first node generates the clock source information, and periodically sends the clock source information to all synchronization ports; the node receiving the clock source information compares the clock source information of this period with the stored clock source information according to the backtracking identifier in the clock source information; determines the blocking point of the clock source according to the priority and quality level of the clock source information and the hop count information in the clock source information, stores the blocked clock source information, and periodically clears the stored clock source information; updates the stored clock source information according to the comparison result of the clock source information, and forwards the updated clock source information according to the comparison result of the clock source information.
[0015] Preferably, the blocking point of the clock source is determined based on the priority and quality level of the clock source information and the hop count information in the clock source information, specifically including: when only one clock source information has the best priority and / or quality level, storing and forwarding the best clock source information, and restarting the clearing timing of the clock source information; when multiple clock source information have the same priority and / or quality level but the hop counts differ by 1 or are equal, determining a blocked port, storing the blocked clock source information, and restarting the clearing timing of the clock source information.
[0016] Preferably, the node obtains port-related information according to the updated synchronization information set, and generates the clock master-slave synchronization path of this node according to the port-related information, specifically including: when there is a blocking point in the link, sending backtrace information in the direction of the blocked port and the direction of the main port; the node that receives the backtrace information selects the optimal backtrace information from the backtrace information in different directions according to the number of hops in the backtrace information, and backtraces the stored clock source information according to the optimal backtrace information; for nodes with blocked ports, select the blocked port as the backup synchronization direction; for nodes without blocked ports, select the port direction where the backtrace information is received and stored as the backup synchronization direction.
[0017] Preferably, the node obtains port-related information according to the updated synchronization information set, generates the clock master-slave synchronization path of this node according to the port-related information, and also includes: comparing the number of hops of the traceback information input from different port directions of the node; for the traceback information with different clock identifiers, discarding the traceback information with a large number of hops, and when the number of hops of the traceback information is equal, discarding the traceback information with a low priority of the receiving port; for the traceback information with the same clock identifier, when the difference in the number of hops is greater than 1 hop, discarding the traceback information with a large number of hops, and when the number of hops is equal or differs by 1 hop, discarding all the backtraceback information.
[0018] In a second aspect, the present invention provides a device for selecting a clock master-slave synchronization path based on node decision, specifically comprising: comprising at least one processor and a memory, at least one processor and the memory being connected via a data bus, the memory storing instructions that can be executed by at least one processor, and after the instructions are executed by the processor, being used to complete the method for selecting a clock master-slave synchronization path based on node decision in the first aspect.
[0019] In a third aspect, the present invention further provides a non-volatile computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions are executed by one or more processors to complete the method described in the first aspect.
[0020] In a fourth aspect, a chip is provided, comprising: a processor and an interface, for calling and running a computer program stored in the memory from a memory, and executing the method provided in the first aspect.
[0021] In a fifth aspect, a computer program product comprising instructions is provided, which, when executed on a computer or a processor, causes the computer or the processor to execute the method provided in the first aspect.
[0022] Compared with the prior art, the beneficial effect of the embodiment of the present invention is that the properties of each port on the link are obtained through periodically sent synchronization information, and then the node where each port is located is decided according to the synchronization information and the properties of the port, and finally the primary and backup synchronization paths are obtained. In this way, it is not necessary to obtain network topology information in advance, but after the network topology changes, the synchronization information carries new path data, thereby completing the re-decision of the primary and backup synchronization paths to adapt to the changes in the network topology. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0024] Figure 1 A flowchart of a method for selecting a clock master / slave synchronization path based on node decision-making provided by an embodiment of the present invention;
[0025] Figure 2 A flowchart of another method for selecting a clock master / slave synchronization path based on node decision provided by an embodiment of the present invention;
[0026] Figure 3 A schematic diagram of a loop detection message matching process in a method provided in an embodiment of the present invention;
[0027] Figure 4 A flowchart of another method for selecting a clock master / slave synchronization path based on node decision provided by an embodiment of the present invention;
[0028] Figure 5 A schematic diagram of a process for processing clock source information in a method provided in an embodiment of the present invention;
[0029] Figure 6 A flowchart of another method for selecting a clock master / slave synchronization path based on node decision provided by an embodiment of the present invention;
[0030] Figure 7 A schematic diagram of a master synchronization path decision model in the method provided in an embodiment of the present invention;
[0031] Figure 8 A flowchart of another method for selecting a clock master / slave synchronization path based on node decision provided by an embodiment of the present invention;
[0032] Fig. 9 A schematic diagram of a decision model when a blocking point exists in the method provided in an embodiment of the present invention;
[0033] Fig.10 A schematic diagram of a synchronization process in a practical scenario in the method provided by an embodiment of the present invention;
[0034] Fig.11 A schematic diagram of the structure of a synchronization node in the method provided by an embodiment of the present invention;
[0035] Fig.12 A schematic diagram of a synchronization process in another actual scenario in the method provided in an embodiment of the present invention;
[0036] Fig.13A schematic diagram of the structure of a device for selecting a clock master-slave synchronization path based on node decision provided by an embodiment of the present invention;
[0037] The reference numerals are as follows:
[0038] 11: processor; 12: memory. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0040] The present invention is an architecture of a specific functional system, so the specific embodiments mainly illustrate the functional logical relationship between the various structural modules, and do not limit the specific software and hardware implementation methods.
[0041] In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other. The present invention will be described in detail below with reference to the accompanying drawings and embodiments.
[0042] Embodiment 1:
[0043] The existing clock master and backup synchronization paths are planned based on the entire network topology and cannot adapt to dynamic changes in the network topology. In this embodiment, a node-based master and backup synchronization path selection automatic selection method is provided, which does not require obtaining the complete network topology, but makes decisions based on the attributes of different nodes and ports.
[0044] like Figure 1 As shown, the method for selecting a clock master / slave synchronization path based on node decision provided by an embodiment of the present invention has the following specific steps:
[0045] Step 101: A node periodically sends synchronization information to other ports through a port.
[0046] In the method provided in this embodiment, a synchronization node is used to transmit messages between nodes on the link, and each node processes the received synchronization information to obtain the properties of each node and each port, as well as the available synchronization paths. In actual implementation, the specific data content and format in the synchronization information can be selected according to actual needs, for example, using a separate loop detection message, or using clock source information, etc. Correspondingly, the properties of the port are determined according to the synchronization information used, for example, the loop property of the port can be obtained through the loop detection message, and the blocking property of the port can be obtained through the clock source information.
[0047] Step 102: The node receiving the synchronization information updates the synchronization information set, updates its own port related information into the synchronization information, and forwards the updated synchronization information to other nodes.
[0048] After receiving the synchronization message, each node needs to update the synchronization information according to the port-related information of each port on the node to pass the attributes on the link to other nodes. The data that needs to be updated in the synchronization information is determined according to actual needs, such as: the number of hops forwarded by the synchronization message, the ring information of the synchronization message sending port and the receiving port, the blocking point information on the link, etc. In the specific implementation, in order to facilitate the management and retrieval of the synchronization information, the synchronization information received on each node can be saved and managed through the synchronization information set.
[0049] At the same time, the synchronization information needs to be forwarded according to the data of the synchronization information and the attributes of the node, so that each node on the link can obtain the information of other nodes on the link through the data in the synchronization information, so as to complete the information acquisition and synchronization path decision on the entire link.
[0050] Step 103: The node obtains relevant information according to the updated synchronization information set, and generates a clock master-slave synchronization path of the node according to the relevant information.
[0051] After each node obtains the synchronization information and port attributes, it can make node decisions on the synchronization information based on the data in the synchronization information and the port attributes, and obtain the primary synchronization path and backup synchronization path that the node needs to use based on the decision results. For example, a limited flooding decision method is used based on the ring attribute, or a path backtracking planning method is used based on the blocking attribute.
[0052] After steps 101 to 103 provided in this embodiment, all nodes and ports on the link can obtain the information required for decision-making through the transmission of synchronization information, thereby realizing the selection of the primary and backup synchronization paths without relying on the complete network topology.
[0053] In actual implementation, in order to ensure that synchronization information can be correctly sent and received, the synchronization ports in the link are configured to be enabled and work properly. If the underlying data of the associated node, the synchronization port or the associated line port is disabled, or an alarm occurs, the information received by the synchronization port will be directly discarded and no information will be sent out. After the above processing, the disabled or alarmed port is invisible to other nodes and ports, and the port will not be used when selecting a path.
[0054] In different implementation scenarios, different synchronization information and specific decision-making methods can be used according to different device support and system support, as long as the required data can be carried in the synchronization information, and the decision is made according to the attributes of the node and the port, the corresponding technical problems of this embodiment can be solved. Some specific implementation plans are provided below. The following solutions can be used alone or simultaneously, and can also be adaptively adjusted according to the specific device configuration and scenario requirements.
[0055] Solution 1: Use a limited flooding decision method based on node synchronization loop detection.
[0056] like Figure 2 As described above, in steps 101 and 102, each port periodically sends synchronization information to all ports, the node receiving the synchronization information updates the synchronization information, and obtains the properties of the port according to the synchronization information, which can be implemented in the following manner.
[0057] Step 201: A node that needs to perform clock synchronization generates a loop detection message and periodically sends the loop detection message to all synchronization ports.
[0058] Each synchronization node periodically starts the loop detection mechanism. The synchronization node generates and sends a loop detection message to all synchronization ports. The loop detection message carries the following parameters: local node ID, sending port ID, and hop count (initial hop count = 0).
[0059] Step 202: The port that receives the loop detection message adds the hop count in the loop detection message to itself, and forwards the updated loop detection message to ports other than the local port.
[0060] like Figure 3 As shown, the sending port identifier in the loop detection message is matched with the receiving node identifier. For loop detection messages not sent by this node, the hop count in the loop detection message is increased by 1, and the updated loop detection message is forwarded to ports other than the receiving port. When the hop count in the loop detection message exceeds the set threshold, it is discarded.
[0061] Step 203: When the node receiving the loop detection message is the sending node of the loop detection message, the data with the minimum hop count in the received loop detection message is recorded.
[0062] like Figure 3 As shown, the sending port identifier in the loop detection message is matched with the identifier of the receiving node, and for the loop message sent by the current node, the information in the loop detection message is extracted, and the loop detection information is saved according to (sending port identifier, receiving port identifier, number of ring hops). In this embodiment, only the loop topology that may form a synchronous ring is concerned, so for each group of sending and receiving ports, only the data with the smallest number of ring hops is recorded.
[0063] Step 204: Generate loop information of the sending port and the receiving port of the loop detection message according to the hop count, the receiving port and the sending port of each group of loop detection messages.
[0064] For each group of transceiver ports on the node, the node's loop analysis is completed based on the loop detection information of each group of transceiver ports stored in the node. In order to avoid the invalidation of loop information caused by network topology changes, if the loop detection information stored in the node is not updated regularly, it will be cleared to avoid decision errors caused by using outdated information.
[0065] After steps 201 to 204 provided in this embodiment, the loop detection information can be used to obtain the loop properties of the port. When the network topology changes, or nodes are added or deleted in the link, the periodically sent loop detection message will carry new synchronization loop information to form corresponding loop detection data. The old information will be replaced by the new information; or it will be cleared due to no update, and the new information will be saved and put into use, thereby realizing the dynamic update of the clock synchronization path.
[0066] Correspondingly, in step 103, the loop information of the sending and receiving ports of the loop detection message is obtained according to the hop count and the sending and receiving ports of each group of loop detection messages, which can be implemented in the following manner.
[0067] (1) For two loop detection messages with different sending ports and receiving ports, when the sending and receiving ports are dual and have the same hop count, the sending port and receiving port of the loop detection message are dual port rings.
[0068] When two loop detection information pieces received by a node have different sending and receiving ports, appear in port pairs, and have the same number of hops, it indicates that the sending ports of the two loop detection information pieces form a ring, and the ring type is a dual port ring of the node.
[0069] (2) For a loop detection message whose sending port and receiving port are the same, the sending and receiving ports of the loop detection message are single-port rings.
[0070] When the sending and receiving ports of the loop detection message received by the node are the same, it indicates that the sending and receiving ports form a ring, and the member type is the single-port ring of the node.
[0071] In this embodiment, the corresponding ports of the dual port ring and the single port number are both called ring ports, and the other ports are called non-ring ports.
[0072] like Figure 4 As shown, after the ring attribute of the port is obtained, the primary and backup synchronization paths can be obtained according to the synchronization information and the attributes of the port.
[0073] Step 301: Each node receives the clock source information of this cycle, compares the clock source information of this cycle with the stored clock source information and loop detection message, updates the stored clock source information according to the comparison result, and forwards the updated clock source information according to the comparison result.
[0074] like Figure 5 As shown, the clock source information is used as the input and output information of the node, including parameters such as clock identification, priority, quality level, hop count, etc. The clock source information is generated by the clock source or the head node (hop count = 0 at this time) and is sent periodically.
[0075] Combined with the ring attribute, the clock source information stored in the node where the corresponding port is located is compared with the clock source information of the input node. The comparison content can be selected as needed: information priority, information quality level, or number of hops in the information, etc. Then, processing is performed based on the comparison result. The rules are as follows.
[0076] a) When the input clock source information is not better than the stored clock source information, the information is discarded and not recorded.
[0077] b) When the input clock source information is better than the stored clock source information, the following processing strategy can be used:
[0078] (a) If the clock source information is compared and is not in the optimal or suboptimal order in the order of the port input information on this node, the clock source information is discarded. Otherwise, subsequent processing is performed.
[0079] (b) If the receiving port of the clock source information is a ring port, processing is performed according to the hop count in the clock source information.
[0080] (c) If the clock source information is ranked optimally or suboptimally among the clock source information input by the port on the node after comparison, and the port is a non-looped port, the port receiving time source data is updated with the clock source information and forwarded for processing.
[0081] Step 302: According to the stored clock source information, the optimal direction is selected as the primary synchronization path, and the suboptimal method is selected as the backup synchronization path.
[0082] In each node, the storage format of the clock source information is: input information (port identifier, clock identifier,
[0083] Priority, quality level, hop count). Each time information is stored, the clear timer is reset.
[0084] The forwarded or generated time source information is stored in the format of output information (port identifier, clock identifier, priority, quality level, hop count). When storing clock source information, clear the timer and restart the time. When the output clock source information of this cycle is not better than the output clock source information that has been stored, the information is discarded.
[0085] The clock synchronization path selection is based on the stored input data records, and the optimal and suboptimal directions are selected in turn as the planned primary and backup synchronization directions.
[0086] After step 301 and step 302 provided in this embodiment, the planning of the clock synchronization path can be completed according to the synchronization information and the ring properties.
[0087] In step 301, when the receiving port of the clock source information is a ring port, the clock source information may be processed according to the hop count in the clock source information in the following manner.
[0088] (1) When the receiving port is a dual port ring or a single port ring, obtain the difference between the hop count in the clock source information of this cycle and the hop count of the clock information when the dual ring port sends it. If the hop count difference is different from the hop count in the loop detection message, use the clock source information of this cycle to update the stored clock source information, and forward the clock source information of this cycle.
[0089] If the port receiving the clock source information is a ring port, and "the number of hops in the received information" - "the number of hops of the clock information when the dual ring port sends it" = "the number of hops recorded in the node ring analysis data", the information is discarded.
[0090] (2) When the receiving port is a non-ring port and the clock source information of the current cycle is the best or second best information among the clock source information received by the port, the clock source information of the current cycle is used to update the stored clock source information and the clock source information of the current cycle is forwarded.
[0091] If the port receiving the clock source information is a ring port, and "number of hops in the received information" - "number of hops of the clock information when the dual ring port sends it" ≠ "number of hops recorded in the node ring analysis data", the port receives the time source data with this information and forwards it for processing.
[0092] Using the above technical solution, when the network topology changes, or nodes are added or deleted on the link, the periodically sent clock source information message will carry new synchronization link information and arrive at the node to trigger a new decision action. The old information on the node will be replaced by the new information; or it will be cleared regularly due to no update, and the new information will be saved for path decision.
[0093] In a specific implementation, the above decision-making scheme based on loop detection can also be used in conjunction with other synchronous loop detection schemes.
[0094] Solution 2: Use the path backtracking decision method based on node synchronization blocking points.
[0095] like Figure 6 As described above, in steps 101 and 102, each node periodically sends synchronization information to all ports that need to be synchronized, and the node that receives the synchronization information updates the synchronization information and obtains the properties of the port according to the synchronization information, which can be implemented in the following manner.
[0096] Step 401: A clock source node or a head node generates clock source information and periodically sends the clock source information to all synchronization ports.
[0097] The clock source information is used as the input and output information of the node, including parameters such as clock identification, priority, quality level, hop count, backtracking identification, etc. The clock source information is generated by the clock source or the head node and sent periodically.
[0098] Step 402: The node that receives the clock source information compares the clock source information of the current period with the stored clock source information according to the traceback identifier in the clock source information.
[0099] Active synchronization path decision, such as Figure 7 As shown in the model, at this time, the traceback flag in the input clock source information = 0. After comparison and decision, the input clock source information selects the optimal clock source information.
[0100] Step 403: According to the priority and quality level of the clock source information and the hop count information in the clock source information, determine the blocking point of the clock source, store the blocked clock source information, and regularly clear the stored clock source information.
[0101] On the other hand, it is also necessary to make a comparison decision to determine the blocking point for input information with the same priority and quality level but a difference of "1" or the same number of hops.
[0102] Output blocking can be flagged via a stability detection mechanism.
[0103] Output the decision information of the primary synchronization path based on the optimal clock source information.
[0104] According to the blocked clock source information, the blocked port decision information is output.
[0105] Step 404: updating the stored clock source information according to the comparison result of the clock source information, and forwarding the updated clock source information according to the comparison result of the clock source information.
[0106] The blocked clock source information and the optimal clock source information are stored in the specified format, and the clock source information clearing timing is restarted. If the stored optimal clock source information is not updated periodically, it will be cleared periodically.
[0107] After steps 401 to 404 provided in this embodiment, the updating and forwarding of the original clock information can be completed.
[0108] When the network topology changes, or nodes are added or deleted on the link, the periodically sent clock source information message will carry new synchronization link information to the node, triggering a new decision action. The old information on the node will be replaced by the new information; or it will be cleared regularly due to no update, and the new information will be saved for decision making. The new decision will output the main synchronization path and blocked port decision information that matches the changed connection.
[0109] In step 403, the process of determining the blocking point of the clock source according to the priority and quality level of the clock source information and the hop count information in the clock source information can be completed in the following manner.
[0110] (1) When only one clock source information has the best priority and / or quality level, the best clock source information is stored and forwarded, and the clearing timing of the clock source information is restarted.
[0111] After comparing the input clock source information, the optimal clock source is selected and stored in the format of optimal clock source (input port, clock identifier, priority, quality level, number of hops), and the information clearing timing is restarted. The optimal clock source information will be forwarded and output. If the stored optimal clock source information is not updated periodically, it will be cleared periodically.
[0112] (2) When the priorities and / or quality levels of multiple clock source information are the same, but the hop counts differ by 1 or are equal, a blocked port is determined, the blocked clock source information is stored, and the clearing timing of the clock source information is restarted.
[0113] At the same time, through comparison and decision, if the priority and quality level of the input clock source information are the same, but the hop count differs by "1" or is equal, the blocking point is determined, and the blocked clock source information is stored in the format: blocked clock source (input port, clock identifier, priority, quality level, hop count), and the information clearing timing is restarted. If the stored blocked clock source information is not updated periodically, it will be cleared regularly.
[0114] like Figure 8 As shown, after the decision-making part blocks the node, the master-slave synchronization path can be obtained according to the synchronization information and the attributes of the port in the following manner, and the synchronization information can be forwarded according to the attributes of the port.
[0115] Step 501: When there is a blocking point in the link, traceback information is sent in the direction of the blocking port and the active port.
[0116] like Fig. 9As shown in the model, there is a blocking point in the node. When the blocking stability flag input is valid, information backtracking is started. The format of the backtracking information is consistent with the clock source information, and the backtracking flag = 1. The backtracking information has two backtracking sending directions.
[0117] Step 502: The node receiving the backtrace information selects the optimal backtrace information from the backtrace information in different directions according to the number of hops of the backtrace information, and backtraces the stored clock source information according to the optimal backtrace information.
[0118] Node input information traceback flag = 1, clock source information is traced back. Hop count - 1, forwarded output, and stored in the format (input port, clock flag, priority, quality level, hop count) for the traceback clock source information.
[0119] Step 503: For a node with a blocked port, select the blocked port as a backup synchronization direction.
[0120] For nodes with blocking points, the blocked port is selected as the backup synchronization direction.
[0121] Step 504: For a node without a blocked port, select the port direction where the traceback information is received and stored as the backup synchronization direction.
[0122] For a node without a blocking point, the port direction where the traceback information is received and recorded is selected as the backup synchronization direction.
[0123] After steps 501 to 504 provided in this embodiment, the selection of the clock synchronization path can be completed.
[0124] When processing the backtrace information, some backtrace information needs to be discarded, and the discarded backtrace information is not recorded.
[0125] Step 601: compare the hop counts of the traceback information input from different ports of the node;
[0126] The traceback information input from different port directions of a node needs to be compared in terms of hop counts, and there are several situations.
[0127] Step 602: For the traceback information with different clock identifiers, the traceback information with a larger hop count is discarded. When the traceback information has an equal hop count, the traceback information with a lower receiving port priority is discarded.
[0128] If the traceback information has different clock identifiers, the one with the larger hop count is discarded. If the hop counts are equal, the one with the larger hop count is selected based on the port configuration priority.
[0129] Step 603: For the backtrace information with the same clock identifier, when the hop counts differ by more than 1 hop, the backtrace information with the larger hop count is discarded; when the hop counts are equal or differ by 1 hop, all the backtrace information is discarded.
[0130] For the backtrace information with the same clock identifier, if the hop counts are equal or differ by 1 hop, the backtrace information is discarded. If the hop counts differ by more than 1 hop, the backtrace information with the larger hop count is discarded.
[0131] After steps 601 to 603 provided in this embodiment,
[0132] When the network topology changes, or nodes are added or deleted on a link, the backup path in the above solution will also be re-determined as the primary path and blockage points change to adapt to the new link.
[0133] The method for selecting the clock master and backup synchronization paths based on node decision provided in this embodiment provides a variety of decision-making methods with different ideas, all of which are based on distributed decision-making of synchronization nodes, which can not only realize the clock master synchronization selection, but also select the corresponding backup synchronization path. In a specific implementation, the method in this embodiment can automatically run at the node after the equipment is powered on, automatically adapt to the network topology and decision-making, and solve the problems of large workload, low efficiency and easy errors in manual configuration when the synchronization network is deployed on a large scale. It gets rid of the dependence on the planning of the control plane, and responds more promptly and adapts to more scenarios. On the other hand, the method in this embodiment can be perfectly combined with the existing SSM architecture, which is convenient for upgrading.
[0134] Embodiment 2:
[0135] Based on the method for selecting the clock master-slave synchronization path based on node decision provided in Example 1, in this embodiment, some examples of path selection using the limited flooding decision method based on node synchronization loop detection in Example 1 are provided. In different specific application scenarios, supplements and adjustments can also be made according to different usage requirements or actual scenarios. In the following technical solutions, one or more technical solutions can be selected and used in combination with the technical solutions in Example 1 if there is no conflict.
[0136] In a specific scenario, such as Fig. 9 For example, node 1 performs loop detection periodically and sends loop detection messages to ports A1, B1, and C1 in sequence.
[0137] The loop detection message sent by A1 of node 1 carries the node 1 identifier, the A1 identifier and the hop count (0). After passing through nodes 6, 5, 4, 3, and 2, the loop detection message is received by B1 of node 1. After analyzing the loop detection message, node 1 stores the loop detection information in the format of (B1, A1, 5).
[0138] The loop detection message sent by B1 of node 1 carries the node 1 identifier, B1 identifier and hop count (0). After passing through nodes 2, 3, 4, 5, and 6, the loop detection message is received by A1 of node 1. After analyzing the loop detection message, node 1 stores the loop detection information in the format of (A1, B1, 5);
[0139] For node 1, (B1, A1, 5) and (A1, B1, 5) indicate that there is a synchronization loop between A1 and B1 with the shortest hop count of 5. This information is input in the subsequent synchronization link decision.
[0140] After completing the path change detection, the clock synchronization path is selected based on the node decision mechanism of limited information flooding.
[0141] like Fig.10 For example, the C1 port of node 1 is connected to the PRC and receives the time source information sent by the PRC. For the convenience of explanation, the recorded data is simplified, and the same parameters of the time source information in this embodiment are ignored, and only the number of information hops in the input and output directions of the port are recorded. At this time, the C1 of node 1 records C1rx(0).
[0142] In node 1, according to the protocol rules, the time source information sent by PRC will be forwarded through the A1 and B1 ports of node 1, and the time source information A1tx(1) and B1tx(1) will be recorded. The clock source information sent from A1 is forwarded by nodes 6, 5, 4, 3, and 2 and received by B1. Based on the loop analysis of node 1, A1 and B1 are dual ring ports, and the hop count analysis 6-1=5 matches the hop count data of the loop analysis, so the received time source information is discarded. Similarly, the clock source information forwarded from B1 will be discarded after being received by A1 through link forwarding. For node 1, only C1 records the received data, and C1 decides to use the main synchronization path.
[0143] In node 4, the time source information sent by PRC can be received from A4 and B4. Although A4 and B4 are dual ring ports, the hop count comparison 3-3=0 does not match the minimum hop count of the ring, so the time source information will be received, processed and forwarded. The time source information A4rx(3), B4rx(3), A4tx(4), and B4tx(4) are recorded. The hop counts recorded by A4 and B4 are both 3. When making a path decision, one of A4 and B4 is decided as the primary path, and the other is the backup path.
[0144] In another specific scenario, Fig.11 FIG. 1 is an implementation example of a synchronization node. In a specific implementation, the synchronization node can adopt a clock synchronization master-slave tracking path selection algorithm module and a layered design based on the existing SSM clock synchronization mechanism.
[0145] Fig.11In the figure, the dashed line shows the existing clock synchronization implementation architecture. The selection of clock input and output is controlled by the SSM module. The SSM module obtains clock quality information through the line interface and the external clock interface to decide whether to track or switch tracking. The tracking direction is set by the priority parameter, which is usually manually configured. The algorithm module sends and receives clock source information or loop detection messages through the system's transmission interface.
[0146] Fig.11 In the figure, the clock synchronization master-slave tracking path selection algorithm module provided in Example 1 is above the dotted line. The module is connected to the existing framework through two interfaces: a) the adaptation layer of the message interface and the line interface is connected, and various message packets required by the patent solution can be sent and received through the line interface. For example: loop detection message, clock source information message; b) connected to the SSM through the data interface to realize data interaction.
[0147] The algorithm module interacts with the SSM module through the application data interface, and the algorithm module can obtain the synchronization port mapping list, enable information, alarm and other information. When the path decision is completed, the QL information of the port configuration is obtained, and the selected primary and backup paths are converted into clock priority list information and sent to the SSM module. For example, a priority list (port a, port b, ...) can be used to indicate that port a is the first priority, that is, the primary direction; port b is the second priority, that is, the backup direction; or port a (priority 1) and port b (priority 2) can be used to send information in the form of a port list. In this way, the SSM module can select the primary and backup paths based on the node algorithm without manual or control plane configuration.
[0148] It can be seen that in actual scenarios, the method provided in Example 1 can realize dynamic planning of clock synchronization paths.
[0149] Embodiment 3:
[0150] Based on the method for selecting the clock master-slave synchronization path based on node decision provided in Example 1, in this embodiment, some examples of path selection using the path backtracking decision method based on node synchronization blocking points in Example 1 are provided. In different specific application scenarios, supplements and adjustments can also be made according to different usage requirements or actual scenarios. In the following technical solutions, one or more technical solutions can be selected and used in combination with the technical solutions in Example 1 if there is no conflict.
[0151] like Fig.12For example, the C1 port of node 1 is connected to the PRC and receives the time source information sent by the PRC. For the convenience of explanation, the node record data is simplified, and the stored time source information is recorded as (input port, clock source identifier, hop count). At this time, the optimal clock source information of node 1 is (C1, PRC, 0).
[0152] In this embodiment, node 4 will receive PRC clock source information from A4 and B4, and the number of hops is 3. Assuming that the priority of A4 configured in node 4 is higher than that of B4, the optimal clock source for the decision comes from A4, and the optimal clock source (A4, PRC, 3) is recorded; and the blocking point for the decision is B4. Record the blocked clock source (B4, PRC, 3). Detect that the blocking point remains stable for a period of time, and start the backtracking mechanism. The backtracking information is sent from A4 and B4 respectively, and the backtracking flag is set to 1. The backtracking information sent from A4 is simplified to (PRC, 3, 1); the backtracking information sent from B4 is simplified to (PRC, 3, 1). For node 4, the main path for the decision is A4, and the backup path is B4.
[0153] For node 2, when deciding on the primary synchronization path, the optimal clock source information recorded is (A2, PRC, 1). The traceback information received from B2 is recorded as (B2, PRC, 1). The primary path is A2, and the used path is B2.
[0154] For node 1, C1 is its primary path. The traceback information (PRC, 1, 1) can be received from both A1 and B1. The time source of the traceback information in both directions is PRC, with the same number of hops. The traceback information in both directions is discarded according to the strategy. In this way, node 1 can only decide on the primary path C1, and there is no backup path.
[0155] It can be seen that in actual scenarios, the method provided in Example 1 can realize dynamic planning of clock synchronization paths.
[0156] Embodiment 4:
[0157] Based on the method for selecting a clock master / slave synchronization path based on node decision provided in the above-mentioned embodiments 1 to 3, the present invention further provides a device for selecting a clock master / slave synchronization path based on node decision that can be used to implement the above-mentioned method, such as Fig.13 , which is a schematic diagram of the device architecture of an embodiment of the present invention. The device for selecting a clock master / slave synchronization path based on node decision in this embodiment includes one or more processors 11 and a memory 12. Fig.13 A processor 11 is taken as an example.
[0158] The processor 11 and the memory 12 may be connected via a bus or other means. Fig.13 The example of connecting through bus is taken in the following.
[0159] The memory 12 is a non-volatile computer-readable storage medium as a method for selecting a clock master-slave synchronization path based on node decision, and can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the method for selecting a clock master-slave synchronization path based on node decision in Examples 1 to 3. The processor 11 executes various functional applications and data processing of the device for selecting a clock master-slave synchronization path based on node decision by running the non-volatile software programs, instructions and modules stored in the memory 12, that is, implementing the method for selecting a clock master-slave synchronization path based on node decision in Examples 1 to 3.
[0160] The memory 12 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 devices. In some embodiments, the memory 12 may optionally include a memory remotely arranged relative to the processor 11, and these remote memories may be connected to the processor 11 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.
[0161] The program instructions / modules are stored in the memory 12. When executed by one or more processors 11, the method for selecting the clock master / slave synchronization path based on node decision in the above-mentioned embodiments 1 to 3 is executed. For example, the method described above is executed. Figure 1 , Figure 2 , Figure 4 , Figure 6 and Figure 8 The steps shown.
[0162] A person skilled in the art may understand that all or part of the steps in the various methods of the embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0163] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for selecting a clock master / slave synchronization path based on node decision, characterized in that: Specifically include: The node periodically sends synchronization information to other ports through the port; The node that receives the synchronization information updates the synchronization information set, updates its own port related information to the synchronization information, and forwards the updated synchronization information to other nodes; The node obtains port related information according to the updated synchronization information set, and generates a clock master / slave synchronization path of the node according to the port related information.
2. The method for selecting a clock master / slave synchronization path based on node decision according to claim 1, characterized in that: When the synchronization information is a loop detection message, the node periodically sends the synchronization information to other ports through the port; the node receiving the synchronization information updates the synchronization information set and updates its own port related information to the synchronization information, specifically including: The node that needs to perform clock synchronization generates a loop detection message and periodically sends the loop detection message to all synchronization ports; The port receiving the loop detection message adds the hop count in the loop detection message to itself and forwards the updated loop detection message to ports other than the local port; When the node receiving the loop detection message is the sending node of the loop detection message, the data with the smallest hop count in the received loop detection message is recorded; According to the hop count, receiving port and sending port of each group of loop detection messages, loop information of the sending port and the receiving port of the loop detection message is generated.
3. The method for selecting a clock master / slave synchronization path based on node decision according to claim 2, characterized in that: The port receiving the loop detection message adds the hop count in the loop detection message to itself, and forwards the updated loop detection message to ports other than the port, specifically including: For two loop detection messages with different sending ports and receiving ports, when the sending port and the receiving port are dual and have the same hop count, the sending port and the receiving port of the loop detection message are dual port rings; For a loop detection message whose sending port and receiving port are the same, the sending port and the receiving port of the loop detection message are a single-port ring.
4. The method for selecting a clock master / slave synchronization path based on node decision according to claim 1, characterized in that: The node obtains port related information according to the updated synchronization information set, and generates a clock master / slave synchronization path of the node according to the port related information, specifically including: Each node receives the clock source information of this cycle, compares the clock source information of this cycle, the stored clock source information and the loop detection message, updates the stored clock source information according to the comparison result, and forwards the updated clock source information according to the comparison result; According to the stored clock source information, the optimal direction is selected as the primary synchronization path, and the suboptimal method is selected as the backup synchronization path.
5. The method for selecting a clock master / slave synchronization path based on node decision according to claim 4, characterized in that: The comparing the clock source information of the current cycle, the stored clock source information and the loop detection message, and updating the stored clock source information according to the comparison result, specifically includes: When the receiving port is a dual port ring or a single port ring, obtain the difference between the hop count in the clock source information of this cycle and the hop count of the clock information when the dual ring port sends it. If the hop count difference is different from the hop count in the loop detection message, use the clock source information of this cycle to update the stored clock source information, and forward the clock source information of this cycle; When the receiving port is a non-looped port and the clock source information of the current period is the best or second best information among the clock source information received by the port, the clock source information of the current period is used to update the stored clock source information and the clock source information of the current period is forwarded.
6. The method for selecting a clock master / slave synchronization path based on node decision according to claim 1, characterized in that: When the synchronization information is clock source information, the node receiving the synchronization information updates the synchronization information set, updates its own port related information into the synchronization information, and forwards the updated synchronization information to other nodes, specifically including: The clock source node or the head node generates clock source information and periodically sends the clock source information to all synchronization ports; The node that receives the clock source information compares the clock source information of the current period with the stored clock source information according to the traceback identifier in the clock source information; According to the priority and quality level of the clock source information and the hop count information in the clock source information, the blocking point of the clock source is determined, the blocked clock source information is stored, and the stored clock source information is cleared regularly; The stored clock source information is updated according to the comparison result of the clock source information, and the updated clock source information is forwarded according to the comparison result of the clock source information.
7. The method for selecting a clock master / slave synchronization path based on node decision according to claim 6, characterized in that: The determining of the blocking point of the clock source according to the priority and quality level of the clock source information and the hop count information in the clock source information specifically includes: When only one clock source information has the best priority and / or quality level, the best clock source information is stored and forwarded, and the clearing timing of the clock source information is restarted; When the priorities and / or quality levels of multiple clock source information are the same, but the hop counts differ by 1 or are equal, a blocked port is determined, the blocked clock source information is stored, and the clearing timing of the clock source information is restarted.
8. The method for selecting a clock master / slave synchronization path based on node decision according to claim 1, characterized in that: The node obtains port related information according to the updated synchronization information set, and generates a clock master / slave synchronization path of the node according to the port related information, specifically including: When there is a blocking point in the link, traceback information is sent in the direction of the blocking port and the active port; The node receiving the backtrace information selects the best backtrace information from the backtrace information in different directions according to the number of hops of the backtrace information, and backtraces the stored clock source information according to the best backtrace information; For nodes with blocked ports, the blocked port is selected as the backup synchronization direction; For a node without a blocked port, the port direction where the traceback information is received and stored is selected as the backup synchronization direction.
9. The method for selecting a clock master / slave synchronization path based on node decision according to claim 8, characterized in that: The node acquires port related information according to the updated synchronization information set, generates a clock master / slave synchronization path of the node according to the port related information, and further includes: Compare the hop counts of the traceback information input from different ports of the node; For traceback information with different clock identifiers, the traceback information with a larger hop count is discarded. When the traceback information has the same hop count, the traceback information with a lower receiving port priority is discarded. For the backtrace information with the same clock identifier, when the hop count difference is greater than 1 hop, the backtrace information with the larger hop count is discarded; when the hop counts are equal or differ by 1 hop, all the backtrace information is discarded.
10. A device for selecting a clock master / slave synchronization path based on node decision, characterized in that: It includes at least one processor and a memory, the at least one processor and the memory are connected via a data bus, the memory stores instructions that can be executed by the at least one processor, and the instructions, after being executed by the processor, are used to complete the method for selecting a clock master-slave synchronization path based on node decision as described in any one of claims 1-9.
Citation Information
Patent Citations
Time synchronization method and clock device
CN102195766A
Cross-domain clock synchronization method, device thereof and cross-domain clock synchronization system
CN105634714A
Intelligent clock planning configuration method, device and integrated controller
CN106357501A
Time synchronization path protection method and device and readable storage medium
CN114173367A
High-precision clock synchronization method based on clock arbitration
CN118264351A
