Method and Network Device for Locating Clock Fault
20220286989 · 2022-09-08
Inventors
Cpc classification
H04J3/0641
ELECTRICITY
H04L41/00
ELECTRICITY
International classification
Abstract
A method for locating a clock fault includes that a network device locates a clock fault source based on whether first frequency offsets between a plurality of input clocks and a local clock exceed a frequency offset threshold, or based on whether second frequency offsets between the input clocks exceed a relative frequency offset threshold.
Claims
1. A method for locating a clock fault and implemented by a network device, wherein the method comprises: obtaining first frequency offsets between at least two clocks and a local clock; determining that the local clock is faulty when a first condition is met, wherein the first condition comprises that a first quantity is greater than a second quantity, wherein the first quantity is of first clocks that are in the at least two clocks and that have second frequency offsets relative to the local clock exceeding a frequency offset threshold, and wherein the second quantity is of second clocks that are in the at least two clocks and that have third frequency offsets relative to the local clock not exceeding the frequency offset threshold; and determining that a third clock in the at least two clocks is faulty when a second condition is met, wherein the second condition comprises that a fourth frequency offset between the third clock and the local clock exceeds the frequency offset threshold and a fifth frequency offset between the local clock and each fourth clock in the at least two clocks other than the third clock does not exceed the frequency offset threshold.
2. The method of claim 1, wherein the second quantity is 0, and wherein the first quantity is a third quantity of the at least two clocks.
3. The method of claim 1, wherein the at least two clocks comprise three or more clocks.
4. The method of claim 1, wherein the frequency offset threshold is ±4.6 parts per million (ppm).
5. The method of claim 1, further comprising supporting either a physical layer clock synchronization or a precision time protocol synchronization.
6. The method of claim 1, further comprising generating an alarm indicating a clock fault source.
7. A method for locating a clock fault and implemented by a network device, wherein the method comprises: identifying whether a condition comprising that a first frequency offset between a first clock in a plurality of second clocks and each of third clocks in the second clocks exceeds a relative frequency offset threshold is met; determining that the first clock is faulty when the condition is met; and generating an alarm indicating that the first clock is faulty.
8. The method of claim 7, wherein the condition further comprises that no second frequency offsets between the third clocks exceed the relative frequency offset threshold.
9. The method of claim 7, wherein the relative frequency offset threshold is ±4.44 parts per billion (ppb).
10. The method of claim 7, further comprising supporting a physical layer clock synchronization.
11. The method of claim 7, further comprising supporting Precision Time Protocol (PTP).
12. A network device for locating a clock fault comprising: an interface configured to receive at least two clocks; a clock circuit coupled to the interface and configured to obtain first frequency offsets between the at least two clocks and a local clock; and a processor coupled to the clock circuit and configured to: determine that the local clock is faulty when a first condition is met, wherein the first condition comprises that a first quantity is greater than a second quantity, wherein the first quantity is of first clocks that are in the at least two clocks and having second frequency offsets relative to the local clock exceeding a frequency offset threshold, and wherein the second quantity is of second clocks that are in the at least two clocks and having third frequency offsets relative to the local clock not exceeding the frequency offset threshold; and determine that a third clock in the at least two clocks is faulty when a second condition is met, wherein the second condition comprises that a fourth frequency offset between the third clock and the local clock exceeds the frequency offset threshold and a fifth frequency offset between the local clock and each fourth clock in the at least two clocks other than the third clock that does not exceed the frequency offset threshold.
13. The network device of claim 12, wherein the second quantity is 0 and the first quantity is a third quantity of the at least two clocks.
14. The network device of claim 12, wherein the at least two clocks comprise three or more clocks.
15. The network device of claim 12, wherein the frequency offset threshold is ±4.6 parts per million (ppm).
16. The network device of claim 12, wherein the network device supports either a physical layer clock synchronization or a precision time protocol synchronization.
17. The network device of claim 12, wherein the processor is further configured to generate an alarm indicating a clock fault source.
18. A network device for locating a clock fault comprising: an interface configured to receive a plurality of first clocks; and a processor coupled to the interface and configured to: determine that a first clock is faulty when a condition is met, wherein the condition comprises that a first frequency offset between a second clock in the first clocks and each of third clocks in the first clocks exceeds a relative frequency offset threshold; and generate an alarm indicating that the first clock is faulty.
19. The network device of claim 18, wherein the condition further comprises that none of second frequency offsets between the third clocks exceeds the relative frequency offset threshold.
20. The network device of claim 18, wherein the relative frequency offset threshold is ±4.44 parts per billion (ppb).
21. The network device of claim 18, wherein the network device supports a physical layer clock synchronization.
22. The network device of claim 18, wherein the network device supports a precision time protocol synchronization.
23. A computer program product comprising computer-executable instructions that are stored on a non-transitory computer readable medium and that, when executed by a processor, cause a network device to: determine that a local clock of the network device is faulty when a first condition is met, wherein the first condition comprises that a first quantity is greater than a second quantity, wherein the first quantity is of first clocks that are in at least two clocks and having first frequency offsets relative to the local clock exceeding a frequency offset threshold, and wherein the second quantity is of second clocks that are in the at least two clocks and having third frequency offsets relative to the local clock not exceeding the frequency offset threshold; determine that a third clock in the at least two clocks is faulty when a second condition is met, wherein the second condition comprises that a fourth frequency offset between the third clock and the local clock exceeds the frequency offset threshold and a fifth frequency offset between the local clock and each fourth clock in the at least two clocks other than the third clock that does not exceed the frequency offset threshold; and determine that a fifth clock is faulty when a third condition is met, wherein the third condition comprises that a sixth frequency offset between the fifth clock and each of sixth clocks in a plurality of seventh clocks exceeds a relative frequency offset threshold, and wherein the fifth clock is one of the seventh clocks.
24. The computer program product of claim 23, wherein the second quantity is 0, and wherein the first quantity is a third quantity of the at least two clocks.
25. The computer program product of claim 23, wherein the at least two clocks comprise three or more clocks.
26. The computer program product of claim 23, wherein the frequency offset threshold is ±4.6 parts per million (ppm).
27. The computer program product of claim 23, wherein the network device supports either a physical layer clock synchronization or a precision time protocol synchronization.
28. The computer program product of claim 23, wherein the computer-executable instructions further cause the network device to generate an alarm indicating a clock fault source.
Description
BRIEF DESCRIPTION OF DRAWINGS
[0053]
[0054]
[0055]
[0056]
[0057]
[0058]
[0059]
[0060]
[0061]
[0062]
[0063]
[0064]
DESCRIPTION OF EMBODIMENTS
[0065] To describe technical solutions in the present disclosure more clearly, the following briefly describes the accompanying drawings used in the embodiments. Apparently, the accompanying drawings in the following description merely show some embodiments of the present disclosure, and a person of ordinary skill in the art can derive other technical solutions and accompanying drawings from these accompanying drawings without creative efforts.
[0066] A device A sends a clock to a device B, and the device A is a reference clock source of the device B. Based on a requirement of the ITU-T G.811 standard, a long-term frequency offset of a clock of a clock server device relative to a standard clock (for example, a GPS clock) should not exceed 0.01 ppb (namely, ±10.sup.−5 ppm). Based on a requirement of the ITU-T G.8262 standard, a frequency offset of a local clock of a mobile bearer device relative to the standard clock (for example, the GPS clock) does not exceed ±4.6 ppm. Therefore, for the mobile bearer device, precision of a frequency offset detection threshold is set not to exceed ±4.6 ppm. “±” indicates a range herein. ±4.6 ppm is used as an example. It is considered that precision that is greater than +4.6 ppm or less than “−4.6 ppm” exceeds the threshold. The mobile bearer device is a device in a mobile bearer network, and the mobile bearer network may generally include a mobile backhaul network and a mobile fronthaul network.
[0067] As shown in
[0068] When the mobile bearer device detects that a frequency offset of a clock (or an input clock) received through a port of the mobile bearer device relative to a local clock of the mobile bearer device exceeds a threshold (for example, ±4.6 ppm), the mobile bearer device cannot determine whether the clock input through the port is faulty or the local clock of the mobile bearer device is faulty. Herein, the local clock may be a clock generated by a local crystal oscillator of the mobile bearer device. In this disclosure, sending a clock includes sending a clock signal, and receiving a clock includes receiving a clock signal.
[0069] The present disclosure provides a technical solution for locating a clock fault. In a general scenario, the mobile bearer device has at least two reference clock sources. In an implementation provided in this embodiment of the present disclosure, a specific device whose clock is faulty may be determined according to a majority decision principle. It should be noted that this solution is not limited to being applied to the mobile bearer device. This solution may be applied to a device that supports physical layer clock synchronization or a device that supports precision time protocol synchronization (for example, a router, a switch, or a packet switching device). The mobile bearer device is one of the devices. For example, this solution is not only applicable to a device that supports physical layer clock synchronization or a device that supports precision time protocol synchronization in a mobile bearer network, but also applicable to a device that supports physical layer clock synchronization or a device that supports precision time protocol synchronization in an electric power network. A design idea of the solution is as follows.
[0070] (1) For a network device that supports physical layer clock synchronization or precision time protocol synchronization, if frequency offset detection values between received at least two clocks and a local clock exceed a determining threshold (the threshold may be referred to as a frequency offset threshold, a frequency offset threshold of the network device, or a frequency offset detection threshold of the mobile bearer device, and a range of the threshold is ±4.6 ppm), it is considered that a clock of a local device is faulty. In a general scenario, there is a relatively low probability that two or more reference clock sources are faulty at the same time. As shown in
[0071] (2) If in the received at least two clocks, a frequency offset between the clock of the reference clock source 1 and the local clock exceeds the frequency offset threshold, but a frequency offset between the local clock and each of clocks of other reference clock sources does not exceed the frequency offset threshold, the network device determines that the clock of the reference clock source 1 is faulty. There is a relatively low probability that the local clock and a clock of another reference clock source are faulty at the same time. As shown in
[0072] It should be understood that the frequency offset of the clock of the reference clock source 1 relative to the local clock has a same meaning as the frequency offset between the reference clock source 1 and the local clock. In
[0073]
[0074] The following describes the foregoing solution in detail with reference to
[0075] S601: The network device receives at least two clocks.
[0076] The network device receives clock signals from the at least two reference clock sources, as shown in
[0077] S602: The network device obtains frequency offsets between a local clock and at least two clocks in the received clocks.
[0078] For example, if the network device is connected to 50 reference clock sources and receives 50 clock signals, when locating a clock fault source, the network device may determine, based on a processing capability of the network device, whether to consider all 50 clock signals or consider a part of the 50 clock signals, for example, 40 clock signals.
[0079] For example, if the network device has a relatively strong processing capability, all the 50 clocks are considered. In this case, the network device calculates frequency offsets between the local clock and the 50 clocks, that is, calculates an offset 1, an offset 2, . . . , and an offset 50.
[0080] S603: The network device determines whether a first condition is met. The first condition includes that a first quantity is greater than a second quantity, the first quantity is a quantity of clocks that are in the considered at least two clocks and whose frequency offsets relative to the local clock exceed a frequency offset threshold, and the second quantity is a quantity of clocks that are in the considered at least two clocks and whose frequency offsets relative to the local clock do not exceed the frequency offset threshold. If the first condition is met, S604 is performed.
[0081] S604: The network device determines that the local clock is faulty.
[0082] In S603 and S604, the network device may compare each of the calculated 50 offsets with the frequency offset threshold, to determine whether the 50 offsets exceed the frequency offset threshold. For example, when a period for the network device to detect the frequency offset of the clock is 900 seconds, the frequency offset threshold may be set to ±4.6 ppm. For example, if the quantity of clocks whose frequency offsets exceed the frequency offset threshold is 48 and the quantity of clocks whose frequency offsets do not exceed the frequency offset threshold is 2 in the considered 50 clocks, the network device determines that the local clock is faulty. For another example, if the quantity of clocks whose frequency offsets exceed the frequency offset threshold is 50 and the quantity of clocks whose frequency offsets do not exceed the frequency offset threshold is 0 in the 50 clocks, in other words, the frequency offsets between all the 50 clocks and the local clock exceed the frequency offset threshold, the network device determines that the local clock is faulty.
[0083] S605: The network device generates an alarm, where the alarm indicates that the local clock is faulty.
[0084] For example, the network device sends an alarm to a network management system, where the alarm indicates that the local clock of the network device is faulty. Alternatively, the network device may record, in a log, that the local clock is faulty.
[0085] S606: The network device determines whether a second condition is met. The second condition includes that a frequency offset between the first clock and the local clock exceeds the frequency offset threshold, and a frequency offset between the local clock and each clock in the at least two clocks other than the first clock does not exceed the frequency offset threshold. If the second condition is met, S607 is performed.
[0086] S607: The network device determines that the first clock is faulty.
[0087] In S606 and S607, the network device may compare each of the calculated 50 offsets with the frequency offset threshold, to determine whether the 50 offsets exceed the frequency offset threshold. For ease of description, the considered 50 clocks are numbered 1, 2, 3, . . . , and 50.
[0088] If an offset 3 of the clock 3 exceeds the frequency offset threshold, but offsets of the other 49 clocks do not exceed the frequency offset threshold, the network device determines that the clock 3 (namely, the first clock) is faulty.
[0089] S608: The network device generates an alarm, where the alarm indicates that the first clock is faulty.
[0090] For example, the network device sends an alarm to the network management system, where the alarm indicates that the clock 3 is faulty. Alternatively, the network device may record, in a log, that the clock 3 is faulty.
[0091] It should be noted that there may be an “or” relationship between that the network device determines whether a first condition is met and that the network device determines whether a second condition is met. To be specific, the network device determines only whether the first condition is met, and does not consider whether the second condition is met, or determines only whether the second condition is met, and does not consider whether the first condition is met. For another example, there may be an “and” relationship between determining whether the first condition is met and determining whether the second condition is met. For example, at a first time point, the 50 clocks considered by the network device meet the first condition, and at a second time point, the 50 clock signals change, and meet the second condition. If the network device determines that the first condition is met at the first time point, and determines that the second condition is met at the second time point, there is the “and” relationship between determining whether the first condition is met and determining whether the second condition is met.
[0092] The foregoing local clock may be a clock generated by a local crystal oscillator.
[0093] In the solution according to the embodiment shown in
[0094] The present disclosure further provides another embodiment, to resolve a problem that a service fault of a base station is caused by relatively low precision of a frequency offset threshold (for example, ±4.6 ppm) of a network device. As shown in
[0095] In a scenario in
[0096] The following describes the foregoing process of determining a clock fault source by determining whether a relative frequency offset exceeds a relative frequency offset threshold with reference to
[0097] S701: The network device receives at least three clocks.
[0098] For example, as shown in
[0099] S702: The network device obtains frequency offsets between at least three clocks in the received clocks.
[0100] As described in the embodiment shown in
[0101] The network device may separately calculate frequency offsets between the three clocks (that is, calculates three relative frequency offsets).
[0102] For example, the network may use two methods to calculate the frequency offsets between the three clocks.
[0103] Method 1: In the scenario in
Relativeoffset 12=Offset 1−Offset 2=—0.1 ppm
Relativeoffset 13=Offset 1−Offset 3=—0.1 ppm
Relativeoffset 23=Offset 2−Offset 3=0 ppm
[0104] It should be understood that the network device may alternatively calculate the frequency offsets between the clocks:
Relativeoffset 12=Offset 2−Offset 1=0.1 ppm
Relativeoffset 13=Offset 3−Offset 3=0.1 ppm
Relativeoffset 23=Offset 3−Offset 2=0 ppm
[0105] Method 2: The network device directly measures the frequency offsets between the three clocks:
Relativeoffset 12=0.1−0=0.1 ppm
Relativeoffset 13=0.1−0=0.1 ppm
Relativeoffset 23=0−0=0 ppm
[0106] It should be understood that the network device may alternatively measure the frequency offsets between the clocks:
Relativeoffset 12=0−0.1=—0.1 ppm
Relativeoffset 13=0−0.1=—0.1 ppm
Relativeoffset 23=0−0=0 ppm
[0107] S703: Determine whether a condition is met. If the condition is met, S704 is performed. The condition includes that a frequency offset between the first clock and each of other clocks in a plurality of clocks exceeds a relative frequency offset threshold, and the first clock is one of the plurality of clocks.
[0108] S704: Determine that the first clock is faulty.
[0109] In S703 and S704, each of the Relativeoffset 12, Relativeoffset 13, and Relativeoffset 23 may be compared with the relative frequency offset threshold to determine whether the Relativeoffset exceeds the relative frequency offset threshold. The relative frequency offset threshold may also be referred to as a frequency offset detection threshold of a reference clock source, or a frequency offset detection threshold of a clock source. For example, the following two scenarios may be considered when the relative frequency offset threshold is set.
[0110] Scenario 1: If the network device is connected to the clock server through one hop, as shown in
[0111] Scenario 2: If the network device is connected to the clock server through a mobile bearer network, in other words, another mobile bearer device further exists between the clock server and a mobile bearer device, the relative frequency offset threshold may be set to ±4.44 ppb. As shown in
[0112] It can be learned that whether the relative frequency offset threshold is ±0.06 ppb, ±2×10.sup.−5 ppm, or ±4.44 ppb, precision of the relative frequency threshold is far higher than a frequency offset threshold (for example, ±4.6 ppm) of the mobile bearer device. Because precision required by a base station service is 0.05 ppm, precision of the foregoing two relative frequency offset thresholds can meet the requirement of the base station service.
[0113] For example, in an example shown in
[0114] In an example shown in
[0115] In a possible implementation, the condition in S703 further includes that none of the frequency offsets between the other clocks exceeds the relative frequency offset threshold. Further, the condition is met only when a frequency offset between any two clocks in the other clocks does not exceed the relative frequency offset threshold. In the scenario shown in
[0116] S705: The network device generates an alarm, where the alarm indicates that the first clock is faulty.
[0117] For details, refer to the description in S608. Details are not described herein again.
[0118] It can be learned that, in the solution of the embodiment in
[0119] This helps quickly troubleshoot a base station fault. Based on the solution in the embodiment in
[0120] The network device may choose, through configuration, to execute only the solution in the embodiment in
[0121] The embodiments of the present disclosure are also applied to other fields that require clock synchronization, for example, electric power and media. The fields also require clock synchronization, and a clock synchronization solution may be consistent with the clock synchronization solution in each embodiment of the present disclosure.
[0122] The mobile bearer device in the foregoing embodiment may be a router or a switch, or may be an optical transport network (OTN) device or a synchronous digital hierarchy (SDH) device, or may be a microwave device, or may be a passive optical network (PON) device or a digital subscriber line (DSL) device.
[0123]
[0124]
[0125]
[0126] The network device 1200 is connected to a plurality of reference clock sources, and receives clocks of the plurality of reference clock sources. In this way, the interface of the network device 1200 executes an action of receiving a clock in
[0127] 1. The clock circuit may perform S602 in
[0128] 2. The clock circuit may perform S702 in
[0129] 3. The clock circuit may perform method 1 in S702 in
[0130] It should be noted that any apparatus embodiment described above is merely an example. The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one position, or may be distributed on a plurality of network units. Some or all the modules may be selected based on an actual requirement to achieve objectives of the solutions of the embodiments. In addition, in the accompanying drawings of the embodiments of a first network node or a controller provided in the present disclosure, connection relationships between modules indicate that the modules have communication connections with each other, and the communication connection may be implemented as one or more communications buses or signal lines. A person of ordinary skill in the art may understand and implement the embodiments of the present disclosure without creative efforts.
[0131] Methods or algorithm steps described in combination with the content disclosed in the embodiments of the present disclosure may be implemented by hardware, or may be implemented by a processor by executing a software instruction. The software instruction may include a corresponding software module. The software module may be stored in a random-access memory (RAM), a flash memory, a read-only memory (ROM), an erasable programmable ROM (EPROM), an electrically EPROM (EEPROM), a hard disk, a removable hard disk, a compact disc, or any other form of storage medium well-known in the art. For example, a storage medium is coupled to a processor, so that the processor can read information from the storage medium or write information into the storage medium. Certainly, the storage medium may be a component of the processor. The processor and the storage medium may be located in an application-specific integrated circuit (ASIC).
[0132] A person skilled in the art should be aware that in the foregoing one or more examples, functions described in the present disclosure may be implemented by hardware, software, firmware, or any combination thereof. When the present disclosure is implemented by software, the foregoing functions may be stored in a computer-readable medium or transmitted as one or more instructions or code in the computer-readable medium. The computer-readable medium includes a computer storage medium and a communications medium, where the communications medium includes any medium that enables a computer program to be transmitted from one place to another. The storage medium may be any available medium accessible to a general-purpose or dedicated computer.
[0133] The objectives, technical solutions, and benefits of the present disclosure are further described in detail in the foregoing specific embodiments. It should be understood that the foregoing descriptions are merely specific embodiments of the present disclosure, but are not intended to limit the protection scope of the present disclosure. Any modification, equivalent replacement, or improvement made based on the technical solutions of the present disclosure shall fall within the protection scope of the present disclosure.