Clock synchronization information acquisition method and apparatus

Through the simulation of network physical topology and clock configuration information, the frequency and time synchronization problems during clock synchronization in the network are solved, and the accurate acquisition and visualization of clock synchronization information is achieved, thereby improving network stability and reliability.

WO2025007817A1PCT designated stage expired Publication Date: 2025-01-09HUAWEI TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/102555
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-31
Filing Date
2024-06-28
Publication Date
2025-01-09

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 unstable 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, computing the frequency and time state information of the device and synchronization path, thereby positioning and solving potential synchronization problems and improving network operation reliability.

Benefits of technology

It realizes accurate acquisition and visualization of network equipment clock synchronization information, helps operation and maintenance personnel to analyze and repair clock synchronization problems, and improves the stability and reliability of network operation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024102555_09012025_PF_FP_ABST
    Figure CN2024102555_09012025_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses a clock synchronization information acquisition method and apparatus. According to the present application, the method comprises: on the basis of the acquired physical topology of a network and frequency configuration information of a plurality of network devices in the network, performing frequency synchronization simulation on the network to obtain frequency synchronization information of the plurality of network devices, the frequency synchronization information comprising frequency state information and / or frequency synchronization paths. By offline simulating real behaviors of the network devices in a frequency synchronization process, the frequency state information and / or the frequency synchronization paths of the network devices under the current frequency configuration can be accurately calculated, thereby helping to locate possible frequency synchronization problems in the network, improving the operational reliability of the network.
Need to check novelty before this filing date? Find Prior Art

Description

Clock synchronization information acquisition method and device

[0001] This application claims priority to Chinese patent application No. 202310814866.5, filed on July 4, 2023, with the invention name “Clock synchronization verification method and device”, and priority to Chinese patent application No. 202310962984.0, filed on July 31, 2023, with the invention name “Clock synchronization information acquisition 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] Currently, network devices communicating with each other in a network generally require clock synchronization. Clock synchronization is divided into frequency synchronization and time synchronization. Frequency synchronization between two network devices means that they have clocks with the same frequency, meaning the phase difference between the clock signals is constant. Time synchronization, also known as phase synchronization, is based on frequency synchronization. Time synchronization between two network devices means that they have clocks with the same frequency and phase, meaning the phase difference between the clock signals is constant and zero.

[0004] Taking frequency synchronization as an example, different network devices typically synchronize their frequencies by having them all directly or indirectly obtain frequency signals from the same frequency source and generate their local system clocks based on these signals. For example, a network device connected to a frequency source directly obtains frequency signals from the source to generate its local system clock. This network device then transmits this frequency signal to its next-hop device, which receives it and generates its local system clock. This is equivalent to the next-hop device indirectly obtaining the frequency signal from the frequency source. The path used to transmit frequency signals from the frequency source to a specific network device is called the frequency synchronization path for that network device.

[0005] Due to the complexity of frequency configuration, various issues can arise when synchronizing multiple network devices within a network. For example, improper frequency configuration on a particular device can lead to signal interruptions or loops during transmission. Accurately acquiring frequency synchronization information from each device is crucial for improving network reliability.

[0006] Summary of the Invention

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

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

[0009] This 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 actual behavior of the network device during the frequency synchronization process, thereby helping to locate frequency synchronization problems that may occur in the network and thus improve the reliability of network operation.

[0010] 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 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. In the case that 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.

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

[0012] Optionally, the implementation process of frequency synchronization simulation of a 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 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 executed until the frequency states of the multiple network devices stop changing, so as to obtain frequency state information of the multiple network devices. 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 that receives the frequency synchronization signal.

[0013] Here, the cessation of frequency state changes of multiple network devices refers to a situation where, during repeated frequency signal diffusion processes, a subsequent diffusion result (the frequency states of multiple network devices) becomes identical to a previous diffusion result. The cessation of frequency state changes of multiple network devices can also be referred to as the multiple network devices reaching a frequency convergence state.

[0014] 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 frequency synchronization sources, the 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.

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

[0016] Optionally, the frequency configuration information includes whether a port of the network device is frequency synchronized and a port priority. The frequency synchronization relationship indicates a frequency synchronization direction in which a first port on the second network device that is frequency synchronized can synchronize a second port on the third network device that is frequency synchronized. 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 are frequency synchronized among the plurality of network devices.

[0017] Optionally, the clock configuration information also includes time configuration information, which is used for time synchronization of multiple network devices. After performing frequency synchronization simulation on the network based on the physical topology and frequency configuration information, time synchronization simulation can also be performed on the network based on the physical topology, time configuration information, and the status of the frequency synchronization sources of the multiple network devices to obtain time synchronization information for the multiple network devices. This time synchronization information includes time status information and / or time synchronization paths. The status of the frequency synchronization source of a network device refers to whether the network device has a frequency synchronization source or not.

[0018] This application simulates the actual behavior of network devices during time synchronization offline, and can accurately calculate the time status information and / or time synchronization path of network devices under the current time configuration, thereby helping to locate time synchronization problems that may occur in the network and thus improve network operation reliability.

[0019] Optionally, the time status information includes the time synchronization status of the network device, attribute information of time signals received and sent by ports of the network device, and a time source selection result for the ports of the network device. The time synchronization status indicates whether the network device has a time synchronization source. If 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 used to receive time signals from the time synchronization source, a port of the network device used to send time signals from the time synchronization source, or a backup port of the network device used to receive time signals from the time synchronization source.

[0020] 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.

[0021] Optionally, the implementation process of simulating time synchronization of a network based on the physical topology, time configuration information, and the status of frequency synchronization sources of multiple network devices includes: establishing a time synchronization topology based on the physical topology, time configuration information, and the status of frequency synchronization sources of multiple network devices, the time synchronization topology including multiple network devices and time synchronization relationships between the multiple network devices, the time synchronization relationships being used to indicate the direction in which time synchronization between the multiple network devices is possible. Based on the time synchronization topology, time signals from m time sources are diffused, where m is a positive integer, and the time signal diffusion process is repeated until the time status of the multiple network devices stops changing, thereby obtaining time status information of the multiple network devices. The time signal diffusion process includes: for a fourth network device among the multiple network devices to which the time signal is diffused, determining the time synchronization signal of the fourth network device from all time signals diffused to the fourth network device based on the time configuration information of the fourth network device, and continuing to diffuse the updated time synchronization signal 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 that receives the time synchronization signal.

[0022] Here, the cessation of the time states of multiple network devices refers to a situation where, during repeated executions of the time signal diffusion process, the subsequent diffusion results (the time states of multiple network devices) are identical to the previous diffusion results. The cessation of the time states of multiple network devices can also be referred to as the multiple network devices reaching a time convergence state.

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

[0024] Optionally, after the time status of multiple network devices stops 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, the 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 status of the multiple time-to-be-synchronized devices stops changing.

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

[0026] Optionally, the time configuration information includes whether time synchronization is enabled on a port of the network device, and the time synchronization relationship indicates a time synchronization direction in which a third port on the fifth network device, which is enabled for time synchronization, can synchronize with a fourth port on the sixth network device, which is enabled for time synchronization. The fifth network device and the sixth network device are two connected network devices, among the plurality of network devices, that are enabled for time synchronization.

[0027] Optionally, 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 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-mentioned frequency signal diffusion process is repeated 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. The frequency synchronization topology is established based on the physical topology and frequency configuration information. The frequency signal diffusion process includes: for a seventh network device among the multiple network devices to which the frequency signal is diffused, determining the frequency synchronization signal of the seventh network device from all the frequency signals diffused to the seventh network device based on the frequency configuration information of the seventh network device, and continuing to diffuse the frequency synchronization signal from the seventh network device based on the frequency synchronization topology. 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.

[0028] Since the result of time synchronization may affect frequency synchronization, for example, 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.

[0029] Optionally, after obtaining updated frequency status information of the plurality of network devices, if the status of the frequency synchronization source of any of the plurality of network devices changes, the time synchronization simulation of the network is re-performed.

[0030] 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.

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

[0032] 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.

[0033] Optionally, whether the network device has a clock synchronization problem can be determined based on the network device's clock synchronization information. The clock synchronization information includes clock status information and / or a clock synchronization path. The clock status information includes frequency status information and / or time status 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, a difference comparison is performed between the network device's clock configuration information and a clock configuration template to obtain error configuration information for the network device.

[0034] This application can automatically locate problem devices in the network, and by comparing the clock configuration information of the problem device with the clock configuration template, it can find potential misconfigurations, which helps to improve the efficiency of repairing misconfigurations.

[0035] Optionally, after obtaining the incorrect configuration information of the network device, the incorrect configuration information may be modified according to a clock configuration template to obtain updated clock configuration information for the network device. Clock synchronization simulation is performed on the network based on the physical topology and the updated clock configuration information to obtain updated clock synchronization information for the network device. After determining that the network device has no clock synchronization issues based on the updated clock synchronization information, clock configuration change information for the network device is sent to the network device, causing it to update its clock configuration information.

[0036] This application can first simulate and repair the incorrect configuration of the problem device, then pre-verify the configuration information after the simulated repair. After confirming that the clock configuration information of the problem device can solve the clock synchronization problem of the problem device after the repair, the clock configuration change information is then sent to the problem device. This application can realize the automated repair of the incorrect configuration of network devices when clock synchronization problems occur, without relying on expert experience, and can ensure the reliability and accuracy of the configuration repair.

[0037] Optionally, if a network change occurs, the physical topology of the changed network and clock configuration information for multiple network devices in the changed network can also be obtained. Based on the physical topology of the changed network and the clock configuration information for multiple network devices in the changed network, clock synchronization simulation is performed on the changed network to obtain clock synchronization information for the multiple network devices in the changed network. The clock synchronization information includes clock state information and / or clock synchronization paths. The clock state information includes frequency state information and / or time state information. The clock synchronization paths include frequency synchronization paths and / or time synchronization paths.

[0038] This application supports pre-verification of network changes and can analyze the dynamic changes in the clock synchronization information of network devices caused by network changes. In addition, since this application supports pre-verification of network changes, operation and maintenance personnel can first 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. This ensures that the network device will not have clock synchronization problems after the clock configuration is changed, which can improve the reliability of network operation.

[0039] Optionally, a fault prompt message may be output to indicate clock synchronization problems that have occurred in the network after the change, which helps operation and maintenance personnel to promptly resolve clock synchronization problems that occur in the network.

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

[0041] In a second aspect, a device for acquiring clock synchronization information is provided. The device includes multiple functional modules that interact with each other to implement the method of the first aspect and its respective 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 the specific implementation.

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

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

[0044] The processor is used to call the computer program to implement the method in the above-mentioned first aspect and its various embodiments.

[0045] 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.

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

[0047] In a sixth aspect, a chip is provided, which includes a programmable logic circuit and / or program instructions. When the chip is running, it implements the method in the above-mentioned first aspect and its various embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] FIG1 is a schematic diagram of frequency synchronization;

[0049] FIG2 is a schematic diagram of time synchronization;

[0050] FIG3 is a schematic diagram of traditional clock synchronization;

[0051] FIG4 is a schematic diagram of high-precision terrestrial clock synchronization based on a transmission network;

[0052] FIG5 is a schematic diagram of solving a clock synchronization path based on the Dijkstra algorithm;

[0053] FIG6 is a schematic diagram of a reverse clock path search based on a real state query;

[0054] FIG7 is a schematic diagram of a clock synchronization simulation process provided by an embodiment of the present application;

[0055] FIG8 is a schematic diagram of an application scenario provided by an embodiment of the present application;

[0056] FIG9 is a schematic diagram of an implementation flow of a method for acquiring time synchronization information provided in an embodiment of the present application;

[0057] FIG10 is a schematic diagram of a physical topology and device frequency configuration of a network provided in an embodiment of the present application;

[0058] FIG11 is a schematic diagram of a frequency synchronization topology provided in an embodiment of the present application;

[0059] FIG12 is a schematic diagram of a frequency signal diffusion provided by an embodiment of the present application;

[0060] FIG13 is a schematic diagram of a network device selecting a frequency synchronization signal according to an embodiment of the present application;

[0061] FIG14 is a schematic diagram of a frequency signal transmitted after a network device completes frequency source selection according to an embodiment of the present application;

[0062] FIG15 is a schematic diagram of a physical topology and SyncE configuration of a network provided in an embodiment of the present application;

[0063] FIG16 is a schematic diagram of another frequency synchronization topology provided in an embodiment of the present application;

[0064] FIG17 is a schematic diagram of another frequency signal diffusion provided by an embodiment of the present application;

[0065] FIG18 is a schematic diagram of another frequency signal diffusion provided in an embodiment of the present application;

[0066] FIG19 is a schematic diagram of a frequency synchronization simulation result provided in an embodiment of the present application;

[0067] FIG20 is a schematic diagram of a physical topology and device time configuration of a network provided in an embodiment of the present application;

[0068] FIG21 is a schematic diagram of a time synchronization topology provided in an embodiment of the present application;

[0069] FIG22 is a schematic diagram of a physical topology and 1588v2 configuration of a network provided in an embodiment of the present application;

[0070] FIG23 is a schematic diagram of another time synchronization topology provided in an embodiment of the present application;

[0071] FIG24 is a schematic diagram of a breadth-first traversal provided in an embodiment of the present application;

[0072] FIG25 is a schematic diagram of a time synchronization simulation result provided by an embodiment of the present application;

[0073] FIG26 is a schematic diagram of another time synchronization simulation result provided in an embodiment of the present application;

[0074] FIG27 is a schematic diagram of another frequency synchronization simulation result provided in an embodiment of the present application;

[0075] FIG28 is a schematic diagram of a visualization page provided in an embodiment of the present application;

[0076] FIG29 is a schematic diagram of a device clock synchronization path presented on a visual page according to an embodiment of the present application;

[0077] FIG30 is a schematic diagram of device clock related information presented on a visualization page according to an embodiment of the present application;

[0078] FIG31 is a schematic diagram of a network physical topology, SyncE configuration, and frequency synchronization simulation results provided in an embodiment of the present application;

[0079] FIG32 is a schematic diagram of a network fault drawn based on frequency synchronization simulation results provided by an embodiment of the present application;

[0080] FIG33 is a schematic diagram of a network failure drawn based on time synchronization simulation results provided by an embodiment of the present application;

[0081] FIG34 is a schematic diagram of a frequency synchronization simulation result after a fault provided by an embodiment of the present application;

[0082] FIG35 is a schematic diagram of a time synchronization simulation result after a fault provided by an embodiment of the present application;

[0083] FIG36 is a schematic diagram of the physical topology and SyncE configuration of another network provided in an embodiment of the present application;

[0084] FIG37 is a schematic diagram of a frequency synchronization simulation process provided by an embodiment of the present application;

[0085] FIG38 is a schematic diagram of another frequency synchronization simulation result after a fault provided by an embodiment of the present application;

[0086] FIG39 is a schematic diagram of another time synchronization topology provided in an embodiment of the present application;

[0087] FIG40 is a schematic diagram of another time synchronization simulation result provided in an embodiment of the present application;

[0088] FIG41 is a schematic diagram of a time synchronization transient loop provided by an embodiment of the present application;

[0089] FIG42 is a schematic diagram of another time synchronization simulation result after a fault provided by an embodiment of the present application;

[0090] FIG43 is a schematic diagram of another network physical topology, SyncE configuration, and frequency synchronization simulation results provided in an embodiment of the present application;

[0091] FIG44 is a schematic diagram of a frequency synchronization simulation result after another fault provided in an embodiment of the present application;

[0092] FIG45 is a schematic structural diagram of a clock synchronization information acquisition device provided in an embodiment of the present application;

[0093] FIG46 is a schematic structural diagram of another clock synchronization information acquisition device provided in an embodiment of the present application;

[0094] FIG47 is a schematic diagram of the structure of another clock synchronization information acquisition device provided in an embodiment of the present application;

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

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

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

[0098] 1. Frequency synchronization: It means that different signals have the same number of pulses in the same time interval. For example, Figure 1 is a schematic diagram of frequency synchronization. The horizontal axis represents time. As shown in Figure 1, 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.

[0099] 2. Time synchronization: This means that different signals, while achieving frequency synchronization, have the same start and end time for each pulse. For example, Figure 2 is a schematic diagram of time synchronization. The horizontal axis represents time. As shown in Figure 2, clocks 3 and 4 have the same frequency and phase. Time synchronization between two network devices means that they have clocks with the same frequency and phase.

[0100] 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.

[0101] 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).

[0102] 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).

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

[0104] 7. Frequency synchronization path: This refers to the path used to transmit frequency signals from the frequency source to the local device. The path used to transmit frequency signals from the frequency source to a specific network device is called the frequency synchronization path for that network device.

[0105] 8. Time synchronization path: This refers to the path used to transmit time signals from a time source to a local device. The path used to transmit time signals from a time source to a network device is called the time synchronization path for that network device.

[0106] 9. Clock synchronization path: refers to the path from the clock source to the local device for transmitting clock signals, also known as the clock path. The path from the clock source to a certain network device for transmitting clock signals 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.

[0107] Currently, network devices that communicate with each other in the network usually need to meet clock synchronization requirements. For example, in a mobile bearer network, in order to ensure the normal operation of communication services, the clock frequency and / or clock phase differences between base stations need 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.

[0108] Traditional clock synchronization solutions equip each base station with a global navigation satellite system (GNSS). Each base station receives satellite clock signals via its own GNSS, thereby achieving clock synchronization between base stations. For example, Figure 3 is a schematic diagram of traditional clock synchronization. Due to limitations in security, cost, maintainability, and failure rates associated with GNSS-based clock synchronization solutions, operators can use high-precision terrestrial clock synchronization solutions based on transmission networks as a backup for achieving clock synchronization between base stations. In this terrestrial high-precision clock synchronization solution based on transmission networks, one or more external building-integrated timing supply (BITS) devices are deployed between the transmission network and the satellite. The external BITS devices receive satellite clock signals and serve as clock sources for providing clock signals to the transmission network (referred to as BITS clock sources). Simultaneously, a clock synchronization system is established using transmission equipment (such as routers) within the transmission network. The clock signals received by the BITS clock source from the satellite are transmitted hop by hop through the transmission equipment to all base stations, achieving clock synchronization between base stations. For example, Figure 4 is a schematic diagram of high-precision terrestrial clock synchronization based on transmission networks.

[0109] Currently, the main clock synchronization technologies include Synchronous Ethernet (SyncE) and 1588v2 (IEEE 1588 version 2). SyncE is used to transmit frequency signals for frequency synchronization, while 1588v2 is primarily used to transmit time signals for time synchronization. Transmission equipment generally does not have a direct need for clock synchronization. However, since base stations are connected to transmission equipment and base stations require clock synchronization, clock synchronization is generally required for all transmission equipment in the entire network and is used as a measure of clock network quality. 1588v2 is based on PTP.

[0110] The frequency information transmitted by SyncE technology within the network consists of two main components: the physical layer bitstream and frequency quality information. The physical layer bitstream contains frequency pulse information. Frequency quality information indicates frequency quality and is generally expressed using synchronization status message (SSM) levels. SSM levels, in descending order of priority, include 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 represent different signal sources. For example, PRC (defined in G.811) represents frequency signals from satellite sources such as Beidou. SEC (defined in G.813) represents the frequency signal of the local clock output by the bearer network equipment during free oscillation. DNU indicates signal unavailable. 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 based on 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.

[0111] The time information transmitted by 1588v2 on the network is mainly divided into two parts: event messages and normal messages. Event messages contain information such as timestamps and delays. Announce messages within normal messages are used to establish the time synchronization system and include time attribute information during the time source selection process. 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 class 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 (which is factory-installed and unique across the network). priority 1 and priority 2 refer to priorities and can be configured to indicate the order of selection. step-removed indicates the number of devices the time signal passes through during transmission. 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 clock with the best time attributes 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 will not form a loop. 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 embodiments of the present application, network changes generally refer to network changes caused by network failures or network changes caused by changes in network configuration.

[0112] Due to the complexity of SyncE and 1588v2 configuration, existing networks may encounter various issues when using high-precision terrestrial clock synchronization solutions. For example, improper clock configuration on transmission equipment can cause clock signals to be interrupted during transmission or form loops within the transmission network. Furthermore, the reliability of the clock synchronization network (CSN) cannot be guaranteed. Even if all base stations can correctly receive clock signals from BITS devices in the current state, if the network changes, there is no guarantee that all base stations will continue to receive the correct clock signals. This may lead to degraded clock accuracy and affect communication service transmission. Therefore, accurately obtaining the clock status and clock paths of all transmission equipment in the current network to locate potential clock synchronization issues in the network is key to improving network reliability.

[0113] 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 it is connected to a BITS device. Among them, the cell site gateway (CSG) device is not connected to the BITS device, and the 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 is a schematic diagram of solving the clock synchronization path based on the Dijkstra algorithm. As shown in Figure 5, 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 require the actual clock status of the device to be collected and can be solved offline based on the clock configuration. The main disadvantage of this solution is that it only supports a small number of time configurations. First, the shortest path algorithm-based solution is only suitable for simple 1588v2 scenarios and does not support complex scenarios with static source selection or multiple BITS devices. It can only query the path but cannot restore device port status information. When two shortest paths exist, this solution cannot further identify the true clock synchronization path. Second, because frequency signal transmission does not follow the shortest path, this solution can only query the time synchronization path, not the frequency synchronization path. Finally, this solution does not support pre-verification, making it impossible to analyze dynamic changes as the network undergoes them.

[0114] Related technologies also provide a reverse clock path search solution based on real-state query. The basic principle of this solution is as follows: establish an information exchange mechanism 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 receiving the clock path query message, the upstream node continues to send clock path query messages to the upstream node of the upstream node until it reaches the clock source device. The clock status information of all devices along the path traversed by the clock path query message is then transmitted hop by hop to device A, thereby achieving online clock path query. For example, Figure 6 is a schematic diagram of a reverse clock path search based on real-state query. As shown in Figure 6, when R4 wants to know its own clock synchronization path, it sends a clock path query message to R3, which it follows. After receiving the message, R3 continues to send the clock path query message to R2, which it follows. After receiving the message, R2 continues to send the clock path query message to R1, which it follows, until it reaches the root node R1. Then, starting from R1, the device information along the path traversed by the clock path query message is transmitted in reverse to R4. The main advantage of this solution is that it performs queries based on the network's actual clock status, achieving high accuracy. However, its main disadvantages are that, on the one hand, it requires a new clock path query protocol, which is not only difficult to implement but also increases the service burden on devices. Furthermore, clock path queries can only be completed for one device at a time. On the other hand, this solution is entirely based on the actual clock status of the current network and does not support pre-verification. Therefore, it is impossible to analyze dynamic changes as the network undergoes them.

[0115] Related technologies also offer clock path query solutions based on expert experience and manual labor. The basic principle of this solution is as follows: Operations and maintenance personnel check the clock configuration or clock status of network devices and, based on expert experience, manually analyze the clock synchronization path. The main drawback of this solution is that it relies on the expertise of operations and maintenance personnel and requires device-by-device analysis, making it inefficient and prone to errors.

[0116] This application provides a technical solution for obtaining clock synchronization information for network devices in a network through offline simulation. In this technical solution, clock synchronization simulation is performed on the network based on the collected physical topology of the network and the clock configuration information of multiple network devices in the network to obtain clock synchronization information for multiple network devices in the network. This clock synchronization information includes clock state information and / or clock synchronization paths. By offline simulating the actual behavior of network devices during the clock synchronization process, the actual clock state and clock synchronization path of the network devices under the current clock configuration can be accurately calculated, thereby helping to locate potential clock synchronization issues in the network and improving network reliability. Furthermore, this application obtains clock synchronization information for multiple network devices in a single simulation, improving the efficiency of obtaining clock synchronization information for all network devices. This solution also supports network verification in network change scenarios. For example, simulation can be continued on a network that is about to change or a network that has already changed, enabling pre-verification of the network that is about to change or post-verification of the network that has already changed. This allows clock synchronization information for network devices in the changed network to be obtained, allowing operations and maintenance personnel to understand how the network-wide clock state will change after the network change, thereby enabling robustness analysis and change analysis.

[0117] 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 true path when there are two shortest paths. However, the present application can simulate the true behavior of network devices during clock synchronization through offline simulation, achieving 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 restricted 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.

[0118] Compared with the reverse clock path search scheme based on real status query in related technologies, this application does not need to collect the real status information of network devices, but only needs to collect the clock configuration information of network devices to complete offline query, and has relatively low data requirements.

[0119] Compared with the clock path query scheme based on expert experience and manual work in related technologies, this 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 this application is more accurate.

[0120] 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-mentioned clock synchronization simulation of the network based on 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 based on the physical topology of the network and the frequency configuration information of multiple network devices in the network to obtain 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 frequency synchronization problems that may occur in the network, thereby improving the reliability of network operation. Among them, frequency synchronization problems include but are not limited to the occurrence of frequency synchronization loops and / or the existence of network devices without frequency synchronization sources. 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.

[0121] 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 based on 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 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, so as to obtain time synchronization information of the multiple network devices, where the time synchronization information includes time status information and / or time synchronization path. The present application can accurately calculate the time status information and / or time synchronization path of the network device under the current time configuration by offline simulation of the actual behavior of the network device during the time synchronization process, thereby helping to locate time synchronization problems that may occur in the network and thereby improving the reliability of network operation. Among them, time synchronization problems include but are not limited to the situation where the network device has no 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.

[0122] 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 has enabled 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 performing time synchronization simulation on the network, 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. You can then determine whether the frequency synchronization simulation results affect time synchronization. If so, continue the time synchronization simulation. This process continues until the frequency and time synchronization simulation results reach a stable state or begin to fluctuate. This provides clock status information and clock synchronization paths for multiple network devices.

[0123] For example, FIG7 is a schematic diagram of a clock synchronization simulation process provided by an embodiment of the present application. As shown in FIG7 , 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 (including frequency configuration information and time configuration information) of the network devices in the network. The first step is to perform frequency synchronization simulation according to the input physical topology and frequency configuration information (for specific implementation, please 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) (for specific implementation, please 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 (for specific implementation, please refer to the description of the frequency-time coupling simulation process in the following method embodiment). The output information finally obtained includes the clock synchronization information of the network devices in the network. The clock synchronization information, for example, includes frequency status information, time status information, frequency synchronization path, and time synchronization path.

[0124] 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 the 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 the 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.

[0125] In some possible implementations, after performing clock synchronization simulation on a network, the simulated clock synchronization information of the network devices may be output. The clock synchronization information may include frequency synchronization information and / or time synchronization information. By outputting the clock synchronization information, the present application achieves visualization of the clock synchronization information, thereby assisting operations and maintenance personnel in viewing and analyzing network conditions.

[0126] In some possible implementations, after performing clock synchronization simulation on a network, it is possible to determine whether a network device has a clock synchronization problem based on the simulated clock synchronization information of the network device. If the network device has a clock synchronization problem, the clock configuration information of the network device can be compared with a clock configuration template to obtain information about the network device's misconfiguration. This application can automatically locate problematic devices in the network and, by comparing the problematic device's clock configuration information with a clock configuration template, identify potential misconfigurations, thereby improving the efficiency of remediating misconfigurations.

[0127] In some possible implementations, after obtaining the erroneous configuration information of the network device, the erroneous configuration information can 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. 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 erroneous configuration of the problem device, and then pre-verify the configuration information after the simulation repair. 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 erroneous 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.

[0128] In some possible implementations, if a 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, based on the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, a clock synchronization simulation is performed on the changed network to obtain the clock synchronization information of multiple network devices in the changed network. Wherein, network changes include but are not limited to network failures (such as link failures or device failures, etc.), changes in the clock configurations of network devices in the network (such as manual changes to the clock configurations of network devices by operation and maintenance personnel, etc.), and the presence of network devices going 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, operation and maintenance personnel can obtain the clock synchronization information of the network devices after the clock configuration is changed through simulation before changing the clock configuration on the network devices to ensure that the network devices will not have clock synchronization problems after the clock configuration is changed, thereby improving the reliability of network operation.

[0129] In some possible implementations, if a clock synchronization problem occurs after a network change, a fault prompt message may be output. This helps operations and maintenance personnel promptly resolve clock synchronization issues that arise in the network. Optionally, the clock synchronization problem includes one or more of a frequency synchronization loop, a transient time synchronization loop, a network device lacking a frequency synchronization source, or a network device lacking a time synchronization source.

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

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

[0132] 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 (DCNs), 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 is a schematic diagram of an application scenario provided in an embodiment of the present application. As shown in Figure 8, 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.

[0133] BITS devices receive satellite clock signals via GNSS antennas and transmit them to downstream transmission network equipment. Two BITS devices are typically deployed, one active and one standby, to improve reliability.

[0134] Transmission network equipment includes, but is not limited to, packet transport network (PTN) equipment and acyclic transmission network (ATN) equipment. Transmission network equipment can be, for example, routers or switches. Transmission network equipment is configured with clock synchronization protocols, including but not limited to SyncE, 1588v2, ITU (International Telecommunication Union)-T G.8275.1, or CU-106. Transmission network equipment is capable of following the clock signal of BITS equipment and transmitting the clock signal hop by hop.

[0135] 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.

[0136] In the application scenario shown in FIG8 , the ultimate goal is to achieve clock synchronization between base stations. This is achieved by configuring the frequency-related and time-related configurations of the transmission network devices 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 the application scenario shown in FIG8 , it can be specifically implemented by performing clock synchronization simulation on the transmission network based on 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.

[0137] Optionally, referring to Figure 8, the transmission network may 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 may 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 may be referred to as access layer devices. Network devices located in the aggregation layer may be referred to as aggregation layer devices. Network devices located in the core layer may be referred to as core layer devices. Taking the transmission network as an operator network as an example, the access layer device may be, for example, a CSG. The aggregation layer device may be, for example, an ASG. The core layer device may be, for example, a base station controller side gateway (radio network controller site gateway, RSG). Alternatively, the transmission network may also adopt a two-layer network architecture, which will not be described in detail in the embodiments of the present application.

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

[0139] For example, Figure 9 is a schematic diagram of an implementation flow of a method for acquiring time synchronization information provided in an embodiment of the present application. This method can be applied to the application scenario shown in Figure 8. As shown in Figure 9, the method includes but is not limited to the following steps 901 to 904.

[0140] 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 be 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.

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

[0142] The physical topology of a network includes all network devices in the network and the physical connection relationships between all network devices. The physical connection relationships here can be port-level physical connection relationships, such as a port of a network device is connected to a port of another network device. The network here can be the transmission network shown in Figure 8. In this case, the physical topology of the network includes all transmission network devices and the physical connection relationships between all 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 can include the transmission network and BITS devices shown in Figure 8. In this case, 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.

[0143] The clock configuration information of the multiple network devices includes frequency configuration information of the multiple network devices, and the frequency configuration information is used for frequency synchronization of the multiple network devices. Optionally, the clock configuration information of the multiple network devices also includes time configuration information of the multiple network devices, and the time configuration information is used for time synchronization of the multiple network devices. 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.

[0144] 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 may use SyncE to configure the frequency information. Whether Synchronous Ethernet is enabled in the SyncE configuration indicates whether frequency synchronization is enabled.

[0145] 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. For example, the network device may configure the time information using 1588v2.

[0146] 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.

[0147] 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. In the case that 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 can 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.

[0148] 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 an SSM level, and the SSM levels are represented from high to low as PRC, SSU-A, SSU-B, SEC and DNU. 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 will be used as a frequency synchronization signal by a network device that enables the 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 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 a frequency synchronization signal for the network device.

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

[0150] 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 synchronization direction between the multiple network devices.

[0151] 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, and 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. Under this implementation method, 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.

[0152] For example, Figure 10 is a schematic diagram of the physical topology and device frequency configuration of a network provided in an embodiment of the present application. As shown in Figure 10, taking the four network devices shown in Figure 10 as an example, the ports of the network devices are connected by 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 has not frequency synchronization enabled. The number next to the port indicates the configured port priority. By default, the port priority will be 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 is not enabled for 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 to 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, the frequency synchronization topology shown in Figure 11 can be obtained according to the physical topology and device frequency configuration shown in Figure 10.

[0153] 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 frequency state information of the multiple network devices.

[0154] Among them, the frequency signal diffusion process includes: for the first network device to which the frequency signal is diffused among the multiple network devices, 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 through which the first network device receives the frequency synchronization signal. The first network device is any network device to which the frequency signal is diffused among the multiple network devices. When the number of frequency sources is greater than 1 (n>1), the first network device can filter out all the frequency signals to which the first network device is diffused except the frequency synchronization signal, that is, the first network device can only diffuse outward the frequency synchronization signal that it follows.

[0155] It is worth noting that when the computer device completes the k-th 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 q-th 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 oscillated. The cessation of the frequency states of multiple network devices can also be referred to as the multiple network devices reaching a frequency convergence state.

[0156] Optionally, for a network device that is exposed to frequency signals from other devices, the network device will typically select a frequency synchronization signal to follow from the frequency signals it has been exposed to. Of course, the present embodiment does not exclude the possibility that the network device continues to use the local frequency. In other words, the first network device may select a frequency synchronization signal to follow from the frequency signals it has been exposed to, or may choose not to follow any received frequency signals and instead use the local frequency.

[0157] Optionally, the above-mentioned 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 can be, for example, an external BITS device. The internal frequency source can 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, Figure 12 is a schematic diagram of frequency signal diffusion provided in an embodiment of the present application. As shown in Figure 12, the frequency signal can be diffused outward from the source node to other nodes hop by hop along the link direction of the frequency synchronization topology. The source node here can be an internal frequency source in the network, or it can be a network device in the network connected to the external frequency source. The numbers in Figure 12 represent the number of diffusion hops of the frequency signal, and the arrows marked with numbers represent the diffusion direction of the frequency signal. Figure 12 only shows the forward diffusion of the frequency signal. In reality, it is possible that the frequency signal diffuses forward and then diffuses in the reverse direction.

[0158] In an embodiment of the present application, the network device may use multicast to spread frequency signals outward.

[0159] 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 that enables 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, and therefore will not continue to diffuse the frequency signal with lower frequency quality. This can minimize the diffusion of frequency signals in the network, thereby improving the efficiency of frequency synchronization simulation.

[0160] Optionally, the computer device determines the frequency synchronization signal of the first network device from among all frequency signals diffused to the first network device based on 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. This may be by simulating 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 subsequent frequency synchronization signals outward based on the frequency synchronization topology. For example, the computer device may simulate the network device executing the following steps a to c to complete the processing of all frequency signals received by the network device.

[0161] 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.

[0162] In step b, based on the frequency configuration information of the device and the attribute information of each received frequency signal, a frequency signal is selected as the 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 SSM mode, the frequency signal with the highest SSM quality is selected first; if there are multiple frequency signals with the highest SSM quality, the frequency signal received through the port with higher port priority is selected from the multiple frequency signals; if a unique frequency signal still cannot be selected, further selection can be made based on the frequency source type and port number. Among them, the frequency source is mainly divided into three types according to 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).

[0163] For example, FIG13 is a schematic diagram of a network device selecting a frequency synchronization signal provided by an embodiment of the present application. As shown in FIG13 , the network device receives an SSU-A signal through the left port, receives a PRC signal 1 through the upper port, receives a PRC signal 2 through the lower port, and receives a 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 filters out PRC signal 3 received through the right port with a port priority of 0, and then selects PRC signal 1 received through the upper port with the highest SSM quality as the following frequency synchronization signal from PRC signal 1 with the highest SSM quality received through the upper port and PRC signal 2 with the highest SSM quality received through the lower port.

[0164] In step c, after determining the frequency synchronization signal the device is currently following, it updates the frequency signals transmitted by all its ports based on the frequency configuration. For example, if only SSM mode is enabled on the device, it will send a frequency signal with the DNU quality attribute back to the port receiving the frequency synchronization signal and transmit the currently following frequency synchronization signal through other ports.

[0165] For example, Figure 14 is a schematic diagram of a frequency signal transmitted by a network device after completing frequency source selection according to an embodiment of the present application. As shown in Figure 14, based on the frequency source selection result shown in Figure 13, after selecting the follow-up PRC signal 1 as the frequency synchronization signal to follow, the network device sends a frequency signal with a DNU quality attribute (i.e., a DNU signal) in the reverse direction through the upper port, and sends the PRC signal 1 received from the upper port through other ports.

[0166] Optionally, after executing 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 n frequency sources as a frequency synchronization source, then the following step 9023 may be continued. One possible scenario in which the network device does not use any of the 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. Another possible scenario 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.

[0167] 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 repeated until the frequency states of the multiple frequency synchronization devices stop changing.

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

[0169] Optionally, after executing step 9022, i.e., after the frequency states of the multiple network devices stop changing, if there is only one frequency synchronization device among the multiple network devices, then the frequency synchronization device may use the local frequency. Alternatively, after executing step 9023, i.e., after the frequency states of the multiple frequency synchronization devices stop changing, if there is still a frequency synchronization device among the multiple frequency synchronization devices that does not have a frequency synchronization source, then the frequency synchronization device may use the local frequency.

[0170] The first embodiment of the present application takes the use of SyncE to configure frequency information on a network device as an example, and provides an implementation method for frequency synchronization simulation based on SyncE. For example, Figure 15 is a physical topology and SyncE configuration diagram of a network provided in an embodiment of the present application. As shown in Figure 15, the network includes four network devices, namely NE1-NE4. In the physical topology shown in Figure 15, NE1-NE4 respectively include multiple Ethernet ports, and the Ethernet ports here are all gigabit Ethernet (GE) ports. The GE ports of different network devices can be connected to each other through bidirectional optical fibers of optical modules. The main BITS device is connected to the GE0 / 1 / 1 port of NE1. The backup BITS device is connected to the GE0 / 1 / 1 port of NE2.

[0171] The SyncE configuration is as follows: NE1-NE4 are all enabled with the Synchronous Ethernet Clock function (i.e., the devices can perform frequency synchronization). NE1–NE4 are all enabled with the SSM mode (i.e., the SSM level of the frequency source participates in device frequency source selection). Each GE port connecting NE1–NE4 is also enabled with the Synchronous Ethernet Clock function (i.e., the ports can receive and transmit frequency signals). Some GE ports on NE1–NE4 are configured with port priorities (indicated by numbers other than "0" in the figure), while others are not (indicated by the number "0" in the figure). GE ports without port priorities do not participate in device frequency source selection. After receiving the satellite clock signal, the active and standby BITS devices transmit frequency signals with a signal quality of PRC. The frequency signal sent by the active BITS device is denoted as PRC signal 1, and the frequency signal sent by the standby BITS device is denoted as PRC signal 2.

[0172] The implementation process of the computer device performing frequency synchronization simulation on the network shown in FIG15 is as follows:

[0173] 1. Based on the physical topology and SyncE configuration, a frequency synchronization topology as shown in Figure 16 is established.

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

[0175] 3. Frequency signal diffusion is performed based on the priority order of the BITS devices and 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.

[0176] Frequency signal processing: NE1 and NE2 both choose to follow their respective GE0 / 1 / 1 ports and send DNU signals in reverse. NE1 sends the following PRC signal 1 through its other two ports, and NE2 sends the following PRC signal 2 through its other two ports. Figure 17 shows the frequency signal diffusion process.

[0177] 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; and NE4's GE0 / 1 / 1 port receives PRC signal 2 from NE2.

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

[0179] Frequency signal processing: The port priority of NE2's GE0 / 1 / 2 is higher than that of GE0 / 1 / 1. NE2 follows PRC signal 1 of GE0 / 1 / 2, sends DNU signals in the reverse direction, and sends PRC signal 1 outward through the other two ports. Figure 18 shows the frequency signal diffusion process.

[0180] Frequency signal processing: NE3 and NE4 both choose to follow their respective GE0 / 1 / 1 ports and send DNU signals in reverse directions. NE3 sends PRC signal 1 through GE0 / 1 / 2, and NE4 sends PRC signal 2 through GE0 / 1 / 2. Figure 18 shows the frequency signal diffusion process.

[0181] 5. The frequency signal continues to spread: NE1's GE0 / 1 / 2 port receives the DNU signal from NE2, NE1's GE0 / 1 / 3 port receives the DNU signal from NE3, NE2's GE0 / 1 / 3 port receives the DNU signal from NE4, NE3's GE0 / 1 / 2 port receives PRC signal 2 from NE4, and NE4's GE0 / 1 / 2 port receives PRC signal 1 from NE3.

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

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

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

[0185] Frequency signal processing: The port priority of NE4's GE0 / 1 / 2 port is higher than the port priority of GE0 / 1 / 1 port. NE4 follows PRC signal 1 of GE0 / 1 / 2 port, sends a DNU signal in the reverse direction, and sends PRC signal 1 outward through GE0 / 1 / 1 port. The frequency signal diffusion process can be seen in Figure 19. Figure 19 is a schematic diagram of a frequency synchronization simulation result provided by an embodiment of the present application. In the frequency synchronization simulation result shown in Figure 19, the arrows indicate the transmission direction of the frequency synchronization signal followed by the network device.

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

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

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

[0189] 7. Finally, convergence is achieved: 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.

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

[0191] Table 1

[0192] Table 2

[0193] Table 3

[0194] Table 4

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

[0196] Step 903: Perform time synchronization simulation on the network based on 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.

[0197] Optionally, the time status information of a network device includes the time synchronization status of the network device, the attribute information of the time signals received and sent by the ports of the network device, and the time source selection result of the ports of the network device. The time synchronization status indicates whether the network device has a time synchronization source. If 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 attribute information of the time signals received and sent by the ports of the network device can be the attribute information of the time signals 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 used to receive time signals from the time synchronization source (which may be called a slave port), a port of the network device used to send time signals from the time synchronization source (which may be called a master port), or a backup port of the network device used to receive time signals from the time synchronization source (which may be called a passive port). A passive port is typically an idle backup port that is neither used to receive nor send time signals. The time synchronization path of a network device refers to the sequence of all devices and ports along the path that the time synchronization signal followed by the network device is transmitted from the time synchronization source to the device itself.

[0198] 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 during the transmission process from the time source to the network device (step-removed), and the configuration priority of the time source (priority1, priority2).

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

[0200] 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 sources 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 time synchronization direction between the multiple network devices.

[0201] 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 does not have a time synchronization source.

[0202] 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 the 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 node represents the network device and the directed link represents the possible time following direction. 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. Under this implementation method, 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.

[0203] For example, Figure 20 is a schematic diagram of the physical topology and device time configuration of a network provided in an embodiment of the present application. As shown in Figure 20, taking the four network devices shown in Figure 20 as an example, all network devices enable dynamic source selection and all network devices have a frequency synchronization source to follow, and the ports of the network devices are connected by 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 has not 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 is not enabled for 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 connecting 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, the time synchronization topology shown in Figure 21 can be obtained according to the physical topology and device time configuration shown in Figure 20.

[0204] In step 9032, the 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 status of the multiple network devices stops changing, so as to obtain the time status information of the multiple network devices.

[0205] The time signal diffusion process includes: for a fourth network device among the multiple network devices to which the time signal is diffused, determining the time synchronization signal of the fourth network device from all time signals diffused to the fourth network device based on the time configuration information of the fourth network device (here, the time source selection mode is mainly used), and continuing to diffuse the updated time synchronization signal from the fourth network device based on the time synchronization topology. 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 used by the fourth network device to diffuse the updated time synchronization signal is different from the port through which the fourth network device receives the time synchronization signal. The fourth network device is any network device among the multiple network devices to which the time signal is diffused. When the number of time sources is greater than 1 (m>1), the fourth network device can filter out all time signals diffused to the fourth network device except the time synchronization signal, that is, the fourth network device can only diffuse the time synchronization signal that it follows.

[0206] 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 do not change compared to the time states of the multiple network devices after executing the yth time signal diffusion process, 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 time states of multiple network devices can also be referred to as the multiple network devices reaching a time convergence state.

[0207] Optionally, for a network device that receives a time signal from another device, the network device typically selects a time synchronization signal to follow from the received time signal. Of course, the present embodiment does not exclude the possibility that the network device continues to use local time. In other words, the fourth network device may select a time synchronization signal to follow from the received time signal, or may choose not to follow any received time signal and use local time.

[0208] Optionally, the m time sources include external time sources outside the network and / or internal time sources within 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 within the network. If the m time sources include an external time source, it is necessary to obtain a physical connection relationship between the external time source and the network devices within the network. After the network devices connected to the external time source receive the time signal from the external time source, they diffuse the time signal from the external time source based on the time synchronization topology.

[0209] Optionally, computer devices can diffuse time signals from m time sources using a breadth-first search based on a time synchronization topology. Starting from a source node, the time signal can diffuse to other nodes along the links of the time synchronization topology using a breadth-first search or other shortest path search algorithm, recording the number of hops and the port at each device (this port is recorded as the preselected slave port). The source node can be an internal time source in the network, or a network device connected to an external time source.

[0210] In an embodiment of the present application, the network device can use multicast to spread 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 of the same time source from different ports, it will choose the time signal with a smaller hop count 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 an implementable method summarized based on the BMC source selection rules, and the time signal can also be simply diffused like the frequency signal.

[0211] 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 descending order of 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 a time signal with poor attributes, it may not affect the time synchronization signal followed by the network device, and therefore will not continue to diffuse the time signal with poor attributes. This can minimize the diffusion of the time signal in the network, thereby improving the efficiency of time synchronization simulation.

[0212] 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 based on 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. This can be to simulate the time source selection mode of the fourth network device under the current time configuration to perform local source selection, update its own time state, and diffuse the following time synchronization signal 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 attributes and the smallest number of hops as a 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 will 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 still receive time signals. 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 the same as the time signal received by the slave port, except for the step-removed bit. 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.

[0213] Optionally, after executing 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 m time sources as a time synchronization source, then the following step 9033 may be continued. One possible situation in which the network device does not use any of the m time sources as a time synchronization source is that the network device has not been diffused to the time signal from any of the m time sources. Another possible situation is that the network device has been diffused to the frequency signal from at least one of the m time sources but has not used it as a time synchronization signal.

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

[0215] 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 already selected the time synchronization source among the above-mentioned 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, the time signal of the time-to-be-synchronized device is diffused along the link direction in the time synchronization topology. For the network device that has already 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. Therefore, 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 as much as possible between multiple time-to-be-synchronized devices.

[0216] Optionally, after executing step 9032, i.e., after the time states of the multiple network devices stop changing, if there is only one device to be synchronized among the multiple network devices, then the device to be synchronized may use local time. Alternatively, after executing step 9033, i.e., after the time states of the multiple devices to be synchronized stop changing, if there is still a device to be synchronized among the multiple devices to be synchronized that does not have a time synchronization source, then the device to be synchronized may use local time.

[0217] The second embodiment of this application uses 1588v2 to configure time information on network devices as an example, and provides an implementation of 1588v2-based time synchronization simulation. For example, Figure 22 is a schematic diagram of the physical topology and 1588v2 configuration of a network provided in this embodiment of the application. As shown in Figure 22, the network includes four network devices, namely NE1-NE4. The physical topology and SyncE configuration shown in Figure 22 are consistent with those described in the first embodiment above and will not be repeated here.

[0218] The 1588v2 configuration is as follows: NE1–NE4 are all PTP-enabled (i.e., they can perform time synchronization), configured as boundary clock (BC) devices (i.e., multiple ports on a device can have PTP enabled), and their clock domain is set to 0 (i.e., only devices within the same domain can perform time synchronization). Each GE port connecting NE1–NE4 is PTP-enabled (i.e., it can receive and send PTP messages). After receiving the satellite clock signal, the active and standby BITS devices transmit time signals (in the form of PTP messages). Priority 1 is set to 6 for the active BITS device and 7 for the standby BITS device. All other time signal attributes are the same.

[0219] The implementation process of the computer device performing time synchronization simulation on the network shown in FIG22 is as follows:

[0220] 1. Perform frequency synchronization simulation first (refer to the frequency synchronization simulation process of the network shown in FIG15 ). After convergence, all devices achieve frequency locking.

[0221] 2. Based on the physical topology and 1588v2 configuration, the time synchronization topology shown in Figure 23 is established.

[0222] 3. Prioritize the BITS devices based on their time signal attributes, and find that the primary BITS device has a higher priority than the backup BITS.

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

[0224] The shortest path from NE1 to the master BITS device is "master BITS device - NE1". Therefore, NE1 follows the master BITS device through GE0 / 1 / 1. The GE0 / 1 / 1 port is in the slave state, and the other two ports are in the master state.

[0225] The shortest path from NE2 to the master BITS device is "master BITS device - NE1 - NE2". Therefore, NE2 follows NE1 through GE0 / 1 / 2. The GE0 / 1 / 2 port is in the slave state, and the other two ports are in the master state.

[0226] The shortest path from NE3 to the master BITS device is "master BITS device - NE1 - NE3". Therefore, NE3 follows NE1 through GE0 / 1 / 1. The GE0 / 1 / 1 port is in the slave state, and the other ports are in the master state.

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

[0228] In this embodiment of the present application, the time signal of the primary BITS device covers 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 primary BITS device, a breadth-first traversal is performed on the time signal of the backup BITS device (second in priority). After determining all devices and ports that it can cover from the first round of uncovered devices, the source is selected for these devices and the port status is determined based on the shortest path obtained.

[0229] 5. Finally, convergence is achieved: NE1 follows the master BITS device via GE0 / 1 / 1, NE2 follows NE1 via GE0 / 1 / 2, NE3 follows NE1 via GE0 / 1 / 1, and NE4 follows NE3 via GE0 / 1 / 2. For example, Figure 25 is a schematic diagram of a time synchronization simulation result provided by an embodiment of the present application. In the time synchronization simulation result shown in Figure 25, the arrows indicate the transmission direction of the time synchronization signal followed by the network devices.

[0230] At this point, the time synchronization path and time status information for NE1-NE4 are obtained. NE1's time synchronization path is: NE1 (GE0 / 1 / 1) <— master BITS device; NE2's time synchronization path is: NE2 (GE0 / 1 / 2) <— NE1 (GE0 / 1 / 1) <— master BITS device; NE3's time synchronization path is: NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— master BITS device; and NE4's time synchronization path is: NE4 (GE0 / 1 / 2) <— NE3 (GE0 / 1 / 1) <— NE1 (GE0 / 1 / 1) <— master BITS device. In the network shown in Figure 22, the time synchronization path and frequency synchronization path for NE1-NE4 are consistent. In actual applications, the time synchronization path and frequency synchronization path for the same network device may not be consistent. For example, the time status information for NE1-NE4 can be found in Tables 5 to 8, respectively.

[0231] Table 5

[0232] Table 6

[0233] Table 7

[0234] Table 8

[0235] Since the time synchronization result may affect frequency synchronization, after executing step 903 above, i.e., after performing time synchronization simulation on the network, the computer device may further determine whether the time synchronization simulation result affects frequency synchronization. If the time synchronization simulation result affects frequency synchronization, the frequency synchronization simulation needs to be continued. The specific implementation process includes the following steps S101 to S102.

[0236] In step S101, it is determined whether any of the multiple network devices has the frequency synchronization function of the time synchronization protocol enabled, and whether 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 through the frequency synchronization simulation. If so, the following step S102 is continued. If not, the clock synchronization simulation process ends, and the frequency synchronization information obtained in step 902 and the time synchronization information obtained in step 903 are used as the final clock synchronization simulation results.

[0237] Since 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, so it is necessary to continue the frequency synchronization simulation from this network device.

[0238] 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 the updated frequency status information of the multiple network devices.

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

[0240] Optionally, after executing step S102, i.e., after obtaining updated frequency status information of multiple network devices, the computer device may further determine whether the frequency synchronization simulation result affects time synchronization. If the frequency synchronization simulation result affects time synchronization, the time synchronization simulation needs to be continued. The specific implementation process includes the following steps S103 to S104.

[0241] 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 multiple network devices has changed. If so, the following step S104 is continued; if not, the clock synchronization simulation process is terminated, and the updated frequency synchronization information obtained after executing step S102 (including the updated frequency status information obtained in step S102 and / or the frequency synchronization path obtained based on the updated frequency status information) and the time synchronization information obtained in step 903 are used as the final clock synchronization simulation result.

[0242] 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.

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

[0244] Since a change in the frequency synchronization state of a network device may cause a change in the time synchronization topology, which may affect the time synchronization result, optionally, for a network device whose frequency synchronization state has changed, time convergence may be continued starting from the network device.

[0245] Furthermore, the computer device may repeatedly perform steps S101 to S104 until the frequency synchronization simulation results and the time synchronization simulation results reach a stable state or enter an oscillation state, thereby obtaining the clock state information and clock synchronization paths of multiple network devices in the network.

[0246] 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 the 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 is possible to realize fault detection 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.

[0247] The third embodiment of the present application takes the example of a network device using SyncE to configure frequency information and 1588v2 to configure time information, and provides an implementation method for frequency-time coupling simulation. 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 clock domain (domain) to 0. The PTP function is enabled on 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 master and standby BITS devices send out time signals (in the form of PTP messages). The priority1 of the master 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 (Figure 19). For another example, the results of the first pass of the time synchronization simulation for this network are shown in Figure 26. In the time synchronization simulation results shown in Figure 26, 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:

[0248] 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 starting 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, thereby achieving a steady state. For example, Figure 27 is a schematic diagram of the second frequency synchronization simulation results provided by an embodiment of the present application. In the frequency synchronization simulation results shown in Figure 27, the arrow points to the transmission direction of the frequency synchronization signal followed by the network device.

[0249] 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.

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

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

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

[0253] 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 looped frequency synchronization paths, 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.

[0254] For example, Figure 28 is a schematic diagram of a visualization page provided in an embodiment of the present application. As shown in Figure 28, 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, Figure 29 is a schematic diagram of the device clock synchronization path presented in a visualization page provided in an embodiment of the present application. As shown in Figure 29, the time synchronization path and frequency synchronization path of R4 are both R4<—R3<—R2<—R1<—BITS device. When a selection instruction for R4 is received on the visualization page shown in Figure 28, the visualization page can further be displayed as Figure 29. In another possible implementation, after selecting a device on the visualization page, the visualization page can further present the clock-related information of the device, and the clock-related information of the device can be presented in the form of a table. For example, Figure 30 is a schematic diagram of the device clock-related information presented in a visualization page provided in an embodiment of the present application. As shown in Figure 30, the device clock-related information includes device time information and device frequency information. Among them, Table (1) in Figure 30 presents the device time information, including whether the time source is locked (that is, whether there is a following time synchronization source, if locked, it is marked as lock, if not locked, it is marked as hold), the device port number, the port time source selection status (divided into slave port, master port, passive port or other port, other ports are represented by " / "), the time synchronization source name, the number of hops (that is, 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), the configuration priority of the time synchronization source (including priority 1 and priority 2), the time synchronization source level, the time synchronization source accuracy and the clock identification (clock-id) of the time synchronization source.Table (2) in FIG30 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, 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 it has the ability to transmit and receive frequency signals, abnormal means 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 sent 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 sent by the port (referred to as Out-signal tag). When a selection instruction for R4 is received on the visualization page shown in FIG. 28 , the visualization page may be switched to be displayed as FIG. 30 .

[0255] Optionally, after completing the network clock synchronization simulation, the computer device can also determine whether the network device has a clock synchronization issue based on the simulated clock synchronization information of the network device. Clock synchronization information includes clock status information and / or clock synchronization path. Clock status information includes frequency status information and / or time status information. Clock synchronization path includes frequency synchronization path and / or time synchronization path. If the network device has a clock synchronization issue, the clock configuration information of the network device can be compared with a clock configuration template to obtain information about the network device's incorrect configuration. The clock configuration template can be obtained by combining the clock configuration information and clock configuration specifications of a normal device of the same type.

[0256] The embodiments of the present 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.

[0257] Optionally, the computer device can locate the problem device that may have a clock configuration problem based on 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-following 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-following 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-following 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 a device reverse-following situation has occurred.

[0258] 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. Then, based on the physical topology of the network and the updated clock configuration information of the network device, the computer device can perform clock synchronization simulation on the network to obtain the updated clock synchronization information of the network device. After determining that the network device has no clock synchronization issues according to the updated clock synchronization information of the network device, the computer device can send the clock configuration change information of the network device to the network device to enable the network device to update its clock configuration information. Conversely, if it is determined that there are still clock synchronization issues with the network device according to the updated clock synchronization information, 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 conduct fault query and repair.

[0259] The embodiment of the present application can first simulate and repair the incorrect configuration of the problem device, then pre-verify the configuration information after the simulated 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 then sent to the problem device. The embodiment of the present application can automatically repair the incorrect configuration of the network device when the clock synchronization problem occurs, without relying on expert experience, and can ensure the reliability and accuracy of the configuration repair.

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

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

[0262] The SyncE configuration is as follows: NE1-NE4 are all enabled with the synchronous Ethernet clock function. NE1–NE4 are all enabled with SSM mode. Each GE port connecting NE1–NE4 is also enabled with the synchronous Ethernet clock function. Some GE ports on NE1–NE4 are configured with port priorities (indicated by numbers other than "0" in the figure), while others are not (indicated by the number "0" in the figure). GE ports without port priorities do not participate in device frequency source selection. After receiving the satellite clock signal, the active and standby BITS devices transmit frequency signals, and both have PRC signal quality.

[0263] 31 , the frequency synchronization simulation results for the network show a frequency synchronization loop between NE1 - NE2 - NE3 - NE4.

[0264] The computer device repair process for the frequency synchronization loop shown in Figure 31 is as follows:

[0265] 1. Locating the Problem 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 (referred to as the following device) that each loop device follows. As shown in Table 9, a reverse device following status is detected (the ASG device follows the CSG device). The ASG device in this reverse device following status is located as NE1.

[0266] Table 9

[0267] 2. Frequency Configuration Comparison: Refer to Table 10. Comparing the frequency configurations of NE1 and NE2, both ASG devices, reveals that the peer devices of ports with the same port priority on NE1 and NE2 have different device roles. Based on NE2's frequency configuration, change the port priority of NE1's GE0 / 1 / 1 to 10, the port priority of GE0 / 1 / 2 to 20, and the port priority of GE0 / 1 / 3 to 0.

[0268] Table 10

[0269] 3. Change Verification: A network simulation was performed to verify the changed frequency synchronization path. NE1 followed the master BITS device, NE2 and NE3 followed NE1, and NE4 followed NE2. No loops appeared in the changed frequency synchronization path, meeting the change expectations.

[0270] 4. Change delivery: Deliver the changed frequency configuration to NE1.

[0271] Optionally, if the network changes, the computer device may 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 based on 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. Network changes include, but are not limited to, network failures (such as link interruption or device failure), changes in the clock configuration of network devices in the network (such as manual modification of the clock configuration of network devices by maintenance personnel), and the online or offline operation of network devices in the network.

[0272] The embodiments of the present application support pre-verification of network changes, enabling analysis of dynamic changes in the clock synchronization information of network devices caused by network changes. In addition, because the embodiments of the present application support pre-verification of network changes, operations and maintenance personnel can first 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. This ensures that the network device will not encounter clock synchronization issues after the clock configuration is changed, thereby improving network operation reliability.

[0273] Furthermore, if a clock synchronization issue arises after a network change, a fault prompt message can be output. This helps operations and maintenance personnel promptly resolve clock synchronization issues that arise in the network. Optionally, clock synchronization issues include one or more of the following: a frequency synchronization loop, a transient time synchronization loop, a network device lacking a frequency synchronization source, or a network device lacking a time synchronization source. A transient time synchronization loop refers to a time synchronization loop that briefly appears during the time synchronization process and disappears after time synchronization is complete.

[0274] 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 status is directly affected in the network based on the network change information, and update the clock status 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 it reaches the convergence state after the network change.

[0275] The fifth embodiment of this application provides a method for implementing clock synchronization network pre-verification, which can simulate and analyze the clock synchronization path that network devices switch to after a network failure. For example, the network physical topology, SyncE configuration, and 1588v2 configuration are the same as those in the second embodiment above.

[0276] Assume that the physical link between NE1 and NE3 is disconnected, preventing the clock signal from being transmitted. The pre-verification simulation process is as follows:

[0277] 1. According to the frequency synchronization simulation results (Figure 19) obtained in the first embodiment and the time synchronization simulation results (Figure 25) obtained in the second embodiment, the directly affected devices are determined. In the embodiment of the present application, the frequency and time of NE3 follow NE1 through the link. For example, Figure 32 is a network fault schematic diagram drawn based on the frequency synchronization simulation results provided by the embodiment of the present application. Figure 32 is drawn based on the frequency synchronization simulation results before the fault (Figure 19). As shown in Figure 32, after the physical link between NE1 and NE3 is interrupted, the frequency synchronization signal originally followed by NE3 is lost, and NE3 needs to reselect the frequency synchronization source and update the frequency status. For another example, Figure 33 is a network fault schematic diagram drawn based on the time synchronization simulation results provided by the embodiment of the present application. Figure 33 is drawn based on the time synchronization simulation results before the fault (Figure 25). As shown in Figure 33, 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 the time synchronization source and update the time status.

[0278] NE3 frequency status update: The frequency signal of GE0 / 1 / 1 is lost, and the quality of the frequency signal of GE0 / 1 / 2 is DNU (unavailable) sent by NE4. As a result, NE3 frequency does not follow the external frequency signal. The quality of the external frequency signal of each port is SEC of the local frequency signal.

[0279] NE3 time status update: The time signal on GE0 / 1 / 1 is lost, and GE0 / 1 / 2 cannot receive the time signal. As a result, the NE3 time does not follow the external time signal. The external time signals sent by each port are all local time signals. Assume that the priority 1 of the local time signal on NE3 is 128.

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

[0281] i. The PRC signal originally received by NE4's GE0 / 1 / 2 from NE3 changes to an SEC signal, which is inferior to the PRC signal from GE0 / 1 / 3. NE4 then follows GE0 / 1 / 3, sending the DNU signal in the reverse direction and sending the PRC signal outward through GE0 / 1 / 2.

[0282] ii. The PRC signal originally received by NE4 on NE2's GE0 / 1 / 3 is converted to a DNU signal, but this does not affect the source selection. The DNU signal originally received by NE4 on NE3's GE0 / 1 / 2 is converted to a PRC signal. NE3 will follow GE0 / 1 / 2, sending the DNU signal in the reverse direction, and then sending the PRC signal outward through GE0 / 1 / 1.

[0283] iii. The SEC signal originally received by NE3 on NE4's GE0 / 1 / 2 port changes to a DNU signal, but this does not affect the source selection.

[0284] iv. Finally, a new convergence state is reached: NE1 follows the master BITS device via the GE0 / 1 / 1 port, NE2 follows NE1 via the GE0 / 1 / 2 port, NE4 follows NE2 via the GE0 / 1 / 1 port, and NE3 follows NE4 via the GE0 / 1 / 2 port. For example, Figure 34 is a schematic diagram of a frequency synchronization simulation result after a fault, as provided in an embodiment of the present application. In the frequency synchronization simulation result shown in Figure 34, the arrows indicate the transmission direction of the frequency synchronization signal followed by the network devices.

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

[0286] v. The priority 1 of the time signal originally received by NE4's GE0 / 1 / 2 from NE3 changes from 6 to 128, making it inferior to the time signal from GE0 / 1 / 1. NE4 then follows GE0 / 1 / 1, and the state of GE0 / 1 / 1 changes to slave. GE0 / 1 / 2 then sends a time signal with priority 1 = 6, and the state of GE0 / 1 / 2 changes to master.

[0287] NE3's GE0 / 1 / 2 receives the priority 1 = 6 signal from NE4. NE3 follows GE0 / 1 / 2, changing its state to slave and GE0 / 1 / 1 to master.

[0288] vii. Finally, a new converged state is reached: NE1 follows the master BITS device via GE0 / 1 / 1, NE2 follows NE1 via GE0 / 1 / 2, NE4 follows NE2 via GE0 / 1 / 1, and NE3 follows NE4 via GE0 / 1 / 2. For example, Figure 35 is a schematic diagram of a post-failure time synchronization simulation result provided by an embodiment of the present application. In the time synchronization simulation result shown in Figure 35, the arrows indicate the transmission direction of the time synchronization signal followed by the network devices.

[0289] After a network failure occurs, the frequency synchronization path of NE3 switches to the following: NE3(GE0 / 1 / 2) <—NE4(GE0 / 1 / 1) <—NE2(GE0 / 1 / 2) <—NE1(GE0 / 1 / 1) <—primary BITS device; the frequency synchronization path of NE4 switches to the following: NE4(GE0 / 1 / 1) <—NE2(GE0 / 1 / 2) <—NE1(GE0 / 1 / 1) <—primary BITS device; the time synchronization path of NE3 switches to the following: NE3(GE0 / 1 / 2) <—NE4(GE0 / 1 / 1) <—NE2(GE0 / 1 / 2) <—NE1(GE0 / 1 / 1) <—primary BITS device; the time synchronization path of NE4 switches to the following: NE4(GE0 / 1 / 1) <—NE2(GE0 / 1 / 2) <—NE1(GE0 / 1 / 1) <—primary BITS device.

[0290] In the embodiment of the present application, after a network change occurs, it is only necessary to obtain the 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 the changes in the clock synchronization information of the network equipment caused by the network change. The analysis of dynamic changes in the network is highly efficient, which helps operation and maintenance personnel to quickly obtain the clock synchronization information of the network equipment after the network change, and thus can achieve rapid positioning and repair of clock synchronization problems that may occur in the changed network.

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

[0292] The SyncE configuration is as follows: NE1-NE4 are all enabled with the synchronous Ethernet clock function. NE1–NE4 are all enabled with SSM mode. Each GE port connecting NE1–NE4 is also enabled with the synchronous Ethernet clock function. Some GE ports on NE1–NE4 are configured with port priorities (indicated by numbers other than "0" in the figure), while others are not (indicated by the number "0" in the figure). GE ports without port priorities do not participate in device frequency source selection. After receiving the satellite clock signal, the active and standby BITS devices transmit frequency signals, and both have PRC signal quality.

[0293] The computer device performs frequency synchronization simulation on the network shown in Figure 36. The specific implementation process can refer to the first embodiment described above. For example, Figure 37 is a schematic diagram of a frequency synchronization simulation process provided in an embodiment of the present application. As shown in Figure 37, by performing frequency synchronization simulation on the network shown in Figure 36, the frequency synchronization simulation result shown in the lower left figure of Figure 37 is ultimately obtained. In the frequency synchronization simulation result shown in Figure 37, the arrow points to the transmission direction of the frequency synchronization signal followed by the network device.

[0294] Assume that the physical link between NE1 and the master BITS device is disconnected, preventing the clock signal from being transmitted. The pre-verification simulation process is as follows:

[0295] 1. Based on the frequency synchronization simulation results shown in Figure 37, determine the directly affected devices. In the embodiment of the present application, NE1's frequency follows the master BITS device via this link. After this link fails, the frequency signal that NE1 originally followed is lost, and NE1 needs to reselect a frequency synchronization source and update its frequency status.

[0296] 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 serve as NE1's frequency follower port. The frequency signal quality 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.

[0297] 2. Continuing the frequency synchronization simulation from NE1: The PRC signal originally received by NE2's GE0 / 1 / 2 port from NE1 changes to a DNU signal, but this does not affect the source selection.

[0298] 3. Finally, the convergence state shown in the lower left figure in Figure 37 is reached: NE1 follows NE2 through the GE0 / 1 / 2 port, NE2 follows NE4 through the GE0 / 1 / 3 port, NE4 follows NE3 through the GE0 / 1 / 2 port, and NE3 follows NE1 through the GE0 / 1 / 1 port. 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 from the satellite, and the accuracy will continue to deteriorate. For example, Figure 38 is a schematic diagram of another frequency synchronization simulation result after a failure provided in an embodiment of the present application. In the time synchronization simulation result shown in Figure 38, the arrow points to the transmission direction of the time synchronization signal followed by the network device.

[0299] The seventh embodiment of the present application provides another implementation method for clock synchronization network pre-verification, which can simulate and analyze the time synchronization transient loop that occurs 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, with the addition of: the GE0 / 1 / 2 port of NE2 is configured with announce-drop (not receiving Announce messages). The computer device 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 and 1588v2 configuration of the network, a time synchronization topology as shown in Figure 39 can be established. By performing time synchronization simulation on the network, a time synchronization simulation result as shown in Figure 40 can be obtained. In the time synchronization simulation result shown in Figure 40, the arrow points to the transmission direction of the time synchronization signal followed by the network device.

[0300] Assume that the physical link between NE1 and the master BITS device is interrupted, preventing clock signal transmission. The pre-verification simulation process is as follows: Based on the time synchronization simulation results shown in Figure 40, determine the directly affected devices. In this embodiment of the present application, NE1's time follows the master BITS device via this link. After this link fails, the time signal that NE1 originally followed is lost, and NE1 needs to reselect a time source and update its time status.

[0301] NE1 time status update: NE1's GE0 / 1 / 1 port loses the PTP message originally received from the master BITS device, and GE0 / 1 / 3 fails to receive PTP messages. However, GE0 / 1 / 2 receives PTP messages with priority 1 = 6. The PTP message received by GE0 / 1 / 2 is sent by the master BITS device and reaches NE1. It then travels through NE1, NE3, NE4, NE2, and NE1, a total of four hops. Therefore, NE1 chooses to follow GE0 / 1 / 2. This PTP message continuously propagates through the NE1-NE3-NE4-NE2-NE1 loop, with the hop count increasing by one with each hop. This creates a temporary time synchronization loop between NE1, NE3, NE4, and NE2, as shown in Figure 41. Due to the 1588v2 configuration, a message becomes invalid when the hop count reaches the threshold (64 by default). The temporary time synchronization loop is automatically broken and enters a convergence state. For example, Figure 42 is a schematic diagram of another time synchronization simulation result after a fault provided by an embodiment of the present application. In the time synchronization simulation result shown in Figure 42, the arrows point to the transmission direction of the time synchronization signal followed by the network device.

[0302] The eighth embodiment of the present application provides another automatic repair method for the frequency synchronization loop. For example, Figure 43 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. As shown in Figure 43, the network includes four network devices, namely NE1-NE4. The physical topology of the network is the same as that of the sixth embodiment mentioned above. Based on the sixth embodiment mentioned above, the SyncE configuration is added with the following additions: the GE0 / 1 / 1 port of NE1 is configured with a signal mark of 1, the GE0 / 1 / 1 port of NE3 is configured with a signal mark of 2, and no signal mark is configured for other ports. In the frequency synchronization simulation results shown in Figure 43, NE1 follows the main 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.

[0303] Assume that the physical link between NE1 and the master BITS device is interrupted, preventing clock signal transmission. A pre-verification simulation is performed. The pre-verification simulation process can be referred to in the sixth embodiment. After NE1 reselects the source, it chooses to follow the PRC signal carrying signal marker 2 from NE2. The resulting frequency synchronization simulation results are shown in Figure 44 , indicating the emergence of a frequency synchronization loop between NE1, NE2, NE3, and NE4.

[0304] The computer device repair process for the frequency synchronization loop shown in Figure 44 is as follows:

[0305] 1. Problem device location: Inspection revealed that the frequency signals transmitted in the frequency synchronization loop carried signal tag attributes, and the signal tags were inconsistent within the frequency synchronization loop. Further inspection of all network devices and ports configured with signal tags ultimately located the two source ports: GE0 / 1 / 1 on NE1 and GE0 / 1 / 1 on NE3. NE1's GE0 / 1 / 1 was not in the frequency synchronization loop.

[0306] 2. Clock Configuration Repair: Because the configured signal markers provide loop prevention, you only need to remove the signal markers on NE3 in the frequency synchronization loop. This means canceling the signal marker configuration on NE3's GE0 / 1 / 1 port. This works because after canceling the signal marker configuration on NE3's GE0 / 1 / 1 port, the PRC signals transmitted between network devices always carry signal marker 1. Upon receiving a PRC signal with signal marker 1, NE1 identifies it as originating from its own device and will not follow it.

[0307] 3. Change Verification: A network change simulation was performed to obtain the following frequency synchronization path after the change: NE2 follows the backup BITS device, NE1 follows NE2, NE3 follows NE1, and NE4 follows NE3. No loops appeared in the frequency synchronization path after the change, meeting the change expectations.

[0308] 4. Change delivery: Deliver the changed frequency configuration to NE3.

[0309] In the embodiment of the present application, by adopting an offline simulation method in a 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 elements, 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 status of the devices. Support for 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 in a one-time simulation. In addition, high scalability is achieved through customized repair methods.

[0310] 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 solutions can be added during the simulation process, or a combination of simulation + other optimization solutions can be adopted. For example, the device can directly select the source locally in some simple configuration scenarios, so only static analysis is required; in the scenario where 1588v2 adopts a simple dynamic source selection for the entire network, a breadth-first traversal can be used for solution. For example, a network can be divided into a simple scenario sub-network and a complex scenario sub-network according to the network configuration. These optimization solutions are adopted in the simple scenario sub-network, and a more universal simulation solution is adopted in the complex scenario sub-network. On the basis of the solution of the present application, any easily conceivable variation should be within the scope of protection of the present application.

[0311] The following describes the virtual device in the embodiment of the present application by way of example.

[0312] For example, Figures 45 to 47 are schematic diagrams of the structure of a clock synchronization information acquisition device provided in an embodiment of the present application. As shown in Figures 45 to 47, 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.

[0313] As shown in Figure 45 , clock synchronization information acquisition apparatus 4500 includes an acquisition module 4501 and a simulation module 4502. Acquisition module 4501 is configured to acquire the physical topology of a network and clock configuration information for multiple network devices in the network. The clock configuration information includes frequency configuration information, which is used for frequency synchronization of multiple network devices. Simulation module 4502 is configured to perform frequency synchronization simulation on the network based on the physical topology and frequency configuration information to obtain frequency synchronization information for multiple network devices. The frequency synchronization information includes frequency status information and / or frequency synchronization paths.

[0314] 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 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. In the case that 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.

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

[0316] Optionally, the simulation module 4502 is specifically used to: establish a frequency synchronization topology based on the physical topology and frequency configuration information, the frequency synchronization topology includes multiple network devices and frequency synchronization relationships 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 executed until the frequency status of the multiple network devices stops changing, so as to obtain 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.

[0317] 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.

[0318] 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, 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 multiple network devices.

[0319] Optionally, the clock configuration information also includes time configuration information, which is used for time synchronization of multiple network devices; the simulation module 4502 is also used to: after performing frequency synchronization simulation on the network according to the physical topology and frequency configuration information, perform time synchronization simulation on the network according to the physical topology, time configuration information and the status of the frequency synchronization sources of multiple network devices to obtain time synchronization information of multiple network devices, and the time synchronization information includes time status information and / or time synchronization path.

[0320] 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, wherein the time synchronization status 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 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.

[0321] 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.

[0322] Optionally, the simulation module 4502 is specifically configured to: establish a time synchronization topology based on the physical topology, time configuration information, and the status of frequency synchronization sources of multiple network devices, the time synchronization topology including multiple network devices and time synchronization relationships between the multiple network devices, the time synchronization relationship being used to indicate the time synchronization direction between the multiple network devices; diffuse time signals from m time sources based on the time synchronization topology, where m is a positive integer, and repeatedly execute the time signal diffusion process until the time status of the multiple network devices stops changing, thereby obtaining time status 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, determining the time synchronization signal of the fourth network device from all time signals diffused to the fourth network device based on the time configuration information of the fourth network device, and continuing 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 from which the time synchronization signal is received.

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

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

[0325] 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 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 among multiple network devices that enable time synchronization.

[0326] 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 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.

[0327] Optionally, the simulation module 4502 is further configured to: after obtaining updated frequency status information of multiple network devices, re-simulate time synchronization of the network if the status of the frequency synchronization source of any network device among the multiple network devices has changed.

[0328] 46 , 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 configured to output the frequency synchronization information after obtaining the frequency synchronization information of multiple network devices.

[0329] Optionally, as shown in FIG47 , clock synchronization information acquisition apparatus 4500 includes an acquisition module 4501, a simulation module 4502, a judgment module 4504, and an information processing module 4505. Judgment module 4504 is configured to determine whether a network device has a clock synchronization problem based on the network device's clock synchronization information. 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. The clock synchronization path includes a frequency synchronization path and / or a time synchronization path. Information processing module 4505 is configured to compare the network device's clock configuration information with a clock configuration template to obtain error configuration information for the network device if the network device has a clock synchronization problem.

[0330] Optionally, referring to Figure 47 , the clock synchronization information acquisition device 4500 may further include a transceiver module 4506. The information processing module 4505 is further configured to, after obtaining the incorrect configuration information of the network device, modify the incorrect configuration information according to the clock configuration template to obtain updated clock configuration information for the network device. The simulation module 4502 is further configured to perform clock synchronization simulation on the network based on the physical topology and the updated clock configuration information to obtain updated clock synchronization information for the network device. The transceiver module 4506 is configured to, after determining that the network device has no clock synchronization issues based on the updated clock synchronization information, transmit clock configuration change information for the network device to the network device, causing the network device to update its clock configuration information.

[0331] Optionally, if a network change occurs, acquisition module 4501 is further configured to acquire the physical topology of the changed network and clock configuration information of multiple network devices in the changed network. Simulation module 4502 is further configured to perform clock synchronization simulation on the changed network based on the physical topology of the changed network and the clock configuration information of multiple network devices in the changed network, thereby obtaining clock synchronization information of the multiple network devices in the changed network. The clock synchronization information includes clock state information and / or clock synchronization paths. The clock state information includes frequency state information and / or time state information. The clock synchronization paths include frequency synchronization paths and / or time synchronization paths.

[0332] Optionally, in the clock synchronization information acquisition device 4500 shown in FIG46 , the output module 4503 is used to output fault prompt information, where the fault prompt information is used to indicate a clock synchronization problem that occurs in the network after the change.

[0333] Optionally, 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.

[0334] Regarding the apparatus 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.

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

[0336] Figure 48 is a schematic diagram of the hardware structure of a computer device provided in an embodiment of the present application. As shown in Figure 48, computer device 4800 includes a processor 4801 and a memory 4802, and processor 4801 and memory 4802 are connected via a bus 4803. Figure 48 illustrates processor 4801 and memory 4802 as separate entities. Alternatively, processor 4801 and memory 4802 may be integrated together. Computer device 4800 may, for example, be a network controller or be connected to a network controller.

[0337] Memory 4802 is used to store computer programs, including operating systems and program code. 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, registers, optical disk storage, optical disc storage, magnetic disk, or other magnetic storage devices.

[0338] Processor 4801 is a general-purpose processor or a dedicated processor. Processor 4801 may be a single-core processor or a multi-core processor. Processor 4801 includes at least one circuit to execute the actions performed by the computer device in the above method embodiment provided in the embodiment of the present application (e.g., the method steps shown in Figure 9).

[0339] 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.

[0340] Optionally, computer device 4800 further includes an input / output (I / O) interface 4805, which is connected to processor 4801 and memory 4802 via bus 4803. Processor 4801 can receive input commands or data through I / O interface 4805. I / O interface 4805 is used to connect computer device 4800 to input devices, such as a keyboard and a mouse. Optionally, in some possible scenarios, the network interface 4804 and I / O interface 4805 are collectively referred to as a communication interface.

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

[0342] Bus 4803 is any type of communication bus for interconnecting the internal components of computer device 4800, such as a system bus. This embodiment of the present application uses the example of interconnecting the aforementioned components within computer device 4800 via bus 4803. Alternatively, the aforementioned components within computer device 4800 may be communicatively connected to each other using other connection methods besides bus 4803, such as interconnecting the aforementioned components within computer device 4800 via a logical interface within computer device 4800.

[0343] The above-mentioned devices can be provided on separate chips, or at least partially or entirely on the same chip. Whether to provide each device independently on different chips or to integrate them on one or more chips often depends on the product design requirements. The embodiments of this application do not limit the specific implementation of the above-mentioned devices.

[0344] The computer device 4800 shown in FIG48 is merely exemplary. During implementation, the computer device 4800 includes other components, which are not listed here. The computer device 4800 shown in FIG48 can acquire time synchronization information of network devices by executing all or part of the steps of the method provided in the above embodiment.

[0345] In the above embodiments, all or part of the embodiments can be implemented using software, hardware, firmware, or any combination thereof. When implemented using software, all or part of the embodiments can be implemented 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, all or part of the processes or functions described in the embodiments of the present invention are generated. 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. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. 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. 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)).

[0346] Those 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 a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0347] 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.

[0348] In this application, the term "and / or" simply describes an association between related objects, indicating that three possible relationships exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " in this document generally indicates that the related objects are in an "or" relationship.

[0349] 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 the relevant laws, regulations and standards of relevant countries and regions.

[0350] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the concepts and principles of the present application shall be included in the scope of protection 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 among the multiple network devices has a frequency synchronization function enabled by a time synchronization protocol, and the priority of a precision time protocol PTP frequency source configured on the network device is higher than the priority of a frequency synchronization source of the network device determined by frequency synchronization simulation, a time synchronization signal from the time synchronization source is used as a frequency synchronization signal of the network device, and a frequency synchronization signal from the network device is generated based on a frequency synchronization topology. The device diffuses the frequency synchronization signal, and repeatedly executes the frequency signal diffusion process 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, 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

Patent Citations

  • Synchronous method, controller, synchronous node and synchronous network

    CN105099647A

  • Microgrid secondary control clock synchronization method with delay robustness

    CN113794239A

  • Dynamic network clock synchronization simulation method, system, equipment and medium

    CN113935139A

  • Technologies to compensate for errors in time synchronization due to clock drift

    US20220123849A1

  • Clock manager monitoring for time synchronized networks

    US20220303034A1