Clock synchronization information acquisition method and device

Through the simulation of network physical topology and clock configuration information, the clock synchronization problem in the network is solved, and the accurate acquisition and automatic repair of clock synchronization information is realized, which improves the reliability and efficiency of network operation.

CN119276403APending Publication Date: 2025-01-07HUAWEI TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202310962984.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Priority Date
2023-07-04
Filing Date
2023-07-31
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The prior art has complexity of frequency configuration and synchronization problems in the clock synchronization process in the network, resulting in unreliability of network operation and it is difficult to accurately obtain the frequency and time synchronization information of network equipment.

Method used

By obtaining the physical topology and clock configuration information of the network, performing frequency and time synchronization simulation, calculating the frequency and time status information of the network equipment and synchronization path, positioning potential synchronization problems, and improving network operation reliability.

Benefits of technology

It realizes accurate positioning and automated repair of clock synchronization problems in the network, improves the clock synchronization efficiency and reliability of network equipment, supports pre-verification of network changes, and ensures the accuracy and reliability of clock configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119276403A_ABST
    Figure CN119276403A_ABST
Patent Text Reader

Abstract

The invention discloses a clock synchronization information acquisition method and device, and belongs to the technical field of communication. According to the method, the network is subjected to frequency synchronization simulation according to the obtained physical topology of the network and the frequency configuration information of the multiple network devices in the network, so that the frequency synchronization information of the multiple network devices is obtained, and the frequency synchronization information comprises the frequency state information and / or the frequency synchronization path. The frequency state information and / or the frequency synchronization path of the network equipment under the current frequency configuration can be accurately calculated through offline simulation of the real behavior of the network equipment in the frequency synchronization process, so that the frequency synchronization problem possibly occurring in the network can be positioned, and the network operation reliability is improved.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] This application claims priority to Chinese patent application No. 202310814866.5, filed on July 4, 2023, with invention name “Clock synchronization verification method and device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a method and device for acquiring clock synchronization information. Background Art

[0003] At present, network devices that communicate with each other in the network usually need to meet clock synchronization. Clock synchronization is divided into frequency synchronization and time synchronization. When two network devices meet frequency synchronization, it means that the two network devices have clocks with the same frequency, that is, the phase difference of the clock signals is constant. Time synchronization is also called phase synchronization. The premise of time synchronization is frequency synchronization. When two network devices meet time synchronization, it means that the two network devices have clocks with the same frequency and the same phase, that is, the phase difference of the clock signals is constant to zero.

[0004] Taking frequency synchronization as an example, different network devices need to obtain synchronized frequencies. The method usually adopted is to make different network devices directly or indirectly obtain frequency signals from the same frequency source, and generate the local system clock of the network device based on the frequency signal. For example, a network device connected to a frequency source directly obtains a frequency signal from the frequency source to generate a local system clock of the network device. The network device continues to send the frequency signal to the next-hop network device of the network device. The next-hop network device receives the frequency signal and generates a local system clock, which is equivalent to the next-hop network device indirectly obtaining the frequency signal from the frequency source. The path used to transmit the frequency signal from the frequency source to a certain network device is called the frequency synchronization path of the network device.

[0005] Due to the complexity of frequency configuration, multiple network devices in the network may have various problems when performing frequency synchronization. For example, due to improper frequency configuration on a certain network device, the frequency signal is interrupted during transmission or a transmission loop occurs. How to accurately obtain the frequency synchronization information of each network device in the network is the key to improving the reliability of network operation. Summary of the invention

[0006] The present application provides a method and device for acquiring clock synchronization information.

[0007] In a first aspect, a method for acquiring clock synchronization information is provided. The method includes: acquiring a physical topology of a network and clock configuration information of multiple network devices in the network, the clock configuration information including frequency configuration information, and the frequency configuration information is used for frequency synchronization of the multiple network devices. Frequency synchronization simulation is performed on the network according to the physical topology and the frequency configuration information of the multiple network devices to obtain frequency synchronization information of the multiple network devices. The frequency synchronization information includes frequency status information and / or frequency synchronization path.

[0008] By offline simulating the actual behavior of network devices during the frequency synchronization process, the present application can accurately calculate the frequency status information and / or frequency synchronization path of the network devices under the current frequency configuration, thereby helping to locate frequency synchronization problems that may occur in the network and thereby improving the reliability of network operation.

[0009] Optionally, the frequency status information of the network device includes the frequency synchronization status of the network device and attribute information of the frequency signals received and sent by the ports of the network device, wherein the frequency synchronization status indicates whether the network device has a frequency synchronization source. When the network device has a frequency synchronization source, the frequency synchronization status also includes an indication of the frequency signal from the frequency synchronization source.

[0010] Optionally, the attribute information of the frequency signal includes frequency quality and / or a signal tag of the frequency signal, and the signal tag is used to identify a source device of the frequency signal. The signal tag can be used for frequency synchronization anti-loop.

[0011] Optionally, the implementation process of frequency synchronization simulation of the network according to the physical topology and frequency configuration information includes: establishing a frequency synchronization topology according to the physical topology and frequency configuration information, the frequency synchronization topology including multiple network devices and frequency synchronization relationships between the multiple network devices, the frequency synchronization relationship being used to indicate the frequency synchronizable direction between the multiple network devices. Based on the frequency synchronization topology, frequency signals from n frequency sources are diffused, where n is a positive integer, and the frequency signal diffusion process is repeatedly executed until the frequency states of the multiple network devices stop changing, so as to obtain the frequency state information of the multiple network devices. Among them, the frequency signal diffusion process includes: for a first network device among multiple network devices to which the frequency signal is diffused, determining the frequency synchronization signal of the first network device among all the frequency signals diffused to the first network device according to the frequency configuration information of the first network device, and continuing to diffuse the frequency synchronization signal from the first network device based on the frequency synchronization topology, wherein the port of the first network device used to diffuse the frequency synchronization signal is different from the port of the first network device receiving the frequency synchronization signal.

[0012] Here, the frequency states of multiple network devices stop changing, which means that in the process of repeatedly executing the frequency signal diffusion process, the subsequent diffusion result (frequency states of multiple network devices) is the same as the previous diffusion result. The frequency states of multiple network devices stop changing, which can also be called that the multiple network devices have reached a frequency convergence state.

[0013] Optionally, after the frequency states of multiple network devices stop changing, if there are multiple frequency devices to be synchronized among the multiple network devices, and the frequency devices to be synchronized are network devices that do not use any of the n frequency sources as the frequency synchronization source, frequency signals from the multiple frequency devices to be synchronized can be diffused among the multiple frequency devices to be synchronized based on the frequency synchronization topology, and the above-mentioned frequency signal diffusion process can be repeated until the frequency states of the multiple frequency devices to be synchronized stop changing.

[0014] In this implementation mode, frequency synchronization can be achieved as much as possible among multiple frequency-to-be-synchronized devices.

[0015] Optionally, the frequency configuration information includes whether the port of the network device enables frequency synchronization and the port priority, and the frequency synchronization direction indicated by the frequency synchronization relationship is: the first port on the second network device that enables frequency synchronization can synchronize the second port on the third network device that enables frequency synchronization. Among them, the port priority of the first port is not 0, and the second network device and the third network device are two connected network devices that enable frequency synchronization among multiple network devices.

[0016] Optionally, the clock configuration information also includes time configuration information, which is used for time synchronization of multiple network devices. After the network is simulated for frequency synchronization according to the physical topology and frequency configuration information, the network can also be simulated for time synchronization according to the physical topology, time configuration information, and the presence or absence of the frequency synchronization source of the multiple network devices to obtain the time synchronization information of the multiple network devices. The time synchronization information includes time status information and / or time synchronization path. The presence or absence of the frequency synchronization source of the network device means that the network device has a frequency synchronization source or does not have a frequency synchronization source.

[0017] By offline simulating the actual behavior of network devices during the time synchronization process, the present application can accurately calculate the time status information and / or time synchronization path of the network devices under the current time configuration, thereby helping to locate time synchronization problems that may occur in the network and thereby improving network operation reliability.

[0018] Optionally, the time status information includes the time synchronization status of the network device, the attribute information of the time signal received and sent by the port of the network device, and the time source selection result of the port of the network device. The time synchronization status indicates whether the network device has a time synchronization source. When the network device has a time synchronization source, the time synchronization status also includes an indication of the time signal from the time synchronization source. The time source selection result indicates that the port is a port of the network device for receiving a time signal from the time synchronization source, a port of the network device for sending a time signal from the time synchronization source, or a standby port of the network device for receiving a time signal from the time synchronization source.

[0019] Optionally, the attribute information of the time signal includes one or more of the level of the time source from which the time signal comes, the accuracy of the time source from which the time signal comes, the device identification of the time source from which the time signal comes, the number of devices through which the time signal passes during transmission from the time source to the network device, and the configuration priority of the time source.

[0020] Optionally, the implementation process of simulating the time synchronization of the network according to the physical topology, time configuration information, and the status of the frequency synchronization source of multiple network devices includes: establishing a time synchronization topology according to the physical topology, time configuration information, and the status of the frequency synchronization source of multiple network devices, the time synchronization topology includes multiple network devices and the time synchronization relationship between the multiple network devices, and the time synchronization relationship is used to indicate the time synchronization direction between the multiple network devices. Based on the time synchronization topology, the time signals from m time sources are diffused, m is a positive integer, and the time signal diffusion process is repeatedly executed until the time status of the multiple network devices stops changing, so as to obtain the time status information of the multiple network devices. Among them, the time signal diffusion process includes: for the fourth network device to which the time signal is diffused among the multiple network devices, according to the time configuration information of the fourth network device, the time synchronization signal of the fourth network device is determined in all the time signals diffused to the fourth network device, and the updated time synchronization signal is continued to be diffused from the fourth network device based on the time synchronization topology. Among them, the number of follow-up hops carried by the updated time synchronization signal is greater than the number of follow-up hops carried by the time synchronization signal before the update, the number of follow-up hops is the number of devices that the time synchronization signal passes through from the time source, and the port of the fourth network device used to diffuse the updated time synchronization signal is different from the port of the fourth network device receiving the time synchronization signal.

[0021] Here, the time states of multiple network devices stop changing, which means that in the process of repeatedly executing the time signal diffusion process, the subsequent diffusion result (the time states of multiple network devices) is the same as the previous diffusion result. The time states of multiple network devices stop changing, which can also be called that the multiple network devices have reached a time convergence state.

[0022] Optionally, an implementation of diffusing time signals from m time sources based on the time synchronization topology includes: diffusing time signals from m time sources by breadth-first search based on the time synchronization topology, which can improve time convergence efficiency.

[0023] Optionally, after the time states of multiple network devices stop changing, if there are multiple time-to-be-synchronized devices among the multiple network devices, and the time-to-be-synchronized devices are network devices that do not use any of the m time sources as time synchronization sources, time signals from the multiple time-to-be-synchronized devices can be diffused among the multiple time-to-be-synchronized devices based on the time synchronization topology, and the above-mentioned time signal diffusion process can be repeated until the time states of the multiple time-to-be-synchronized devices stop changing.

[0024] In this implementation mode, time synchronization can be achieved as much as possible among multiple time-to-be-synchronized devices.

[0025] Optionally, the time configuration information includes whether the port of the network device is enabled for time synchronization, and the time synchronization direction indicated by the time synchronization relationship is: the third port on the fifth network device that is enabled for time synchronization can synchronize the fourth port on the sixth network device that is enabled for time synchronization. The fifth network device and the sixth network device are two connected network devices that are enabled for time synchronization among the multiple network devices.

[0026] Optionally, after the network is subjected to time synchronization simulation, if there is a frequency synchronization function of the network device enabling the time synchronization protocol among the multiple network devices, and the priority of the precision time protocol (PTP) frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, the time synchronization signal from the time synchronization source of the network device is used as the frequency synchronization signal of the network device, and the frequency synchronization signal is diffused from the network device based on the frequency synchronization topology, and the above frequency signal diffusion process is repeated until the frequency states of the multiple network devices stop changing, so as to obtain the updated frequency state information of the multiple network devices. Among them, the frequency synchronization topology is established according to the physical topology and the frequency configuration information. The frequency signal diffusion process includes: for the seventh network device to which the frequency signal is diffused among the multiple network devices, according to the frequency configuration information of the seventh network device, the frequency synchronization signal of the seventh network device is determined in all the frequency signals diffused to the seventh network device, and the frequency synchronization signal is continued to be diffused from the seventh network device based on the frequency synchronization topology. Among them, the port of the seventh network device used to diffuse the frequency synchronization signal is different from the port of the seventh network device receiving the frequency synchronization signal.

[0027] Since the result of time synchronization may affect frequency synchronization, for example, if the network device has enabled the frequency synchronization function of the time synchronization protocol (such as 1588v2), and the priority of the PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, in this case, the time synchronization source of the network device will be used as the frequency synchronization source of the network device, and the network device will use the time synchronization signal from the time synchronization source as the frequency synchronization signal of the network device. In this case, the frequency source selection result of the network device will change, and the frequency synchronization simulation needs to be continued from this network device.

[0028] Optionally, after obtaining updated frequency status information of multiple network devices, if there is a change in the status of a frequency synchronization source of a network device among the multiple network devices, time synchronization simulation is performed again on the network.

[0029] Since changes in the state of the frequency synchronization source of the network device will cause changes in the time synchronization topology, it is necessary to re-perform the time synchronization simulation.

[0030] Optionally, after obtaining the frequency synchronization information of the plurality of network devices, the frequency synchronization information may be outputted. In addition, after obtaining the time synchronization information of the plurality of network devices, the time synchronization information may be outputted.

[0031] After performing clock synchronization simulation on the network, the present application realizes visualization of the clock synchronization information by outputting the clock synchronization information (including frequency synchronization information and / or time synchronization information) to assist operation and maintenance personnel in viewing and analyzing the network status.

[0032] Optionally, it is also possible to determine whether the network device has a clock synchronization problem based on the clock synchronization information of the network device, where the clock synchronization information includes clock state information and / or clock synchronization path, the clock state information includes frequency state information and / or time state information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path. If the network device has a clock synchronization problem, the clock configuration information of the network device is compared with the clock configuration template to obtain the error configuration information of the network device.

[0033] This application can realize automatic location of problem devices in the network, and find out potential misconfigurations by comparing the clock configuration information of the problem device with the clock configuration template, which helps to improve the efficiency of repairing misconfigurations.

[0034] Optionally, after obtaining the erroneous configuration information of the network device, the erroneous configuration information may be modified according to the clock configuration template to obtain updated clock configuration information of the network device. Clock synchronization simulation is performed on the network according to the physical topology and the updated clock configuration information to obtain updated clock synchronization information of the network device. After determining that the network device has no clock synchronization problem according to the updated clock synchronization information, the clock configuration change information of the network device is sent to the network device so that the network device updates the clock configuration information of the network device.

[0035] The present application can first simulate and repair the wrong configuration of the problem device, and then pre-verify the configuration information after the simulation repair, and after determining that the clock configuration information of the problem device can solve the clock synchronization problem of the problem device after repair, the clock configuration change information is sent to the problem device. The present application can realize the automatic repair of the wrong configuration of the network device when the network device has a clock synchronization problem without relying on expert experience, and can ensure the reliability and accuracy of the configuration repair.

[0036] Optionally, if the network changes, the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network can also be obtained. According to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, the changed network is subjected to clock synchronization simulation to obtain the clock synchronization information of multiple network devices in the changed network. The clock synchronization information includes clock state information and / or clock synchronization path, the clock state information includes frequency state information and / or time state information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path.

[0037] This application supports pre-verification of network changes, and can realize dynamic change analysis of the clock synchronization information of network devices caused by network changes. In addition, since this application supports pre-verification of network changes, before the operation and maintenance personnel change the clock configuration on the network device, they can first obtain the clock synchronization information of the network device after the clock configuration is changed through simulation to ensure that the network device will not have clock synchronization problems after the clock configuration is changed, which can improve the reliability of network operation.

[0038] Optionally, a fault prompt message may be outputted, which is used to indicate the clock synchronization problem that occurs in the network after the change, so as to help the operation and maintenance personnel solve the clock synchronization problem that occurs in the network in a timely manner.

[0039] Optionally, the clock synchronization problem includes, but is not limited to, one or more of the occurrence of a frequency synchronization loop, the occurrence of a time synchronization transient loop, the network device having no frequency synchronization source, or the network device having no time synchronization source.

[0040] In a second aspect, a clock synchronization information acquisition device is provided. The device includes multiple functional modules, and the multiple functional modules interact with each other to implement the method in the first aspect and its various embodiments. The multiple functional modules can be implemented based on software, hardware, or a combination of software and hardware, and the multiple functional modules can be arbitrarily combined or divided based on specific implementations.

[0041] In a third aspect, a computer device is provided, comprising: a processor and a memory;

[0042] The memory is used to store a computer program, wherein the computer program includes program instructions;

[0043] The processor is used to call the computer program to implement the method in the above-mentioned first aspect and each implementation manner.

[0044] In a fourth aspect, a computer-readable storage medium is provided, on which instructions are stored. When the instructions are executed by a processor, the method in the above-mentioned first aspect and its various embodiments is implemented.

[0045] In a fifth aspect, a computer program product is provided, including a computer program, which, when executed by a processor, implements the method in the above-mentioned first aspect and its various embodiments.

[0046] In a sixth aspect, a chip is provided, the chip including a programmable logic circuit and / or program instructions, and when the chip is running, the method in the above-mentioned first aspect and its various embodiments is implemented. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 It is a schematic diagram of frequency synchronization;

[0048] Figure 2 It is a schematic diagram of time synchronization;

[0049] Figure 3 This is a traditional clock synchronization diagram;

[0050] Figure 4 This is a schematic diagram of high-precision ground clock synchronization based on a transmission network;

[0051] Figure 5 This is a schematic diagram of solving the clock synchronization path based on the Dijkstra algorithm;

[0052] Figure 6 is a schematic diagram of a reverse clock path search based on a real state query;

[0053] Figure 7 It is a schematic diagram of a clock synchronization simulation process provided by an embodiment of the present application;

[0054] Figure 8 This is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0055] Fig. 9 It is a schematic diagram of an implementation flow of a method for obtaining time synchronization information provided in an embodiment of the present application;

[0056] Fig.10 It is a schematic diagram of the physical topology and device frequency configuration of a network provided in an embodiment of the present application;

[0057] Fig.11 This is a schematic diagram of a frequency synchronization topology provided in an embodiment of the present application;

[0058] Fig.12 This is a schematic diagram of frequency signal diffusion provided by an embodiment of the present application;

[0059] Fig.13 It is a schematic diagram of a network device selecting a frequency synchronization signal provided by an embodiment of the present application;

[0060] Fig.14 It is a schematic diagram of a network device sending out a frequency signal after completing frequency source selection provided by an embodiment of the present application;

[0061] Fig.15 It is a schematic diagram of a physical topology and SyncE configuration of a network provided in an embodiment of the present application;

[0062] Fig.16 is another frequency synchronization topology schematic diagram provided in an embodiment of the present application;

[0063] Fig.17 is another frequency signal diffusion schematic diagram provided in an embodiment of the present application;

[0064] Fig.18 This is another frequency signal diffusion schematic diagram provided in an embodiment of the present application;

[0065] Fig.19 It is a schematic diagram of a frequency synchronization simulation result provided by an embodiment of the present application;

[0066] Fig. 20 It is a schematic diagram of the physical topology and device time configuration of a network provided in an embodiment of the present application;

[0067] Fig.21 This is a schematic diagram of a time synchronization topology provided in an embodiment of the present application;

[0068] Fig. 22 It is a schematic diagram of the physical topology and 1588v2 configuration of a network provided in an embodiment of the present application;

[0069] Fig.23 This is another schematic diagram of time synchronization topology provided in an embodiment of the present application;

[0070] Fig.24 It is a breadth-first traversal schematic diagram provided in an embodiment of the present application;

[0071] Fig.25 This is a schematic diagram of a time synchronization simulation result provided by an embodiment of the present application;

[0072] Fig.26 is another schematic diagram of time synchronization simulation results provided by an embodiment of the present application;

[0073] Fig. 27 is another schematic diagram of frequency synchronization simulation results provided by an embodiment of the present application;

[0074] Fig.28 is a schematic diagram of a visualization page provided in an embodiment of the present application;

[0075] Fig.29 This is a schematic diagram of a device clock synchronization path presented on a visual page provided by an embodiment of the present application;

[0076] Fig.30 This is a schematic diagram of device clock related information presented on a visualization page provided by an embodiment of the present application;

[0077] Fig.31 It is a schematic diagram of a network physical topology, SyncE configuration and frequency synchronization simulation results provided in an embodiment of the present application;

[0078] Fig.32 A network fault schematic diagram drawn based on frequency synchronization simulation results provided by an embodiment of the present application;

[0079] Fig.33 A network fault schematic diagram drawn based on time synchronization simulation results provided by an embodiment of the present application;

[0080] Fig.34 This is a schematic diagram of a frequency synchronization simulation result after a fault provided by an embodiment of the present application;

[0081] Fig.35 This is a schematic diagram of a time synchronization simulation result after a fault provided by an embodiment of the present application;

[0082] Fig.36 It is a schematic diagram of the physical topology and SyncE configuration of another network provided in an embodiment of the present application;

[0083] Fig.37 It is a schematic diagram of a frequency synchronization simulation process provided by an embodiment of the present application;

[0084] Fig.38 is another schematic diagram of frequency synchronization simulation results after a fault provided by an embodiment of the present application;

[0085] Fig.39 This is another schematic diagram of time synchronization topology provided in an embodiment of the present application;

[0086] Fig.40 This is another schematic diagram of time synchronization simulation results provided by an embodiment of the present application;

[0087] Fig.41 It is a schematic diagram of a time synchronization transient loop provided by an embodiment of the present application;

[0088] Fig.42 is another schematic diagram of time synchronization simulation results after a fault provided by an embodiment of the present application;

[0089] Fig.43 It is a schematic diagram of the physical topology, SyncE configuration and frequency synchronization simulation results of another network provided in an embodiment of the present application;

[0090] Fig.44 This is another schematic diagram of frequency synchronization simulation results after a fault provided by an embodiment of the present application;

[0091] Fig.45 It is a structural schematic diagram of a clock synchronization information acquisition device provided in an embodiment of the present application;

[0092] Fig.46 It is a structural schematic diagram of another clock synchronization information acquisition device provided in an embodiment of the present application;

[0093] Fig.47 It is a structural diagram of another clock synchronization information acquisition device provided in an embodiment of the present application;

[0094] Fig.48 It is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0095] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.

[0096] In order to facilitate readers' understanding of the technical solution of the present application, some terms involved in the present application are explained below.

[0097] 1. Frequency synchronization: It means that different signals have the same number of pulses in the same time interval. For example, Figure 1 This is a schematic diagram of frequency synchronization. The horizontal axis represents time. Figure 1 As shown, the frequencies of clock 1 and clock 2 are the same, and the phase difference between clock 1 and clock 2 is is a constant value, that is The two network devices satisfying frequency synchronization means that the two network devices have clocks of the same frequency.

[0098] 2. Time synchronization: It means that different signals have the same start and end time for each pulse based on frequency synchronization. For example, Figure 2 This is a schematic diagram of time synchronization. The horizontal axis represents time. Figure 2 As shown, the frequency and phase of clock 3 and clock 4 are the same. Two network devices satisfying time synchronization means that the two network devices have clocks with the same frequency and the same phase.

[0099] 3. Clock synchronization: divided into frequency synchronization and time synchronization. In the embodiment of the present application, clock synchronization is a general term for frequency synchronization and time synchronization.

[0100] 4. Frequency signal: refers to the signal emitted by the frequency source, which contains frequency pulse information and other attribute information (attribute information of the frequency signal).

[0101] 5. Time signal: refers to the signal emitted by the time source, which contains time information and other attribute information (attribute information of the time signal).

[0102] 6. Clock signal: refers to a signal sent by a clock source. In the embodiments of the present application, the clock source is a general term for a frequency source and a time source.

[0103] 7. Frequency synchronization path: refers to the path from the frequency source to the local device for transmitting frequency signals, also known as the frequency path. The path from the frequency source to a network device for transmitting frequency signals is called the frequency synchronization path of the network device.

[0104] 8. Time synchronization path: refers to the path from the time source to the local device for transmitting time signals, also known as the time path. The path from the time source to a network device for transmitting time signals is called the time synchronization path of the network device.

[0105] 9. Clock synchronization path: refers to the path from the clock source to the local device for transmitting the clock signal, also known as the clock path. The path from the clock source to a certain network device for transmitting the clock signal is called the clock synchronization path of the network device. In the embodiment of the present application, the clock synchronization path is a general term for the frequency synchronization path and the time synchronization path. Optionally, the clock synchronization path includes a frequency synchronization path and / or a time synchronization path. In a clock synchronization path, the downstream node is said to follow the upstream node, and the downstream node follows the port on the downstream node used to connect to the upstream node. When the clocks of two devices follow the same clock source, the clocks of the two devices are said to be synchronized.

[0106] At present, network devices that communicate with each other in the network usually need to meet clock synchronization. For example, in a mobile bearer network, in order to ensure the normal operation of communication services, the clock frequency and / or clock phase difference between base stations needs to be kept within a certain error level, that is, there is a need for clock synchronization between base stations. Different systems require different synchronization methods. For example, the synchronous digital hierarchy (SDH) network is a frequency synchronization system that requires the frequencies between different network elements to be synchronized to ensure the normal transmission of SDH services. The mobile bearer network deployed with time-division-synchronous code division multiple access (TD-SCDMA) base stations is a time synchronization system that requires the time between adjacent base stations to be synchronized to ensure the normal operation of the air interface.

[0107] The traditional clock synchronization solution is to configure a global navigation satellite system (GNSS) for each base station. The base stations receive the clock signals from the satellites through their respective GNSS, thereby achieving clock synchronization between the base stations. Figure 3This is a schematic diagram of traditional clock synchronization. Since the GNSS-based clock synchronization solution has constraints such as security, cost, maintainability, and failure rate, operators can use the ground-based high-precision clock synchronization solution based on the transmission network as a backup solution to achieve clock synchronization between base stations. In the ground-based high-precision clock synchronization solution based on the transmission network, one or more external building-integrated timing supply (BITS) devices are deployed between the transmission network and the satellite. The external BITS device is used to receive the satellite's clock signal and use the external BITS device as a clock source to provide the clock signal to the transmission network (referred to as BITS clock source). At the same time, a clock synchronization system is established using the transmission equipment in the transmission network (such as routers, etc.). The clock signal received by the BITS clock source from the satellite is transmitted hop by hop to all base stations through the transmission equipment, thereby achieving clock synchronization between base stations. For example, Figure 4 This is a schematic diagram of ground-based high-precision clock synchronization based on the transmission network.

[0108] At present, the main clock synchronization technologies include synchronous Ethernet (SyncE) and 1588v2 (IEEE 1588version2). SyncE is used to transmit frequency signals to achieve frequency synchronization. 1588v2 is mainly used to transmit time signals to achieve time synchronization. Transmission equipment usually does not have a direct demand for clock synchronization, but because base stations are all connected to transmission equipment and base stations have clock synchronization requirements, it is generally required that the transmission equipment of the entire network achieve clock synchronization, and this is used as a measure of the quality of the clock network. 1588v2 is based on PTP.

[0109] The frequency information transmitted by SyncE technology in the network is mainly divided into two parts, including physical layer code stream and frequency quality information. The physical layer code stream contains frequency pulse information. Frequency quality information is used to indicate frequency quality, and is generally expressed in the synchronous status message (SSM) level. The SSM levels include five categories in order of priority from high to low: primary reference clock (PRC), synchronization supply unit-A (SSU-A), synchronization supply unit-B (SSU-B), SDH equipment clock (SEC), and do not use (DNU). Different SSM levels can represent different signal sources. For example, PRC (defined in G.811) represents the frequency signal from satellite sources such as Beidou. SEC (defined in G.813) represents the frequency signal of the local clock output when the bearer network equipment is free oscillating. DNU means that the signal is not available. When the device is in SSM mode, it will first select the source based on the SSM level of the frequency signal. For frequency signals with the same SSM level, it will then compare the locally configured port priorities. In addition, the frequency signal may also include a signal tag, which is used to identify the source device of the frequency signal, so that the source device can determine whether a frequency synchronization loop occurs when the extended SSM mode is enabled. The frequency synchronization process mainly includes the diffusion of frequency information and device source selection. After the frequency signal is transmitted from different ports to each device, the device selects the source according to the quality of the frequency signal and the locally configured port priority. Due to the existence of port priority, the frequency signal does not necessarily take the shortest path in the network, and the transmission path of the frequency signal may form a loop.

[0110] The time information transmitted by 1588v2 technology in the network is mainly divided into two parts, including event messages and ordinary messages. Event messages contain time stamps, delays and other information. The announce message in the ordinary message is used to establish a time synchronization system, including time attribute information in the time source selection process. The time attribute information includes one or more of priority 1, clock class, clock accuracy, offset scaled-log variance, priority 2, clock ID or step-removed. Among them, clock-class indicates the level of the time source. clock-accuracy indicates the accuracy of the time source. offset scaled-log variance indicates time stability. clock-id indicates the device ID of the time source (the device is burned in the factory and is unique in the entire network). priority 1 and priority 2 refer to priorities, which can be manually configured to indicate the priority selection order. step-removed indicates the number of devices that the time signal passes through during the transmission process. Except for step-removed, which changes during the time signal transmission process, other time attribute information will not change during the time signal transmission process. Other time synchronization technologies similar to 1588v2 include ITU-T G.8275.1, CU-106, etc. After receiving different declaration messages, the device will select a time attribute with the best to follow through the best master clock (BMC) source selection algorithm. The time synchronization process mainly includes the diffusion of time information and device source selection. After the time signal is transmitted from different ports to a device, the device selects the source according to the attribute information of the time signal. Since the step-removed value of the time signal will increase during the transmission process, the time signal can take the shortest path, and no loop will occur. However, after the network changes, the time signal needs to be transiently diffused. In this case, a transient loop may appear in the transmission path of the time signal. In the embodiment of the present application, network changes generally refer to network changes caused by network failures or network changes caused by changes in network configuration.

[0111] Due to the complexity of SyncE and 1588v2 configuration, there may be various problems when using the ground high-precision clock synchronization solution in the existing network. For example, due to improper clock configuration on the transmission equipment, the clock signal is interrupted during transmission or loops in the transmission network. In addition, the reliability of the clock synchronization network (CSN) cannot be guaranteed. Even if all base stations can correctly receive the clock signal from the BITS device in the current state, once the network changes, it cannot be guaranteed that all base stations can still receive the correct clock signal after the network changes, which may cause the clock accuracy to deteriorate and affect the transmission of communication services. Therefore, how to accurately obtain the clock status and clock path of all transmission devices in the current network to locate the clock synchronization problems that may occur in the network is the key to improving the reliability of network operation.

[0112] Related technologies provide a clock path query solution based on the Dijkstra algorithm. The basic principle of this solution is as follows: collect the network element topology of the entire network and the clock configuration of all devices, extract the clock topology of the entire network, and determine the device role of the transmission device based on whether the BITS device is connected. Among them, the base station side gateway (cell sitegateway, CSG) device is not connected to the BITS device, and the access service gateway (access service gateway, ASG) device is connected to the BITS device. The Dijkstra algorithm is then used to calculate the shortest path from all CSG devices to the ASG device, thereby obtaining the clock synchronization path of all CSG devices and the number of hops they follow. For example, Figure 5 This is a schematic diagram of solving the clock synchronization path based on the Dijkstra algorithm. Figure 5 As shown in the figure, by solving the shortest path from R4 (CSG device) to R1 (ASG device), the clock synchronization path obtained is R4<—R3<—R6<—R2<—R1. The main advantage of this solution is that it does not need to collect the actual clock status of the device, and can be solved offline according to the clock configuration. The main disadvantage of this solution is that it only supports a small amount of time configuration. First, the solution based on the shortest path algorithm is only applicable to simple scenarios of 1588v2, and does not support complex scenarios with static source selection and multiple BITS devices. It can only query the path and cannot restore the port status information of the device. When there are two shortest paths, this solution cannot further identify the real clock synchronization path. Secondly, since the frequency signal does not have the characteristic of following the shortest path when transmitting, this solution can only query the time synchronization path, but not the frequency synchronization path. Finally, this solution does not support pre-verification, and when the network changes, it cannot analyze the dynamic change process.

[0113] Related technologies also provide a reverse clock path search solution based on real status query. The basic principle of this solution is as follows: establish a set of information interaction mechanisms between network devices. When device A wants to query its clock path, it sends a clock path query message to the upstream node it follows. After the upstream node receives the clock path query message, it continues to send clock path query messages to the upstream node of the upstream node until it reaches the source device of the clock source. Then, the clock status information of all devices on the path passed by the clock path query message is passed to device A hop by hop, thereby realizing online clock path query. For example, Figure 6 This is a schematic diagram of reverse clock path search based on real state query. Figure 6 As shown in the figure, when R4 wants to know its own clock synchronization path, it will send a clock path query message to R3 it follows. After receiving the message, R3 will continue to send a clock path query message to R2 it follows. After receiving the message, R2 will continue to send a clock path query message to R1 it follows until it reaches the root node R1. Then, starting from R1, the device information on the path passed by the clock path query message is passed back to R4. The main advantage of this solution is that it can achieve a high accuracy rate by querying under the real clock state of the network. The main disadvantage of this solution is that, on the one hand, this solution needs to add a set of clock path query protocols, which is not only difficult to implement, but also increases the business burden of the device. The clock path query of only one device can be completed at a time. On the other hand, this solution is completely based on the real clock state in the current network, does not support pre-verification, and cannot analyze the dynamic change process when the network changes.

[0114] Related technologies also provide a clock path query solution based on expert experience and manual work. The basic principle of this solution is as follows: the operation and maintenance personnel check the clock configuration or clock status of the network device and manually analyze the clock synchronization path based on expert experience. The main disadvantage of this solution is that it relies on the expert experience of the operation and maintenance personnel and needs to analyze each device one by one, which is inefficient and prone to errors.

[0115] The present application provides a technical solution for obtaining clock synchronization information of network devices in a network based on an offline simulation method. In the technical solution provided by the present application, the network is subjected to clock synchronization simulation according to the collected physical topology of the network and the clock configuration information of multiple network devices in the network to obtain the clock synchronization information of multiple network devices in the network, and the clock synchronization information includes clock state information and / clock synchronization path. By simulating the real behavior of the network device in the clock synchronization process offline, the actual clock state and clock synchronization path of the network device under the current clock configuration can be accurately calculated, which helps to locate the clock synchronization problems that may occur in the network, thereby improving the reliability of network operation. In addition, the present application can obtain the clock synchronization information of multiple network devices in the network by performing a one-time simulation of the network, thereby improving the efficiency of obtaining the clock synchronization information of the whole network devices. The present application solution also supports network verification in the network change scenario, for example, the network that is about to change or the network that has changed can continue to be simulated to realize the pre-verification of the network that is about to change or the post-verification of the network that has changed, and then obtain the clock synchronization information of the network devices in the changed network, so that the operation and maintenance personnel know what changes will occur in the clock state of the whole network after the network change, thereby realizing robustness analysis and change analysis.

[0116] Specifically, compared with the clock path query solution based on the Dijkstra algorithm in the related art, the solution based on the Dijkstra algorithm can only solve the time path query based on 1588v2, and cannot identify the real path when there are two shortest paths. The present application can simulate the real behavior of network devices in the clock synchronization process through offline simulation, and realize more accurate time path query, and the simulation method also supports more flexible frequency path query. In addition, the offline simulation solution provided by the present application is not limited by the network topology (such as the number of BITS devices, the number of network devices, the connection relationship, etc.), can support various clock protocols and clock configurations, and has high scalability.

[0117] Compared with the reverse clock path search scheme based on real status query in the related art, the present application does not need to collect the real status information of the network device, but only needs to collect the clock configuration information of the network device to complete the offline query, and the data requirements are relatively low.

[0118] Compared with the clock path query scheme based on expert experience and manual work in the related art, the present application can simulate the real behavior of network equipment during the clock synchronization process through offline simulation, thereby restoring the real network status. Therefore, the clock synchronization information obtained using the technical solution provided by the present application is more accurate.

[0119] In the above technical solution provided by the present application, the clock configuration information at least includes frequency configuration information, and the frequency configuration information is used for frequency synchronization of multiple network devices. Accordingly, the above clock synchronization simulation of the network according to the physical topology of the network and the clock configuration information of multiple network devices in the network includes: performing frequency synchronization simulation on the network according to the physical topology of the network and the frequency configuration information of multiple network devices in the network to obtain the frequency synchronization information of the multiple network devices, and the frequency synchronization information includes frequency status information and / or frequency synchronization path. The present application can accurately calculate the frequency status information and / or frequency synchronization path of the network device under the current frequency configuration by offline simulation of the real behavior of the network device during the frequency synchronization process, thereby helping to locate the frequency synchronization problems that may occur in the network, thereby improving the reliability of network operation. Among them, the frequency synchronization problem includes but is not limited to the occurrence of a frequency synchronization loop and / or the existence of a network device without a frequency synchronization source. The frequency synchronization source refers to the frequency source followed by the network device. If the network device has a frequency synchronization source, it means that the network device follows the frequency of other devices, that is, the frequency used by the network device is synchronized with the frequency of other devices. On the contrary, if the network device does not have a frequency synchronization source, it means that the network device follows the local frequency, that is, the frequency used by the network device is the local frequency of the network device.

[0120] Optionally, the clock configuration information also includes time configuration information, which is used for time synchronization of multiple network devices. Accordingly, the above-mentioned clock synchronization simulation of the network according to the physical topology of the network and the clock configuration information of multiple network devices in the network may also include: after the frequency synchronization simulation of the network, the time synchronization simulation of the network is performed according to the physical topology of the network, the time configuration information of multiple network devices in the network, and the state of the frequency synchronization source of the multiple network devices, so as to obtain the time synchronization information of the multiple network devices, and the time synchronization information includes time state information and / or time synchronization path. The present application can accurately calculate the time state information and / or time synchronization path of the network device under the current time configuration by offline simulation of the real behavior of the network device in the time synchronization process, so as to help locate the time synchronization problems that may occur in the network, thereby improving the reliability of network operation. Among them, the time synchronization problem includes but is not limited to the existence of a network device without a time synchronization source. The time synchronization source refers to the time source followed by the network device. If the network device has a time synchronization source, it means that the network device follows the time of other devices, that is, the time used by the network device is synchronized with the time of other devices. On the contrary, if the network device does not have a time synchronization source, it means that the network device follows the local time, that is, the time used by the network device is the local time of the network device.

[0121] Since the result of frequency synchronization may affect time synchronization, for example, a network device without a frequency synchronization source cannot follow the time signal from other devices, that is, a network device without a frequency synchronization source will not have a time synchronization source, so the time synchronization simulation in the embodiment of the present application is performed on the basis of frequency synchronization simulation. Similarly, the result of time synchronization may also affect frequency synchronization, because some time synchronization protocols (such as 1588v2) also have the ability to achieve frequency synchronization, such as a network device that enables the frequency synchronization function of a time synchronization protocol (such as 1588v2), and the priority of the PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation. In this case, the time synchronization source of the network device will be used as the frequency synchronization source of the network device, and the network device will use the time synchronization signal from the time synchronization source as the frequency synchronization signal of the network device, then the frequency source selection result of the network device will change, and it is necessary to continue the frequency synchronization simulation from the network device. Therefore, after the network is subjected to time synchronization simulation, it is further possible to determine whether the time synchronization simulation result will affect frequency synchronization. If the time synchronization simulation result affects frequency synchronization, it is necessary to continue the frequency synchronization simulation. After that, you can continue to judge whether the frequency synchronization simulation results will affect time synchronization. If the frequency synchronization simulation results affect time synchronization, you need to continue the time synchronization simulation. And so on, until the frequency synchronization simulation results and the time synchronization simulation results reach a stable state or enter oscillation. At this point, the clock status information and clock synchronization path of multiple network devices in the network are obtained.

[0122] For example, Figure 7 Schematic diagram of a clock synchronization simulation process provided by an embodiment of the present application. Figure 7 As shown, the clock synchronization simulation process is mainly implemented by a frequency synchronization simulation module, a time synchronization simulation module and a frequency-time coupling simulation module. The input information of the clock synchronization simulation includes the physical topology of the network and the clock configuration information of the network devices in the network (including frequency configuration information and time configuration information). The first step is to perform frequency synchronization simulation according to the input physical topology and frequency configuration information (the specific implementation can refer to the description of the following step 902), the second step is to perform time synchronization simulation according to the input physical topology and time configuration information and the frequency synchronization simulation result (here mainly refers to the frequency synchronization state of the network device) (the specific implementation can refer to the description of the following step 903), the third step is to perform frequency-time coupling simulation according to the time synchronization simulation result and the frequency synchronization simulation result (the specific implementation can refer to the description of the frequency-time coupling simulation process in the following method embodiment), and the output information finally obtained includes the clock synchronization information of the network devices in the network, and the clock synchronization information includes, for example, frequency status information, time status information, frequency synchronization path and time synchronization path.

[0123] Since any clock configuration on a network device will affect the behavior of the device, the clock configuration information obtained in this application can include all clock configurations of the network device, thereby restoring the real state of the network. Taking SyncE configuration as an example, the frequency configuration information may include whether the device enables synchronous Ethernet, the source selection mode of the device, whether the device enables SSM mode, whether the device enables extended SSM mode, the input lower limit and output upper limit of the device's frequency source SSM level, whether the port enables synchronous Ethernet, the port priority, and the port's SSM level information, etc. Taking 1588v2 configuration as an example, the time configuration information may include whether the device enables PTP time synchronization, the device's clock device type, the domain where the device's clock is located, whether the port enables PTP time synchronization, and whether the device enables static source selection, etc.

[0124] In some possible implementations, after the network is subjected to clock synchronization simulation, the clock synchronization information of the simulated network device may also be output. The clock synchronization information includes frequency synchronization information and / or time synchronization information. The present application realizes visualization of the clock synchronization information by outputting the clock synchronization information to assist operation and maintenance personnel in viewing and analyzing the network situation.

[0125] In some possible implementations, after the clock synchronization simulation is performed on the network, it is also possible to determine whether the network device has a clock synchronization problem based on the clock synchronization information of the network device obtained by the simulation. If the network device has a clock synchronization problem, the clock configuration information of the network device can be compared with the clock configuration template to obtain the wrong configuration information of the network device. The present application can realize the automatic positioning of the problem device in the network, and by comparing the difference between the clock configuration information of the problem device and the clock configuration template, find out the potential wrong configuration, which helps to improve the efficiency of repairing the wrong configuration.

[0126] In some possible implementations, after obtaining the wrong configuration information of the network device, the wrong configuration information can also be modified according to the clock configuration template to obtain the updated clock configuration information of the network device, and then the network is simulated for clock synchronization according to the physical topology of the network and the updated clock configuration information of the network device to obtain the updated clock synchronization information of the network device, and after determining that the network device has no clock synchronization problem according to the updated clock synchronization information of the network device, the clock configuration change information of the network device is sent to the network device so that the network device updates the clock configuration information of the network device. The present application can first simulate and repair the wrong configuration of the problem device, and then pre-verify the configuration information after the simulation repair, and after determining that the clock configuration information of the problem device can solve the clock synchronization problem of the problem device after being repaired, the clock configuration change information is sent to the problem device. The present application can realize the automatic repair of the wrong configuration of the network device without relying on expert experience when the network device has a clock synchronization problem, and can ensure the reliability and accuracy of the configuration repair.

[0127] In some possible implementations, if the network changes, the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network can also be obtained, and then the clock synchronization simulation of the changed network is performed according to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network to obtain the clock synchronization information of multiple network devices in the changed network. Wherein, the network change includes but is not limited to a network failure (such as a link failure or a device failure, etc.), a change in the clock configuration of a network device in the network (such as an operation and maintenance personnel manually changing the clock configuration of a network device, etc.), and the existence of a network device online or offline in the network. The present application supports pre-verification of network changes, and can realize dynamic change analysis of the clock synchronization information of network devices caused by network changes. In addition, since the present application supports pre-verification of network changes, the operation and maintenance personnel can obtain the clock synchronization information of the network device after the clock configuration is changed through simulation before changing the clock configuration on the network device, so as to ensure that the network device will not have a clock synchronization problem after the clock configuration is changed, which can improve the reliability of network operation.

[0128] In some possible implementations, if a clock synchronization problem occurs after a network change, a fault prompt message may also be output. This helps operation and maintenance personnel to promptly resolve clock synchronization problems that occur in the network. Optionally, the clock synchronization problem includes one or more of a frequency synchronization loop, a time synchronization transient loop, a network device without a frequency synchronization source, or a network device without a time synchronization source.

[0129] The following is a detailed introduction to the technical solution of the present application from multiple perspectives, including application scenarios, method flow, software devices, hardware devices, etc.

[0130] The following is an example of an application scenario of the embodiment of the present application.

[0131] The method provided in the embodiment of the present application can be applied to various networks with clock synchronization requirements, including but not limited to data center networks (DCN), metropolitan area networks, wide area networks, operator networks or campus networks. A typical application scenario of the present application is to use a transmission network to achieve clock synchronization between base stations, and the transmission network can be, for example, an operator network or a campus network. For example, Figure 8 This is a schematic diagram of an application scenario provided by an embodiment of the present application. Figure 8 As shown, the application scenario includes BITS equipment, a transmission network and a base station. In the embodiment of the present application, the network equipment in the transmission network is referred to as a transmission network equipment.

[0132] BITS equipment is used to receive the satellite clock signal through the GNSS antenna and transmit the clock signal to the transmission network equipment below. Usually two BITS equipments are set up, one active and one standby, to improve reliability.

[0133] The transmission network equipment includes but is not limited to packet transport network (PTN) equipment and acyclic transmission network (ATN) equipment. The transmission network equipment may be, for example, a router or a switch. The transmission network equipment is configured with a clock synchronization protocol, including but not limited to SyncE, 1588v2, ITU (International Telecommunication Union)-T G.8275.1 or CU-106. The transmission network equipment has the ability to follow the clock signal of the BITS device and pass the clock signal hop by hop.

[0134] The base station achieves clock synchronization between base stations by following the upstream transmission network equipment and receiving the same clock signal from the BITS equipment.

[0135] exist Figure 8 In the application scenario shown, the ultimate goal is to achieve clock synchronization between base stations. The implementation means is to configure the frequency-related configuration and time-related configuration of the transmission network equipment to ensure that all devices in the transmission network can follow the clock signal from the BITS device. Therefore, when the method provided in the embodiment of the present application is applied to Figure 8In the application scenario shown, it can be specifically implemented by performing clock synchronization simulation on the transmission network according to the network topology of the transmission network and the clock configuration information of all transmission network devices to obtain the clock synchronization information of all transmission network devices, and further determine whether each transmission network device can follow the correct clock signal.

[0136] Optionally, see Figure 8 , the transmission network can adopt a three-layer network architecture, including: a core layer, an aggregation layer and an access layer. The core layer is the high-speed switching backbone of the network, which is connected to the backbone network (also referred to as the core network), for example, it can be connected to the controller in the backbone network. The aggregation layer is used to provide aggregation connections (connecting the access layer and the core layer). The access layer is used to connect base stations to the network. Network devices located in the access layer can be called access layer devices. Network devices located in the aggregation layer can be called aggregation layer devices. Network devices located in the core layer can be called core layer devices. Taking the transmission network as an operator network as an example, the access layer device can be, for example, a CSG. The aggregation layer device can be, for example, an ASG. The core layer device can be, for example, a base station controller side gateway (radio network controller site gateway, RSG). Alternatively, the transmission network can also adopt a two-layer network architecture, which will not be described in detail in the embodiments of the present application.

[0137] The following is an example of the method flow of the embodiment of the present application.

[0138] For example, Fig. 9 Schematic diagram of the implementation process of a method for obtaining time synchronization information provided by an embodiment of the present application. The method can be applied to Figure 8 The application scenario shown in Figure 1. Fig. 9 As shown, the method includes but is not limited to the following steps 901 to 904.

[0139] The method provided in the embodiment of the present application can be performed by a computer device with a data processing function. Optionally, the computer device can be a network controller or connected to a network controller. The network controller is used to manage and control network devices in the network, and the network controller can store the physical topology of the network and the clock configuration information of the network devices for use. Optionally, the network controller can periodically collect the clock configuration information of the network devices, for example, the network controller uses a simple network management protocol (SNMP) or network telemetry technology to collect the clock configuration information of the network devices. Alternatively, when the clock configuration information of the network device changes, the network device actively reports the changed clock configuration information to the network controller.

[0140] Step 901: Acquire the physical topology of a network and clock configuration information of multiple network devices in the network.

[0141] The physical topology of a network includes all network devices in the network and the physical connections between all network devices. The physical connection relationship here can be a port-level physical connection relationship, such as a port of a network device is connected to a port of another network device. The network here can be Figure 8 The physical topology of the network includes all the transmission network devices and the physical connection relationship between all the transmission network devices. The computer device also needs to obtain the physical connection relationship between the BITS device and the transmission network device, such as which port of which transmission network device the BITS device is connected to. Alternatively, the network here may include Figure 8 The transmission network and BITS devices shown in FIG. 1 , the physical topology of the network includes all BITS devices, all transmission network devices, and the physical connection relationships between all BITS devices and all transmission network devices.

[0142] The clock configuration information of the multiple network devices includes the frequency configuration information of the multiple network devices, and the frequency configuration information is used for the multiple network devices to perform frequency synchronization. Optionally, the clock configuration information of the multiple network devices also includes the time configuration information of the multiple network devices, and the time configuration information is used for the multiple network devices to perform time synchronization. The multiple network devices here can be all network devices in the network, that is, the computer device can obtain the clock configuration information of all network devices in the network.

[0143] Optionally, the frequency configuration information of the network device includes, but is not limited to, one or more of whether the network device enables frequency synchronization, the frequency source selection mode of the network device, whether the network device enables SSM mode, whether the network device enables extended SSM mode, whether each port of the network device enables frequency synchronization, and the port priority of the network device. For example, the network device can use SyncE to configure the frequency information, and whether the SyncE configuration enables synchronous Ethernet means whether frequency synchronization is enabled.

[0144] Optionally, the time configuration information of the network device includes, but is not limited to, one or more of whether the network device enables time synchronization, whether the network device enables the frequency synchronization function of the time synchronization protocol, the time source selection mode of the network device, and whether each port of the network device enables time synchronization. The network device can, for example, use 1588v2 to configure the time information.

[0145] Step 902: Perform frequency synchronization simulation on the network according to the physical topology and the frequency configuration information of the multiple network devices to obtain frequency synchronization information of the multiple network devices, where the frequency synchronization information includes frequency status information and / or frequency synchronization path.

[0146] Optionally, the frequency status information of the network device includes the frequency synchronization status of the network device and the attribute information of the frequency signals received and sent by the ports of the network device. The frequency synchronization status indicates whether the network device has a frequency synchronization source. When the network device has a frequency synchronization source, the frequency synchronization status also includes an indication of the frequency signal from the frequency synchronization source. The attribute information of the frequency signal received and sent by the ports of the network device may be the attribute information of the frequency signal received and sent by all ports on the network device that enable frequency synchronization. The frequency synchronization path of the network device refers to all devices and their port sequence along the path that the frequency synchronization signal followed by the network device is transmitted from the frequency synchronization source to the device.

[0147] Optionally, the attribute information of the frequency signal includes the frequency quality and / or signal tag of the frequency signal, and the signal tag is used to identify the source device of the frequency signal. The frequency quality of the frequency signal can be represented by the SSM level, and the SSM levels are represented from high to low as PRC, SSU-A, SSU-B, SEC and DNU, and the higher the SSM level, the higher the frequency quality. Both the frequency quality and signal tag of the frequency signal can be used by the network device to determine whether the frequency signal can be used as a frequency synchronization signal. For example, the higher the frequency quality of the frequency signal, the greater the possibility that the frequency signal is used as a frequency synchronization signal by the network device enabled in SSM mode. The signal tag is set by the source device of the frequency signal, identifies the source device of the frequency signal, and can be used for frequency synchronization loop prevention. For example, when the network device is in the extended SSM mode, if the signal tag of the received frequency signal is the same as the locally configured signal tag, it is determined that the frequency signal cannot be used as the frequency synchronization signal of the network device.

[0148] Optionally, the implementation process of the above step 902 includes but is not limited to the following steps 9021 to 9023.

[0149] In step 9021, a frequency synchronization topology is established based on the physical topology of the network and the frequency configuration information of multiple network devices in the network. The frequency synchronization topology includes the multiple network devices and the frequency synchronization relationship between the multiple network devices. The frequency synchronization relationship is used to indicate the frequency synchronizable direction between the multiple network devices.

[0150] The frequency synchronizable direction between multiple network devices is the possible frequency following direction between the multiple network devices. Optionally, the frequency configuration information includes whether the port of the network device enables frequency synchronization and the port priority. The frequency synchronizable direction indicated by the frequency synchronization relationship is: the first port on the second network device that enables frequency synchronization can synchronize the second port on the third network device that enables frequency synchronization. Among them, the port priority of the first port is not 0, and the second network device and the third network device are two connected network devices that enable frequency synchronization among multiple network devices. Optionally, the frequency synchronization topology can be represented by nodes and directed links, where the nodes represent network devices and the directed links represent possible frequency following directions. For example, a directed link points from network device A to network device B, indicating that network device B may follow the frequency of network device A. In this implementation, a directed link from the second port to the first port can be established between the first port of the second network device and the second port of the third network device, indicating that the second network device can follow the frequency signal received from the first port.

[0151] For example, Fig.10 Schematic diagram of the physical topology and device frequency configuration of a network provided in an embodiment of the present application. Fig.10 As shown, Fig.10 Taking the four network devices shown as an example, the ports of the network devices are connected through physical links. The end of the physical link with a dot indicates that the port connected to the physical link has frequency synchronization enabled, and the end of the physical link without a dot indicates that the port connected to the physical link does not have frequency synchronization enabled. The number next to the port indicates the configured port priority. By default, the port priority is configured to 0. When the port priority is greater than 0, the smaller the port priority value, the higher the port priority. The frequency synchronization principle can be as follows: If the port does not enable frequency synchronization, the port does not have the ability to receive and send frequency signals, and there is no need to establish a directed link connecting the port; if the port priority is 0, the network device to which the port belongs does not have the ability to follow the frequency signal received by the port, and there is no need to establish a directed link pointing to the port. Based on this frequency synchronization principle, according to Fig.10 The physical topology and device frequency configuration shown can be obtained as Fig.11 The frequency synchronization topology shown.

[0152] In step 9022, frequency signals from n frequency sources are diffused based on the frequency synchronization topology, where n is a positive integer, and the frequency signal diffusion process is repeated until the frequency states of the multiple network devices stop changing, so as to obtain the frequency state information of the multiple network devices.

[0153] Among them, the frequency signal diffusion process includes: for the first network device among the multiple network devices to which the frequency signal is diffused, according to the frequency configuration information of the first network device (the frequency source selection mode is mainly used here), the frequency synchronization signal of the first network device is determined among all the frequency signals to which the first network device is diffused, and the frequency synchronization signal is continued to be diffused from the first network device based on the frequency synchronization topology. Among them, the port of the first network device used to diffuse the frequency synchronization signal is different from the port of the first network device receiving the frequency synchronization signal. The first network device is any network device among the multiple network devices to which the frequency signal is diffused. When the number of frequency sources is greater than 1 (n>1), the first network device can filter out all the frequency signals diffused to the first network device except the frequency synchronization signal, that is, the first network device can only diffuse outward the frequency synchronization signal that it follows.

[0154] It is worth noting that when the computer device completes the kth frequency signal diffusion process, the frequency states of multiple network devices in the network do not change compared to the frequency states of the multiple network devices after the qth frequency signal diffusion process is completed, then it is determined that the frequency states of the multiple network devices have stopped changing, k and q are both positive integers, and k>q≥1. In other words, when the computer device repeatedly executes the frequency signal diffusion process, if the subsequent diffusion result (the frequency state of multiple network devices) is the same as the previous diffusion result, the frequency signal diffusion process is stopped. The situation where k>q+1 means that the frequency states of multiple network devices in the network have fluctuated. The cessation of the change in the frequency states of multiple network devices can also be referred to as the multiple network devices reaching a frequency convergence state.

[0155] Optionally, for a network device that is diffused to a frequency signal from another device, the network device will usually select a frequency synchronization signal to follow from the diffused frequency signal. Of course, the embodiment of the present application does not exclude the possibility that the network device continues to use the local frequency, that is, the first network device may select a frequency synchronization signal to follow from the diffused frequency signal, or may choose not to follow any received frequency signal and use the local frequency.

[0156] Optionally, the n frequency sources include external frequency sources that are not in the network and / or internal frequency sources in the network. The external frequency source may be, for example, an external BITS device. The internal frequency source may be, for example, a network device in the network. If the n frequency sources include an external frequency source, it is necessary to obtain the physical connection relationship between the external frequency source and the network device in the network. After the network device connected to the external frequency source in the network receives the frequency signal of the external frequency source, it diffuses the frequency signal of the external frequency source based on the frequency synchronization topology. For example, Fig.12Schematic diagram of a frequency signal diffusion provided by an embodiment of the present application. Fig.12 As shown, the frequency signal can spread outward from the source node to other nodes along the link direction of the frequency synchronization topology hop by hop. The source node here can be an internal frequency source in the network, or a network device in the network connected to an external frequency source. Fig.12 The numbers in represent the diffusion hop count of the frequency signal, and the arrows marked with numbers represent the diffusion direction of the frequency signal. Fig.12 Only the forward diffusion of the frequency signal is shown. In reality, the frequency signal may diffuse forward and then diffuse backward.

[0157] In the embodiment of the present application, the network device can spread the frequency signal outward in a multicast manner.

[0158] When the number of frequency sources is greater than 1, the computer device can diffuse the frequency signals of n frequency sources in order of the frequency quality of the frequency signals provided by the frequency sources from high to low. Since the network device enabling the SSM mode will give priority to following the frequency signal with higher frequency quality, after the network device receives the frequency signal with higher frequency quality and uses it as the frequency synchronization signal, even if the network device subsequently receives a frequency signal with lower frequency quality, it will not affect the frequency synchronization signal followed by the network device, so it will not continue to diffuse the frequency signal with lower frequency quality, which can minimize the diffusion of frequency signals in the network, thereby improving the efficiency of frequency synchronization simulation.

[0159] Optionally, the computer device determines the frequency synchronization signal of the first network device among all the frequency signals diffused to the first network device according to the frequency configuration information of the first network device, and continues to diffuse the frequency synchronization signal from the first network device based on the frequency synchronization topology, which may be to simulate the frequency source selection mode of the first network device under the current frequency configuration to perform local source selection, update its own frequency state and diffuse the following frequency synchronization signal outward based on the frequency synchronization topology. For example, the computer device can simulate the network device to perform the following steps a to c to complete the processing of all frequency signals received by the network device.

[0160] In step a, frequency signals that do not meet the source selection qualifications are screened out, for example, the quality of the frequency signal is lower than the threshold configured for this device, this device enables the extended SSM mode but the received frequency signal does not meet the requirements (for example, the signal mark of the received frequency signal is 0 or is the same as the locally configured signal mark), etc.

[0161] In step b, according to the frequency configuration information of the device and the attribute information of each received frequency signal, a frequency signal is selected as a frequency synchronization signal to follow. The frequency source selection mode of the device can be to select the frequency source in the order of frequency quality from high to low, port priority from high to low, frequency source type and port number. For example, if the device enables the SSM mode, the frequency signal with the highest SSM quality is preferentially selected; if there are multiple frequency signals with the highest SSM quality, the frequency signal received through the port with a higher port priority is selected from the multiple frequency signals; if the only frequency signal still cannot be selected, it can be further selected according to the frequency source type and port number. Among them, the frequency source is mainly divided into three types according to the type: the frequency source received from the CLK / TOD port (usually a BITS frequency source), the frequency source received from the Ethernet port (called a line frequency source), and the PTP frequency source (such as the follow-up frequency source configured in 1588v2).

[0162] For example, Fig.13 Schematic diagram of a network device selecting a frequency synchronization signal provided by an embodiment of the present application. Fig.13 As shown, the network device receives the SSU-A signal through the left port, the PRC signal 1 through the upper port, the PRC signal 2 through the lower port, and the PRC signal 3 through the right port. The port priority of the left port of the network device is 10, the port priority of the upper port is 20, the port priority of the lower port is 30, and the port priority of the right port is 0. Among them, the quality of the PRC signal is higher than the quality of the SSU-A signal, and the smaller the port priority value, the higher the port priority. The network device first screens out the PRC signal 3 received through the right port with a port priority of 0, and then selects the PRC signal 1 received through the upper port with a higher port priority as the frequency synchronization signal to follow, from the PRC signal 1 with the highest SSM quality received through the upper port and the PRC signal 2 with the highest SSM quality received through the lower port.

[0163] In step c, after determining the frequency synchronization signal currently followed by the device, the outgoing frequency signals of all ports of the device are updated according to the frequency configuration. For example, if the device only enables the SSM mode, the device will send a frequency signal with a DNU quality attribute back to the port that receives the frequency synchronization signal, and send the currently followed frequency synchronization signal outward through other ports.

[0164] For example, Fig.14 FIG. 1 is a schematic diagram of a network device sending out a frequency signal after completing frequency source selection provided by an embodiment of the present application. Fig.14 As shown, in Fig.13Based on the frequency source selection results shown, after the network device selects the follow-up PRC signal 1 as the frequency synchronization signal to follow, it sends a frequency signal (i.e., DNU signal) with DNU quality attributes in reverse through the upper port, and sends the PRC signal 1 received from the upper port through other ports.

[0165] Optionally, after executing the above step 9022, that is, after the frequency states of the multiple network devices stop changing, if there are multiple frequency-to-be-synchronized devices among the multiple network devices, and the frequency-to-be-synchronized devices are network devices that do not use any of the above n frequency sources as a frequency synchronization source, then the following step 9023 may be continued. One possible situation that the network device does not use any of the above n frequency sources as a frequency synchronization source is that the network device is not diffused to the frequency signal from any of the n frequency sources, and another possible situation is that the network device is diffused to the frequency signal from at least one of the n frequency sources, but does not use it as a frequency synchronization signal.

[0166] In step 9023, frequency signals from the multiple frequency synchronization devices are diffused among the multiple frequency synchronization devices based on the frequency synchronization topology, and the frequency signal diffusion process is repeatedly executed until the frequency states of the multiple frequency synchronization devices stop changing.

[0167] Among them, the frequency signal from the frequency device to be synchronized is diffused among multiple frequency devices to be synchronized. It can be understood that the frequency signal from the frequency device to be synchronized will only affect the frequency source selection of other frequency devices to be synchronized, and will not affect the frequency source selection result of the network device that has selected the frequency synchronization source among the above n frequency sources. For each frequency device to be synchronized among the multiple frequency devices to be synchronized, the computer device can diffuse the frequency signal from the frequency device to be synchronized among the multiple frequency devices to be synchronized based on the frequency synchronization topology, specifically, diffuse the frequency signal of the frequency device to be synchronized along the link direction in the frequency synchronization topology, and for the network device that has selected the frequency synchronization source among the n frequency sources, after receiving the frequency signal from the frequency device to be synchronized, it will be filtered, so there may be a situation where the frequency device to be synchronized cannot receive the frequency signal sent by other frequency devices to be synchronized. This implementation method can achieve frequency synchronization between multiple frequency devices to be synchronized as much as possible.

[0168] Optionally, after executing the above step 9022, that is, after the frequency states of the multiple network devices stop changing, if there is only one frequency-to-be-synchronized device among the multiple network devices, the frequency-to-be-synchronized device can use the local frequency. Alternatively, after executing the above step 9023, that is, after the frequency states of the multiple frequency-to-be-synchronized devices stop changing, if there is still a frequency-to-be-synchronized device without a frequency synchronization source among the multiple frequency-to-be-synchronized devices, the frequency-to-be-synchronized device can use the local frequency.

[0169] The first embodiment of the present application takes the example of a network device using SyncE to configure frequency information, and provides an implementation method of frequency synchronization simulation based on SyncE. For example, Fig.15 FIG. 1 is a schematic diagram of a physical topology and SyncE configuration of a network provided in an embodiment of the present application. Fig.15 As shown in the figure, the network includes four network devices, namely NE1-NE4. Fig.15 In the physical topology shown, NE1-NE4 each includes multiple Ethernet ports, all of which are Gigabit Ethernet (GE) ports. The GE ports of different network devices can be connected via bidirectional optical fiber modules. The active BITS device is connected to the GE0 / 1 / 1 port of NE1. The standby BITS device is connected to the GE0 / 1 / 1 port of NE2.

[0170] The SyncE configuration is as follows: NE1-NE4 are all enabled with the synchronous Ethernet clock function (that is, the devices can perform frequency synchronization). NE1–NE4 are all enabled with the SSM mode (that is, the SSM level of the frequency source participates in the device frequency source selection). Each GE port interconnected between NE1–NE4 is enabled with the synchronous Ethernet clock function (that is, the port can receive and send frequency signals). Some GE ports of NE1–NE4 are configured with port priorities (indicated by non-"0" numbers in the figure), and some GE ports are not configured with port priorities (indicated by the number "0" in the figure). GE ports that are not configured with port priorities do not participate in the device frequency source selection. After receiving the clock signal from the satellite, the active and standby BITS devices send out frequency signals, and the signal quality is PRC. The frequency signal sent by the active BITS device is recorded as PRC signal 1, and the frequency signal sent by the standby BITS device is recorded as PRC signal 2.

[0171] Computer equipment Fig.15 The implementation process of frequency synchronization simulation for the network shown is as follows:

[0172] 1. Based on the physical topology and SyncE configuration, the following is established: Fig.16 The frequency synchronization topology shown.

[0173] 2. Prioritize the BITS devices based on their frequency signal quality (here the primary BITS device and the backup BITS device have the same priority).

[0174] 3. According to the priority order of the BITS devices, frequency signal diffusion is performed based on the frequency synchronization topology. NE1's GE0 / 1 / 1 port receives PRC signal 1 from the active BITS device, and NE2's GE0 / 1 / 1 port receives PRC signal 2 from the standby BITS device.

[0175] Frequency signal processing: NE1 and NE2 both choose to follow their respective GE0 / 1 / 1 ports and send DNU signals in the reverse direction. NE1 sends the following PRC signal 1 outward through the other two ports, and NE2 sends the following PRC signal 2 outward through the other two ports. The frequency signal diffusion process can be seen in Fig.17 .

[0176] 4. The frequency signal continues to spread: NE1's GE0 / 1 / 2 port receives PRC signal 2 from NE2; NE2's GE0 / 1 / 2 port receives PRC signal 1 from NE1; NE3's GE0 / 1 / 1 port receives PRC signal 1 from NE1; NE4's GE0 / 1 / 1 port receives PRC signal 2 from NE2.

[0177] Frequency signal processing: The port priority of GE0 / 1 / 2 of NE1 is lower than that of GE0 / 1 / 1. NE1 does not change and continues to follow PRC signal 1 of GE0 / 1 / 1.

[0178] Frequency signal processing: The port priority of GE0 / 1 / 2 of NE2 is higher than that of GE0 / 1 / 1. NE2 follows the PRC signal 1 of GE0 / 1 / 2, sends the DNU signal in the reverse direction, and sends the PRC signal 1 outward through the other two ports. For the frequency signal diffusion process, see Fig.18 .

[0179] Frequency signal processing: NE3 and NE4 both choose to follow their respective GE0 / 1 / 1 ports and send DNU signals in the reverse direction. NE3 sends PRC signal 1 through GE0 / 1 / 2 port, and NE4 sends PRC signal 2 through GE0 / 1 / 2 port. The frequency signal diffusion process can be seen in Fig.18 .

[0180] 5. The frequency signal continues to spread: GE0 / 1 / 2 of NE1 receives the DNU signal from NE2, and GE0 / 1 / 3 of NE1 receives the DNU signal from NE3; GE0 / 1 / 3 of NE2 receives the DNU signal from NE4; GE0 / 1 / 2 of NE3 receives the PRC signal 2 from NE4, and GE0 / 1 / 2 of NE4 receives the PRC signal 1 from NE3.

[0181] Frequency signal processing: NE1 does not change and continues to follow PRC signal 1 of GE0 / 1 / 1.

[0182] Frequency signal processing: NE2 does not change and continues to follow PRC signal 1 of GE0 / 1 / 2.

[0183] Frequency signal processing: NE3 does not change and continues to follow PRC signal 1 of GE0 / 1 / 1.

[0184] Frequency signal processing: The port priority of NE4's GE0 / 1 / 2 port is higher than that of GE0 / 1 / 1 port. NE4 follows the PRC signal 1 of GE0 / 1 / 2 port, sends the DNU signal in the reverse direction, and sends the PRC signal 1 outward through GE0 / 1 / 1 port. For the frequency signal diffusion process, see Fig.19 . Fig.19 Schematic diagram of a frequency synchronization simulation result provided by an embodiment of the present application. Fig.19 In the frequency synchronization simulation results shown, the arrows point to the transmission direction of the frequency synchronization signal followed by the network devices.

[0185] 6. The frequency signal continues to spread: GE0 / 1 / 3 of NE2 receives the PRC signal 1 from NE4; GE0 / 1 / 2 of NE3 receives the DNU signal from NE4.

[0186] Frequency signal processing: NE2 does not change and continues to follow PRC signal 1 of GE0 / 1 / 2.

[0187] Frequency signal processing: NE3 does not change and continues to follow PRC signal 1 of GE0 / 1 / 1.

[0188] 7. Finally, the convergence state is reached: NE1 follows the master BITS device through GE0 / 1 / 1, NE2 follows NE1 through GE0 / 1 / 2, NE3 follows NE1 through GE0 / 1 / 1, and NE4 follows NE3 through GE0 / 1 / 2.

[0189] At this point, the frequency synchronization path and frequency status information of NE1-NE4 can be obtained. The frequency synchronization path of NE1 is: NE1 (GE0 / 1 / 1) <— main BITS device; the frequency synchronization path of NE2 is: NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— main BITS device; the frequency synchronization path of NE3 is: NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— main BITS device; the frequency synchronization path of NE4 is: NE4 (GE0 / 1 / 2) <— NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— main BITS device. For example, the frequency status information of NE1-NE4 can be referred to Tables 1 to 4 respectively.

[0190] Table 1

[0191]

[0192] Table 2

[0193]

[0194] Table 3

[0195]

[0196] Table 4

[0197]

[0198] Optionally, the clock configuration information of the multiple network devices in the above step 901 also includes time configuration information of the multiple network devices, and the time configuration information is used for the multiple network devices to perform time synchronization. If the network also has a time synchronization requirement based on frequency synchronization, the computer device can continue to perform the following step 903.

[0199] Step 903: Perform time synchronization simulation on the network according to the physical topology, the time configuration information of the multiple network devices, and the status of the frequency synchronization sources of the multiple network devices to obtain the time synchronization information of the multiple network devices, which includes time status information and / or time synchronization path.

[0200] Optionally, the time status information of the network device includes the time synchronization state of the network device, the attribute information of the time signal received and sent by the port of the network device, and the time source selection result of the port of the network device. Among them, the time synchronization state indicates whether the network device has a time synchronization source. In the case that the network device has a time synchronization source, the time synchronization state also includes an indication of the time signal from the time synchronization source. The attribute information of the time signal received and sent by the port of the network device can be the attribute information of the time signal received and sent by all ports on the network device that enable time synchronization. The time source selection result indicates that the port is a port of the network device for receiving a time signal from a time synchronization source (which may be called a slave port), a port of the network device for sending a time signal from a time synchronization source (which may be called a master port), or a standby port of the network device for receiving a time signal from a time synchronization source (which may be called a passive port). Among them, the passive port is usually used as an idle standby port, which is neither used to receive time signals nor to send time signals. The time synchronization path of the network device refers to all devices and their port sequences along the path from the time synchronization source to the device that the time synchronization signal followed by the network device is transmitted to the device.

[0201] Optionally, the attribute information of the time signal includes one or more of the class of the time source from which the time signal comes (clock-class), the accuracy of the time source from which the time signal comes (clock-accuracy), the device identification of the time source from which the time signal comes (for example, the clock identification clock-id), the number of devices passed through by the time signal during transmission from the time source to the network device (step-removed), and the configuration priority of the time source (priority1, priority2).

[0202] Optionally, the implementation process of the above step 903 includes but is not limited to the following steps 9031 to 9033.

[0203] In step 9031, a time synchronization topology is established based on the physical topology of the network, the time configuration information of multiple network devices in the network, and the status of the frequency synchronization source of the multiple network devices. The time synchronization topology includes the multiple network devices and the time synchronization relationship between the multiple network devices. The time synchronization relationship is used to indicate the direction in which the time between the multiple network devices can be synchronized.

[0204] Among them, a network device without a frequency synchronization source cannot follow the time signal from other devices, that is, a network device without a frequency synchronization source will not have a time synchronization source.

[0205] The time synchronizable direction between multiple network devices is the possible time following direction between the multiple network devices. Optionally, the time configuration information includes whether the port of the network device is enabled for time synchronization, and the time synchronizable direction indicated by the time synchronization relationship is: the third port on the fifth network device that is enabled for time synchronization can synchronize the fourth port on the sixth network device that is enabled for time synchronization. Among them, the fifth network device and the sixth network device are two connected network devices that are enabled for time synchronization among multiple network devices. The third port is not configured with announce-drop, that is, the third port has the ability to receive time signals. Optionally, the time synchronization topology can be represented by nodes and directed links, where the nodes represent network devices and the directed links represent possible time following directions. For example, a directed link points from network device A to network device B, indicating that network device B may follow the time of network device A. In this implementation mode, a directed link from the fourth port to the third port can be established between the third port of the fifth network device and the fourth port of the sixth network device, indicating that the fifth network device can follow the time signal received from the third port.

[0206] For example, Fig. 20 Schematic diagram of the physical topology and device time configuration of a network provided in an embodiment of the present application. Fig. 20 As shown, Fig. 20 Taking the four network devices shown as an example, all network devices enable dynamic source selection and all network devices have frequency synchronization sources to follow, and the ports of the network devices are connected through physical links. The end of the physical link with a dot indicates that the port connected to the physical link has time synchronization enabled, and the end of the physical link without a dot indicates that the port connected to the physical link does not have time synchronization enabled. Among them, the right port of the lower left device is configured with announce-drop. The time synchronization principle can be as follows: If the port does not enable time synchronization, the port does not have the ability to receive and send time signals, and there is no need to establish a directed link connected to the port; if the port is configured with announce-drop, the port does not have the ability to receive time signals, and there is no need to establish a directed link pointing to the port. Based on this time synchronization principle, according to Fig. 20 The physical topology and device time configuration shown can be obtained as Fig.21 The time synchronization topology shown.

[0207] In step 9032, time signals from m time sources are diffused based on the time synchronization topology, where m is a positive integer, and the time signal diffusion process is repeated until the time states of the multiple network devices stop changing, so as to obtain the time state information of the multiple network devices.

[0208] Among them, the time signal diffusion process includes: for the fourth network device to which the time signal is diffused among the multiple network devices, according to the time configuration information of the fourth network device (here the time source selection mode is mainly used), the time synchronization signal of the fourth network device is determined in all the time signals to which the fourth network device is diffused, and the updated time synchronization signal is continued to be diffused from the fourth network device based on the time synchronization topology. Among them, the number of follow-up hops carried by the updated time synchronization signal is greater than the number of follow-up hops carried by the time synchronization signal before the update. The number of follow-up hops is the number of devices that the time synchronization signal passes through from the time source. The port of the fourth network device used to diffuse the updated time synchronization signal is different from the port of the fourth network device receiving the time synchronization signal. The fourth network device is any network device to which the time signal is diffused among the multiple network devices. When the number of time sources is greater than 1 (m>1), the fourth network device can filter other time signals except the time synchronization signal among all the time signals to which the fourth network device is diffused, that is, the fourth network device can only diffuse the time synchronization signal that it follows outward.

[0209] It is worth noting that when the time states of multiple network devices in the network after the computer device executes the xth time signal diffusion process, compared with the time states of the multiple network devices after executing the yth time signal diffusion process, have not changed, then it is determined that the time states of the multiple network devices have stopped changing, and x and y are both positive integers, and x>y≥1. In other words, when the computer device repeatedly executes the time signal diffusion process, if the subsequent diffusion result (the time state of multiple network devices) is the same as the previous diffusion result, the time signal diffusion process is stopped. Where x is usually equal to y+1. The cessation of the change in the time states of multiple network devices can also be referred to as the multiple network devices reaching a time convergence state.

[0210] Optionally, for a network device that is diffused to a time signal from another device, the network device will usually select a time synchronization signal to follow from the diffused time signal. Of course, the embodiment of the present application does not exclude the possibility that the network device continues to use the local time, that is, the fourth network device may select a time synchronization signal to follow from the diffused time signal, or may choose not to follow any received time signal and use the local time.

[0211] Optionally, the m time sources include external time sources that are not in the network and / or internal time sources in the network. The external time source may be, for example, an external BITS device. The internal time source may be, for example, a network device in the network. If the m time sources include an external time source, it is necessary to obtain the physical connection relationship between the external time source and the network device in the network. After the network device connected to the external time source in the network receives the time signal of the external time source, the time signal of the external time source is diffused based on the time synchronization topology.

[0212] Optionally, the computer device can diffuse the time signals from m time sources by breadth-first search based on the time synchronization topology. The time signal can diffuse from the source node along the link direction of the time synchronization topology to other nodes by breadth-first search and other shortest path search algorithms, and record the number of hops and port (the port is recorded as the pre-selected slave port) when it reaches each device. The source node here can be an internal time source in the network, or it can be a network device connected to an external time source in the network.

[0213] In an embodiment of the present application, the network device can use multicast to diffuse the time signal outward. The process of time signal diffusion is basically similar to that of frequency signal. The difference is that the time signal includes a "step-removed" attribute, that is, the number of devices to which the time signal has been transmitted. When the device receives the time signal from the same time source from different ports, it will choose the time signal with a smaller number of hops to follow. Therefore, when the time signal is diffused, it can be completed in one go according to the breadth-first traversal, and there will be no reverse diffusion of the frequency signal. It is worth noting that the breadth-first search here is actually a feasible method summarized based on the BMC source selection rules, and the time signal can also be simply diffused like a frequency signal.

[0214] When the number of time sources is greater than 1, the computer device can prioritize the attribute information of the time signal provided by the time source, and diffuse the time signals of the m time sources in order from high to low priority. The better the attribute of the time signal, the higher the priority. Since the network device will give priority to following the time signal with better attributes, after the network device receives the time signal with better attributes and uses it as the time synchronization signal, even if the network device subsequently receives the time signal with poorer attributes, it may not affect the time synchronization signal followed by the network device, so it will not continue to diffuse the time signal with poorer attributes, which can minimize the diffusion of the time signal in the network, thereby improving the efficiency of time synchronization simulation.

[0215] Optionally, the computer device determines the time synchronization signal of the fourth network device from all the time signals diffused to the fourth network device according to the time configuration information of the fourth network device, and continues to diffuse the updated time synchronization signal from the fourth network device based on the time synchronization topology, which can be to simulate the time source selection mode of the fourth network device under the current time configuration to select the source locally, update its own time state, and diffuse the time synchronization signal to follow outward based on the time synchronization topology. For example, the computer device can use the port of the network device that receives the best time signal attribute and the smallest number of hops as the slave port, and other ports as passive ports or master ports according to the time source selection mode under the current time configuration. Among them, the slave port indicates that the device will follow the time signal received by the port after the BMC selects the source, and will not send out the time signal through the port. The master port indicates that the device does not follow the time signal received by the port, and will send out the time signal currently followed by the device through the port (step-removed will increase by one), but the port will also receive the time signal, and when the time signal changes, the BMC source selection is performed again. A passive port indicates that after the BMC selects the source, the time signal received by this port is different from the time signal received by the slave port in step-removed, and the rest are the same. This port will receive this time signal as a backup. When the time signal of the slave port changes (for example, it is lost), the device chooses to follow the time signal received by the passive port.

[0216] Optionally, after executing the above step 9032, that is, after the time states of the multiple network devices stop changing, if there are multiple time synchronization devices among the multiple network devices, and the time synchronization devices are network devices that do not use any of the above m time sources as the time synchronization source, then the following step 9033 may be continued. One possible situation that the network device does not use any of the above m time sources as the time synchronization source is that the network device is not diffused to the time signal from any of the m time sources, and another possible situation is that the network device is diffused to the frequency signal from at least one of the m time sources, but does not use it as the time synchronization signal.

[0217] In step 9033, time signals from the multiple time synchronization devices are diffused in the multiple time synchronization devices respectively based on the time synchronization topology, and the time signal diffusion process is repeatedly executed until the time states of the multiple time synchronization devices stop changing.

[0218] Among them, the time signal from the time-to-be-synchronized device is diffused among multiple time-to-be-synchronized devices. It can be understood that the time signal from the time-to-be-synchronized device will only affect the time source selection of other time-to-be-synchronized devices, and will not affect the time source selection result of the network device that has selected the time synchronization source among the above m time sources. For each time-to-be-synchronized device among the multiple time-to-be-synchronized devices, the computer device can diffuse the time signal from the time-to-be-synchronized device among the multiple time-to-be-synchronized devices based on the time synchronization topology, specifically, diffuse the time signal of the time-to-be-synchronized device along the link direction in the time synchronization topology, and for the network device that has selected the time synchronization source among the m time sources, after receiving the time signal from the time-to-be-synchronized device, it will be filtered, so there may be a situation where the time-to-be-synchronized device cannot receive the time signal sent by other time-to-be-synchronized devices. This implementation method can achieve time synchronization between multiple time-to-be-synchronized devices as much as possible.

[0219] Optionally, after executing the above step 9032, that is, after the time states of the multiple network devices stop changing, if there is only one time-to-be-synchronized device among the multiple network devices, then the time-to-be-synchronized device can use local time. Alternatively, after executing the above step 9033, that is, after the time states of the multiple time-to-be-synchronized devices stop changing, if there is still a time-to-be-synchronized device without a time synchronization source among the multiple time-to-be-synchronized devices, then the time-to-be-synchronized device can use local time.

[0220] The second embodiment of the present application takes the example of a network device using 1588v2 to configure time information, and provides an implementation method of time synchronization simulation based on 1588v2. For example, Fig. 22 FIG. 1 is a schematic diagram of a physical topology and 1588v2 configuration of a network provided in an embodiment of the present application. Fig. 22 As shown, the network includes four network devices, namely NE1-NE4. Fig. 22 The physical topology and SyncE configuration shown are consistent with the physical topology and SyncE configuration involved in the first embodiment above, and are not described in detail here.

[0221] The 1588v2 configuration is as follows: NE1–NE4 are all enabled with the PTP function (i.e., the device can perform time synchronization), set as boundary clock (BC) devices (i.e., the device can have multiple ports with the PTP function enabled), and set the clock domain to 0 (i.e., only devices in the same domain can perform time synchronization). The PTP function is enabled on each GE port interconnected between NE1–NE4 (i.e., the port can receive and send PTP messages). After receiving the clock signal from the satellite, the active and standby BITS devices send out time signals (in the form of PTP messages). The priority1 of the active BITS device is configured to 6, and the priority1 of the standby BITS device is configured to 7. The attributes of other time signals are the same.

[0222] Computer equipment Fig. 22 The implementation process of time synchronization simulation for the network shown is as follows:

[0223] 1. Perform frequency synchronization simulation first (refer to the above Fig.15 Figure 1 shows the frequency synchronization simulation process of the network shown in Figure 1), and after convergence, all devices achieve frequency locking.

[0224] 2. Based on the physical topology and 1588v2 configuration, the following is established: Fig.23 The time synchronization topology shown.

[0225] 3. Priority is sorted according to the time signal attributes of the BITS devices, and the priority of the primary BITS device is higher than that of the backup BITS.

[0226] 4. Perform a breadth-first traversal of the time signal of the main BITS device (first priority) to determine all the devices and ports it can cover, and then select sources for these devices and determine the port status based on the shortest path obtained. For example, Fig.24 This is a breadth-first traversal schematic diagram provided in an embodiment of the present application.

[0227] The shortest path from NE1 to the master BITS device is "master BITS device - NE1", so NE1 follows the master BITS device through GE0 / 1 / 1. The status of GE0 / 1 / 1 is slave, and the status of the other two ports is master.

[0228] The shortest path from NE2 to the master BITS device is "master BITS device-NE1-NE2", so NE2 follows NE1 through GE0 / 1 / 2 port. The status of GE0 / 1 / 2 port is slave, and the status of the other two ports is master.

[0229] The shortest path from NE3 to the master BITS device is "master BITS device-NE1-NE3", so NE3 follows NE1 through GE0 / 1 / 1 port. The status of GE0 / 1 / 1 port is slave, and the status of other ports is master.

[0230] The shortest paths from NE4 to the master BITS device are "master BITS device-NE1-NE2-NE4" and "master BITS device-NE1-NE3-NE4". The clock IDs of NE3 and NE2 are compared (assuming that NE3 has a smaller clock ID). Therefore, NE4 follows NE3 through GE0 / 1 / 2. The status of GE0 / 1 / 2 is slave, and the status of GE0 / 1 / 1 is passive.

[0231] In the embodiment of the present application, the time signal of the main BITS device can cover all devices, so there is no need to process the time signal of the backup BITS device. If there are devices in the network that are not covered by the time signal of the main BITS device, a breadth-first traversal is performed on the time signal of the backup BITS device (second priority), and after determining all the devices and ports that can be covered in the first round of uncovered device set, the source is selected for these devices and the port status is determined based on the shortest path obtained.

[0232] 5. Finally, the convergence state is reached: NE1 follows the main BITS device through GE0 / 1 / 1 port, NE2 follows NE1 through GE0 / 1 / 2 port, NE3 follows NE1 through GE0 / 1 / 1 port, and NE4 follows NE3 through GE0 / 1 / 2 port. For example, Fig.25 Schematic diagram of a time synchronization simulation result provided by an embodiment of the present application. Fig.25 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices.

[0233] At this point, the time synchronization path and time status information of NE1-NE4 can be obtained. The time synchronization path of NE1 is: NE1 (GE0 / 1 / 1) <— main BITS device; the time synchronization path of NE2 is: NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— main BITS device; the time synchronization path of NE3 is: NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— main BITS device; the time synchronization path of NE4 is: NE4 (GE0 / 1 / 2) <— NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— main BITS device. Fig. 22The time synchronization path and frequency synchronization path of NE1-NE4 in the network shown are consistent. In actual applications, the time synchronization path and frequency synchronization path of the same network device may also be inconsistent. For example, the time status information of NE1-NE4 can be respectively referred to Table 5 to Table 8.

[0234] Table 5

[0235]

[0236] Table 6

[0237]

[0238] Table 7

[0239]

[0240] Table 8

[0241]

[0242] Since the time synchronization result may affect the frequency synchronization, after executing the above step 903, that is, after the time synchronization simulation is performed on the network, the computer device can further determine whether the time synchronization simulation result will affect the frequency synchronization. If the time synchronization simulation result affects the frequency synchronization, it is necessary to continue the frequency synchronization simulation. The specific implementation process includes the following steps S101 to S102.

[0243] In step S101, it is determined whether there is a network device among multiple network devices that has enabled the frequency synchronization function of the time synchronization protocol, and the priority of the PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation. If there is, continue to perform the following step S102; if not, end the clock synchronization simulation process, and use the frequency synchronization information obtained in the above step 902 and the time synchronization information obtained in the above step 903 as the final clock synchronization simulation result.

[0244] Because the network device has enabled the frequency synchronization function of the time synchronization protocol (such as 1588v2), and the priority of the PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, the time synchronization source of the network device will be used as the frequency synchronization source of the network device, that is, the network device will use the time synchronization signal from the time synchronization source as the frequency synchronization signal of the network device, then the frequency source selection result of the network device will change, and therefore it is necessary to continue the frequency synchronization simulation from this network device.

[0245] In step S102, for a network device that has enabled the frequency synchronization function of the time synchronization protocol and whose configured PTP frequency source has a higher priority than the frequency synchronization source determined by frequency synchronization simulation, the time synchronization signal from the time synchronization source is used as the frequency synchronization signal of the network device, and the frequency synchronization signal is diffused from the network device based on the frequency synchronization topology, and the frequency signal diffusion process is repeated until the frequency status of the multiple network devices stops changing, so as to obtain updated frequency status information of the multiple network devices.

[0246] The implementation process of this step S102 can refer to the above-mentioned step 9022, and the embodiment of the present application will not be repeated here.

[0247] Optionally, after executing step S102, that is, after obtaining the updated frequency status information of multiple network devices, the computer device can continue to determine whether the frequency synchronization simulation result will affect time synchronization. If the frequency synchronization simulation result affects time synchronization, it is necessary to continue the time synchronization simulation. The specific implementation process includes the following steps S103 to S104.

[0248] In step S103, based on the updated frequency status information of the multiple network devices and the frequency status information of the multiple network devices before the update, it is determined whether the frequency synchronization status of the network devices in the multiple network devices has changed. If yes, continue to execute the following step S104; if no, end the clock synchronization simulation process, and use the updated frequency synchronization information obtained after executing the above step S102 (including the updated frequency status information obtained in the above step S102 and / or the frequency synchronization path obtained based on the updated frequency status information) and the time synchronization information obtained in the above step 903 as the final clock synchronization simulation result.

[0249] The state of the frequency synchronization source of the network device changes, that is, the network device changes from having no frequency synchronization source to having a frequency synchronization source, or the network device changes from having a frequency synchronization source to having no frequency synchronization source.

[0250] In step S104, time synchronization simulation is performed again on the network.

[0251] Since a change in the frequency synchronization state of a network device may cause a change in the time synchronization topology, the time synchronization result may be affected. Optionally, for a network device whose frequency synchronization state has changed, the time may be converged starting from the network device.

[0252] Furthermore, the computer device may repeatedly perform the above steps S101 to S104 until the frequency synchronization simulation result and the time synchronization simulation result reach a stable state or enter into oscillation. Thus, the clock state information and clock synchronization paths of multiple network devices in the network are obtained.

[0253] In an embodiment of the present application, by performing clock synchronization simulation on the network, not only can the clock synchronization information of multiple network devices in the network be obtained, but also it can be determined whether a network using the current clock configuration will fail based on the clock synchronization simulation results. For example, if the frequency synchronization simulation results and time synchronization simulation results of the network under the current clock configuration enter oscillation, it means that the network has a clock synchronization problem, and thus it can realize fault discovery for the network that has deployed the current clock configuration, and fault warning for the network that is to deploy the current clock configuration, thereby achieving the effect of improving the reliability of network operation.

[0254] The third embodiment of the present application provides an implementation method for frequency-time coupling simulation, taking the network device using SyncE to configure frequency information and using 1588v2 to configure time information as an example. For example, the physical topology and SyncE configuration of the network are consistent with the physical topology and SyncE configuration involved in the first embodiment mentioned above. The 1588v2 configuration is as follows: NE1-NE4 all enable the PTP function, are set as BC devices, and set the domain (domain) where the clock is located to 0. The PTP function is enabled for each GE port interconnected between NE1-NE4. NE4 enables the PTP frequency synchronization function, and configures the quality level and priority value of the PTP frequency source so that the PTP frequency source is superior to the line frequency source of all GE ports. After receiving the clock signal from the satellite, the primary and standby BITS devices send out time signals (in the form of PTP messages). The priority1 of the primary BITS device is configured to 7, and the priority1 of the standby BITS device is configured to 6. The attributes of other time signals are the same. For example, the first frequency synchronization simulation result of the network is the frequency synchronization simulation result obtained in the first embodiment mentioned above ( Fig.19 ). For example, the first time synchronization simulation result of the network is as follows Fig.26 As shown. Fig.26 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices. The implementation process of the frequency-time coupling simulation is as follows:

[0255] 1. Determine whether the time synchronization result affects frequency synchronization. Since NE4 has enabled the frequency synchronization function of 1588v2 and configured the PTP frequency source as the optimal frequency source, the frequency state of NE4 needs to reselect the source and continue to converge the frequency from NE4. Specifically, the time synchronization signal followed by NE4 comes from the GE0 / 1 / 1 port, causing its frequency to follow the port. Therefore, the DNU signal is sent in the reverse direction, and the PRC signal is sent through the GE0 / 1 / 2 port. These two outgoing signals will not affect NE2 and NE3, thus achieving a steady state. For example, Fig. 27 Schematic diagram of the second frequency synchronization simulation result provided by the embodiment of the present application. Fig. 27 In the frequency synchronization simulation results shown, the arrows point to the transmission direction of the frequency synchronization signal followed by the network devices.

[0256] 2. Determine whether the frequency synchronization result affects time synchronization. Since the frequency synchronization status of no device has changed, time synchronization will not be affected.

[0257] Optionally, after completing the clock synchronization simulation of the network, the following step 904 may also be performed.

[0258] Step 904: Output frequency synchronization information and / or time synchronization information.

[0259] Optionally, the computer device outputs the frequency synchronization information and / or the time synchronization information, which may be that the computer device displays the frequency synchronization information and / or the time synchronization information, or that the computer device sends the frequency synchronization information and / or the time synchronization information to other display devices for display.

[0260] The embodiments of the present application assist operation and maintenance personnel in viewing and analyzing network conditions by realizing the visualization of clock synchronization information. Optionally, a frequency synchronization path and / or a time synchronization path can be drawn based on the physical topology of the network. Optionally, the functions provided by the visualization page include but are not limited to filtering network elements according to the clock synchronization situation (for example, filtering devices without frequency synchronization paths, devices without time synchronization paths, or devices with frequency synchronization paths forming a loop, etc.), switching to view the clock synchronization paths of different devices, switching to view the clock synchronization paths before and after network changes, switching the clock synchronization path topology of the entire network and the clock synchronization path topology of the current device, etc.

[0261] For example, Fig.28 is a schematic diagram of a visualization page provided in an embodiment of the present application. Fig.28 As shown, the visualization page includes the physical topology of the network, including seven network devices R1-R7. In one possible implementation, after selecting a device on the visualization page, the visualization page can further present the clock synchronization path of the device. For example, Fig.29This is a schematic diagram of a device clock synchronization path presented on a visual page provided by an embodiment of the present application. Fig.29 As shown in the figure, the time synchronization path and frequency synchronization path of R4 are both R4<—R3<—R2<—R1<—BITS device. Fig.28 When a selection instruction for R4 is received on the visualization page shown in FIG. Fig.29 In another possible implementation, after selecting a device on the visualization page, the visualization page may further present the clock-related information of the device, and the clock-related information of the device may be presented in a table. For example, Fig.30 This is a schematic diagram of device clock related information presented on a visual page provided by an embodiment of the present application. Fig.30 As shown, the device clock related information includes device time information and device frequency information. Fig.30 Table (1) in the figure shows the device time information, including whether the time source is locked (i.e., whether there is a following time synchronization source, if locked, it is marked as lock, if not locked, it is marked as hold), device port number, port time source selection status (divided into slave port, master port, passive port or other port, other ports are represented by " / "), time synchronization source name, hop count (i.e., the number of devices that the following time synchronization signal passes through during the transmission process from the time synchronization source to the network device), time synchronization source configuration priority (including priority 1 and priority 2), time synchronization source level, time synchronization source accuracy and time synchronization source clock identification (clock-id). Fig.30Table (2) in the figure presents the device frequency information, including whether the frequency source is locked (i.e., whether there is a frequency synchronization source to follow. If locked, it is marked as lock, and if not locked, it is marked as hold), the device port number, whether it is a frequency following port, the port transceiver status (divided into normal or abnormal, normal means that it has the ability to transmit and receive frequency signals, and abnormal means that it does not have the ability to transmit and receive frequency signals), port priority, the SSM level configured on the port (referred to as Cfg-SSM; if the port SSM level is configured, then no matter what the SSM level of the frequency signal received by the port is, the network device will process the frequency signal received by the port according to the configured SSM level), the SSM level of the frequency signal received by the port (referred to as In-SSM), the SSM level of the frequency signal emitted by the port (referred to as Out-SSM), the signal tag configured on the port (referred to as Cfg-signal tag; if the port signal tag is configured, then no matter what the signal tag of the frequency signal received by the port is, the network device will uniformly set the signal tag of the frequency signal received by the port to the signal tag configured on the port), the signal tag of the frequency signal received by the port (referred to as In-signal tag), and the signal tag of the frequency signal emitted by the port (referred to as Out-signal tag). When in such a case, Fig.28 When a selection instruction for R4 is received on the visualization page shown, the visualization page can be switched to display Fig.30 .

[0262] Optionally, after the computer device completes the clock synchronization simulation of the network, it can also determine whether the network device has a clock synchronization problem based on the clock synchronization information of the network device obtained by simulation. The clock synchronization information includes clock state information and / or clock synchronization path. The clock state information includes frequency state information and / or time state information. The clock synchronization path includes a frequency synchronization path and / or a time synchronization path. If the network device has a clock synchronization problem, the clock configuration information of the network device can be compared with the clock configuration template to obtain the wrong configuration information of the network device. The clock configuration template can be obtained by combining the clock configuration information and clock configuration specification of a normal device of the same type.

[0263] The embodiment of the present application can realize automatic positioning of problem devices in the network, and find out potential misconfigurations by comparing the clock configuration information of the problem device with the clock configuration template, which helps to improve the efficiency of repairing the misconfigurations.

[0264] Optionally, the computer device can locate the problem device that may have a clock configuration problem according to the current problem type. For example, if the network device does not have a frequency synchronization source, the network device can be located as a problem device. For another example, if the frequency synchronization path of the network device forms a loop, the reverse follow-up device on the frequency synchronization path can be located as a problem device. Optionally, for the network device on the frequency synchronization path, it can be determined whether the network device is a reverse follow-up device based on the distance from the network layer where the network device is located to the frequency synchronization source and the distance from the network layer where the previous hop device followed by the network device is located to the frequency synchronization source. If the distance from the network layer where the network device is located to the frequency synchronization source is closer than the distance from the network layer where the previous hop device followed by the network device is located to the frequency synchronization source, the network device can be determined to be a reverse follow-up device. For example, if the frequency source device is connected to the RSG, it is usually the case that the ASG follows the RSG or the ASG follows other ASGs, and the CSG follows the ASG or other CSGs. If a CSG follows the ASG, it means that the device is reversely following.

[0265] Furthermore, after obtaining the erroneous configuration information of the network device, the computer device can also modify the erroneous configuration information according to the clock configuration template to obtain the updated clock configuration information of the network device, and then perform clock synchronization simulation on the network according to the physical topology of the network and the updated clock configuration information of the network device to obtain the updated clock synchronization information of the network device, and after determining that the network device has no clock synchronization problem according to the updated clock synchronization information of the network device, send the clock configuration change information of the network device to the network device so that the network device updates the clock configuration information of the network device. On the contrary, if it is determined according to the updated clock synchronization information that there is still a clock synchronization problem in the network device, the computer device does not send the clock configuration change information, which can be regarded as a failure of automatic repair. In this case, the computer device can, for example, output an alarm to prompt the operation and maintenance personnel to perform fault query and repair.

[0266] The embodiment of the present application can first simulate and repair the wrong configuration of the problem device, and then pre-verify the configuration information after the simulation repair, and after determining that the clock configuration information of the problem device can solve the clock synchronization problem of the problem device after repair, the clock configuration change information is sent to the problem device. The embodiment of the present application can realize automatic repair of the wrong configuration of the network device without relying on expert experience when the network device has a clock synchronization problem, and can ensure the reliability and accuracy of the configuration repair.

[0267] Alternatively, after obtaining the erroneous configuration information of the network device, the computer device may also directly output the erroneous configuration information to assist the operation and maintenance personnel in performing configuration repair.

[0268] The fourth embodiment of the present application provides an automatic repair method for a frequency synchronization loop. For example, Fig.31 FIG. 1 is a schematic diagram of a network physical topology, SyncE configuration, and frequency synchronization simulation results provided by an embodiment of the present application. Fig.31 As shown in the figure, the network includes four network devices, namely NE1-NE4. Among them, NE1 and NE2 are ASG devices, and NE3 and NE4 are CSG devices. Fig.31 In the physical topology shown, NE1-NE4 each includes multiple GE ports. The GE ports of different network devices can be connected via bidirectional optical fibers of optical modules. The active BITS device is connected to the GE0 / 1 / 1 port of NE1. The standby BITS device is connected to the GE0 / 1 / 1 port of NE2.

[0269] The SyncE configuration is as follows: NE1-NE4 are all enabled with the synchronous Ethernet clock function. NE1–NE4 are all enabled with the SSM mode. All GE ports interconnected between NE1–NE4 are all enabled with the synchronous Ethernet clock function. Some GE ports of NE1–NE4 are configured with port priorities (indicated by numbers other than "0" in the figure), and some GE ports are not configured with port priorities (indicated by the number "0" in the figure). GE ports that are not configured with port priorities do not participate in the device frequency source selection. After receiving the clock signal from the satellite, the active and standby BITS devices send out frequency signals, and the signal quality is PRC.

[0270] See also Fig.31 ,The frequency synchronization simulation results for the network show a frequency synchronization loop between NE1-NE2-NE3-NE4.

[0271] Computer equipment Fig.31 The repair process of the frequency synchronization loop is shown as follows:

[0272] 1. Locate the faulty device: Check the device following status of each device in the frequency synchronization loop (referred to as loop devices) to determine the previous hop device followed by each loop device (referred to as the following device). Refer to Table 9, it is found that there is a device reverse following situation (ASG device follows CSG device), and the ASG device that is reverse following is located as NE1.

[0273] Table 9

[0274] Loop Equipment NE1(ASG) NE2(ASG) NE3(CSG) NE4(CSG) Follow device NE3(CSG) NE1(ASG) NE4(CSG) NE2(ASG)

[0275] 2. Frequency configuration comparison: Refer to Table 10 to compare the frequency configurations of NE1 and NE2, both of which are ASG devices. It is found that the device roles of the peer devices of the ports with the same port priority of NE1 and NE2 are different. According to the frequency configuration of NE2, the port priority of GE0 / 1 / 1 of NE1 is changed to 10, the port priority of GE0 / 1 / 2 is changed to 20, and the port priority of GE0 / 1 / 3 is changed to 0.

[0276] Table 10

[0277] equipment NE1(ASG) NE2(ASG) Enable synchronous Ethernet yes yes Enable SSM mode yes yes Number of valid source selection ports 2 2 Frequency follows the peer device on the port CSG ASG No priority port peer device ASG CSG

[0278] 3. Change verification: The network is simulated for change and the frequency synchronization path after the change is obtained: NE1 follows the main BITS device, NE2 and NE3 follow NE1, and NE4 follows NE2. There is no loop in the frequency synchronization path after the change, which meets the change expectations.

[0279] 4. Change delivery: Send the changed frequency configuration to NE1.

[0280] Optionally, if the network changes, the computer device can also obtain the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, and then perform clock synchronization simulation on the changed network according to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network to obtain the clock synchronization information of multiple network devices in the changed network. Wherein, the network changes include but are not limited to network failures (such as link interruption or equipment failure, etc.), changes in the clock configuration of network devices in the network (such as manual changes to the clock configuration of network devices by operation and maintenance personnel, etc.), and the presence of network devices online or offline in the network.

[0281] The embodiment of the present application supports pre-verification of network changes, and can realize dynamic change analysis of the clock synchronization information of network devices caused by network changes. In addition, since the embodiment of the present application supports pre-verification of network changes, before the operation and maintenance personnel change the clock configuration on the network device, they can first obtain the clock synchronization information of the network device after the clock configuration is changed through simulation to ensure that the network device will not have clock synchronization problems after the clock configuration is changed, which can improve the reliability of network operation.

[0282] Furthermore, if a clock synchronization problem occurs after a network change, a fault prompt message can also be output. This helps operation and maintenance personnel to promptly resolve clock synchronization problems that occur in the network. Optionally, the clock synchronization problem includes one or more of the following: a frequency synchronization loop, a time synchronization transient loop, a network device without a frequency synchronization source, or a network device without a time synchronization source. Among them, a time synchronization transient loop refers to a time synchronization loop that appears briefly during the time synchronization process, and the time synchronization loop disappears after the time synchronization is completed.

[0283] Optionally, if before the network changes, the computer device has completed the clock synchronization simulation of the network before the change, then after the network changes, the computer device can continue the simulation based on the current simulation results to obtain the clock synchronization information of the network devices in the changed network. For example, the computer device can determine the network devices whose clock states are directly affected in the network based on the network change information, and update the clock state information of the network devices. For example, if the physical link where the frequency following port on a certain network device is located is interrupted, resulting in the interruption of the frequency signal received by the port, the network device needs to re-select the frequency source, and the frequency signals sent out by other ports may also change. The computer device can start from the network device directly affected by the network change, spread outward the clock synchronization signal that the network device reselects to follow, and perform frequency synchronization simulation, time synchronization simulation and frequency-time coupling simulation again until the convergence state after the network change is reached.

[0284] The fifth embodiment of the present application provides a clock synchronization network pre-verification implementation method, which can simulate and analyze the clock synchronization path of the network device switching after a network failure. For example, the physical topology, SyncE configuration and 1588v2 configuration of the network are the same as those of the second embodiment above.

[0285] Assume that the physical link between NE1 and NE3 is disconnected and the clock signal cannot be transmitted. The pre-verification simulation process is as follows:

[0286] 1. According to the frequency synchronization simulation results obtained in the first embodiment above ( Fig.19 ) and the time synchronization simulation results obtained in the second embodiment ( Fig.25 ), and determine the directly affected device. In the embodiment of the present application, the frequency and time of NE3 follow NE1 through the link. For example, Fig.32 It is a network fault schematic diagram drawn based on frequency synchronization simulation results provided in an embodiment of the present application. Fig.32 is based on the frequency synchronization simulation results before the fault ( Fig.19 ) drawn, such as Fig.32As shown in FIG. 1 , after the physical link between NE1 and NE3 is interrupted, the frequency synchronization signal that NE3 originally followed is lost, and NE3 needs to reselect the frequency synchronization source and update the frequency status. For another example, Fig.33 It is a network fault schematic diagram drawn based on time synchronization simulation results provided in an embodiment of the present application. Fig.33 is based on the time synchronization simulation results before the failure ( Fig.25 ) drawn, such as Fig.33 As shown in FIG. 1 , after the physical link between NE1 and NE3 is interrupted, the time synchronization signal originally followed by NE3 is lost, and NE3 needs to reselect a time synchronization source and update the time status.

[0287] NE3 frequency status update: The frequency signal of GE0 / 1 / 1 port is lost, and the quality of the frequency signal of GE0 / 1 / 2 port is DNU (unavailable) sent by NE4, resulting in that NE3 frequency will not follow the external frequency signal. The quality of the external frequency signal of each port is SEC of the local frequency signal.

[0288] NE3 time status update: The time signal of GE0 / 1 / 1 port is lost, and GE0 / 1 / 2 port cannot receive the time signal, resulting in NE3 time not following the external time signal. The external time signals of each port are all local time signals. Assume that the priority1 of NE3's local time signal is 128.

[0289] 2. Continue frequency synchronization simulation from NE3. The implementation process is as follows:

[0290] i. The PRC signal originally received by NE4's GE0 / 1 / 2 port from NE3 is changed to a SEC signal, which is inferior to the PRC signal from GE0 / 1 / 3. NE4 follows GE0 / 1 / 3 port, sends DNU signal in the reverse direction, and sends PRC signal outward through GE0 / 1 / 2 port.

[0291] ii. The PRC signal originally received by NE4 on GE0 / 1 / 3 of NE2 is changed to a DNU signal, but it does not affect the source selection. The DNU signal originally received by NE4 on GE0 / 1 / 2 of NE3 is changed to a PRC signal. NE3 will follow GE0 / 1 / 2, send DNU signals in the reverse direction, and send PRC signals outward through GE0 / 1 / 1.

[0292] iii. The SEC signal originally received by NE4's GE0 / 1 / 2 port from NE3 is changed to a DNU signal, but it does not affect the source selection.

[0293] iv. Finally, a new convergence state is reached: NE1 follows the main BITS device through GE0 / 1 / 1, NE2 follows NE1 through GE0 / 1 / 2, NE4 follows NE2 through GE0 / 1 / 1, and NE3 follows NE4 through GE0 / 1 / 2. For example, Fig.34 FIG. 1 is a schematic diagram of a frequency synchronization simulation result after a fault provided by an embodiment of the present application. Fig.34 In the frequency synchronization simulation results shown, the arrows point to the transmission direction of the frequency synchronization signal followed by the network devices.

[0294] 3. Continue the time synchronization simulation from NE3. The implementation process is as follows:

[0295] v. The priority 1 of the time signal originally received by NE4's GE0 / 1 / 2 from NE3 changes from 6 to 128, which is inferior to the time signal from GE0 / 1 / 1. NE4 follows GE0 / 1 / 1, and the status of GE0 / 1 / 1 changes to slave. It sends a time signal with priority 1 = 6 through GE0 / 1 / 2, and the status of GE0 / 1 / 2 changes to master.

[0296] vi. NE3's GE0 / 1 / 2 receives the time signal with priority1=6 from NE4. NE3 follows GE0 / 1 / 2 and changes its state to slave while GE0 / 1 / 1 changes its state to master.

[0297] vii. Finally, a new convergence state is reached: NE1 follows the master BITS device through GE0 / 1 / 1, NE2 follows NE1 through GE0 / 1 / 2, NE4 follows NE2 through GE0 / 1 / 1, and NE3 follows NE4 through GE0 / 1 / 2. For example, Fig.35 1 is a schematic diagram of a time synchronization simulation result after a fault provided by an embodiment of the present application. Fig.35 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices.

[0298] So far, it is known that after a network failure occurs, the frequency synchronization path of NE3 is switched to: NE3 (GE0 / 1 / 2) <— NE4 (GE0 / 1 / 1) <— NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— master BITS device; the frequency synchronization path of NE4 is switched to: NE4 (GE0 / 1 / 1) <— NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— master BITS device; the time synchronization path of NE3 is switched to: NE3 (GE0 / 1 / 2) <— NE4 (GE0 / 1 / 1) <— NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— master BITS device; the time synchronization path of NE4 is switched to: NE4 (GE0 / 1 / 1) <— NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— master BITS device.

[0299] After a network change occurs, the embodiment of the present application only needs to obtain network change information and perform further clock synchronization simulation on the network based on the previously obtained clock synchronization simulation results, so as to obtain changes in clock synchronization information of network devices caused by the network change. The analysis of dynamic changes in the network is efficient, which helps operation and maintenance personnel to quickly obtain clock synchronization information of network devices after the network change, and then can achieve rapid location and repair of clock synchronization problems that may occur in the changed network.

[0300] The sixth embodiment of the present application provides another implementation method of clock synchronization network pre-verification, which can simulate and analyze the frequency synchronization loop that appears after a network failure. Fig.36 FIG. 1 is a schematic diagram of another network physical topology and SyncE configuration provided in an embodiment of the present application. Fig.36 As shown in the figure, the network includes four network devices, namely NE1-NE4. Fig.36 In the physical topology shown, NE1-NE4 each includes multiple GE ports. The GE ports of different network devices can be connected via bidirectional optical fibers of optical modules. The active BITS device is connected to the GE0 / 1 / 1 port of NE1. The standby BITS device is connected to the GE0 / 1 / 1 port of NE2.

[0301] The SyncE configuration is as follows: NE1-NE4 are all enabled with the synchronous Ethernet clock function. NE1–NE4 are all enabled with the SSM mode. All GE ports interconnected between NE1–NE4 are all enabled with the synchronous Ethernet clock function. Some GE ports of NE1–NE4 are configured with port priorities (indicated by numbers other than "0" in the figure), and some GE ports are not configured with port priorities (indicated by the number "0" in the figure). GE ports that are not configured with port priorities do not participate in the device frequency source selection. After receiving the clock signal from the satellite, the active and standby BITS devices send out frequency signals, and the signal quality is PRC.

[0302] Computer equipment Fig.36 The network shown in the figure performs frequency synchronization simulation, and the specific implementation process can refer to the first embodiment mentioned above. For example, Fig.37 Schematic diagram of a frequency synchronization simulation process provided by an embodiment of the present application. Fig.37 As shown, through Fig.36 The network shown in the figure is subjected to frequency synchronization simulation, and finally the Fig.37 The frequency synchronization simulation results are shown in the lower left figure. Fig.37 In the frequency synchronization simulation results shown, the arrows point to the transmission direction of the frequency synchronization signal followed by the network devices.

[0303] Assume that the physical link between NE1 and the main BITS device is disconnected and the clock signal cannot be transmitted. The pre-verification simulation process is as follows:

[0304] 1. According to Fig.37 The frequency synchronization simulation results shown show that the directly affected devices are determined. In the embodiment of the present application, the frequency of NE1 follows the main BITS device through the link. After the link fails, the frequency signal originally followed by NE1 is lost, and NE1 needs to reselect the frequency synchronization source and update the frequency status.

[0305] NE1 frequency status update: The frequency signal of GE0 / 1 / 1 is lost, the port priority of GE0 / 1 / 3 is 0, and GE0 / 1 / 3 cannot be used as the frequency follower port of NE1. The quality of the frequency signal of GE0 / 1 / 2 is PRC. Therefore, NE1 chooses to follow GE0 / 1 / 2, sends DNU signals in the reverse direction, and sends PRC signals outward through the other two ports.

[0306] 2. Continue frequency synchronization simulation from NE1: The PRC signal originally received by NE2's GE0 / 1 / 2 port from NE1 is changed to a DNU signal, but it does not affect the source selection.

[0307] 3. Finally reach Fig.37 The lower left figure shows the convergence state: NE1 follows NE2 through GE0 / 1 / 2, NE2 follows NE4 through GE0 / 1 / 3, NE4 follows NE3 through GE0 / 1 / 2, and NE3 follows NE1 through GE0 / 1 / 1. A frequency synchronization loop appears between the four devices after the failure. Although each of the four devices can receive the PRC signal, the PRC signal is actually no longer a frequency signal that is continuously updated by the satellite, and its accuracy will continue to deteriorate. For example, Fig.38 FIG. 1 is another schematic diagram of a frequency synchronization simulation result after a fault provided by an embodiment of the present application. Fig.38 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices.

[0308] The seventh embodiment of the present application provides another implementation method of clock synchronization network pre-verification, which can simulate and analyze the time synchronization transient loop that appears after a network failure. For example, the physical topology and SyncE configuration of the network are the same as those of the second embodiment above. The 1588v2 configuration is based on the second embodiment above, and adds: the GE0 / 1 / 2 port of NE2 is configured with announce-drop (does not receive Announce messages). The computer equipment performs time synchronization simulation on the network, and the specific implementation process can refer to the second embodiment above. Among them, according to the physical topology of the network and the 1588v2 configuration, the following can be established Fig.39 The time synchronization topology shown in Figure 2 is shown in Figure 2. By simulating the time synchronization of the network, we can get the following Fig.40 The time synchronization simulation results are shown in Figure 2. Fig.40 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices.

[0309] Assume that the physical link between NE1 and the main BITS device is disconnected and the clock signal cannot be transmitted. The pre-verification simulation process is as follows: Fig.40 The time synchronization simulation results shown show that the directly affected devices are determined. In the embodiment of the present application, the time of NE1 follows the main BITS device through the link. After the link fails, the time signal originally followed by NE1 is lost, and NE1 needs to reselect the time source and update the time status.

[0310] NE1 time status update: The PTP message originally received by NE1's GE0 / 1 / 1 port from the primary BITS device is lost, and GE0 / 1 / 3 port cannot receive the PTP message, but GE0 / 1 / 2 port can receive the PTP message with priority1=6. The PTP message received by GE0 / 1 / 2 port is sent by the primary BITS device to reach NE1, and passes through NE1-NE3-NE4-NE2-NE1, a total of 4 hops. Therefore, NE1 will choose to follow GE0 / 1 / 2 port. The PTP message is continuously transmitted in the loop of NE1-NE3-NE4-NE2-NE1. The number of hops increases by 1 for each transmission, thus forming a transient loop of time synchronization between NE1-NE3-NE4-NE2, for example, see Fig.41 Due to the configuration characteristics of 1588v2, when the number of hops of a message reaches the threshold (the default is 64), the message becomes invalid. The time synchronization transient loop will be automatically broken and enter the convergence state. For example, Fig.42 FIG. 1 is another schematic diagram of time synchronization simulation results after a fault provided by an embodiment of the present application. Fig.42 In the time synchronization simulation results shown, the arrows point to the transmission direction of the time synchronization signal followed by the network devices.

[0311] The eighth embodiment of the present application provides another automatic repair method for the frequency synchronization loop. For example, Fig.43 FIG. 1 is a schematic diagram of another network physical topology, SyncE configuration, and frequency synchronization simulation results provided by an embodiment of the present application. Fig.43 As shown, the network includes four network devices, namely NE1-NE4. The physical topology of the network is the same as that of the sixth embodiment. The SyncE configuration is based on the sixth embodiment, with the following additions: the GE0 / 1 / 1 port of NE1 is configured with a signal tag of 1, the GE0 / 1 / 1 port of NE3 is configured with a signal tag of 2, and no signal tag is configured for other ports. Fig.43 In the frequency synchronization simulation results shown, NE1 follows the master BITS device through the GE0 / 1 / 1 port, NE3 follows NE1 through the GE0 / 1 / 1 port, NE4 follows NE3 through the GE0 / 1 / 2 port, and NE2 follows NE4 through the GE0 / 1 / 3 port.

[0312] Assume that the physical link between NE1 and the main BITS device is interrupted and the clock signal cannot be transmitted. At this time, a pre-verification simulation is performed. The pre-verification simulation process can refer to the sixth embodiment above. After NE1 reselects the source, it chooses to follow the PRC signal carrying signal mark 2 from NE2, and finally obtains the following Fig.44 The frequency synchronization simulation result shown shows that a frequency synchronization loop appears between NE1-NE2-NE3-NE4.

[0313] Computer equipment Fig.44 The repair process of the frequency synchronization loop is shown as follows:

[0314] 1. Locating the faulty device: Check and find that the frequency signal transmitted in the frequency synchronization loop carries the signal tag attribute, and the signal tag is inconsistent in the frequency synchronization loop. Then check all network devices and ports configured with signal tags, and finally locate two source ports, namely GE0 / 1 / 1 port of NE1 and GE0 / 1 / 1 port of NE3. GE0 / 1 / 1 port of NE1 is not in the frequency synchronization loop.

[0315] 2. Clock configuration repair: Since the configured signal tag has the ability to prevent loops, you only need to remove the signal tag of NE3 in the frequency synchronization loop, that is, cancel the signal tag configuration of NE3's GE0 / 1 / 1 port. The implementation principle is that after canceling the signal tag configuration of NE3's GE0 / 1 / 1 port, the PRC signal transmitted between network devices always carries signal tag 1. After NE1 receives the PRC signal carrying signal tag 1, it will determine that the PRC signal is sent from this device, and will not choose to follow the PRC signal.

[0316] 3. Change verification: The network is simulated for change and the frequency synchronization path after the change is obtained: NE2 follows the backup BITS device, NE1 follows NE2, NE3 follows NE1, and NE4 follows NE3. There is no loop in the frequency synchronization path after the change, which meets the change expectations.

[0317] 4. Change delivery: Send the changed frequency configuration to NE3.

[0318] In the embodiments of the present application, by adopting the offline simulation method in the clock synchronization network, the beneficial effects achieved include but are not limited to: low data requirements, high scalability, high accuracy, support for pre-verification and high efficiency. Low data requirements mean that there is no need to collect the real status information of the network element, only the network clock configuration information needs to be collected. High scalability means that it is not restricted by the network topology (number of clock sources, number of network elements, connection relationships, etc.), and can support respective clock protocols and clock configurations. High accuracy means simulating the behavior of real devices and 100% restoring the real state of the device. Supporting pre-verification means supporting continued simulation after network changes and supporting the output of multiple convergence states. High efficiency means that the clock status of all network elements can be obtained through a one-time simulation. In addition, high scalability is achieved through customized repair methods.

[0319] The embodiment of the present application mainly adopts an offline simulation solution for the clock synchronization network, and optimizes it according to the characteristics of the clock network. Compared with related technologies, this solution can achieve better results, mainly including accuracy, scalability and pre-verification capabilities. In practical applications, some optimization schemes can also be added during the simulation process, or a combination of simulation + other optimization schemes can be adopted. For example, the device can directly select the source locally in some simple configuration scenarios, so only static analysis is required; 1588v2 can use a breadth-first traversal to solve the problem in a scenario where a simple dynamic source selection is used throughout the network. For example, a network can be divided into a simple scenario sub-network and a complex scenario sub-network according to the network configuration, and these optimization schemes are adopted in the simple scenario sub-network, and a more universal simulation scheme is adopted in the complex scenario sub-network. On the basis of the scheme of the present application, any easily conceivable variation scheme should be within the scope of protection of the present application.

[0320] The following is an example of a virtual device in an embodiment of the present application.

[0321] For example, Figure 45 to Figure 47 They are schematic diagrams of the structure of a clock synchronization information acquisition device provided in an embodiment of the present application. Figure 45 to Figure 47 As shown, the clock synchronization information acquisition device 4500 includes but is not limited to an acquisition module 4501 and a simulation module 4502. The clock synchronization information acquisition device 4500 may also include one or more of an output module 4503, a judgment module 4504, an information processing module 4505 or a transceiver module 4506.

[0322] like Fig.45 As shown, the clock synchronization information acquisition device 4500 includes an acquisition module 4501 and a simulation module 4502. The acquisition module 4501 is used to acquire the physical topology of the network and the clock configuration information of multiple network devices in the network, the clock configuration information includes frequency configuration information, and the frequency configuration information is used for multiple network devices to perform frequency synchronization. The simulation module 4502 is used to perform frequency synchronization simulation on the network according to the physical topology and the frequency configuration information to obtain the frequency synchronization information of multiple network devices, the frequency synchronization information includes frequency status information and / or frequency synchronization path.

[0323] Optionally, the frequency status information of the network device includes the frequency synchronization status of the network device and attribute information of the frequency signals received and sent by the ports of the network device, wherein the frequency synchronization status indicates whether the network device has a frequency synchronization source. When the network device has a frequency synchronization source, the frequency synchronization status also includes an indication of the frequency signal from the frequency synchronization source.

[0324] Optionally, the attribute information of the frequency signal includes frequency quality and / or a signal tag of the frequency signal, and the signal tag is used to identify a source device of the frequency signal.

[0325] Optionally, the simulation module 4502 is specifically used to: establish a frequency synchronization topology according to the physical topology and frequency configuration information, the frequency synchronization topology includes multiple network devices and frequency synchronization relationships between the multiple network devices, the frequency synchronization relationship is used to indicate the frequency synchronizable direction between the multiple network devices; based on the frequency synchronization topology, frequency signals from n frequency sources are diffused, n is a positive integer, and the frequency signal diffusion process is repeatedly executed until the frequency status of the multiple network devices stops changing, so as to obtain the frequency status information of the multiple network devices, wherein the frequency signal diffusion process includes: for a first network device among the multiple network devices to which the frequency signal is diffused, determining the frequency synchronization signal of the first network device among all the frequency signals diffused to the first network device according to the frequency configuration information of the first network device, and continuing to diffuse the frequency synchronization signal from the first network device based on the frequency synchronization topology, wherein the port of the first network device used to diffuse the frequency synchronization signal is different from the port of the first network device to which the frequency synchronization signal is received.

[0326] Optionally, the simulation module 4502 is also used to: after the frequency states of multiple network devices stop changing, if there are multiple frequency devices to be synchronized among the multiple network devices, diffuse the frequency signals from the multiple frequency devices to be synchronized respectively among the multiple frequency devices to be synchronized based on the frequency synchronization topology, and repeat the frequency signal diffusion process until the frequency states of the multiple frequency devices to be synchronized stop changing, and the frequency devices to be synchronized are network devices that do not use any of the n frequency sources as the frequency synchronization source.

[0327] Optionally, the frequency configuration information includes whether the port of the network device enables frequency synchronization and the port priority, and the frequency synchronizable direction indicated by the frequency synchronization relationship is: the first port enabled with frequency synchronization on the second network device can synchronize the second port enabled with frequency synchronization on the third network device, wherein the port priority of the first port is not 0, and the second network device and the third network device are two connected network devices enabled with frequency synchronization among multiple network devices.

[0328] Optionally, the clock configuration information also includes time configuration information, and the time configuration information is used for time synchronization of multiple network devices; the simulation module 4502 is also used to: after simulating the frequency synchronization of the network according to the physical topology and frequency configuration information, simulate the time synchronization of the network according to the physical topology, time configuration information and the status of the frequency synchronization source of multiple network devices to obtain the time synchronization information of multiple network devices, and the time synchronization information includes time status information and / or time synchronization path.

[0329] Optionally, the time status information includes the time synchronization status of the network device, attribute information of the time signal received and sent by the port of the network device, and the time source selection result of the port of the network device, wherein the time synchronization status indicates whether the network device has a time synchronization source. When the network device has a time synchronization source, the time synchronization status also includes an indication of the time signal from the time synchronization source, and the time source selection result indicates that the port is a port of the network device for receiving a time signal from the time synchronization source, a port of the network device for sending a time signal from the time synchronization source, or a backup port of the network device for receiving a time signal from the time synchronization source.

[0330] Optionally, the attribute information of the time signal includes one or more of the level of the time source from which the time signal comes, the accuracy of the time source from which the time signal comes, the device identification of the time source from which the time signal comes, the number of devices through which the time signal passes during transmission from the time source to the network device, and the configuration priority of the time source.

[0331] Optionally, the simulation module 4502 is specifically used to: establish a time synchronization topology according to the physical topology, time configuration information, and the state of the frequency synchronization source of multiple network devices, the time synchronization topology includes multiple network devices and the time synchronization relationship between the multiple network devices, and the time synchronization relationship is used to indicate the time synchronization direction between the multiple network devices; based on the time synchronization topology, diffuse the time signals from m time sources, m is a positive integer, and repeat the time signal diffusion process until the time state of the multiple network devices stops changing, so as to obtain the time state information of the multiple network devices, wherein the time signal diffusion process includes: for a fourth network device to which the time signal is diffused among the multiple network devices, according to the time configuration information of the fourth network device, determine the time synchronization signal of the fourth network device among all the time signals diffused to the fourth network device, and continue to diffuse the updated time synchronization signal from the fourth network device based on the time synchronization topology, wherein the number of follow-up hops carried by the updated time synchronization signal is greater than the number of follow-up hops carried by the time synchronization signal before the update, the number of follow-up hops is the number of devices that the time synchronization signal passes through from the time source, and the port of the fourth network device used to diffuse the updated time synchronization signal is different from the port of the fourth network device that receives the time synchronization signal.

[0332] Optionally, the simulation module 4502 is specifically used to: diffuse the time signals from m time sources by breadth-first search based on the time synchronization topology.

[0333] Optionally, the simulation module 4502 is also used for: after the time states of multiple network devices stop changing, if there are multiple time devices to be synchronized among the multiple network devices, time signals from the multiple time devices to be synchronized are diffused in the multiple time devices to be synchronized based on the time synchronization topology, and the time signal diffusion process is repeated until the time states of the multiple time devices to be synchronized stop changing, and the time devices to be synchronized are network devices that do not use any of the m time sources as the time synchronization source.

[0334] Optionally, the time configuration information includes whether the port of the network device enables time synchronization, and the time synchronization direction indicated by the time synchronization relationship is: the third port enabled with time synchronization on the fifth network device can synchronize the fourth port enabled with time synchronization on the sixth network device, wherein the fifth network device and the sixth network device are two connected network devices enabled with time synchronization among multiple network devices.

[0335] Optionally, the simulation module 4502 is also used to: after performing time synchronization simulation on the network, if there is a network device among multiple network devices that enables the frequency synchronization function of the time synchronization protocol, and the priority of the precision time protocol PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, use the time synchronization signal from the time synchronization source as the frequency synchronization signal of the network device, and diffuse the frequency synchronization signal from the network device based on the frequency synchronization topology, and repeat the frequency signal diffusion process until the frequency status of multiple network devices stops changing, so as to obtain updated frequency status information of multiple network devices, wherein the frequency synchronization topology is established based on the physical topology and frequency configuration information, and the frequency signal diffusion process includes: for a seventh network device among multiple network devices to which the frequency signal is diffused, determine the frequency synchronization signal of the seventh network device among all the frequency signals to which the seventh network device is diffused according to the frequency configuration information of the seventh network device, and continue to diffuse the frequency synchronization signal from the seventh network device based on the frequency synchronization topology, wherein the port of the seventh network device used to diffuse the frequency synchronization signal is different from the port of the seventh network device that receives the frequency synchronization signal.

[0336] Optionally, the simulation module 4502 is further used to: after obtaining updated frequency status information of multiple network devices, if there is any change in the status of the frequency synchronization source of a network device among the multiple network devices, re-simulate the time synchronization of the network.

[0337] Alternatively, if Fig.46 As shown, the clock synchronization information acquisition device 4500 includes an acquisition module 4501, a simulation module 4502 and an output module 4503. The output module 4503 is used to output the frequency synchronization information after obtaining the frequency synchronization information of multiple network devices.

[0338] Alternatively, if Fig.47 As shown, the clock synchronization information acquisition device 4500 includes an acquisition module 4501, a simulation module 4502, a judgment module 4504 and an information processing module 4505. The judgment module 4504 is used to judge whether the network device has a clock synchronization problem based on the clock synchronization information of the network device, the clock synchronization information includes clock state information and / or clock synchronization path, the clock state information includes frequency state information and / or time state information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path. The information processing module 4505 is used to compare the clock configuration information of the network device with the clock configuration template if the network device has a clock synchronization problem, so as to obtain the wrong configuration information of the network device.

[0339] Optionally, see Fig.47The clock synchronization information acquisition device 4500 may further include a transceiver module 4506. The information processing module 4505 is further used to modify the erroneous configuration information according to the clock configuration template after obtaining the erroneous configuration information of the network device, and obtain the updated clock configuration information of the network device. The simulation module 4502 is further used to perform clock synchronization simulation on the network according to the physical topology and the updated clock configuration information, and obtain the updated clock synchronization information of the network device. The transceiver module 4506 is used to send the clock configuration change information of the network device to the network device after determining that the network device has no clock synchronization problem according to the updated clock synchronization information, so that the network device updates the clock configuration information of the network device.

[0340] Optionally, the acquisition module 4501 is further used to acquire the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network if the network changes. The simulation module 4502 is further used to perform clock synchronization simulation on the changed network according to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network to obtain the clock synchronization information of multiple network devices in the changed network, the clock synchronization information includes clock state information and / or clock synchronization path, the clock state information includes frequency state information and / or time state information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path.

[0341] Optionally, in Fig.46 In the clock synchronization information acquisition device 4500 shown, the output module 4503 is used to output fault prompt information, and the fault prompt information is used to indicate the clock synchronization problem that occurs in the network after the change.

[0342] Optionally, the clock synchronization problem includes one or more of the occurrence of a frequency synchronization loop, the occurrence of a time synchronization transient loop, the network device having no frequency synchronization source, or the network device having no time synchronization source.

[0343] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0344] The hardware structure of the embodiment of the present application is described below with examples.

[0345] Fig.48 Schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. Fig.48 As shown, the computer device 4800 includes a processor 4801 and a memory 4802 , and the processor 4801 and the memory 4802 are connected via a bus 4803 . Fig.48The processor 4801 and the memory 4802 are described as being independent of each other. Optionally, the processor 4801 and the memory 4802 are integrated together. The computer device 4800 may be, for example, a network controller, or be connected to a network controller.

[0346] The memory 4802 is used to store computer programs, including operating systems and program codes. The memory 4802 is various types of storage media, such as read-only memory (ROM), random access memory (RAM), electrically erasable programmable read-only memory (EEPROM), compact disc read-only memory (CD-ROM), flash memory, optical storage, register, optical disk storage, optical disk storage, magnetic disk or other magnetic storage devices.

[0347] The processor 4801 is a general-purpose processor or a special-purpose processor. The processor 4801 may be a single-core processor or a multi-core processor. The processor 4801 includes at least one circuit to execute the actions (e.g., Fig. 9 illustrative method steps).

[0348] Optionally, the computer device 4800 further includes a network interface 4804, which is connected to the processor 4801 and the memory 4802 via the bus 4803. The network interface 4804 enables the computer device 4800 to communicate with other devices. The processor 4801 can exchange information with other devices via the network interface 4804.

[0349] Optionally, the computer device 4800 further includes an input / output (I / O) interface 4805, which is connected to the processor 4801 and the memory 4802 via the bus 4803. The processor 4801 can receive input commands or data, etc. via the I / O interface 4805. The I / O interface 4805 is used for the computer device 4800 to connect input devices, such as keyboards, mice, etc. Optionally, in some possible scenarios, the above-mentioned network interface 4804 and I / O interface 4805 are collectively referred to as communication interfaces.

[0350] Optionally, the computer device 4800 further includes a display 4806, which is connected to the processor 4801 and the memory 4802 via the bus 4803. The display 4806 can be used to display the intermediate results and / or final results generated by the processor 4801 executing the above method, such as displaying clock synchronization information and fault prompt information. In a possible implementation, the display 4806 is a touch display screen to provide a human-computer interaction interface.

[0351] The bus 4803 is any type of communication bus for interconnecting the internal devices of the computer device 4800. For example, a system bus. The embodiment of the present application takes the interconnection of the above-mentioned devices inside the computer device 4800 through the bus 4803 as an example. Optionally, the above-mentioned devices inside the computer device 4800 are connected to each other in a communication manner other than the bus 4803, for example, the above-mentioned devices inside the computer device 4800 are interconnected through a logical interface inside the computer device 4800.

[0352] The above devices may be arranged on independent chips, or at least partially or completely on the same chip. Whether to arrange each device independently on different chips or to integrate them on one or more chips often depends on the needs of product design. The embodiments of the present application do not limit the specific implementation form of the above devices.

[0353] Fig.48 The computer device 4800 shown is merely exemplary. During implementation, the computer device 4800 includes other components, which are not listed one by one in this article. Fig.48 The computer device 4800 shown can obtain the time synchronization information of the network device by executing all or part of the steps of the method provided in the above embodiment.

[0354] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (digital subscriber line, DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a digital versatile disc (DVD)), or a semiconductor medium (eg, a solid state disk (SSD)).

[0355] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0356] In the embodiments of the present application, the terms “first”, “second” and “third” are used for descriptive purposes only and should not be understood as indicating or implying relative importance.

[0357] The term "and / or" in this application is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.

[0358] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.

[0359] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the concept and principle of the present application shall be included in the protection scope of the present application.

Claims

1. A method for acquiring clock synchronization information, characterized in that: The method comprises: Acquire a physical topology of a network and clock configuration information of a plurality of network devices in the network, wherein the clock configuration information includes frequency configuration information, and the frequency configuration information is used for frequency synchronization of the plurality of network devices; Frequency synchronization simulation is performed on the network according to the physical topology and the frequency configuration information to obtain frequency synchronization information of the multiple network devices, where the frequency synchronization information includes frequency status information and / or frequency synchronization path.

2. The method according to claim 1, characterized in that The frequency status information of a network device includes the frequency synchronization status of the network device and the attribute information of the frequency signal received and sent by the port of the network device, wherein the frequency synchronization status indicates whether the network device has a frequency synchronization source. When the network device has a frequency synchronization source, the frequency synchronization status also includes an indication of the frequency signal from the frequency synchronization source.

3. The method according to claim 2, characterized in that The attribute information of the frequency signal includes frequency quality and / or a signal tag of the frequency signal, and the signal tag is used to identify a source device of the frequency signal.

4. The method according to any one of claims 1 to 3, characterized in that: The performing frequency synchronization simulation on the network according to the physical topology and the frequency configuration information includes: Establishing a frequency synchronization topology according to the physical topology and the frequency configuration information, wherein the frequency synchronization topology includes the multiple network devices and the frequency synchronization relationship between the multiple network devices, and the frequency synchronization relationship is used to indicate the frequency synchronization direction between the multiple network devices; Based on the frequency synchronization topology, frequency signals from n frequency sources are diffused, where n is a positive integer, and the frequency signal diffusion process is repeatedly performed until the frequency states of the multiple network devices stop changing, so as to obtain the frequency state information of the multiple network devices, wherein the frequency signal diffusion process includes: For the first network device among the multiple network devices to which the frequency signal is diffused, the frequency synchronization signal of the first network device is determined among all the frequency signals to which the first network device is diffused according to the frequency configuration information of the first network device, and the frequency synchronization signal is continued to be diffused from the first network device based on the frequency synchronization topology, wherein the port of the first network device used to diffuse the frequency synchronization signal is different from the port of the first network device through which the frequency synchronization signal is received.

5. The method according to claim 4, characterized in that After the frequency states of the multiple network devices stop changing, if there are multiple frequency-to-be-synchronized devices among the multiple network devices, and the frequency-to-be-synchronized devices are network devices that do not use any frequency source among the n frequency sources as a frequency synchronization source, the method further includes: Based on the frequency synchronization topology, frequency signals from the multiple frequency synchronization devices are diffused among the multiple frequency synchronization devices respectively, and the frequency signal diffusion process is repeatedly executed until the frequency states of the multiple frequency synchronization devices stop changing.

6. The method according to claim 4 or 5, characterized in that: The frequency configuration information includes whether the port of the network device enables frequency synchronization and the port priority. The frequency synchronizable direction indicated by the frequency synchronization relationship is: a first port on the second network device that enables frequency synchronization can synchronize a second port on the third network device that enables frequency synchronization, wherein the port priority of the first port is not 0, and the second network device and the third network device are two connected network devices that enable frequency synchronization among the multiple network devices.

7. The method according to any one of claims 1 to 6, characterized in that: The clock configuration information also includes time configuration information, and the time configuration information is used for the multiple network devices to perform time synchronization; After performing frequency synchronization simulation on the network according to the physical topology and the frequency configuration information, the method further includes: The network is subjected to time synchronization simulation according to the physical topology, the time configuration information and the status of the frequency synchronization sources of the multiple network devices to obtain the time synchronization information of the multiple network devices, wherein the time synchronization information includes time status information and / or time synchronization path.

8. The method according to claim 7, characterized in that The time status information includes the time synchronization status of the network device, the attribute information of the time signal received and sent by the port of the network device, and the time source selection result of the port of the network device, wherein the time synchronization status indicates whether the network device has a time synchronization source. When the network device has a time synchronization source, the time synchronization status also includes an indication of the time signal from the time synchronization source, and the time source selection result indicates that the port is a port of the network device for receiving a time signal from the time synchronization source, a port of the network device for sending a time signal from the time synchronization source, or a backup port of the network device for receiving a time signal from the time synchronization source.

9. The method according to claim 8, characterized in that The attribute information of the time signal includes one or more of the level of the time source from which the time signal comes, the accuracy of the time source from which the time signal comes, the device identification of the time source from which the time signal comes, the number of devices through which the time signal passes during transmission from the time source to the network device, and the configuration priority of the time source.

10. The method according to any one of claims 7 to 9, characterized in that: The performing time synchronization simulation on the network according to the physical topology, the time configuration information, and the presence or absence of frequency synchronization sources of the multiple network devices includes: Establishing a time synchronization topology according to the physical topology, the time configuration information, and the presence or absence of the frequency synchronization source of the multiple network devices, the time synchronization topology including the multiple network devices and the time synchronization relationship between the multiple network devices, the time synchronization relationship being used to indicate the time synchronization direction between the multiple network devices; Based on the time synchronization topology, time signals from m time sources are diffused, where m is a positive integer, and a time signal diffusion process is repeatedly executed until the time states of the multiple network devices stop changing, so as to obtain time state information of the multiple network devices, wherein the time signal diffusion process includes: For a fourth network device among the multiple network devices to which the time signal is diffused, determine the time synchronization signal of the fourth network device among all the time signals to which the fourth network device is diffused according to the time configuration information of the fourth network device, and continue to diffuse the updated time synchronization signal from the fourth network device based on the time synchronization topology, wherein the number of follow-up hops carried by the updated time synchronization signal is greater than the number of follow-up hops carried by the time synchronization signal before the update, the number of follow-up hops being the number of devices that the time synchronization signal passes through from the time source, and the port of the fourth network device used to diffuse the updated time synchronization signal is different from the port of the fourth network device that receives the time synchronization signal.

11. The method according to claim 10, characterized in that The diffusing the time signals from the m time sources based on the time synchronization topology includes: Based on the time synchronization topology, the time signals from the m time sources are diffused by breadth-first search.

12. The method according to claim 10 or 11, characterized in that: After the time states of the multiple network devices stop changing, if there are multiple time-to-be-synchronized devices among the multiple network devices, and the time-to-be-synchronized devices are network devices that do not use any of the m time sources as a time synchronization source, the method further includes: Based on the time synchronization topology, time signals from the multiple time synchronization devices are diffused in the multiple time synchronization devices respectively, and the time signal diffusion process is repeatedly executed until the time states of the multiple time synchronization devices stop changing.

13. The method according to any one of claims 10 to 12, characterized in that: The time configuration information includes whether the port of the network device enables time synchronization, and the time synchronization direction indicated by the time synchronization relationship is: the third port on the fifth network device that enables time synchronization can synchronize the fourth port on the sixth network device that enables time synchronization, wherein the fifth network device and the sixth network device are two connected network devices that enable time synchronization among the multiple network devices.

14. The method according to any one of claims 7 to 13, characterized in that: After performing time synchronization simulation on the network, the method further includes: If a network device enables the frequency synchronization function of the time synchronization protocol among the multiple network devices, and the priority of the precision time protocol PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, the time synchronization signal from the time synchronization source is used as the frequency synchronization signal of the network device, and the frequency synchronization signal is diffused from the network device based on the frequency synchronization topology, and the frequency signal diffusion process is repeatedly executed until the frequency status of the multiple network devices stops changing, so as to obtain the updated frequency status information of the multiple network devices, wherein the frequency synchronization topology is established according to the physical topology and the frequency configuration information, and the frequency signal diffusion process includes: For the seventh network device among the multiple network devices to which the frequency signal is diffused, the frequency synchronization signal of the seventh network device is determined among all the frequency signals to which the seventh network device is diffused according to the frequency configuration information of the seventh network device, and the frequency synchronization signal is continued to be diffused from the seventh network device based on the frequency synchronization topology, wherein the port of the seventh network device used to diffuse the frequency synchronization signal is different from the port of the seventh network device through which the frequency synchronization signal is received.

15. The method according to claim 14, characterized in that After obtaining the updated frequency status information of the multiple network devices, the method further includes: If there is a state change of a frequency synchronization source of a network device among the plurality of network devices, the time synchronization simulation is performed again on the network.

16. The method according to any one of claims 1 to 15, characterized in that: After obtaining the frequency synchronization information of the plurality of network devices, the method further includes: The frequency synchronization information is output.

17. The method according to any one of claims 1 to 16, characterized in that: The method further comprises: Determine whether the network device has a clock synchronization problem according to the clock synchronization information of the network device, the clock synchronization information includes clock state information and / or a clock synchronization path, the clock state information includes frequency state information and / or time state information, and the clock synchronization path includes a frequency synchronization path and / or a time synchronization path; If the network device has a clock synchronization problem, the clock configuration information of the network device is compared with a clock configuration template to obtain error configuration information of the network device.

18. The method according to claim 17, characterized in that After obtaining the error configuration information of the network device, the method further includes: Modify the erroneous configuration information according to the clock configuration template to obtain updated clock configuration information of the network device; Perform clock synchronization simulation on the network according to the physical topology and the updated clock configuration information to obtain updated clock synchronization information of the network device; After determining that the network device has no clock synchronization problem according to the updated clock synchronization information, the clock configuration change information of the network device is sent to the network device, so that the network device updates the clock configuration information of the network device.

19. The method according to any one of claims 1 to 18, characterized in that: The method further comprises: If the network changes, obtaining the physical topology of the changed network and clock configuration information of multiple network devices in the changed network; According to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, clock synchronization simulation is performed on the changed network to obtain clock synchronization information of multiple network devices in the changed network, the clock synchronization information includes clock status information and / or clock synchronization path, the clock status information includes frequency status information and / or time status information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path.

20. The method according to claim 19, characterized in that The method further comprises: Output fault prompt information, where the fault prompt information is used to indicate a clock synchronization problem that occurs in the changed network.

21. The method according to claim 20, characterized in that The clock synchronization problem includes one or more of the following: a frequency synchronization loop occurs, a time synchronization transient loop occurs, a network device has no frequency synchronization source, or a network device has no time synchronization source.

22. A clock synchronization information acquisition device, characterized in that: The device comprises: An acquisition module, used to acquire the physical topology of the network and clock configuration information of multiple network devices in the network, wherein the clock configuration information includes frequency configuration information, and the frequency configuration information is used for frequency synchronization of the multiple network devices; A simulation module is used to perform frequency synchronization simulation on the network according to the physical topology and the frequency configuration information to obtain frequency synchronization information of the multiple network devices, wherein the frequency synchronization information includes frequency status information and / or frequency synchronization path.

23. The device according to claim 22, characterized in that The frequency status information of a network device includes the frequency synchronization status of the network device and the attribute information of the frequency signal received and sent by the port of the network device, wherein the frequency synchronization status indicates whether the network device has a frequency synchronization source. When the network device has a frequency synchronization source, the frequency synchronization status also includes an indication of the frequency signal from the frequency synchronization source.

24. The device according to claim 23, characterized in that The attribute information of the frequency signal includes frequency quality and / or a signal tag of the frequency signal, and the signal tag is used to identify a source device of the frequency signal.

25. The device according to any one of claims 22 to 24, characterized in that The simulation module is specifically used for: Establishing a frequency synchronization topology according to the physical topology and the frequency configuration information, wherein the frequency synchronization topology includes the multiple network devices and the frequency synchronization relationship between the multiple network devices, and the frequency synchronization relationship is used to indicate the frequency synchronization direction between the multiple network devices; Based on the frequency synchronization topology, frequency signals from n frequency sources are diffused, where n is a positive integer, and the frequency signal diffusion process is repeatedly performed until the frequency states of the multiple network devices stop changing, so as to obtain the frequency state information of the multiple network devices, wherein the frequency signal diffusion process includes: For the first network device among the multiple network devices to which the frequency signal is diffused, the frequency synchronization signal of the first network device is determined among all the frequency signals to which the first network device is diffused according to the frequency configuration information of the first network device, and the frequency synchronization signal is continued to be diffused from the first network device based on the frequency synchronization topology, wherein the port of the first network device used to diffuse the frequency synchronization signal is different from the port of the first network device through which the frequency synchronization signal is received.

26. The device according to claim 25, characterized in that The simulation module is also used for: After the frequency states of the multiple network devices stop changing, if there are multiple frequency devices to be synchronized among the multiple network devices, frequency signals from the multiple frequency devices to be synchronized are respectively diffused among the multiple frequency devices to be synchronized based on the frequency synchronization topology, and the frequency signal diffusion process is repeated until the frequency states of the multiple frequency devices to be synchronized stop changing, and the frequency devices to be synchronized are network devices that do not use any of the n frequency sources as a frequency synchronization source.

27. The device according to claim 25 or 26, characterized in that The frequency configuration information includes whether the port of the network device enables frequency synchronization and the port priority. The frequency synchronizable direction indicated by the frequency synchronization relationship is: a first port on the second network device that enables frequency synchronization can synchronize a second port on the third network device that enables frequency synchronization, wherein the port priority of the first port is not 0, and the second network device and the third network device are two connected network devices that enable frequency synchronization among the multiple network devices.

28. The device according to any one of claims 22 to 27, characterized in that The clock configuration information also includes time configuration information, and the time configuration information is used for the multiple network devices to perform time synchronization; the simulation module is also used to: After performing frequency synchronization simulation on the network according to the physical topology and the frequency configuration information, performing time synchronization simulation on the network according to the physical topology, the time configuration information and the status of the frequency synchronization sources of the multiple network devices to obtain time synchronization information of the multiple network devices, wherein the time synchronization information includes time status information and / or time synchronization path.

29. The device according to claim 28, characterized in that The time status information includes the time synchronization status of the network device, the attribute information of the time signal received and sent by the port of the network device, and the time source selection result of the port of the network device, wherein the time synchronization status indicates whether the network device has a time synchronization source. When the network device has a time synchronization source, the time synchronization status also includes an indication of the time signal from the time synchronization source, and the time source selection result indicates that the port is a port of the network device for receiving a time signal from the time synchronization source, a port of the network device for sending a time signal from the time synchronization source, or a backup port of the network device for receiving a time signal from the time synchronization source.

30. The device according to claim 29, characterized in that The attribute information of the time signal includes one or more of the level of the time source from which the time signal comes, the accuracy of the time source from which the time signal comes, the device identification of the time source from which the time signal comes, the number of devices through which the time signal passes during transmission from the time source to the network device, and the configuration priority of the time source.

31. The device according to any one of claims 28 to 30, characterized in that The simulation module is specifically used for: Establishing a time synchronization topology according to the physical topology, the time configuration information, and the presence or absence of the frequency synchronization source of the multiple network devices, the time synchronization topology including the multiple network devices and the time synchronization relationship between the multiple network devices, the time synchronization relationship being used to indicate the time synchronization direction between the multiple network devices; Based on the time synchronization topology, time signals from m time sources are diffused, where m is a positive integer, and a time signal diffusion process is repeatedly executed until the time states of the multiple network devices stop changing, so as to obtain time state information of the multiple network devices, wherein the time signal diffusion process includes: For a fourth network device among the multiple network devices to which the time signal is diffused, determine the time synchronization signal of the fourth network device among all the time signals to which the fourth network device is diffused according to the time configuration information of the fourth network device, and continue to diffuse the updated time synchronization signal from the fourth network device based on the time synchronization topology, wherein the number of follow-up hops carried by the updated time synchronization signal is greater than the number of follow-up hops carried by the time synchronization signal before the update, the number of follow-up hops being the number of devices that the time synchronization signal passes through from the time source, and the port of the fourth network device used to diffuse the updated time synchronization signal is different from the port of the fourth network device that receives the time synchronization signal.

32. The device according to claim 31, characterized in that The simulation module is specifically used for: Based on the time synchronization topology, the time signals from the m time sources are diffused by breadth-first search.

33. The device according to claim 31 or 32, characterized in that The simulation module is also used for: After the time states of the multiple network devices stop changing, if there are multiple time-to-be-synchronized devices among the multiple network devices, time signals from the multiple time-to-be-synchronized devices are diffused among the multiple time-to-be-synchronized devices based on the time synchronization topology, and the time signal diffusion process is repeated until the time states of the multiple time-to-be-synchronized devices stop changing, and the time-to-be-synchronized devices are network devices that do not use any of the m time sources as a time synchronization source.

34. The device according to any one of claims 31 to 33, characterized in that The time configuration information includes whether the port of the network device enables time synchronization, and the time synchronization direction indicated by the time synchronization relationship is: the third port on the fifth network device that enables time synchronization can synchronize the fourth port on the sixth network device that enables time synchronization, wherein the fifth network device and the sixth network device are two connected network devices that enable time synchronization among the multiple network devices.

35. The device according to any one of claims 28 to 34, characterized in that The simulation module is also used for: After performing time synchronization simulation on the network, if there is a network device among the multiple network devices that enables the frequency synchronization function of the time synchronization protocol, and the priority of the precision time protocol PTP frequency source configured on the network device is higher than the priority of the frequency synchronization source of the network device determined by the frequency synchronization simulation, the time synchronization signal from the time synchronization source is used as the frequency synchronization signal of the network device, and the frequency synchronization signal is diffused from the network device based on the frequency synchronization topology, and the frequency signal diffusion process is repeatedly executed until the frequency status of the multiple network devices stops changing, so as to obtain the updated frequency status information of the multiple network devices, wherein the frequency synchronization topology is established according to the physical topology and the frequency configuration information, and the frequency signal diffusion process includes: For the seventh network device among the multiple network devices to which the frequency signal is diffused, the frequency synchronization signal of the seventh network device is determined among all the frequency signals to which the seventh network device is diffused according to the frequency configuration information of the seventh network device, and the frequency synchronization signal is continued to be diffused from the seventh network device based on the frequency synchronization topology, wherein the port of the seventh network device used to diffuse the frequency synchronization signal is different from the port of the seventh network device through which the frequency synchronization signal is received.

36. The device according to claim 35, characterized in that The simulation module is also used for: After obtaining the updated frequency status information of the multiple network devices, if there is a change in the status of the frequency synchronization source of a network device among the multiple network devices, the time synchronization simulation of the network is re-performed.

37. The device according to any one of claims 22 to 36, characterized in that The device also includes: The output module is used to output the frequency synchronization information after obtaining the frequency synchronization information of the multiple network devices.

38. The device according to any one of claims 22 to 37, characterized in that The device also includes: a judgment module, configured to judge whether the network device has a clock synchronization problem according to the clock synchronization information of the network device, the clock synchronization information including clock state information and / or clock synchronization path, the clock state information including frequency state information and / or time state information, and the clock synchronization path including frequency synchronization path and / or time synchronization path; The information processing module is used to compare the clock configuration information of the network device with the clock configuration template if the network device has a clock synchronization problem, so as to obtain the error configuration information of the network device.

39. The device according to claim 38, characterized in that The device also includes: a transceiver module; The information processing module is further configured to, after obtaining the erroneous configuration information of the network device, modify the erroneous configuration information according to the clock configuration template to obtain updated clock configuration information of the network device; The simulation module is further used to perform clock synchronization simulation on the network according to the physical topology and the updated clock configuration information to obtain updated clock synchronization information of the network device; The transceiver module is used to send the clock configuration change information of the network device to the network device after determining that the network device has no clock synchronization problem according to the updated clock synchronization information, so that the network device updates the clock configuration information of the network device.

40. The device according to any one of claims 22 to 39, characterized in that The acquisition module is further used to acquire the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network if the network changes; The simulation module is also used to perform clock synchronization simulation on the changed network according to the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, so as to obtain clock synchronization information of multiple network devices in the changed network, wherein the clock synchronization information includes clock status information and / or clock synchronization path, the clock status information includes frequency status information and / or time status information, and the clock synchronization path includes frequency synchronization path and / or time synchronization path.

41. The device according to claim 40, characterized in that The device also includes: The output module is used to output fault prompt information, where the fault prompt information is used to indicate the clock synchronization problem that occurs in the changed network.

42. The device according to claim 41, characterized in that The clock synchronization problem includes one or more of the following: a frequency synchronization loop occurs, a time synchronization transient loop occurs, a network device has no frequency synchronization source, or a network device has no time synchronization source.

43. A computer device, characterized in that: include: Processor and memory; The memory is used to store a computer program, wherein the computer program includes program instructions; The processor is used to call the computer program to implement the time synchronization information acquisition method as described in any one of claims 1 to 21.

44. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed by the processor, the time synchronization information acquisition method as described in any one of claims 1 to 21 is implemented.

45. A computer program product, characterized in that It includes a computer program, which, when executed by a processor, implements the time synchronization information acquisition method as described in any one of claims 1 to 21.

Citation Information

Cited By

  • Configurable clock tree verification method and system, computer equipment and program product

    CN122509125A

  • Verification method, system, computer device and program product of configurable clock tree

    CN122509125B