Clock synchronization method, network device, and storage medium

By obtaining and analyzing the synchronization status information of multiple superior clock sources, and selecting the most reliable clock source for synchronization, the stability problem of the SyncE clock source under abnormal circumstances is solved, and the reliability of the clock source and the business stability of the terminal equipment are improved. performance, reducing maintenance costs.

WO2024198327A1PCT designated stage expired Publication Date: 2024-10-03ZTE CORP
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/126451
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-03-28
Filing Date
2023-10-25
Publication Date
2024-10-03

AI Technical Summary

Technical Problem

In a distributed network, the SyncE clock source is prone to abnormalities due to transmission network delay, jitter, and equipment hardware effects, making it impossible to switch to a more reliable superior clock source, affecting the business stability and maintenance costs of terminal equipment.

Method used

By obtaining the synchronization status information of multiple upper-level clock sources, the synchronization level is determined, and the most reliable upper-level clock source is selected for synchronization based on the level to avoid the impact of abnormal status.

Benefits of technology

It improves the stability and reliability of the clock source, reduces operation and maintenance work and maintenance costs, and ensures the business stability of terminal equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023126451_03102024_PF_FP_ABST
    Figure CN2023126451_03102024_PF_FP_ABST
Patent Text Reader

Abstract

Embodiments of the present application relate to the technical field of communications, and provide a clock synchronization method, a network device, and a storage medium. The clock synchronization method comprises: if the synchronization state levels of the upper-level clock sources among a plurality of upper-level clock sources are the same, acquiring synchronization state information of the plurality of upper-level clock sources; according to the synchronization state information of the plurality of upper-level clock sources, determining the synchronization level of the plurality of upper-level clock sources; and determining a synchronous upper-level clock source from the plurality of upper-level clock sources on the basis of the synchronization level, and controlling a lower-level clock source to synchronize with the synchronous upper-level clock source.
Need to check novelty before this filing date? Find Prior Art

Description

Clock synchronization method, network device and storage medium

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on March 28, 2023, with application number 202310323611.9 and invention name “Clock synchronization method, network device and storage medium”. The entire contents of the Chinese patent application are incorporated herein by reference. Technical Field

[0003] The present application relates to the field of communication technology, and in particular to a clock synchronization method, network equipment, and storage medium. Background Art

[0004] In distributed networks, SyncE (Synchronous Ethernet) clocks operate in master-slave mode. Its synchronization status message (SSM) message, based on the clock protocol, is a distributed system that can meet the needs of base station communications and has been widely used.

[0005] In actual use, SyncE clock sources must synchronize with higher-level clock sources, which may be multiple. In practice, base station configurations are complex. When the higher-level clock source is a non-GPS clock, such as 1PPS+TOD or 1588, it can be easily affected by transmission network factors (such as latency, jitter, and packet loss) and device hardware. This can cause the higher-level clock source to exhibit anomalies even when locked. In such cases, SyncE clocks fail to detect the anomaly and, when SyncE clock access is abnormal, fail to switch to a more reliable higher-level clock source. This can affect user equipment (UE) services, such as handover and access.

[0006] Summary of the Invention

[0007] The main purpose of the embodiments of the present application is to provide a clock synchronization method, network equipment and storage medium, aiming to improve the stability and reliability of the clock source, reduce operation and maintenance work, and thus reduce maintenance costs and labor costs.

[0008] In a first aspect, an embodiment of the present application provides a clock synchronization method, the method comprising: if the synchronization status level of each of the multiple superior clock sources is the same, obtaining the synchronization status information of the multiple superior clock sources; determining the synchronization level of the multiple superior clock sources based on the synchronization status information of the multiple superior clock sources; determining a synchronous superior clock source from the multiple superior clock sources based on the synchronization level, and controlling the subordinate clock source to synchronize with the synchronous superior clock source.

[0009] In the second aspect, an embodiment of the present application provides a clock synchronization device, which includes: an information acquisition module, which is used to obtain the synchronization status information of the multiple superior clock sources if the synchronization status level of each of the multiple superior clock sources is the same; a synchronization level determination module, which is used to determine the synchronization level of the multiple superior clock sources based on the synchronization status information of the multiple superior clock sources; a clock source determination module, which is used to determine the synchronous superior clock source from the multiple superior clock sources based on the synchronization level, and control the subordinate clock source to synchronize with the synchronous superior clock source.

[0010] In a third aspect, an embodiment of the present application provides a network device, comprising a processor, a memory, a computer program stored on the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the clock synchronization method as described in any one of the items provided in the specification of this application are implemented.

[0011] In a fourth aspect, an embodiment of the present application further provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the clock synchronization method as described in any one of the items provided in the specification of this application. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0013] FIG1 is a schematic diagram of a SyncE clock synchronization principle provided by an embodiment of the present application;

[0014] FIG2 is a flow chart of a clock synchronization method provided in an embodiment of the present application;

[0015] FIG3 is a schematic diagram of the steps of an overall process of clock synchronization provided by an embodiment of the present application;

[0016] FIG4 is a schematic block diagram of the structure of a clock synchronization device provided in an embodiment of the present application;

[0017] FIG5 is a schematic block diagram of the structure of a network device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0018] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0019] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0020] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0021] As shown in Figure 1, SyncE technology is used to synchronize frequencies between Ethernet devices. In distributed networks, SyncE clocks operate in a master-slave mode. Based on the SSM clock protocol, it is a widely used distributed system that can meet the needs of base station communications.

[0022] SyncE clock technology uses Ethernet link bit streams to recover clocks. It is widely used in mainstream base station standards such as LTE-FDD / FDD-NR. SyncE clocks use the first layer of the OSI protocol (the physical layer) to achieve network synchronization. Its clock performance is guaranteed by the physical layer, also known as the master-slave synchronization of the physical layer. SyncE clocks support clock distribution based on network synchronous line codes. Data is sent using a high-precision clock at the Ethernet source port, and this clock is recovered and extracted at the receiver. This clock is unaffected by network load fluctuations and is independent of Ethernet link layer load and packet forwarding delay. This ensures that the recovered clock is highly stable and offers carrier-grade clock synchronization quality.

[0023] In the synchronous Ethernet protocol, ITU-T stipulates that SyncE clocks synchronize and transmit SSM messages through a dedicated slow protocol message, the ESMC message. ESMC messages are defined in detail in the G.8264 standard protocol. The message format is shown in Table 1, which is used to represent the ESMC frame structure message format.

[0024] Table 1

[0025] The QL TLV field is in the first byte unit of the data and padding, as shown in Table 2. Table 2 is used to represent the format of the QL TLV field of the ESMC message.

[0026] Table 2

[0027] The embodiment of the present application provides a clock synchronization method, network device and storage medium. The method can be applied to network devices, wherein the network device can be a server, a base station, etc., but is not limited thereto. The embodiment of the present application obtains the synchronization status information of multiple superior clock sources when the synchronization status levels of the superior clock sources in multiple superior clock sources are the same; determines the synchronization level of the multiple superior clock sources according to the synchronization status information of the multiple superior clock sources; determines the synchronous superior clock source from the multiple superior clock sources based on the synchronization level, and controls the subordinate clock source to synchronize with the synchronous superior clock source. In this way, when there are multiple superior clock sources with the same synchronization status level, the superior clock source to be accessed can be accurately determined through the synchronization status information, thereby avoiding the terminal device being affected in switching, access and other services due to the abnormality of the superior clock source, improving the stability and reliability of the clock source, reducing operation and maintenance work, and thus reducing maintenance costs and labor costs.

[0028] Please refer to Figure 2, which is a flowchart of a clock synchronization method provided in an embodiment of the present application. This clock synchronization method can prevent terminal devices from being affected by services such as switching and access due to abnormalities in the upper-level clock source, improve the stability and reliability of the clock source, reduce operation and maintenance work, and thus reduce maintenance costs and labor costs.

[0029] As shown in FIG. 2 , the clock synchronization method may include S101 to S103 .

[0030] S101: If the synchronization status levels of multiple upper-level clock sources are the same, obtain synchronization status information of the multiple upper-level clock sources.

[0031] The synchronization status level can be an SSM message level, which includes PRC, SSU-A, SSU-B, and SEC. In actual use, a SyncE clock source at this level must synchronize with a higher-level clock source. Multiple higher-level clock sources with the same synchronization status level may exist, so synchronization status information from multiple higher-level clock sources is required. This synchronization status information can include information such as the target field or identifier.

[0032] Specifically, the reliability of the SyncE clock source can be improved by expanding the SSM message and adding a target field to the QL TLV field in the SSM message to verify the superior clock source. The target field information can be stored in the QL TLV field and used to determine the priority of each superior clock source.

[0033] Specifically, the reliability of the SyncE clock source can be improved by storing corresponding identifiers for determining the priority of each superior clock source in the SSM message. The identifiers can be stored in the SSM message for determining the priority of each superior clock source.

[0034] In some embodiments, if the synchronization status levels of multiple superior clock sources are the same, before obtaining the synchronization status information of the multiple superior clock sources, the first clock source type and clock source status of the multiple superior clock sources are obtained; and the synchronization status level of each superior clock source is determined based on the first clock source type and clock source status of each superior clock source. In this way, the synchronization status level corresponding to each superior clock source can be accurately determined based on the first clock source type and clock source status.

[0035] The first clock source type may be a broad category of clock sources, specifically including satellite clock sources and 1588 clock sources, etc. The clock source states may include a locked state, a hold state, and a free-running state.

[0036] For example, the first clock source type and clock source status corresponding to multiple upper-level clock sources (such as upper-level clock source A, upper-level clock source B and upper-level clock source C) can be obtained respectively, and then the synchronization status level of upper-level clock source A, upper-level clock source B and upper-level clock source C can be determined respectively according to the first clock source type and clock source status of each upper-level clock source. For example, the synchronization status level of upper-level clock source A is determined to be PRC, the synchronization status level of upper-level clock source B is determined to be SSU-A and the synchronization status level of upper-level clock source C is determined to be SSU-B.

[0037] In some embodiments, if the first clock source type of the upper-level clock source is a satellite-type clock source, and the clock source status of the upper-level clock source is in a locked state, the synchronization status level of the upper-level clock source is a first synchronization status level; if the first clock source type of the upper-level clock source is a satellite-type clock source, and the clock source status of the upper-level clock source is in a held state, or if the first clock source type of the upper-level clock source is a 1588-type clock source, and the clock source status of the upper-level clock source is in a locked state, the synchronization status level of the upper-level clock source is a second synchronization status level; if the first clock source type of the upper-level clock source is a 1588-type clock source, and the clock source status of the upper-level clock source is in a held state, the synchronization status level of the upper-level clock source is a third synchronization status level; if the clock source status of the upper-level clock source is a free-running state, the synchronization status level of the upper-level clock source is a fourth synchronization status level.

[0038] The first synchronization status level may be PRC, the second synchronization status level may be SSU-A, the third synchronization status level may be SSU-B, and the fourth synchronization status level may be SEC.

[0039] Specifically, the synchronization status levels of multiple superior clock sources can be determined separately. Taking one superior clock source as an example, the first clock source type of the superior clock source is first detected, and then the clock source status of the superior clock source is determined, thereby accurately determining the synchronization status level corresponding to the superior clock source.

[0040] Exemplarily, if the first clock source type of the superior clock source is a satellite clock source, and the clock source status of the superior clock source is in a locked state, the synchronization status level of the superior clock source is PRC; if the first clock source type of the superior clock source is a satellite clock source, and the clock source status of the superior clock source is in a held state, the synchronization status level of the superior clock source is SSU-A; if the first clock source type of the superior clock source is a 1588 clock source, and the clock source status of the superior clock source is in a locked state, the synchronization status level of the superior clock source is SSU-A; if the first clock source type of the superior clock source is a 1588 clock source, and the clock source status of the superior clock source is in a held state, the synchronization status level of the superior clock source is SSU-B; if the clock source status of the superior clock source is in a free running state, the synchronization status level of the superior clock source is SEC.

[0041] In some embodiments, the second clock source type and clock source status of multiple upper-level clock sources are obtained; the priority of each upper-level clock source is determined based on the second clock source type and clock source status; and target field information corresponding to each upper-level clock source is generated based on the priority of each upper-level clock source. In this way, the target field information corresponding to each upper-level clock source can be accurately generated.

[0042] Among them, the second clock source type can be a subclass of the clock source, which can specifically include GPS; GPS+BDS; GPS, BDS; 1PPS+TOD; SyncE+1588 and 15888, etc., which are not specifically limited here.

[0043] Exemplarily, the second clock source types and clock source statuses corresponding to multiple superior clock sources (such as superior clock source D, superior clock source E, and superior clock source F) can be obtained respectively, and then the priorities of superior clock source D, superior clock source E, and superior clock source F can be determined respectively according to the second clock source type and clock source status of each superior clock source, for example, the priority of superior clock source D is greater than the priority of superior clock source E, and the priority of superior clock source E is greater than the priority of superior clock source F, and the target field information corresponding to each superior clock source is generated according to the priority of each superior clock source.

[0044] For example, the target field information can be obtained by encoding. If the priority of the superior clock source D is greater than the priority of the superior clock source E, and the priority of the superior clock source E is greater than the priority of the superior clock source F, the target field information of the superior clock source D can be set to 0001, the target field information of the superior clock source E can be set to 0010, and the target field information of the superior clock source F can be set to 0011.

[0045] In some embodiments, each superior clock source is initially sorted based on its clock source status; and then, the initially sorted superior clock sources are secondarily sorted based on their second clock source type to determine the priority of each superior clock source. Thus, the priority of each superior clock source can be accurately determined by sequentially sorting the clock sources based on their clock source status and second clock source type.

[0046] For example, it is assumed that multiple superior clock sources include superior clock source G, superior clock source H and superior clock source I, and the clock source type of superior clock source G is 1588, and the clock source status is locked; the clock source type of superior clock source I is 1PPS+TOD, and the clock source status is held; each superior clock source can be initially sorted according to the clock source status corresponding to the multiple superior clock sources, and the sorting result after the initial priority sorting is: superior clock source G = superior clock source H > superior clock source I; and then the superior clock sources after the initial sorting are secondarily sorted according to the second clock source type corresponding to the multiple superior clock sources, and the final priority sorting result is: superior clock source G > superior clock source H > superior clock source I, thereby accurately determining the priority of each superior clock source.

[0047] Exemplarily, the second clock source types of the superior clock source include GPS+BDS; GPS, BDS; 1PPS+TOD and 1588, and the clock source states include locked, held and free running.

[0048] If the second clock source type of the superior clock source is GPS+BDS and the clock source status of the superior clock source is locked, the priority of the superior clock source is first, and the corresponding target field information is 0001; if the second clock source type of the superior clock source is GPS or BDS and the clock source status of the superior clock source is locked, the priority of the superior clock source is second, and the corresponding target field information is 0010; if the second clock source type of the superior clock source is 1PPS+TOD and the clock source status of the superior clock source is locked, the priority of the superior clock source is third, and the corresponding target field information is 0011; if the second clock source type of the superior clock source is 1588 and the clock source status of the superior clock source is locked, the priority of the superior clock source is fourth, and the corresponding target field information is 0100.

[0049] If the second clock source type of the superior clock source is GPS+BDS and the clock source status of the superior clock source is in hold mode, the priority of the superior clock source is fifth, and the corresponding target field information is 0101; if the second clock source type of the superior clock source is GPS or BDS and the clock source status of the superior clock source is in hold mode, the priority of the superior clock source is fifth, and the corresponding target field information is 0101; if the second clock source type of the superior clock source is 1PPS+TOD and the clock source status of the superior clock source is in hold mode, the priority of the superior clock source is fifth, and the corresponding target field information is 0101; if the second clock source type of the superior clock source is 1588 and the clock source status of the superior clock source is in hold mode, the priority of the superior clock source is sixth, and the corresponding target field information is 0110.

[0050] If the second clock source type of the superior clock source is GPS+BDS and the clock source status of the superior clock source is free-running, the priority of the superior clock source is seventh, and the corresponding target field information is 0111; if the second clock source type of the superior clock source is GPS or BDS and the clock source status of the superior clock source is free-running, the priority of the superior clock source is seventh, and the corresponding target field information is 0111; if the second clock source type of the superior clock source is 1PPS+TOD and the clock source status of the superior clock source is free-running, the priority of the superior clock source is seventh, and the corresponding target field information is 0111; if the second clock source type of the superior clock source is 1588 and the clock source status of the superior clock source is free-running, the priority of the superior clock source is seventh, and the corresponding target field information is 0111.

[0051] Specifically, the clock priority defined above may be represented in the QL TLV field as target field information, as shown in Table 3. Table 3 is used to represent the application of the clock priority in the QL TLV.

[0052] Table 3

[0053] In some embodiments, a determination is made as to whether the synchronization status levels of the respective superior clock sources are the same. If the synchronization status levels of the multiple superior clock sources are different, the multiple superior clock sources are screened based on the synchronization status levels to obtain a synchronized superior clock source, and the subordinate clock source is controlled to synchronize its clock with the synchronized superior clock source. This allows for rapid determination of the synchronized superior clock source for clock synchronization even when the synchronization status levels of the multiple superior clock sources are different.

[0054] Specifically, first determine whether the synchronization status levels of each superior clock source are the same; if the synchronization status levels of multiple superior clock sources are different, there is no need to determine the synchronization level of each superior clock source. Multiple superior clock sources can be directly screened according to the synchronization status level to determine the synchronous superior clock source, and control the subordinate clock source to synchronize clocks with the synchronous superior clock source.

[0055] For example, if multiple superior clock sources include superior clock source A, superior clock source B, and superior clock source C, and the synchronization status level of superior clock source A is PRC, the synchronization status level of superior clock source B is SSU-A, and the synchronization status level of superior clock source C is SSU-B, superior clock source A can be directly determined as the synchronous superior clock source, and the subordinate clock sources can be controlled to synchronize their clocks with superior clock source A.

[0056] In some embodiments, a superior clock source corresponding to the highest synchronization status level is determined from multiple superior clock sources. If there is only one superior clock source corresponding to the highest synchronization status level, the superior clock source is used as the synchronization superior clock source. If there are multiple superior clock sources corresponding to the highest synchronization status level, the synchronization superior clock source is determined based on the target field information of each superior clock source. This allows the superior clock source corresponding to the highest synchronization status level to be selected as the synchronization superior clock source, thereby improving the accuracy of determining the synchronization superior clock source.

[0057] For example, if multiple superior clock sources include superior clock source A, superior clock source B, and superior clock source C, and the synchronization status level of superior clock source A is PRC, the synchronization status level of superior clock source B is SSU-A, and the synchronization status level of superior clock source C is SSU-B, then it can be determined that the highest synchronization status level is PRC, and its corresponding superior clock source is superior clock source A. Since the number of superior clock sources corresponding to the highest synchronization status level is one, superior clock source A can be determined as the synchronous superior clock source, and the subordinate clock sources can be controlled to synchronize their clocks with superior clock source A.

[0058] For example, if multiple superior clock sources include superior clock source A, superior clock source B, superior clock source C, and superior clock source D, and the synchronization status level of superior clock source A is PRC, the synchronization status level of superior clock source B is SSU-A, the synchronization status level of superior clock source C is SSU-B, and the synchronization status level of superior clock source D is PRC, then it can be determined that the highest synchronization status level is PRC, and its corresponding superior clock sources are superior clock source A and superior clock source D. Furthermore, there are multiple superior clock sources corresponding to the highest synchronization status level. Therefore, the synchronization superior clock source can be determined based on the target field information of superior clock source A and superior clock source D.

[0059] S102: Determine synchronization levels of multiple upper-level clock sources according to synchronization status information of the multiple upper-level clock sources.

[0060] The synchronization level of the upper-level clock source can be determined by the target field information, which is used to indicate the priority of multiple upper-level clock sources.

[0061] In some embodiments, the synchronization levels of multiple superior clock sources are determined based on the target field information of each superior clock source. This allows the synchronization levels of multiple superior clock sources to be accurately determined when the synchronization status levels of multiple superior clock sources are the same, thereby accurately determining the priorities of the multiple superior clock sources.

[0062] Specifically, first determine whether the synchronization status levels of the superior clock sources are the same; if the synchronization status levels of multiple superior clock sources are the same, determine the synchronization levels of the multiple superior clock sources according to the target field information of each superior clock source, thereby determining the synchronized superior clock source.

[0063] For example, if the multiple superior clock sources include superior clock source A, superior clock source B, and superior clock source C, and the target field information of superior clock source A is 0001, the target field information of superior clock source B is 0010, and the target field information of superior clock source C is 0011, then based on the target field information of each superior clock source, it can be determined that the synchronization level of superior clock source A is the first level, the synchronization level of superior clock source B is the second level, and the synchronization level of superior clock source C is the third level.

[0064] For example, if the multiple superior clock sources include superior clock source D and superior clock source E, and the target field information of superior clock source D is 0001, and the target field information of superior clock source E is 0011, then it can be determined based on the target field information of each superior clock source that the synchronization level of superior clock source D is the first level, and the synchronization level of superior clock source E is the second level.

[0065] In some embodiments, the target field information of each superior clock source is parsed to obtain the priority information of each superior clock source; and the synchronization levels of the multiple superior clock sources are determined according to the priority information of each superior clock source.

[0066] The priority information of the upper-level clock source is used to indicate the priority of each upper-level clock source.

[0067] Specifically, the target field information of each superior clock source is decoded to obtain the priority information of each superior clock source, thereby determining the priority of each superior clock source, and determining the synchronization level of multiple superior clock sources according to the priority of each superior clock source.

[0068] For example, if the multiple superior clock sources include superior clock source A, superior clock source B, and superior clock source C, and the target field information of superior clock source A is 0001, the target field information of superior clock source B is 0010, and the target field information of superior clock source C is 0011, then the target field information 0001 of superior clock source A can be decoded to determine that the priority of superior clock source A is first, the target field information 0010 of superior clock source B can be decoded to determine that the priority of superior clock source B is second, and the target field information 0011 of superior clock source C can be decoded to determine that the priority of superior clock source C is third. As a result, the synchronization level of superior clock source A is determined to be first, the synchronization level of superior clock source B is determined to be second, and the synchronization level of superior clock source C is determined to be third.

[0069] In some embodiments, the synchronization levels of multiple superior clock sources may also be determined based on identifier information of each superior clock source.

[0070] Specifically, the identifier of each upper-level clock source may be identified to obtain the priority information of each upper-level clock source; and the synchronization levels of the multiple upper-level clock sources may be determined according to the priority information of each upper-level clock source.

[0071] For example, if multiple superior clock sources include superior clock source A, superior clock source B, and superior clock source C, and the identifier of superior clock source A is a circle, the identifier of superior clock source B is a square, and the identifier of superior clock source C is a triangle, then the identifier of superior clock source A can be identified to determine that superior clock source A has the first priority, the identifier of superior clock source B can be identified to determine that superior clock source B has the second priority, and the identifier of superior clock source C can be identified to determine that superior clock source C has the third priority. This determines that the synchronization level of superior clock source A is the first level, the synchronization level of superior clock source B is the second level, and the synchronization level of superior clock source C is the third level.

[0072] It should be noted that the synchronization status information may include any information used to determine the priority information of the superior clock source. Using any one type of information or combining multiple types of information to determine the priority information of the superior clock source falls within the protection scope of this application.

[0073] S103: Determine a synchronous upper-level clock source from multiple upper-level clock sources based on the synchronization level, and control the lower-level clock source to synchronize with the synchronous upper-level clock source.

[0074] The synchronous upper-level clock source is an upper-level clock source used to synchronize with a lower-level or current-level clock source.

[0075] Specifically, from multiple upper-level clock sources, the upper-level clock source corresponding to the highest synchronization level is determined, and the upper-level clock source corresponding to the highest synchronization level is used as the synchronous upper-level clock source, and the lower-level clock sources are controlled to synchronize with the synchronous upper-level clock source.

[0076] For example, if it is determined that the synchronization level of the upper-level clock source A is the first level, the synchronization level of the upper-level clock source B is the second level, and the synchronization level of the upper-level clock source C is the third level, then the upper-level clock source corresponding to the highest synchronization level is determined to be the upper-level clock source A, and the lower-level clock source is controlled to synchronize with the upper-level clock source A.

[0077] It should be noted that if the synchronization status levels of multiple superior clock sources are the same, and the synchronization levels of multiple superior clock sources are the same, you can select any superior clock source from the multiple superior clock sources as the synchronous superior clock source, and control the subordinate clock source to synchronize with the synchronous superior clock source.

[0078] In some embodiments, as shown in FIG3 , the clock synchronization method proposed in an embodiment of the present application is introduced from the overall process of clock synchronization, specifically including S201 to S2042 .

[0079] S201: The upper-level clock source sends synchronization status information to the lower-level clock source.

[0080] S202: Determine the synchronization status level of the upper-level clock source.

[0081] S203: Determine whether the synchronization status level of the upper-level clock source is the highest.

[0082] S2031. If the synchronization status level of the superior clock source is the highest, determine the synchronization level according to the target field information in the QL TLV field.

[0083] S2032: If the synchronization status level of the superior clock source is not the highest, do not synchronize the SyncE clock signal of the superior clock source.

[0084] S204: Determine whether the synchronization level of the upper-level clock source is the highest.

[0085] S2041: If the synchronization level of the superior clock source is the highest, synchronize the SyncE clock signal of the superior clock source.

[0086] S2042: If the synchronization level of the superior clock source is not the highest, determine the synchronization status level in the QL TLV field of the new superior clock source.

[0087] For example, when multiple (assuming 3 in this embodiment) upper-level clock sources send SSM messages (i.e., synchronization status information) to the current-level device, it is assumed that the synchronization status levels are SSU-A, PRC, and SSU-B, and the upper-level clock sources are all in a locked state. According to the above flowchart, the upper-level clock source corresponding to the synchronization status level of PRC has the highest level. In this case, the priority of the clock source is also the highest, and the current-level device synchronizes with this clock source.

[0088] For example, when multiple (assuming 3 in this embodiment) upper-level clock sources send SSM messages (i.e., synchronization status information) to the current-level device, it is assumed that the synchronization status levels are PRC, PRC, and SSU-A, and the configured clock sources correspond to GPS, 1PPS+TOD, and SyncE+1588, and the upper-level clock sources are all in a locked state. According to the flowchart, the highest synchronization status level is first determined, and GPS and 1PPS+TOD are filtered. Then, according to the clock source priority defined in the extended field of the SSM message (i.e., the target field information), GPS has the highest priority, so the GPS clock source is synchronized.

[0089] For example, when multiple (assuming 3 in this embodiment) upper-level clock sources send SSM messages (i.e., synchronization status information) to the current-level device, it is assumed that the synchronization status levels are SSU-A, SSU-A, and SSU-B, and the upper-level clock sources are GPS, SyncE+1588, and 15888, respectively, and the clock source statuses are hold, lock, and hold, respectively. According to the flowchart, the highest synchronization status level is first determined, and GPS and SyncE+1588 are filtered out. Then, according to the clock source priority defined in the extended field of the SSM message (i.e., the target field information), SyncE+1588 has the highest priority, so the SyncE+1588 clock source is synchronized.

[0090] Please refer to FIG. 4 , which is a schematic block diagram of a clock synchronization device provided in an embodiment of the present application. The clock synchronization device can be configured in a server to execute the aforementioned clock synchronization method.

[0091] As shown in FIG4 , the clock synchronization device 300 includes: an information acquisition module 301 , a synchronization level determination module 302 , and a clock source determination module 303 .

[0092] The information acquisition module 301 is configured to acquire synchronization status information of the multiple upper-level clock sources if the synchronization status levels of the multiple upper-level clock sources are the same.

[0093] The synchronization level determination module 302 is configured to determine the synchronization levels of multiple upper-level clock sources according to the synchronization status information of the multiple upper-level clock sources.

[0094] The clock source determination module 303 is configured to determine a synchronous upper-level clock source from a plurality of upper-level clock sources based on the synchronization level, and control the lower-level clock source to synchronize with the synchronous upper-level clock source.

[0095] The synchronization level determination module 302 is further configured to determine the synchronization levels of multiple upper-level clock sources according to the target field information of each upper-level clock source.

[0096] The synchronization level determination module 302 is further configured to parse the target field information of each superior clock source to obtain the priority information of each superior clock source; and determine the synchronization level of multiple superior clock sources according to the priority information of each superior clock source.

[0097] The information acquisition module 301 is further configured to acquire the first clock source type and clock source status of multiple upper-level clock sources; and determine the synchronization status level of each upper-level clock source according to the first clock source type and clock source status of each upper-level clock source.

[0098] The information acquisition module 301 is also used to: if the first clock source type of the upper-level clock source is a satellite-type clock source and the clock source status of the upper-level clock source is a locked state, then the synchronization status level of the upper-level clock source is the first synchronization status level; if the first clock source type of the upper-level clock source is a satellite-type clock source and the clock source status of the upper-level clock source is a held state, or if the first clock source type of the upper-level clock source is a 1588-type clock source and the clock source status of the upper-level clock source is a locked state, then the synchronization status level of the upper-level clock source is the second synchronization status level; if the first clock source type of the upper-level clock source is a 1588-type clock source and the clock source status of the upper-level clock source is a held state, then the synchronization status level of the upper-level clock source is the third synchronization status level; if the clock source status of the upper-level clock source is a free-running state, then the synchronization status level of the upper-level clock source is the fourth synchronization status level.

[0099] The information acquisition module 301 is also used to obtain the second clock source type and clock source status of multiple upper-level clock sources; determine the priority of each upper-level clock source according to the second clock source type and clock source status, and generate the target field information corresponding to each upper-level clock source according to the priority of each upper-level clock source.

[0100] The clock source screening module 304 is used to determine whether the synchronization status levels of the upper-level clock sources are the same; if the synchronization status levels of multiple upper-level clock sources are different, the multiple upper-level clock sources are screened according to the synchronization status levels to obtain the synchronized upper-level clock source, and the lower-level clock source is controlled to synchronize the clocks with the synchronized upper-level clock source.

[0101] The clock source screening module 304 is also used to determine the superior clock source corresponding to the highest synchronization status level from multiple superior clock sources; if the number of superior clock sources corresponding to the highest synchronization status level is one, the superior clock source is used as the synchronous superior clock source; if the number of superior clock sources corresponding to the highest synchronization status level is multiple, the synchronous superior clock source is determined based on the synchronization status information of each superior clock source.

[0102] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0103] The methods and apparatus of the present application can be used in a wide variety of general-purpose or specialized computing system environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer devices, network PCs, minicomputers, mainframe computers, and distributed computing environments including any of the above.

[0104] Please refer to FIG5 , which is a schematic block diagram of the structure of a network device provided in an embodiment of the present application.

[0105] As shown in FIG5 , a network device 400 may include a processor 401 and a memory 402 . The processor 401 and the memory 402 are connected via a bus 403 , such as an I 2 C (Inter-Integrated Circuit) bus.

[0106] In an exemplary embodiment, processor 401 can be used to provide computing and control capabilities to support the operation of the entire terminal device. Processor 401 can be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor.

[0107] Specifically, the memory 402 may be a Flash chip, a read-only memory (ROM) disk, an optical disk, a USB flash drive, or a mobile hard disk.

[0108] Those skilled in the art will understand that the structure shown in Figure 5 is merely a block diagram of a partial structure related to the embodiment of the present application, and does not constitute a limitation on the terminal device to which the embodiment of the present application is applied. The specific server may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0109] The processor 401 is configured to run a computer program stored in the memory and implement any one of the clock synchronization methods provided in the embodiments of the present application when executing the computer program.

[0110] In one embodiment, the processor 401 is used to run a computer program stored in a memory, and implement the following steps when executing the computer program: if the synchronization status level of each superior clock source in multiple superior clock sources is the same, obtain the synchronization status information of the multiple superior clock sources; determine the synchronization level of the multiple superior clock sources based on the synchronization status information of the multiple superior clock sources; determine the synchronous superior clock source from the multiple superior clock sources based on the synchronization level, and control the subordinate clock source to synchronize with the synchronous superior clock source.

[0111] In one embodiment, the synchronization status information includes target field information. When the processor 401 determines the synchronization level of multiple superior clock sources based on the synchronization status information of multiple superior clock sources, it is used to implement: determining the synchronization level of multiple superior clock sources based on the target field information of each superior clock source.

[0112] In one embodiment, when the processor 401 determines the synchronization level of multiple superior clock sources based on the target field information of each superior clock source, it is used to implement: parsing the target field information of each superior clock source to obtain the priority information of each superior clock source; and determining the synchronization level of multiple superior clock sources based on the priority information of each superior clock source.

[0113] In one embodiment, the processor 401 is used to implement the following before obtaining the synchronization status information of multiple superior clock sources if the synchronization status levels of multiple superior clock sources are the same: obtaining the first clock source type and clock source status of the multiple superior clock sources; and determining the synchronization status level of each superior clock source based on the first clock source type and clock source status of each superior clock source.

[0114] In one embodiment, when determining the synchronization status level of each superior clock source based on the first clock source type and clock source status of each superior clock source, the processor 401 is configured to implement: if the first clock source type of the superior clock source is a satellite-type clock source and the clock source status of the superior clock source is in a locked state, then the synchronization status level of the superior clock source is a first synchronization status level; if the first clock source type of the superior clock source is a satellite-type clock source and the clock source status of the superior clock source is in a held state, or if the first clock source type of the superior clock source is a 1588-type clock source and the clock source status of the superior clock source is in a locked state, then the synchronization status level of the superior clock source is a second synchronization status level; if the first clock source type of the superior clock source is a 1588-type clock source and the clock source status of the superior clock source is in a held state, then the synchronization status level of the superior clock source is a third synchronization status level; and if the clock source status of the superior clock source is in a free-running state, then the synchronization status level of the superior clock source is a fourth synchronization status level.

[0115] In one embodiment, when the processor 401 obtains the synchronization status information of multiple superior clock sources, it is used to implement: obtaining the second clock source type and clock source status of the multiple superior clock sources; determining the priority of each superior clock source according to the second clock source type and the clock source status, and generating the target field information corresponding to each superior clock source according to the priority of each superior clock source.

[0116] In one embodiment, the processor 401 is used to implement: determining whether the synchronization status levels of each superior clock source are the same; if the synchronization status levels of multiple superior clock sources are different, screening the multiple superior clock sources according to the synchronization status levels to obtain a synchronous superior clock source, and controlling the subordinate clock source to perform clock synchronization with the synchronous superior clock source.

[0117] In one embodiment, when the processor 401 screens multiple superior clock sources according to the synchronization status level and obtains a synchronous superior clock source, it is used to implement: determining the superior clock source corresponding to the highest synchronization status level from multiple superior clock sources; if the number of superior clock sources corresponding to the highest synchronization status level is one, then the superior clock source is used as the synchronous superior clock source; if the number of superior clock sources corresponding to the highest synchronization status level is multiple, then the synchronous superior clock source is determined according to the synchronization status information of each superior clock source.

[0118] It should be noted that those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the terminal device described above can refer to the corresponding process in the aforementioned terminal capability reporting method embodiment, and will not be repeated here.

[0119] An embodiment of the present application also provides a storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of any clock synchronization method provided in the description of the embodiment of the present application.

[0120] The storage medium may be an internal storage unit of the terminal device described in the aforementioned embodiment, such as a hard disk or memory of the terminal device. The storage medium may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device.

[0121] It will be appreciated by those skilled in the art that all or some of the steps, systems, and functional modules / units in the methods disclosed above may be implemented as software, firmware, hardware, and appropriate combinations thereof. In a hardware embodiment, the division between the functional modules / units mentioned in the above description does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed by several physical components in cooperation. Some or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or non-transitory medium) and a communication medium (or temporary medium). As is known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable, and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, it is well known to those skilled in the art that communication media generally embodies computer-readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.

[0122] It should be understood that the term "and / or" used in this specification and the appended claims refers to any combination of one or more of the associated listed items and all possible combinations, including these combinations. It should be noted that, in this article, the terms "include", "comprise" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system that includes a series of elements includes not only those elements, but also includes other elements that are not explicitly listed, or also includes elements that are inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "including a..." does not exclude the presence of other identical elements in the process, method, article or system that includes the element.

[0123] The serial numbers of the embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments. The above are only specific embodiments of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application shall be based on the scope of protection of the claims.

Claims

1. A clock synchronization method, the method comprising: If the synchronization status levels of the multiple upper-level clock sources are the same, obtaining synchronization status information of the multiple upper-level clock sources; Determining the synchronization levels of the multiple superior clock sources according to the synchronization status information of the multiple superior clock sources; A synchronous superior clock source is determined from the plurality of superior clock sources based on the synchronization level, and a subordinate clock source is controlled to be synchronized with the synchronous superior clock source.

2. The method according to claim 1, wherein: The synchronization status information includes target field information, and determining the synchronization levels of the multiple superior clock sources according to the synchronization status information of the multiple superior clock sources includes: Parsing the target field information of each of the upper-level clock sources to obtain the priority information of each of the upper-level clock sources; The synchronization levels of the multiple superior clock sources are determined according to the priority information of each superior clock source.

3. The method according to claim 1, wherein: The acquiring synchronization status information of the plurality of upper-level clock sources includes: Obtaining a second clock source type and a clock source status of the multiple upper-level clock sources; The priority of each of the upper-level clock sources is determined according to the second clock source type and the clock source state, and the target field information corresponding to each of the upper-level clock sources is generated according to the priority of each of the upper-level clock sources.

4. The method according to claim 1, wherein: If the synchronization status levels of the multiple upper-level clock sources are the same, before acquiring the synchronization status information of the multiple upper-level clock sources, the method further includes: Obtaining a first clock source type and a clock source status of the multiple upper-level clock sources; Determine each of the upper clock sources according to the first clock source type and clock source state of each of the upper clock sources The synchronization status level of the clock source.

5. The method according to claim 4, wherein: The step of determining the synchronization status level of each of the upper-level clock sources according to the first clock source type and the clock source status of each of the upper-level clock sources comprises: If the first clock source type of the upper-level clock source is a satellite-type clock source, and the clock source state of the upper-level clock source is a locked state, the synchronization state level of the upper-level clock source is a first synchronization state level; If the first clock source type of the superior clock source is a satellite clock source, and the clock source state of the superior clock source is in the hold state, or if the first clock source type of the superior clock source is a 1588 clock source, and the clock source state of the superior clock source is in the locked state, the synchronization state level of the superior clock source is the second synchronization state level; If the first clock source type of the upper-level clock source is a 1588-type clock source, and the clock source state of the upper-level clock source is a hold state, the synchronization state level of the upper-level clock source is a third synchronization state level; If the clock source state of the upper-level clock source is a free-running state, the synchronization state level of the upper-level clock source is a fourth synchronization state level.

6. The method according to claim 4 or 5, wherein: The method further comprises: Determining whether the synchronization status levels of the superior clock sources are the same; If the synchronization status levels of the multiple superior clock sources are different, the multiple superior clock sources are screened according to the synchronization status levels to obtain a synchronous superior clock source, and the subordinate clock source is controlled to perform clock synchronization with the synchronous superior clock source.

7. The method according to claim 6, wherein: The step of screening the plurality of superior clock sources according to the synchronization status level to obtain a synchronous superior clock source includes: Determine, from the multiple upper-level clock sources, an upper-level clock source corresponding to the highest synchronization status level; If the number of upper-level clock sources corresponding to the highest synchronization status level is multiple, the synchronization upper-level clock source is determined according to the synchronization status information of each of the upper-level clock sources.

8. A clock synchronization device, comprising: An information acquisition module, configured to acquire synchronization status information of the plurality of superior clock sources if the synchronization status levels of the plurality of superior clock sources are the same; A synchronization level determination module, configured to determine the synchronization levels of the multiple superior clock sources according to the synchronization status information of the multiple superior clock sources; The clock source determination module is used to determine a synchronous superior clock source from the multiple superior clock sources based on the synchronization level, and control the subordinate clock source to synchronize with the synchronous superior clock source.

9. A network device, comprising: A processor, a memory, a computer program stored in the memory and executable by the processor, and a data bus for realizing connection and communication between the processor and the memory, wherein when the computer program is executed by the processor, the steps of the clock synchronization method as described in any one of claims 1 to 7 are realized.

10. A storage medium for computer-readable storage, wherein the storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the steps of the clock synchronization method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method and device for selecting clock sources of microwave network elements

    CN102664699A

  • Method and device for selecting time synchronization sources

    CN102957488A

  • System and method for synchronizing clocks in multiple cells

    CN112398568A

  • Clock frequency monitoring device and clock frequency monitoring method

    US20210302499A1

  • Station apparatus, subscriber apparatus, synchronization method, and PON system

    WO2020075318A1