A method and device for handling the failure of a grouped synchronization channel
By integrating PTCF events into synchronization path selection algorithms, the method ensures continuous monitoring and recovery from packet timing channel failures, enhancing the reliability of time synchronization systems.
Patent Information
- Application Number
- CN202110362229.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-04-02
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2041-04-02
AI Technical Summary
In the prior art, after the packet synchronization channel fails, the synchronization link cannot switch to other paths, resulting in the synchronization node being unable to recover the time source information, the robustness of the synchronization network is affected, and the source selection decision algorithm and the synchronization measurement protocol lack an association mechanism, so it is impossible to effectively handle the packet synchronization channel failure event.
The monitoring status and sub-decision domain decision algorithm are introduced. By associating the packet synchronization channel failure event in the synchronization port state decision, the connection between the source selection decision algorithm and the synchronization measurement protocol is established to realize dynamic binding and separation, ensuring the switching and recovery of the synchronization path.
It improves the operation reliability of the synchronization network, and can refer to the packet synchronization channel failure event information in synchronization path decisions, select normal paths, and clear failure events, improving the fault tolerance of the synchronization network.
Smart Images

Figure CN115189792B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of packet time synchronization, and particularly to a method and apparatus for handling packet synchronization channel failures.
Background Art
[0002] High-precision time synchronization is one of the key requirements for 5G bearers and has application scenarios in fields such as wireless communication, communication networks, the Internet of Things, and industrial Internet.
[0003] The mainstream time synchronization technology adopted in the industry is based on IEEE1588v2. The clock models commonly used in networking applications are boundary clocks (BC) and ordinary clocks (OC), and the time synchronization tracking path is determined by the Best Master Clock (BMC) algorithm defined by 1588v2.
[0004] Real-time monitoring of the synchronization channel of the time synchronization link is an important mechanism for synchronous OAM and is of great significance for the stable operation of the time synchronization network. Monitoring of the packet synchronization channel includes various monitoring contents, such as loss of Precision Time Protocol (PTP) packets, abnormal PTP packet information, unreliable PTP timing, degraded PTP input, and out-of-limit Packet Delay Variation (PDV) of the channel network. Once a degradation event is detected, the packet synchronization channel is determined to have failed. After the synchronization channel fails, the synchronization node cannot recover accurate time source information through this channel. How to handle Packet Timing Channel Fail (PTCF) events and enhance the robustness of the synchronization network is an important issue.
Summary of the Invention
[0005] The technical problem to be solved by the present invention is to use packet synchronization channel monitoring technology. When a packet synchronization channel failure event is detected, it should be considered to re-make a synchronization path decision. Switching the synchronization link to other paths can ensure the normal synchronization of the synchronization link. However, under the current mechanism, there are the following technical problems in implementation:
[0006] The current source selection decision algorithm and the synchronization measurement protocol operate separately and lack an association mechanism. Such as Figure 1, the tracking direction of the node and the synchronization working status of the port are determined by the source selection decision algorithm. The synchronization port operates the synchronization measurement protocol according to the working status determined by the source selection decision: Master clock or Slave clock. The synchronization measurement protocol layer cannot affect the decision of the source selection decision algorithm, and similarly, the packet synchronization channel failure event implemented based on the synchronization measurement protocol layer cannot affect the decision of the source selection decision algorithm. Only relying on the Announce message, the decision of the source selection decision algorithm will keep the tracking port of the node in the port direction of the packet synchronization channel failure.
[0007] Furthermore, the solution of the present invention is also used to solve the following sub-problems: The monitoring of the packet synchronization channel is implemented at the Slave clock port based on the synchronization measurement protocol. By analyzing information such as the received PTP synchronization message and timestamp information, it is determined whether there is a packet synchronization channel failure event in the packet synchronization channel of this port. Once a packet synchronization channel failure event is detected, path switching is triggered. The port with the packet synchronization channel failure no longer operates in the Slave clock state, and thus loses the monitoring ability for the packet synchronization channel failure, and cannot complete actions such as status recovery and synchronization path back-off. This port will be kept in the deprecated state all the time.
[0008] The present invention adopts the following technical solutions:
[0009] In a first aspect, the present invention provides a method for handling packet synchronization channel failure. A port in the Slave state detects a packet channel failure event. This port is stripped from the master decision domain time source information set, and state decision is performed based on the separated sub-decision domain time source information set and the master decision domain time source information set, and the result is the monitoring state or the Master clock state.
[0010] Preferably, the monitoring state is a newly added state; or it is an extension of the existing Master, Slave, and Passive states.
[0011] Preferably, a port in the monitoring state can receive and send synchronization messages, operate the PTP mechanism, and perform calculations and analyses of delay and clock offset; the calculation results are not used for synchronization tracking.
[0012] Preferably, when the port in the Slave state detects a packet channel failure event, this port is stripped from the master decision domain time source information set, specifically including: the sub-decision domain of this port no longer provides time source information to the master decision domain, and at the same time, it is necessary to obtain the time source information of the master decision domain.
[0013] Preferably, it further includes that for a port in the monitoring state, if it detects the disappearance of the failure alarm, the sub-decision domain resumes binding with the master decision domain, re-provides time source information to the master decision domain, and triggers the re-decision of the master decision domain.
[0014] Preferably, when the state decision of the sub - decision domain is the monitoring state, it specifically includes:
[0015] The sub - decision domain of the port extracts the time - source information of the externally received Announce message and obtains the time - source information of the main decision domain. If the time - source information received by the sub - decision domain is better than that of the main decision domain, the port is decided to be in the monitoring state;
[0016] Or, the sub - decision domain receives an Announce message from an external port, and the time - source information set of the main decision domain is empty, then the port is decided to be in the monitoring state.
[0017] Preferably, when the state decision of the sub - decision domain is the master - clock state, it specifically includes:
[0018] When the time - source information of the main decision domain is better than the external time - source information received by the synchronization port of the sub - decision domain of the corresponding port, the port operates in the master - clock state.
[0019] Preferably, if the number of ports or the state of the slave ports in the main decision domain changes, the state decision will be restarted.
[0020] Preferably, the monitoring state can also be entered through a configuration method. In this case, it has nothing to do with failure alarms. Unless the configuration changes, it will always be in the monitoring state.
[0021] In a second aspect, the present invention also provides a method for handling the failure of a packet synchronization channel. The port A of the first node is connected to the port B' of the second node, and the port A of the first node operates in the master - clock state, while the port B' of the second node operates in the slave - clock state. The handling method includes:
[0022] The port B' of the second node starts monitoring the packet synchronization channel. When a packet synchronization channel failure event is detected, the second node sets the packet synchronization channel failure event flag of the port B' to valid;
[0023] The sub - decision domain of the port B' of the second node is separated from the main decision domain of the second node, and the port B' of the second node enters the monitoring state;
[0024] The sub - decision domains of the other ports of the second node still remain bound to the main decision domain of the second node; through the main - domain decision algorithm, the port C' of the second node becomes the new and only slave - clock port of the second node; the sub - decision domain of the port C' of the second node replaces the sub - decision domain of the port B' of the second node to provide time - source information to the main decision domain of the second node.
[0025] Preferably, after the port B' of the second node enters the monitoring state, the method further includes:
[0026] The second node sends the packet synchronization channel failure event information to the first node;
[0027] The second node restarts the PTP protocol stack of port B' and stops monitoring the synchronization channel;
[0028] The first node receives the packet synchronization channel failure event information sent by the second node, restarts the PTP protocol stack of port A in the first node, and sends the packet synchronization channel failure event response information to the second node;
[0029] Port B' of the second node receives the packet synchronization channel failure event response information fed back by the first node and restarts monitoring the synchronization channel.
[0030] Preferably, if the repair of the packet synchronization channel associated with port B' of the second node is successful, the method further includes:
[0031] The second node sets the packet synchronization channel failure event flag of its port B' to invalid; the synchronization sub-domain of port B' of the second node re-establishes a binding relationship with the main decision domain and starts the main domain decision algorithm; so as to obtain the time source information from the repaired packet synchronization channel of port B' of the second node and the time source information obtained by port C' of the second node, and make a decision on a better time source information between the two as the time source information of the main decision domain of the second node.
[0032] Preferably, when the timeout occurs for port B' of the second node to receive the advertisement message from the first node, the method further includes:
[0033] Clear the sub-decision domain time source information of port B' of the second node, decide that port B' enters the listening state, and set the packet synchronization channel failure event flag of port B' of the second node to invalid;
[0034] The sub-decision domain of port B' of the second node re-binds to the main decision domain of the second node and accepts the time source information obtained by the main decision domain of the second node from port C' of the second node;
[0035] The second node sends the time source information obtained by port C' of the second node to the first node through the connection between port B' and port A of the first node.
[0036] Preferably, when port B' receives one or more advertisement messages, the method further includes:
[0037] The sub-decision domain of port B' decides the optimal time source among the one or more advertisement messages received, updates the time source information of the sub-decision domain, and maintains the monitoring state of port B' and the packet synchronization channel failure event flag in the valid state;
[0038] After waiting for the packet synchronization channel monitoring of the second node to confirm that the packet synchronization channel has recovered, re-bind port B' to the main decision domain so as to re-make decisions on the port status.
[0039] Preferably, if it is detected that the packet synchronization channel of port B' of the second node has recovered, the method further includes:
[0040] Clear the packet synchronization channel failure event flag of port B' of the second node, and re-bind the sub-decision domain of port B' of the second node to the main decision domain;
[0041] If the time source information of the main decision domain is better than the external time source information received by the synchronization port of the sub-decision domain of port B' of the second node, decide that port B' of the second node works in the master clock state.
[0042] Preferably, if the time source information received by the newly bound port C' of the main decision domain of the second node is better than the time source information historically received by the sub-decision domain of port B' of the second node, the method further includes:
[0043] Set the working state of port B' of the second node to the master clock (Master) state, set the packet synchronization channel failure event flag to the invalid state, and bind the sub-decision domain of port B' and the main decision domain of the second node;
[0044] The second node sends the time source information obtained from the main decision domain of the second node to port A of the first node through an announcement message through port B';
[0045] The first node switches the working state of its port A from the historical master clock state to the slave clock state.
[0046] Preferably, if the binding of port C' of the main decision domain of the second node times out due to receiving an announcement message and the packet synchronization channel failure event flag corresponding to port C' is invalid, the method further includes:
[0047] The main decision domain of the second node decides that the bound port C' enters the listening state, the sub-decision domain of port B' maintains the port monitoring state, and keeps the packet synchronization channel failure event flag of port B' set to valid.
[0048] Preferably, it is implemented by running the PTP slave clock protocol, and clock deviation calculation is performed, and the calculation result is used for channel monitoring and analysis;
[0049] Among them, the channel monitoring and analysis includes monitoring whether the packet synchronization channel fails and comparing the packet timing of the channel with the frequency or time deviation of the local clock;
[0050] Among them, the monitoring state can migrate between the slave clock state Slave, the master clock state Master, the blocking state Passive, and the listening state Listening corresponding to the respective ports.
[0051] Preferably, the port C' of the second node starts monitoring the packet synchronization channel. When a packet synchronization channel failure event is detected, the second node sets the packet synchronization channel failure event flag of the port C' to valid.
[0052] The sub-decision domain of the port C' of the second node is separated from the main decision domain of the second node, and the port C' of the second node enters the monitoring state.
[0053] The sub-decision domains of the other ports of the second node remain bound to the main decision domain of the second node; through the sub-domain decision algorithm, the port D' of the second node becomes the new and only clock port of the second node; the sub-decision domain of the port D' of the second node provides time source information to the main decision domain of the second node instead of the sub-decision domain of the port C' of the second node.
[0054] In a third aspect, the present invention also provides a processing device for packet synchronization channel failure, which is used to implement the processing method for packet synchronization channel failure described in the first and second aspects. The device includes:
[0055] At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to execute the processing method for packet synchronization channel failure described in the first and second aspects.
[0056] In a fourth aspect, the present invention also provides a non-volatile computer storage medium, which stores computer-executable instructions. The computer-executable instructions are executed by one or more processors to complete the processing method for packet synchronization channel failure described in the first aspect.
[0057] The present invention solves the lack of a processing solution after the introduction of a packet synchronization channel failure event, associates synchronization OAM events with synchronization path decisions, and improves the reliability of the operation of the synchronization network.
[0058] Associate the packet synchronization channel failure event in the synchronization path decision. For example: establish a connection between the source selection decision algorithm and the two layers of the synchronization measurement protocol, so that the packet synchronization channel failure event information can be referenced in the synchronization port state decision to select a path with a normal packet synchronization channel, and the packet synchronization channel failure event can also be cleared in the corresponding decision scenario.
Description of the Drawings
[0059] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other accompanying drawings can be obtained based on these drawings.
[0060] Figure 1 The hierarchical structure diagram of the source selection decision algorithm and synchronous measurement mechanism in the prior art provided by the present invention;
[0061] Figure 2 The diagram of the separation mechanism in the prior art provided by the present invention;
[0062] Figure 3 The diagram of an association mechanism provided by an embodiment of the present invention;
[0063] Figure 4 The schematic diagram of the monitoring status jump provided by an embodiment of the present invention;
[0064] Figure 5 The schematic diagram of a single-domain decision framework in the prior art provided by the present invention;
[0065] Figure 6 The schematic diagram of a dynamic sub-domain decision framework provided by an embodiment of the present invention;
[0066] Figure 7 The schematic diagram of a group synchronization channel failure event recovery mechanism provided by an embodiment of the present invention;
[0067] Figure 8 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0068] Figure 9 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0069] Figure 10 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0070] Figure 11 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0071] Figure 12 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0072] Figure 13 It is the schematic diagram of the flow of a method for handling group synchronization channel failure provided by an embodiment of the present invention;
[0073] Figure 14 It is a schematic diagram of the node relationship of the packet synchronization channel provided by an embodiment of the present invention;
[0074] Figure 15 It is an example diagram of the decision logic of the sub-decision domain provided by an embodiment of the present invention;
[0075] Figure 16 It is a schematic diagram of the message format of the frame header of a PTP packet provided by an embodiment of the present invention;
[0076] Figure 17 It is a schematic diagram of the frame header message of a delay request packet provided by an embodiment of the present invention;
[0077] Figure 18 It is a schematic diagram of the structure of a processing device for the failure of the packet synchronization channel provided by an embodiment of the present invention.
Specific Embodiments
[0078] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to 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.
[0079] In the description of the present invention, the orientation or positional relationship indicated by terms such as "inner", "outer", "longitudinal", "lateral", "upper", "lower", "top", "bottom", etc. is based on the orientation or positional relationship shown in the accompanying drawings. It is only for the convenience of describing the present invention rather than requiring the present invention to be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present invention.
[0080] Before presenting the content of the specific embodiment solutions of the present invention, first, the core improvement technical points of the present invention involved in each embodiment of the present invention are stripped out and introduced separately, and then through the technical presentation of each embodiment, the technical content of the corresponding core improvement points is integrated into the embodiment scenario for relevant elaboration.
[0081] Refer to Figure 2 , for the existing separated system architecture: the PTP working state of the port is determined by the source selection decision algorithm, and then the PTP port can perform packet synchronization channel monitoring (labeled as "synchronization measurement mechanism" in the figure). However, the monitoring result has nothing to do with the source selection decision. For the technical solution of the present invention, refer to Figure 3 , a connection will be established between the packet synchronization channel failure event flag and the source selection decision (also described as the sub-decision domain algorithm in the subsequent embodiments of the present invention), which will bring changes to the processing flow of each part, as follows:
[0082] Change in the handling method of the packet synchronization channel failure event flag: Previously, the packet synchronization channel failure event flag could only be set or cleared by the synchronization channel monitoring mechanism. Now, it can also be cleared by the source selection decision algorithm (for example, when the sub-domain decision is Master, the failure alarm is cleared; its significant technical significance will be described in detail in the extended implementation solution to be elaborated in the embodiments of the present invention).
[0083] Change in the source selection decision algorithm processing mechanism: Previously, the packet synchronization channel failure event flag had no association with the source selection decision. Now, it can be read by the source selection decision algorithm and applied in the port working state decision. To handle the decision scenarios brought about by the introduction of the packet synchronization channel failure event flag, the source selection decision algorithm adopts a dynamic sub-domain decision framework solution, that is, it can be dynamically bound and separated from the main decision domain (its significant technical significance will be described in detail in the extended implementation solution to be elaborated in the embodiments of the present invention).
[0084] Change in the synchronization measurement mechanism: To monitor the failed channel, a new monitoring status model is adopted to ensure the monitoring continuity after the synchronization path is switched.
[0085] In step 202 of Embodiment 1 of the present invention, the port B' of the second node will enter the monitoring state, and the corresponding monitoring state is implemented based on the monitoring status model proposed in the embodiments of the present invention.
[0086] To solve the monitoring problem of the failed synchronization channel after the synchronization path of the packet synchronization channel is switched, a new monitoring status model is introduced into the synchronization measurement protocol. In the synchronization port working state (the existing synchronization port working states include the slave clock state (Slave), the master clock state (Master), the blocking state (Passive), and the listening state (Listening)), a new monitoring state is added. Different from the original single-channel monitoring (which only monitors the Slave port. And there is only one Slave port in the BC node), it can achieve continuous monitoring of multiple channels (that is, the time source information that may be sent by multiple channels connected under one port can be monitored). It can monitor the packet synchronization channels of multiple PTP ports. The PTP port is a logical concept, and multiple PTP ports can be associated with one physical port or different physical ports. The specific solution is as follows:
[0087] The said monitoring state can be applied to the boundary clock BC or the ordinary clock OC. For the application scenario of the boundary clock node, multiple ports in the monitoring state can exist simultaneously;
[0088] The monitoring state can be entered through decision-making by the state decision algorithm (in the embodiments of the present invention, specifically, it enters when the packet synchronization channel failure event flag is set to valid, and can enter after sub-domain decision-making. The sub-domain decision-making may also decide to be Master), or it can be manually set in the manual planning mode. If it enters through decision-making by the state decision algorithm, the corresponding port will transfer from the initial slave clock Slave state to the monitoring state. The packet synchronization channel monitoring mechanism (i.e., the monitoring state) proposed in the embodiments of the present invention adopts a solution based on the PTP measurement protocol. By monitoring and analyzing factors such as the type, quantity, integrity, and rationality of the timestamp of the synchronization message, it is determined whether the packet synchronization channel is working properly. Only when the port runs the slave clock protocol can complete synchronization messages and all timestamp information be obtained.
[0089] The port in the monitoring state can migrate to the slave clock state Slave, the master clock state (Master), the blocking state (Passive), and the listening state (Listening). There are two scenarios for state migration: 1) decision-making events brought about by the disappearance of the packet channel alarm; 2) decision-making events brought about by changes in the received announce message. If it is incorporated into the main decision domain for decision-making, it may migrate to states such as Slave, Master, Passive, and Listening; if it is still in the sub-decision domain for decision-making, it will only migrate to Master. See specifically Figure 4 as shown;
[0090] During the implementation of the monitoring state, it is achieved by running the PTP slave clock protocol, but it does not participate in node synchronization (specifically, the execution code of the corresponding synchronization function can be set to invalid or timeout response, etc.). The existing slave clock state also runs the PTP slave clock protocol and participates in node synchronization; this is also one of the essential differences between the monitoring state proposed in the embodiments of the present invention and the slave clock state. This is because after the existing slave clock runs, clock deviation calculation will be performed and used to adjust the local frequency or time; the port in the monitoring state of the present invention's technology does not adjust the local time with the calculation result, but the calculation result is used for channel monitoring and analysis (for example: monitoring whether the packet synchronization channel fails, comparing the packet timing of the channel with the frequency or time deviation of the local clock, etc.), only for monitoring. Thus, the port can monitor the failure event of the synchronization channel through the monitoring state; and, when the corresponding port is in the monitoring state, it can receive and process the announce message, but the information is only used in the port sub-decision domain and will not be directly applied to the main decision domain, but will be transmitted according to whether there is a binding relationship between the sub-decision domain and the main decision domain (see the elaboration on the sub-domain decision framework in the following text);
[0091] If a port is manually configured to enter the monitoring state, this state can only be cleared manually and cannot be changed via the sub-domain state decision. For a port with a manually configured monitoring state, it also needs to be stripped from the main decision and no longer participate in the decision-making of the main domain, and thus no longer transmit the received time source information to the main decision domain. The sub-domain of this port does not process the received announcement messages, does not initiate sub-domain decision-making, and does not send out announcement messages either. A port with a manually configured monitoring state runs the PTP measurement protocol from-port protocol and has all the monitoring functions described above (for example: monitoring whether the packet synchronization channel fails, comparing the packet timing of the channel with the frequency or time deviation of the local clock, etc.), and can be used for packet synchronization channel analysis and monitoring of a specified synchronization port.
[0092] To meet the need for packet synchronization channel monitoring, the upstream-connected synchronization port needs to work in the Master state of the master clock. A port working in the monitoring state proposed in the embodiment of the present invention does not send out announcement messages. In this way, through the source selection state decision of the upstream synchronization node, the upstream-connected synchronization port will work in the Master state of the master clock.
[0093] In the specific implementation process of the present invention, the above-mentioned monitoring state can be implemented by defining a new PTP port working state type, or by redefining the blocked state Passive in the existing port working states to meet the above requirements. Among the existing PTP port states, Passive is the most suitable; the Master state cannot run the slave clock protocol of PTP and thus cannot monitor the synchronization channel well.
[0094] In the core framework modification of the present invention, in addition to the above-mentioned monitoring state model proposed, another main modification point lies in the proposal of the sub-domain decision framework.
[0095] By using the sub-domain decision algorithm in the sub-domain decision framework, the decision-making scenario brought about by the introduction of the packet synchronization channel failure event flag can be solved.
[0096] The existing source selection decision algorithm is a single-domain decision framework, as Figure 5 shown. The node is a decision domain, and the announcement messages received by all synchronization ports (Port 1, Port 2... Port n) are compared and aggregated and then the source selection decision is made uniformly. This solution is difficult to adapt to the decision-making scenario brought about by the difference in information flow after the introduction of the packet synchronization channel failure event flag.
[0097] Combined with Figure 6 , the sub-domain decision algorithm under the sub-domain decision framework proposed in the embodiment of the present invention is described as follows:
[0098] The node is divided into each sub-decision domain according to the synchronization port and corresponds one-to-one with the number of ports;
[0099] The sub - decision domain and the main decision domain achieve dynamic binding and separation based on the validity and invalidity of the packet synchronization channel failure event flag. When the packet synchronization channel failure event flag is invalid, the port sub - decision domain corresponding to this synchronization channel is bound to the main decision domain and participates in the unified source selection decision of the main decision domain. When the packet synchronization channel failure event flag is valid, the port sub - decision domain corresponding to this synchronization channel is separated from the main decision domain and makes an independent source selection decision. The specific mechanism is as follows:
[0100] After binding to the main decision domain, the sub - decision domain transmits the received time source information to the main decision domain and accepts the unified source selection decision of the main decision domain. The main decision domain receives the time source information sent by the sub - decision domain and forms a time source information set of the main decision domain. The time source information set of the main decision domain can be organized in the form of the optimal time source information set (E best ) way to organize information; the sub - decision domain separated from the main decision domain no longer transmits time source information to the main decision domain, but receives the time source information from the main decision domain. The sub - decision domain forms a time source information set of the sub - decision domain based on the time source information received at the port. The time source information set of the sub - decision domain can be organized in the form of the port - optimal time source information set (E rbest ) way to organize information. However, when it is determined that the Announce message received at the corresponding port of the separated sub - decision domain times out, it is necessary to receive the time source information of the main decision domain. After the packet synchronization channel fails at the corresponding port, the port makes a decision based on the time source information of the main decision domain, re - establishes a master - slave relationship with the port that has a connection relationship with it, and restores the synchronization channel between the two ports; among them, if the announce message of the main decision domain is also lost, then the optimal time source information is the local clock information, that is, the local clock is used as the time source to send information outward.
[0101] The change of the packet synchronization channel failure event flag of the corresponding port will immediately trigger the binding or separation between the sub - decision domain and the main decision domain of the corresponding port, and if the time source information obtained by the corresponding port in history is selected by the main decision domain as the time source information of the main decision domain, then the corresponding separation action will trigger the re - source selection decision of the main decision domain.
[0102] The source selection decision of the sub - decision domain adopts a new decision process, which can decide a new state and clear the packet synchronization channel failure event flag. The specific method is as follows:
[0103] When the external time source information received by the sub - decision domain synchronization port is better than the optimal time source information of the main decision domain (including that the main decision domain has no time information sent over, that is, the port of the main decision domain fails to receive the external announce message), then it is decided that the synchronization port works in the monitoring state,
[0104] When the sub - decision domain synchronization port receives that the master - decision domain time source information is superior to the external time source information (including the situation where there is no external time source information, that is, no Announce message is received from the external port), the status of the decision synchronization port is set to the master clock (Master) status, the failure event flag of the packet synchronization channel of this port is cleared, and this sub - decision domain will rebind to the master - decision domain.
[0105] When the port in the monitoring state detects the disappearance of the packet channel failure event, for example: no longer losing synchronization messages, stable timestamps, etc., the failure event flag of the packet synchronization channel of this port can be cleared, the sub - decision domain rebinds to the master - decision domain, and the master - decision domain re - determines the working status of this port through re - decision. It may be one of Master, Slave, Passive Listening.
[0106] When the number of ports in the master - decision domain or the status of the slave ports changes, the status decision will be re - made according to the existing 1588 protocol.
[0107] When the sub - decision domain synchronization port cannot receive external time source information and the announcement message reception times out, the time source information of the sub - decision domain is cleared, and the synchronization port (specifically the second - node port B' in Embodiment 1 of the present invention) decides to clear the failure event flag of the packet synchronization channel of this port and simultaneously switches to the listening state. This sub - decision domain will rebind to the master - decision domain.
[0108] When the master - decision domain cannot receive any other time source information and each unified source - selection decision port is in the listening state, the sub - decision domain will maintain the synchronization port working in the monitoring state and the failure event flag of the packet synchronization channel valid.
[0109] In the present invention, it also relates to the improvement of the packet synchronization channel failure event recovery mechanism. Since the failure causes of the packet synchronization channel failure event are mostly related to the operation of the PTP protocol stack of the synchronization port, an attempt can be made to automatically recover from the failure, which can improve the fault - tolerance ability of the synchronization network. The recovery process is as Figure 7 shown and is described as follows:
[0110] When the sub - decision domain decision synchronization port (specifically the port B' of the second node in the embodiment of the present invention) enters the monitoring state, it immediately sends information carrying the failure event flag of the packet synchronization channel to the upstream paired master clock port. For example: using the idle bit of the DelayReq message frame header to carry this information;
[0111] Subsequently, the PTP protocol stack of this port is restarted once. The restart is only performed once and only for this port, without affecting the synchronization status of other ports of the node;
[0112] When the upstream node dual master clock port receives information carrying the packet synchronization channel failure event flag, after judgment, the PTP protocol stack of this port is restarted. The restart is only performed once, and a restart event is prompted. After the restart, a message carrying response information is sent to the downstream node. For example, this information can be carried by the idle bit of the DelayResp message frame header.
[0113] In addition, the technical features involved in each embodiment of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0114] Example 1:
[0115] Embodiment 1 of the present invention provides a method for handling packet synchronization channel failure. In the embodiments of the present invention, for the convenience of distinguishing different ports to describe the method feature content, descriptions such as port A of the first node and port B' of the second node are schematically given. In fact, the corresponding ports can be any custom description scheme. Therefore, the port numbers involved in the embodiments of the present invention do not have the meanings of sequence, specific position, etc., and are only used to distinguish the identities of ports from each other. Similarly, port C' of the second node does not mean that there is a sequence relationship with port B' of the second node, but only to represent two different ports of the second node in the description. Therefore, it is also feasible to describe port C' of the second node as port D' of the second node in the embodiments of the present invention. In the embodiments of the present invention, it is assumed that initially port A of the first node is connected to port B' of the second node, and port A of the first node works in the master clock state, and port B' of the second node works in the slave clock state. For example: through the source selection decision algorithm, port A of the first node works in the Master state, while port B' of the second node works in the Slave state.
[0116] The source selection decision algorithm is that when the PTP port of a node receives advertisement messages from different sources, it sequentially compares the information carried in the messages through a standardized process and selects the optimal time source for tracking. The advertisement message carrying time source information includes: source clock ID, priority 1, clock class, priority 2, hop count, etc. In the example, after the second node receives the advertisement message sent by the first node and the advertisement source selection decision is made, port B' of the second node works in the slave clock state.
[0117] As Figure 8 shown, the processing method of the embodiment of the present invention includes:
[0118] In step 201, port B' of the second node starts monitoring the packet synchronization channel. When a packet synchronization channel failure event is detected, the second node sets the packet synchronization channel failure event flag of port B' to valid.
[0119] Among them, the monitoring mechanism for packet synchronization channel failure belongs to the category of synchronous OAM. There are various defined failure events, such as: PTP packet loss, abnormal PTP packet information, unreliable PTP timing, deteriorated PTP input, PDV out-of-limit, etc. All types of events are uniformly represented by the packet synchronization channel failure event flag (portPTCF), and this flag is bound to the synchronization port. As long as a type of failure event occurs in the channel of this port direction, the packet synchronization channel failure event flag is valid.
[0120] In step 202, the sub-decision domain of port B' of the second node is separated from the main decision domain of the second node, and port B' of the second node enters the monitoring state.
[0121] Nodes are divided into respective sub-decision domains according to synchronization ports (for example, port B' of the second node and port C' of the second node), and they correspond one-to-one with the number of ports; the sub-decision domain and the main decision domain are dynamically bound and separated according to the validity and invalidity of the packet synchronization channel failure event flag. When the packet synchronization channel failure event flag is invalid, the port sub-decision domain corresponding to this synchronization channel is bound to the main decision domain and participates in the unified source selection decision of the main decision domain. When the packet synchronization channel failure event flag is valid, the port sub-decision domain corresponding to this synchronization channel is separated from the main decision domain and makes an independent source selection decision. The specific mechanism is as follows:
[0122] After the sub-decision domain is bound to the main decision domain, it transmits the received time source information to the main decision domain and accepts the unified source selection decision of the main decision domain;
[0123] The sub-decision domain separated from the main decision domain no longer transmits time source information to the main decision domain. However, when it is determined that the Announce message received at the port corresponding to the separated sub-decision domain times out, the sub-decision domain and the main decision domain are re-bound, and it is necessary to receive the optimal time source information after comparison and decision by the main decision domain. After the packet synchronization channel fails at the corresponding port, the time source information decided by the main decision domain is used to re-establish a master-slave relationship with the port in another node with which it has a connection relationship, and the synchronization channel between the two ports is restored;
[0124] The change of the packet synchronization channel failure event flag of the corresponding port will immediately trigger the binding or separation between the sub-decision domain and the main decision domain of the corresponding port. And if the time source information obtained by the corresponding port in history is selected by the main decision domain as the time source information of the main decision domain, the corresponding separation action will trigger the re-source selection decision of the main decision domain.
[0125] In step 203, the sub - decision domains of the other ports of the second node still remain bound to the main decision domain of the second node; through the main domain decision algorithm, port C' of the second node becomes the new and only slave clock port of the second node; the sub - decision domain of port C' of the second node replaces the sub - decision domain of port B' of the second node to provide time source information to the main decision domain of the second node.
[0126] In the embodiments of the present invention, the expressions of the main domain decision algorithm and the sub - decision domain algorithm will appear at different positions, and their essence is the source - selection decision algorithm. The difference lies in the range of data objects calculated by the corresponding algorithms; for the sub - decision domain algorithm, its calculation scope is the time source information obtained by the port itself, while for the main domain decision algorithm, its calculation scope is the time source information obtained by all ports bound to it.
[0127] The embodiments of the present invention solve the lack of a processing solution after the introduction of the packet synchronization channel failure event, associate the synchronization OAM event with the synchronization path decision, and improve the reliability of the synchronization network operation.
[0128] In the embodiments of the present invention, the packet synchronization channel failure event is associated with the synchronization path decision. For example, a connection is established between the source - selection decision algorithm (expressed as the sub - domain decision algorithm in the embodiments of the present invention) and two layers of the synchronization measurement protocol (i.e., the method content associated with the packet synchronization channel failure event flag), enabling the reference of the packet synchronization channel failure event information in the synchronization port state decision (including the slave clock state Slave, the master clock state Master, the passive state Passive, the listening state Listening, and the monitoring state proposed in the embodiments of the present invention) to select a path with a normal synchronization channel, and also enabling the clearing of the packet synchronization channel failure event through the sub - domain decision algorithm in the corresponding decision scenario (i.e., adjusting the packet synchronization channel failure event flag to invalid).
[0129] As introduced before the description of the embodiments of the present invention began, since the fault causes of the packet synchronization channel failure event are mostly associated with the operation of the PTP protocol stack of the synchronization port, an attempt can be made to automatically recover from the fault, which can improve the fault - tolerance ability of the synchronization network. Refer to Figure 14 , the recovery process is as follows. After port B' of the second node enters the monitoring state, as Figure 9 shown, it further includes:
[0130] In step 301, the second node sends the packet synchronization channel failure event information to the first node; for example, the bit7 of the 7th byte in the DelayReq message frame header carries the packet synchronization channel failure event information and sends it to the first node, where bit7 = 1 indicates valid.
[0131] Among them, in the embodiment of the present invention, the corresponding second node completes the sending of the packet synchronization channel failure event information through its port B' and the connection channel between port B' and the first node port A.
[0132] In step 302, the second node restarts the PTP protocol stack of port B' and stops monitoring the synchronization channel. For example, it is triggered by reporting the "PTP Reset" event of port B' at the same time.
[0133] In the specific implementation process, it usually means restarting the PTP protocol stack of port B' in the second node once and recording the restart event of the port PTP protocol stack. Recording the restart event of the port PTP protocol stack is to exclude the problem of the PTP protocol stack when further analyzing the cause of the problem later.
[0134] In step 303, the first node receives the packet synchronization channel failure event information sent by the second node, restarts the PTP protocol stack of port A in the first node, and sends the packet synchronization channel failure event response information to the second node.
[0135] In step 304, port B' of the second node receives the packet synchronization channel failure event response information fed back by the first node and restarts monitoring the synchronization channel.
[0136] Through the process of stopping and restarting the monitoring of the synchronization channel performed in the method of steps 301 - 304 above, it is possible to avoid misjudgment during the restart process of the PTP protocol stack and affect the analysis of the cause of the failure.
[0137] Among them, if port B' of the second node does not receive the packet synchronization channel failure event response information fed back by the first node for a long time, it will also restart the synchronization channel monitoring after timeout. The judgment duration can be adjusted according to different systems.
[0138] In the embodiment of the present invention, further continuing the method process of steps 201 - 203, if the repair of the packet synchronization channel associated with port B' of the second node is successful, the method further includes:
[0139] The second node invalidates the packet synchronization channel failure event flag of its port B'; the synchronization sub-domain of port B' of the second node re-establishes a binding relationship with the master decision domain and starts the sub-domain decision algorithm; so as to obtain time source information from the repaired packet synchronization channel of port B' of the second node and the time source information obtained by port C' of the second node, and make a decision on the better time source information between the two as the time source information of the master decision domain of the second node. This is because in the previous round of source selection decision algorithm, port C' did not defeat port B', so the historical time source information of port B' is better than that of port C'.
[0140] Among them, the successful repair of the packet synchronization channel failure associated with port B' of the second node can be completed by the second node restarting the PTP protocol stack of port B' in step 302 above, or it can also be brought about by the restoration of one or more of the following normal conditions for the loss of PTP packets, abnormal PTP packet information, unreliable PTP timing, degraded PTP input, and PDV out-of-limit in the above failure event.
[0141] In the specific implementation process, for the packet synchronization channel failure event, it is further divided into the case where the announcement message times out. At this time, the execution process of the provided method has its own exclusive characteristics, such as Figure 10 As shown, when the announcement message received by port B' of the second node from the first node times out, the method further includes:
[0142] In step 401, clear the time source information of the sub-decision domain of port B' of the second node, decide that port B' enters the listening state, and invalidate the packet synchronization channel failure event flag of port B' of the second node.
[0143] In step 402, the sub-decision domain of port B' of the second node re-binds to the master decision domain of the second node and accepts the time source information obtained by the master decision domain of the second node from port C' of the second node.
[0144] In step 403, the second node sends the time source information obtained by port C' of the second node to the first node through the connection between port B' and port A of the first node.
[0145] If steps 201-203 are also prepared to resolve the packet synchronization channel failure event, and then rebind the sub-decision domain of port B' of the second node to the main decision domain, and incorporate the time source information calculated by the sub-decision domain itself through the sub-decision domain into the main decision domain to re-trigger the time source decision of the main decision domain; then the technical performance of the above steps 401-403 is that port B' of the second node has lost the possibility of restoring the packet synchronization channel, or it can be understood that in order to put the corresponding port B' of the second node into effective use as soon as possible, therefore, the above steps 401-403 are executed, and the time source information of the sub-decision domain of port B' of the second node is cleared, which is also to avoid the invalid time source information brought by the sub-decision domain of port B' of the corresponding second node when rebinding the second node main decision domain, resulting in invalid source selection decision calculation on the main decision domain side.
[0146] The process of step 401 to step 403 is exactly the opposite, that is, when port B' can receive the notification message, and still receives one or more notification messages, for example: the topology adjustment or time source switching occurs upstream of the second node, such as Figure 11 As shown, the method also includes:
[0147] In step 501, the port B' sub-decision domain decides the best time source among the received one or more notification messages, updates the time source information of the sub-decision domain, maintains the monitoring state of port B', and maintains the packet synchronization channel failure event flag as valid.
[0148] If the notification message can still be received, it means that the connection with port A of the first node is still maintained, but at this time, the packet synchronization channel has not been restored, so the corresponding port B' sub-decision domain only makes the decision on the optimal time source within a private range (that is, separated from the main decision domain).
[0149] In step 502, after waiting for the second node's packet synchronization channel monitoring to confirm that the packet synchronization channel is restored, port B' is re-bound to the main decision domain so as to re-determine the port status.
[0150] Since in the embodiments of the present invention, when port B' of the second node is used as a slave clock, the packet synchronization channel status fails. After making a sub-decision domain decision through the received announcement message in the scenarios of the above steps 501 - 502, the master-slave relationship between the original port B' of the second node and port A of the first node will be maintained unchanged. However, it cannot guarantee that the packet synchronization channel returns to normal. If the packet synchronization channel failure event flag is cleared without judgment, the second node will select to track upstream through port B' through decision-making. The packet synchronization channel monitoring mechanism will detect the failure of this packet synchronization channel again, and the second node will perform a synchronization path switch again, resulting in synchronization oscillation. Therefore, when port B' of the second node is in the monitoring state and port B' receives an announcement message, this technical solution needs to be adopted to ensure the stability of the synchronization path switch.
[0151] The above steps 501 - 502 and steps 401 - 403 exactly constitute two major refined branch processes in the execution process of steps 201 - 203 of the embodiments of the present invention. That is, both of the above two branches can be understood as one of the specific implementation situations after port B' of the second node enters the monitoring state in step 202.
[0152] As one of the implementation solutions of the embodiments of the present invention, for port B' of the second node, after the separation action of step 202 is executed for the sub-decision domain associated with it and the main decision domain of the second node, if they are to be re-bound, in addition to the timeout of port B' of the second node receiving the announcement message from the first node associated with the above step 401, and the monitoring confirmation that the packet synchronization channel is restored in step 502, there is also a situation. If the time source information received by the newly bound port C' of the main decision domain of the second node is better than the time source information historically received by the sub-decision domain of port B' of the second node, as Figure 12 shown, the method further includes:
[0153] In step 601, set the working state of port B' of the second node to the master clock (Master) state, set the packet synchronization channel failure event flag to the invalid state, and bind the sub-decision domain of port B' and the main decision domain of the second node.
[0154] In step 602, the second node sends the time source information obtained from the main decision domain of the second node to port A of the first node through an announcement message via port B'.
[0155] In step 603, the first node switches the working state of its port A from the historical master clock state to the slave clock state.
[0156] The motivation for triggering the re - binding of the sub - decision domain of port B' of the second node and the main decision domain of the second node in the above - mentioned third case is that it is found that the time - source information historically received by the sub - decision domain of port B' of the second node is not as good as the time - source information from port C' of the second node determined in step 203 of the embodiment of the present invention. At this time, if, as described in step 601, port B' of the second node is set to the master clock state, then for port B' of the second node, it doesn't need to care whether the packet synchronization channel failure is effectively resolved. Because at this time, port B' of the second node has become a dominant node, and even if the packet synchronization channel failure is not resolved, it has no impact on its being the master clock.
[0157] In addition, as another method process that can be considered as a continuation of step 502, which has results similar to those brought by steps 601 - 603 above, but with different method logics, as Figure 13 shown, if it is detected that the packet synchronization channel of port B' of the second node is restored, the method further includes:
[0158] In step 701, clear the packet synchronization channel failure event flag of port B' of the second node, and re - bind the sub - decision domain of port B' of the second node to the main decision domain.
[0159] In step 702, if the time - source information of the main decision domain is better than the external time - source information received by the synchronization port of the sub - decision domain of port B' of the second node, determine that port B' of the second node works in the master - clock state.
[0160] As a supplement to the above - mentioned method - logic branches, compared with the situations of steps 401 - 403, steps 501 - 502, and steps 601 - 603, a worse situation may occur. That is, the selected port C' of the second node described in step 203 also has a timeout for receiving channel messages (i.e., a synchronization channel failure event occurs), and the packet synchronization channel failure event flag corresponding to port C' is invalid. The method further includes: the main decision domain of the second node decides to bind port C' to enter the listening state, while the sub - decision domain of port B' maintains the port monitoring state, and keeps the packet synchronization channel failure event flag of port B' set to valid.
[0161] Example 2:
[0162] In the embodiment of the present invention, the implementation - mechanism characteristics of the sub - decision domain are separately and relatively completely elaborated, and the elaboration content of the corresponding mechanism can be applied to other embodiments of the present invention.
[0163] The sub - decision domain algorithm is only applicable to the decision of the working state of the synchronization port that is unbound from the main decision domain. Usually, after the node starts, the sub - decision domain of the synchronization port is default - bound to the main decision domain, and the working state of the synchronization port is determined by the decision of the main decision domain. After the packet synchronization channel monitoring mechanism is started and a packet synchronization channel failure event occurs, an independent sub - decision domain will be formed, and the sub - decision domain algorithm needs to be run;
[0164] The data set maintained by the sub - decision domain includes:
[0165] The time source information received by the sub - domain associated port through the advertisement message;
[0166] The optimal time source information decided by the node's main decision domain;
[0167] It should be noted that: the sub - decision domain separated from the main decision domain of the slave node does not need to transmit the optimal time source information decided by this sub - decision domain to the main decision domain of the node. When the sub - decision domain rebinds to the main decision domain, it needs to send the optimal time source information calculated by it (only limited to this sub - decision domain) to the main decision domain, thereby triggering the main decision domain to perform a new round of source selection decision algorithm.
[0168] The sub - decision domain only makes decisions on the working state of the associated ports, and is independent of other sub - decision domains, and the decision results are also not related. While the main decision domain makes unified decisions on all the bound ports;
[0169] The port working states decided by the sub - decision domain include: monitoring state and master clock state. And when deciding the master clock state of the port, the packet channel failure event flag of the port is cleared. The main decision domain will decide: at most one slave clock, an indefinite number of master clocks and blocked ports, and will not operate on the packet channel failure event flag of the port;
[0170] The decision scenarios that the sub - decision domain needs to handle, in a certain instance, include the following logic:
[0171] The port receives new time source information, and the decision scenario where the sub - decision domain decides that it is better than the time source composed of the local clock;
[0172] The port receives new time source information, and the decision scenario where the sub - decision domain decides that it is not better than the time source information composed of the local clock;
[0173] The time source information received by the port is better than the optimal time source information of the main decision domain;
[0174] The time source information received by the port is not better than the optimal time source information of the main decision domain;
[0175] The decision processing after the sub - decision domain receives the advertisement message timeout;
[0176] Decision processing after the loss of the optimal time source in the main decision domain;
[0177] For the corresponding sub - decision domain, in the decision scenario where the time source information is received as described above, the corresponding decision logic can refer to Figure 15 implementation. In Figure 15 In order to indicate that the corresponding port does not refer to a specific port, the port r is used for representation, where r represents a possible general port identifier. For example, r is 1, 2, 3, etc. Compared with Embodiment 1, the decision logic corresponding to the embodiment of the present invention Figure 15 introduces the concept of logical superiority and the technical concept of the local clock (i.e., the clock signal generated by the local crystal oscillator). Among them, in the comparison decision algorithm in BMC, the corresponding conclusion will form superiority or logical superiority, which will form different decision results in the main decision domain (this is an existing protocol mechanism and will not be elaborated too much in the implementation scheme of the present invention).
[0178] In step 801, it is judged whether the port r packet synchronization channel failure event flag is valid. If it is valid, go to step 802; if it is invalid, go to step 809.
[0179] In step 802, it is judged whether the local clock is superior to or logically superior to the optimal clock decided by the main decision domain. If so, go to step 803; if not, go to step 806.
[0180] In step 803, it is judged whether the local clock is superior to or logically superior to the optimal clock decided by the port r sub - decision domain. If so, go to step 805; if not, go to step 804.
[0181] In step 804, the sub - decision domain of port r decides to enter the monitoring state.
[0182] This can be understood as a kind of entry logic in the current instance scenario that connects to "the port B' of the second node enters the monitoring state" in step 202 of Embodiment 1. That is, after reaching the judgment condition of step 804, the port B' of the second node enters the monitoring state.
[0183] In step 805, port r is decided to be in the master clock state, send the local time source information (the local time source information is derived from the local clock generation), and clear the port r failure flag.
[0184] In step 806, it is judged whether the main decision domain clock is superior to or logically superior to the optimal clock decided by the port r sub - decision domain. If so, go to step 807; if not, go to step 808.
[0185] In step 807, port r determines the master clock state, sends the optimal time source determined by the master decision domain as its own time source information, and clears the port r failure flag.
[0186] In step 808, the sub-decision domain of port r determines to enter the monitoring state.
[0187] In step 809, the master decision domain decision logic is entered.
[0188] Example 3:
[0189] Embodiments of the present invention will further combine signaling protocols and present the technical solution of Embodiment 1 in the form of another node port, and the method includes:
[0190] As Figure 14 shown, port A of the first node is connected to port B' of the second node. Through source selection decision, port A of the first node operates in the master clock (Master) state, while port B' of the second node operates in the slave clock (Slave) state;
[0191] Port 1 of node 2 will start monitoring the packet synchronization channel. When a packet synchronization channel failure event is detected, node 2 sets the packet synchronization channel failure event flag (portDS.CF) of port 1 to "1", that is, portDS.CF = 1; as Figure 16 shown, the portDS.CF is the attribute data of the port and can be associated with the field in the flagField that correspondingly carries the packet synchronization channel failure information.
[0192] The sub-decision domain of port 1 of node 2 immediately separates from the master decision domain of node 2 and starts the sub-domain decision algorithm; the result of the sub-domain decision algorithm is that port 1 of node 2 enters the monitoring state. For the decision process, refer to Figure 15 the implementation example;
[0193] At this time, the sub-decision domains of port 2, port 3, and port 4 of node 2 still remain bound to the master decision domain; through the source selection decision algorithm of the master decision domain, port 3 becomes the new and only slave clock (Slave) port of node 2; since the sub-decision domain of port 1 of node 2 no longer provides time source information to the master decision domain of node 2;
[0194] After port 1 of node 2 determines to enter the monitoring state, it immediately sends the packet synchronization channel failure event information through bit7 of the 7th byte in the DelayReq message header to node 1. Bit7 = 1 indicates validity, and the definitions of each byte of the corresponding DelayReq message are as Figure 17As shown. Subsequently, Port 1 of Node 2 restarts the PTP protocol stack of this port once. Node 1 receives the packet synchronization channel failure event information, detects that the synchronization channel failure event flag is valid, also restarts the PTP protocol stack of Port 2 of this node once, and sends the packet synchronization channel failure event response information to Node 2 through bit 7 of the 7th byte in the DelayResp message header; while Port 1 of Node 2 continues to monitor the synchronization channel;
[0195] Next, several cases are presented for the possible technical branches of the complete solution:
[0196] If the recovery mechanism is successfully repaired, Port 1 of Node 2 can detect the recovery of the synchronization channel failure event through the packet synchronization channel monitoring mechanism, and set portDS.CF = 0 for Port 1. The synchronization sub-domain of Port 1 of this Node 2 is immediately bound to the main decision domain, and the source selection decision of the main decision domain of Node 2 is started. According to the networking in the example, in the case where the time source and the networking do not change, the slave clock port of Node 2 will return to Port 1. Manually recovering the synchronization channel failure event will also have the same binding and re-planning decision process.
[0197] If the timeout occurs when Port 1 of Node 2 receives the advertisement message from Node 1, immediately clear the time source information of the sub-decision domain of Port 1, the decision port 1 enters the listening state, and set portDS.CF = 0. The sub-decision domain of Port 1 is re-bound to the main decision domain of Node 2 and accepts the time source information of the main decision domain.
[0198] If a topology adjustment or time source switch occurs upstream of Node 2, such that Port 1 receives different advertisement messages, the sub-decision domain of Port 1 only needs to decide the optimal time source in the received message, update the sub-domain information, and maintain the monitoring state of Port 1, as well as maintain portDS.CF = 1.
[0199] If the synchronization network topology adjustment or time source switch makes the time source information received by the port (Port 2, Port 3, or Port 4) bound to the main decision domain of Node 2 better than the time source information received by the sub-decision domain of Port 1, then it is decided that Port 1 works in the Master state, set portDS.CF = 0, and bind to the main decision domain.
[0200] If the port bound to the main decision domain of Node 2 enters the listening state due to the timeout of receiving the advertisement message, the sub-decision domain of Port 1 maintains the port monitoring state, as well as maintains portDS.CF = 1.
[0201] Example 4:
[0202] Such as Figure 18As shown in the figure, it is a schematic architecture diagram of a processing device for packet synchronization channel failure in an embodiment of the present invention. The processing device for packet synchronization channel failure in this embodiment includes one or more processors 21 and a memory 22. Among them, Figure 18 Take one processor 21 as an example.
[0203] The processor 21 and the memory 22 can be connected through a bus or other means. Figure 18 Take the connection through the bus as an example.
[0204] The memory 22, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the processing method for packet synchronization channel failure in Embodiment 1. The processor 21 executes the processing method for packet synchronization channel failure by running the non-volatile software programs and instructions stored in the memory 22.
[0205] The memory 22 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some embodiments, the memory 22 may optionally include a memory remotely set relative to the processor 21, and these remote memories can be connected to the processor 21 through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0206] The program instructions / modules are stored in the memory 22, and when executed by the one or more processors 21, execute the processing method for packet synchronization channel failure in the above Embodiment 1. For example, execute each step described above. Figures 8 - 12 shown.
[0207] It should be noted that the information interaction, execution process, etc. between the modules and units in the above device and system, due to being based on the same concept as the method embodiment of the present invention, the specific content can be referred to the description in the method embodiment of the present invention, and will not be elaborated here.
[0208] Those of ordinary skill in the art can understand that all or part of the steps in the various methods of the embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. The storage medium may include: read-only memory (ROM, Read Only Memory), random access memory (RAM, Random Access Memory), magnetic disk or optical disc, etc.
[0209] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for handling the failure of a packet synchronization channel, characterized in that, Nodes divide each sub - decision domain corresponding one - to - one with the synchronization ports. The node includes a main decision domain and each sub - decision domain. When a packet channel failure event is detected by a port in the Slave state, this port is stripped from the main decision domain time source information set, and state decisions are made based on the separated sub - decision domain time source information set and the main decision domain time source information set, and the result is the monitoring state or the master clock state.
2. The method for processing the failure of the packet synchronization channel according to claim 1, wherein The monitoring state is a newly added state; or, it is an extension of the existing Master, Slave, and Passive states.
3. The method for processing the failure of the grouped synchronization channel according to claim 1, wherein A port in the monitoring state can receive and send synchronization messages, run the PTP mechanism, and calculate and analyze delays and clock offsets; the calculated results are not used for synchronization tracking.
4. The method for handling the failure of the grouped synchronization channel according to claim 1, wherein When a packet channel failure event is detected by a port in the Slave state, this port is stripped from the main decision domain time source information set, specifically including: the sub - decision domain of this port no longer provides time source information to the main decision domain, and at the same time, it is necessary to obtain the time source information of the main decision domain.
5. The method for processing the failure of the grouped synchronization channel according to claim 1, wherein It also includes that for a port in the monitoring state, if the disappearance of the failure alarm is detected, the sub - decision domain resumes binding with the main decision domain, provides time source information to the main decision domain again, and triggers a re - decision of the main decision domain.
6. The method for handling the failure of the packet synchronization channel according to any one of claims 1-5, characterized in that, When the state decision of the sub - decision domain is the monitoring state, it specifically includes: The sub - decision domain of the port extracts the time source information of the externally received Announce message, obtains the time source information of the main decision domain. If the time source information received by the sub - decision domain is better than the time source information of the main decision domain, the port is decided to be in the monitoring state; Or, the sub - decision domain receives an Announce message from an external port, and the time source information set of the main decision domain is empty, then the port is decided to be in the monitoring state.
7. The method for processing the failure of the packet synchronization channel according to any one of claims 1-5, characterized in that, When the state decision of the sub - decision domain is the master clock state, it specifically includes: When the time source information of the main decision domain is better than the externally received time source information of the sub - decision domain synchronization port of the corresponding port, the port operates in the master clock state.
8. The method for handling the failure of the grouped synchronization channel according to any one of claims 1-5, characterized in that, If the number of ports in the main decision domain or the state of the slave ports changes, the state decision will be restarted.
9. The method for handling the failure of the packet synchronization channel according to any one of claims 1-5, characterized in that, The monitoring state can also be entered through a configuration method. In this case, it has nothing to do with the failure alarm. Unless the configuration changes, it will always be in the monitoring state.
10. A processing device for a packet synchronization channel failure, characterized in that, The device includes: At least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the processor to perform the method for handling packet synchronization channel failure according to any one of claims 1 - 9.
Citation Information
Patent Citations
Time synchronization system and method with multiple synchronization domains, and cross-domain device
CN103634091A
Time synchronization method and apparatus
CN106464656A