A time source signal determination method and apparatus, network device, and storage medium

By comprehensively considering information such as the super master clock identifier, quality parameters, and path time accuracy, the problem that the shortest hop count selection in existing technologies is not necessarily optimal has been solved, and higher-precision time synchronization has been achieved.

CN115442881BActive Publication Date: 2026-05-15CHINA MOBILE COMM LTD RES INST +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHINA MOBILE COMM LTD RES INST
Filing Date
2021-06-03
Publication Date
2026-05-15

AI Technical Summary

Technical Problem

In existing technologies, selecting the time source signal by the shortest number of hops may not be the optimal choice in some situations, resulting in insufficient time synchronization accuracy.

Method used

By comparing information such as the super master clock identifier, the quality parameters of the super master clock, and the path time accuracy, a better time source signal is determined, taking into account parameters such as clock class, time accuracy, stability, and priority.

Benefits of technology

By selecting time source signals more rationally, the accuracy and reliability of time synchronization can be improved, thus meeting the requirements for high-precision time synchronization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115442881B_ABST
    Figure CN115442881B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a time source signal determination method and device, network equipment and a storage medium. The method is applied to network equipment, and comprises the following steps: obtaining data sets of at least two time source signals respectively, wherein each data set comprises at least one of the following information corresponding to the time source signal: super master clock identification, quality parameter of the super master clock, path time precision; comparing the at least one information in the at least two data sets, and determining a better time source signal based on a comparison result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of communication technology, and specifically to a method, apparatus, network device, and storage medium for determining a time source signal. Background Technology

[0002] With the development of 5G services and the increasing demands of certain industries, the requirements for network time synchronization accuracy are becoming increasingly stringent. For time synchronization networks, a synchronization source server is typically installed upstream to output a time signal, which is then transmitted to the nodes requiring synchronization via the transmission network. When a node receives multiple time source signals, it needs to compare and select the optimal one.

[0003] Currently, the primary approach is to compare information such as the number of hops, with the shortest number of hops considered the optimal time source signal. However, this method relies on a relatively singular basis, and in some cases, the shortest number of hops may not be the optimal choice. Summary of the Invention

[0004] To address the existing technical problems, embodiments of the present invention provide a method, apparatus, network device, and storage medium for determining time source signals.

[0005] To achieve the above objectives, the technical solution of this invention is implemented as follows:

[0006] This invention provides a method for determining a time source signal, which is applied in a network device; the method includes:

[0007] Data sets of at least two time source signals are obtained respectively, wherein the data sets include at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy;

[0008] Compare at least one piece of information from at least two datasets, and determine a better time source signal based on the comparison results.

[0009] In the above scheme, comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison result includes:

[0010] Compare the super master clock identifiers in at least two datasets. If the super master clock identifiers are the same, compare the path time precision in the at least two datasets and determine the time source signal with the smaller path time precision as the better time source signal.

[0011] In the above scheme, the dataset also includes the number of hops along the path;

[0012] The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes:

[0013] Compare the supermaster clock identifiers in at least two datasets; if the supermaster clock identifiers are the same, compare the path time accuracy in the at least two datasets.

[0014] If the path time precision is the same, compare the number of hops along the path in the at least two datasets, and determine the time source signal with the smaller number of hops as the better time source signal.

[0015] In the above scheme, comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison result includes:

[0016] Compare the quality parameters of the super master clock in at least two datasets, and determine the time source signal that has better clock quality as characterized by the quality parameters of the super master clock and is available from the super master clock as the better time source signal.

[0017] In the above scheme, comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison result includes:

[0018] Compare the quality parameters of the super master clock in at least two datasets. If the clock quality represented by the quality parameters of the super master clock is the same, and the super master clocks corresponding to the at least two time source signals are both available, compare the path time accuracy in the at least two datasets, and determine the time source signal with the smaller path time accuracy as the better time source signal.

[0019] In the above scheme, the dataset also includes the number of hops along the path;

[0020] The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes:

[0021] Compare the quality parameters of the super master clock in at least two datasets. If the quality parameters of the super master clock represent the same clock quality and the super master clocks corresponding to the at least two time source signals are both available, compare the path time accuracy in the at least two datasets.

[0022] If the path time precision is the same, compare the number of hops along the path in the at least two datasets, and determine the time source signal with the smaller number of hops as the better time source signal.

[0023] In the above scheme, obtaining datasets of at least two time source signals includes:

[0024] The network device receives at least two synchronization messages, each of which includes information about a time source signal; and obtains the dataset corresponding to the time source signal based on the information about the time source signal.

[0025] In the above scheme, the dataset also includes the number of hops along the path;

[0026] If one of the two synchronization messages includes information related to the path time precision, while the other synchronization message does not, the path time precision corresponding to the other synchronization message is calculated based on the number of hops along the path.

[0027] In the above scheme, the path time precision corresponding to the other synchronization message is obtained by multiplying the number of hops along the path by the preset node precision.

[0028] In the above scheme, the quality parameters of the super master clock include at least one of the following parameters:

[0029] Clock class, time accuracy, stability, priority.

[0030] In the above scheme, the time accuracy of the super master clock is either a fixed value or an instantaneous value.

[0031] In the above scheme, the path time precision includes one of the following:

[0032] Fixed time deviation;

[0033] Fixed time deviation and dynamic time deviation;

[0034] Fixed time deviation, dynamic time deviation, and transient time change;

[0035] Maximum time deviation.

[0036] This invention also provides a time source signal determination device, the device comprising: an acquisition unit and a determination unit; wherein,

[0037] The acquisition unit is used to acquire datasets of at least two time source signals respectively, wherein the datasets include at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy;

[0038] The determining unit is used to compare at least one piece of information in at least two datasets and determine a better time source signal based on the comparison result.

[0039] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of the method described in this invention.

[0040] This invention also provides a network device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method described in this invention.

[0041] The time source signal determination method, apparatus, network device, and storage medium provided in this invention obtain at least two time source signal datasets through the network device. Each dataset includes at least one of the following information corresponding to the time source signal: a super master clock identifier, a super master clock quality parameter, and path time accuracy. The method compares the at least one piece of information in the at least two datasets and determines a superior time source signal based on the comparison result. By employing the technical solution of this invention, a better (or superior) time source signal is determined based on at least one of the super master clock identifier, super master clock quality parameter, and path time accuracy, thus more reasonably determining the better (or superior) time source signal and better meeting the needs of time synchronization. Attached Figure Description

[0042] Figure 1 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 1 ;

[0043] Figure 2 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 2 ;

[0044] Figure 3 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 3 ;

[0045] Figure 4 This is a schematic diagram of the composition of the time source signal determination device according to an embodiment of the present invention;

[0046] Figure 5 This is a schematic diagram of the hardware composition structure of a network device according to an embodiment of the present invention. Detailed Implementation

[0047] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.

[0048] This invention provides a method for determining a time source signal. Figure 1 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 1 ;like Figure 1As shown, the method includes:

[0049] Step 101: Obtain datasets of at least two time source signals, wherein the datasets include at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy;

[0050] Step 102: Compare at least one piece of information from at least two datasets, and determine the better time source signal based on the comparison results.

[0051] The time source signal determination method of this embodiment is applied to a network device. The network device can be any network node that needs time synchronization. For example, the network device can be a base station or other network devices. This embodiment does not limit the type of network device.

[0052] In some optional embodiments of the present invention, step 101, namely obtaining the datasets of at least two time source signals, includes: the network device receiving at least two synchronization messages, each synchronization message including information of a time source signal; and obtaining the dataset corresponding to the time source signal based on the information of the time source signal.

[0053] In this embodiment, each time source signal corresponds to a synchronization message, and each synchronization message carries information about the corresponding time source signal. The network device obtains the dataset of the corresponding time source signal based on the information of each time source signal. In some examples, the synchronization message can directly carry the information in the dataset; for example, the synchronization message can directly carry the super master clock identifier. In other examples, the information in the dataset needs to be calculated from the information carried in the synchronization message. For example, the path time accuracy is obtained by adding a dynamic time deviation to a fixed time deviation.

[0054] In some optional embodiments, the dataset also includes the number of hops along the path; if one of the two synchronization messages includes information related to the path time precision, and the other synchronization message does not include information related to the path time precision, the path time precision corresponding to the other synchronization message is calculated based on the number of hops along the path.

[0055] In this embodiment, the synchronization message may also include the path hop count, which represents the number of nodes the synchronization message passes through from the initial node to the network device. If one synchronization message includes information related to the path time precision (i.e., the network device can determine the path time precision based on this information), and the other synchronization message does not include such information (i.e., the network device cannot determine the corresponding path time precision), then to enable comparison of information such as "path time precision," the network device can determine the path time precision corresponding to the other synchronization message based on other information, specifically calculated based on the path hop count corresponding to the other synchronization message.

[0056] Optionally, the path time precision corresponding to the other synchronization message is obtained by multiplying the number of hops along the path by a preset node precision. This allows for comparisons based on path time precision during the comparison of information within the dataset.

[0057] In some optional embodiments of the present invention, the quality parameters of the Grand Master include at least one of the following parameters: clock class, time accuracy, stability (offsetScaledLogVariance), and priority.

[0058] In some alternative embodiments, the time precision of the super master clock is a fixed value or an instantaneous value. As one example, the network device may pre-obtain a fixed value representing the time precision corresponding to the time source signal; wherein the fixed value corresponding to different time source signals may be the same or different. As another example, the synchronization message may include relevant information (such as a fixed value or an instantaneous value) representing the time precision of the super master clock; then the network device can determine the time precision (such as a fixed value or an instantaneous value) of the super master clock corresponding to the time source signal through the received synchronization message.

[0059] In some alternative embodiments, the path time precision includes one of the following:

[0060] Fixed time deviation;

[0061] Fixed time deviation and dynamic time deviation;

[0062] Fixed time deviation, dynamic time deviation, and transient time change;

[0063] Maximum time deviation.

[0064] In this embodiment, the path time accuracy can be obtained in different ways. One implementation is to represent the path time accuracy using a fixed time deviation. For example, different time source signals (or different super master clocks) can correspond to different fixed time deviations. The synchronization message can carry a super master clock identifier and a fixed time deviation. After receiving the synchronization message, the network device can obtain the super master clock identifier and the corresponding fixed time deviation from the synchronization message, and determine the corresponding path time accuracy based on the fixed time deviation. In another implementation, different time source signals (or different super master clocks) can correspond to the same or different fixed time deviations. In addition, different time source signals (or different super master clocks) can also correspond to the same or different dynamic time deviations. The synchronization message can carry a super master clock identifier, a fixed time deviation, and a dynamic time deviation. After receiving the synchronization message, the network device can obtain the super master clock identifier, the corresponding fixed time deviation, and the dynamic time deviation from the synchronization message, and calculate based on the fixed time deviation and dynamic time deviation corresponding to a time source signal, for example, by adding the fixed time deviation to the dynamic time deviation, to obtain the path time accuracy. In another implementation, similar to the above implementation, the network device can obtain the super master clock identifier, the corresponding fixed time deviation, dynamic time deviation, and transient time change from the synchronization message. It then calculates the path time accuracy based on the fixed time deviation, dynamic time deviation, and transient time change corresponding to a time source signal, for example, by adding the fixed time deviation, dynamic time deviation, and transient time change. In yet another implementation, the network device can receive multiple synchronization messages corresponding to the same time source signal within a certain time range. Each synchronization message may include a time deviation. The maximum time deviation is determined from the multiple time deviations, and the corresponding path time accuracy is determined based on the maximum time deviation. Alternatively, the network device can obtain the super master clock identifier and the corresponding maximum time deviation from the synchronization message, and determine the corresponding path time accuracy based on the maximum time deviation. In this case, the aforementioned fixed time deviation, dynamic time deviation, transient time change, and maximum time deviation are all determined and added to the synchronization message by nodes other than the network device during the transmission of the time source signal.

[0065] The technical solution of this invention allows the network device to determine a better (or superior) time source signal based on at least one of the following: super master clock identifier, super master clock quality parameters, and path time accuracy. This more reasonable determination of the better (or superior) time source signal better meets the needs of time synchronization.

[0066] Regarding step 102, as one implementation, comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the super master clock identifiers in at least two datasets; if the super master clock identifiers are the same, comparing the path time precision in the at least two datasets, and determining the time source signal with the smaller path time precision as the better time source signal.

[0067] In this embodiment, the network device compares the super master clock identifiers in at least two datasets. If the super master clock identifiers are the same, it indicates that they originate from the same super master clock. The path time accuracy is further compared, and the time source signal with the smaller path time accuracy is determined to be the better time source signal.

[0068] Regarding step 102, as one implementation, the dataset further includes the number of hops along the path; comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the super master clock identifiers in at least two datasets; if the super master clock identifiers are the same, comparing the path time accuracy in the at least two datasets; if the path time accuracy is the same, comparing the number of hops along the path in the at least two datasets, and determining the time source signal with the smaller number of hops along the path as the better time source signal.

[0069] Regarding step 102, as one implementation, comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the quality parameters of the super master clock in at least two datasets, and determining a time source signal whose clock quality is better as represented by the quality parameters of the super master clock and which is available from the super master clock as the better time source signal.

[0070] In this embodiment, the quality parameters of the super master clock include at least one of the following parameters: clock level, time accuracy, stability, and priority. The network device can then determine the quality of the corresponding super master clock based on at least one of these parameters. In some examples, the priority of each parameter can be pre-configured. For instance, the priority of clock level is higher than the priority of time accuracy, which is higher than the priority of stability, which is higher than the priority of priority. The network device can then compare clock levels; if the clock level of one time source signal is higher than the clock level of another time source signal, the clock quality represented by the first time source signal can be determined to be superior. In other examples, weighting coefficients for each parameter can be pre-configured, and the parameters can be weighted and summed based on these weighting coefficients. The clock quality is then determined based on the weighted summation result.

[0071] For example, the super master clock can be used to indicate that the clock level corresponding to the super master clock is within the available range of the network device.

[0072] Regarding step 102, as one implementation, comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the quality parameters of the super master clock in at least two datasets; if the clock quality represented by the quality parameters of the super master clock is the same, and the super master clocks corresponding to the at least two time source signals are both available; comparing the path time accuracy in the at least two datasets; and determining the time source signal with the smaller path time accuracy as the better time source signal.

[0073] Regarding step 102, as one implementation, the dataset further includes the number of hops along the path; comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the quality parameters of the supermaster clock in at least two datasets; if the clock quality represented by the quality parameters of the supermaster clock is the same, and the supermaster clocks corresponding to the at least two time source signals are both available, comparing the path time accuracy in the at least two datasets; if the path time accuracy is the same, comparing the number of hops along the path in the at least two datasets, and determining the time source signal with the smaller number of hops along the path as the better time source signal.

[0074] The method for determining the time source signal according to the present invention will be described below with reference to specific embodiments.

[0075] Example 1

[0076] Figure 2 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 2 In this example, the dataset may include: supermaster clock identifier, path time precision, and the number of hops traversed. For example... Figure 2 As shown, the method includes:

[0077] Step 201: Compare the datasets of the two time source signals; assume that the two time source signals are time source signal A and time source signal B;

[0078] Step 202: If the supermaster clock identifiers are the same in the two datasets, compare the path time accuracy in the two datasets;

[0079] Step 203: If the path time precision corresponding to time source signal A is less than the path time precision corresponding to time source signal B, then time source signal A is determined to be the better time source signal; conversely, if the path time precision corresponding to time source signal B is less than the path time precision corresponding to time source signal A, then time source signal B is determined to be the better time source signal.

[0080] Step 204: If the time precision of the two paths is the same, then compare the number of hops of the paths traversed in the two datasets;

[0081] Step 205: If the number of hops along the path corresponding to time source signal A is less than the number of hops along the path corresponding to time source signal B, then time source signal A is determined to be the better time source signal; conversely, if the number of hops along the path corresponding to time source signal B is less than the number of hops along the path corresponding to time source signal A, then time source signal B is determined to be the better time source signal.

[0082] Example 2

[0083] Figure 3 This is a flowchart illustrating the time source signal determination method according to an embodiment of the present invention. Figure 3 In this example, the dataset may include: the quality parameters of the super master clock, path time accuracy, and the number of hops along the path. For example... Figure 3 As shown, the method includes:

[0084] Step 301: Compare the quality parameters of the super master clock of the two time source signals and whether the super master clock is available; assume that the two time source signals are time source signal A and time source signal B;

[0085] Step 302: If the clock quality of the super master clock corresponding to time source signal A is better than that of the super master clock corresponding to time source signal B, and the super master clock corresponding to time source signal A is available, then time source signal A is determined to be the better time source signal; conversely, if the clock quality of the super master clock corresponding to time source signal B is better than that of the super master clock corresponding to time source signal A, and the super master clock corresponding to time source signal B is available, then time source signal B is determined to be the better time source signal.

[0086] Step 303: If the quality parameters of the super master clock in the two datasets represent the same quality of the super master clock, and the super master clocks corresponding to the two time source signals are both available, then compare the path time accuracy in the two datasets.

[0087] Step 304: If the path time precision corresponding to time source signal A is less than the path time precision corresponding to time source signal B, then time source signal A is determined to be the better time source signal; conversely, if the path time precision corresponding to time source signal B is less than the path time precision corresponding to time source signal A, then time source signal B is determined to be the better time source signal.

[0088] Step 305: If the time precision of the two paths is the same, then compare the number of hops of the paths traversed in the two datasets;

[0089] Step 306: If the number of hops along the path corresponding to time source signal A is less than the number of hops along the path corresponding to time source signal B, then time source signal A is determined to be the better time source signal; conversely, if the number of hops along the path corresponding to time source signal B is less than the number of hops along the path corresponding to time source signal A, then time source signal B is determined to be the better time source signal.

[0090] This invention also provides a time source signal determination device. Figure 4 This is a schematic diagram of the composition of the time source signal determination device according to an embodiment of the present invention; as shown below. Figure 4 As shown, the device includes: an acquisition unit 41 and a determination unit 42; wherein,

[0091] The acquisition unit 41 is used to acquire datasets of at least two time source signals respectively. The datasets include at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy.

[0092] The determining unit 42 is used to compare at least one piece of information in at least two datasets and determine a better time source signal based on the comparison result.

[0093] In some optional embodiments of the present invention, the determining unit 42 is used to compare the super master clock identifiers in at least two datasets. If the super master clock identifiers are the same, the path time precision in the at least two datasets is compared, and the time source signal with the smaller path time precision is determined to be the better time source signal.

[0094] In some optional embodiments of the present invention, the dataset further includes the number of hops along the path; the determining unit 42 is used to compare the super master clock identifiers in at least two datasets, and if the super master clock identifiers are the same, compare the path time precision in the at least two datasets; if the path time precisions are the same, compare the number of hops along the path in the at least two datasets, and determine the time source signal with the smaller number of hops along the path as the better time source signal.

[0095] In some optional embodiments of the present invention, the determining unit 42 is used to compare the quality parameters of the super master clock in at least two datasets, and determine the time source signal with better clock quality characterized by the quality parameters of the super master clock and the time source signal available for the super master clock as the better time source signal.

[0096] In some optional embodiments of the present invention, the determining unit 42 is used to compare the quality parameters of the super master clock in at least two datasets. If the clock quality represented by the quality parameters of the super master clock is the same, and the super master clocks corresponding to the at least two time source signals are both available, the determining unit 42 compares the path time precision in the at least two datasets and determines the time source signal with the smaller path time precision as the better time source signal.

[0097] In some optional embodiments of the present invention, the dataset further includes the number of hops along the path; the determining unit 42 is used to compare the quality parameters of the super master clock in at least two datasets; if the clock quality represented by the quality parameters of the super master clock is the same, and the super master clocks corresponding to the at least two time source signals are both available, the path time accuracy in the at least two datasets is compared; if the path time accuracy is the same, the number of hops along the path in the at least two datasets is compared, and the time source signal with the smaller number of hops along the path is determined to be the better time source signal.

[0098] In some optional embodiments of the present invention, the acquisition unit 41 is configured to receive at least two synchronization messages, each synchronization message including information of a time source signal; and to obtain a dataset corresponding to the time source signal based on the information of the time source signal.

[0099] In some optional embodiments of the present invention, the dataset also includes the number of hops along the path;

[0100] If one of the two synchronization messages includes information related to the path time precision, while the other synchronization message does not, the path time precision corresponding to the other synchronization message is calculated based on the number of hops along the path.

[0101] In some optional embodiments of the present invention, the path time precision corresponding to the other synchronization message is obtained by multiplying the number of hops along the path by a preset node precision.

[0102] In some optional embodiments of the present invention, the quality parameters of the super master clock include at least one of the following parameters: clock class, time accuracy, stability, and priority.

[0103] In some alternative embodiments of the present invention, the time accuracy of the super master clock is a fixed value or an instantaneous value.

[0104] In some optional embodiments of the present invention, the path time precision includes one of the following:

[0105] Fixed time deviation;

[0106] Fixed time deviation and dynamic time deviation;

[0107] Fixed time deviation, dynamic time deviation, and transient time change;

[0108] Maximum time deviation.

[0109] In this embodiment of the invention, the device is applied in a network device. The acquisition unit 41 and the determination unit 42 in the device can, in practical applications, be implemented by a central processing unit (CPU), a digital signal processor (DSP), a microcontroller unit (MCU), or a field-programmable gate array (FPGA).

[0110] It should be noted that the time source signal determination device provided in the above embodiments is only illustrated by the division of the above-described program modules when determining the time source signal. In practical applications, the above processing can be assigned to different program modules as needed, that is, the internal structure of the device can be divided into different program modules to complete all or part of the processing described above. In addition, the time source signal determination device and the time source signal determination method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process can be found in the method embodiments, which will not be repeated here.

[0111] This invention also provides a network device. Figure 5 This is a schematic diagram of the hardware composition structure of a network device according to an embodiment of the present invention, such as... Figure 5 As shown, the network device includes a memory 52, a processor 51, and a computer program stored in the memory 52 and executable on the processor 51. When the processor 51 executes the program, it implements the steps of the method described in the embodiments of the present invention.

[0112] Optionally, the network device may also include one or more network interfaces 53. It is understood that the various components in the network device are coupled together via a bus system 54. It is understood that the bus system 54 is used to implement communication between these components. In addition to a data bus, the bus system 54 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 5 The general labeled all buses as Bus System 54.

[0113] It is understood that memory 52 can be volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), ferromagnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM); magnetic surface memory can be disk storage or magnetic tape storage. Volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Synchronous Static Random Access Memory (SSRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic Random Access Memory (SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), SyncLink Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory 52 described in this embodiment of the invention is intended to include, but is not limited to, these and any other suitable types of memory.

[0114] The methods disclosed in the above embodiments of the present invention can be applied to processor 51, or implemented by processor 51. Processor 51 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 51 or by instructions in the form of software. The processor 51 may be a general-purpose processor, DSP, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 51 can implement or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present invention. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of the present invention can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 52. ​​Processor 51 reads the information in memory 52 and completes the steps of the aforementioned method in combination with its hardware.

[0115] In an exemplary embodiment, the network device may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, MCUs, microprocessors, or other electronic components to perform the aforementioned method.

[0116] In an exemplary embodiment, the present invention also provides a computer-readable storage medium, such as a memory 52 including a computer program, which can be executed by a processor 51 of a network device to perform the steps described in the foregoing method. The computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, Flash Memory, magnetic surface memory, optical disc, or CD-ROM; or it may be various devices including one or any combination of the above-mentioned memories.

[0117] The computer-readable storage medium provided in the embodiments of the present invention stores a computer program thereon, which, when executed by a processor, implements the steps of the method described in the embodiments of the present invention.

[0118] The methods disclosed in the several method embodiments provided in this application can be arbitrarily combined without conflict to obtain new method embodiments.

[0119] The features disclosed in the several product embodiments provided in this application can be arbitrarily combined without conflict to obtain new product embodiments.

[0120] The features disclosed in the several method or device embodiments provided in this application can be arbitrarily combined without conflict to obtain new method or device embodiments.

[0121] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods, such as: multiple units or components can be combined, or integrated into another system, or some features can be ignored or not executed. In addition, the coupling, direct coupling, or communication connection between the various components shown or discussed can be through some interfaces, and the indirect coupling or communication connection between devices or units can be electrical, mechanical, or other forms.

[0122] The units described above as separate components may or may not be physically separate. The components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the units may be selected to achieve the purpose of this embodiment according to actual needs.

[0123] In addition, in the various embodiments of the present invention, each functional unit can be integrated into one processing unit, or each unit can be a separate unit, or two or more units can be integrated into one unit; the integrated unit can be implemented in hardware or in the form of hardware plus software functional units.

[0124] Those skilled in the art will understand that all or part of the steps of the above method embodiments can be implemented by hardware related to program instructions. The aforementioned program can be stored in a computer-readable storage medium. When the program is executed, it performs the steps of the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] Alternatively, if the integrated units of this invention are implemented as software functional modules and sold or used as independent products, they can also be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the embodiments of this invention, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as mobile storage devices, ROM, RAM, magnetic disks, or optical disks.

[0126] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for determining a time source signal, characterized in that, The method is applied to a network device; the method includes: Data sets of at least two time source signals are obtained, each data set including at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy. The path time accuracy includes one of the following: fixed time deviation; fixed time deviation and dynamic time deviation; fixed time deviation, dynamic time deviation, and transient time change; maximum time deviation. The data set also includes the number of hops traversed. If the synchronization message corresponding to the data set does not include information related to path time accuracy, the path time accuracy corresponding to the synchronization message is obtained by multiplying the number of hops traversed by a preset node accuracy. Compare at least one piece of information in at least two datasets, and determine a better time source signal based on the comparison result; wherein, comparing at least one piece of information in at least two datasets and determining a better time source signal based on the comparison result includes: comparing the super master clock identifiers in at least two datasets; if the super master clock identifiers are the same, comparing the path time precision in the at least two datasets, and determining the time source signal with the smaller path time precision as the better time source signal.

2. The method according to claim 1, characterized in that, The dataset also includes the number of hops along the path; The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes: Compare the supermaster clock identifiers in at least two datasets; if the supermaster clock identifiers are the same, compare the path time accuracy in the at least two datasets. If the path time precision is the same, compare the number of hops along the path in the at least two datasets, and determine the time source signal with the smaller number of hops as the better time source signal.

3. The method according to claim 1, characterized in that, The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes: Compare the quality parameters of the super master clock in at least two datasets, and determine the time source signal that has better clock quality as characterized by the quality parameters of the super master clock and is available from the super master clock as the better time source signal.

4. The method according to claim 1, characterized in that, The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes: Compare the quality parameters of the super master clock in at least two datasets. If the clock quality represented by the quality parameters of the super master clock is the same, and the super master clocks corresponding to the at least two time source signals are both available, compare the path time accuracy in the at least two datasets, and determine the time source signal with the smaller path time accuracy as the better time source signal.

5. The method according to claim 1, characterized in that, The dataset also includes the number of hops along the path; The step of comparing at least one piece of information from at least two datasets and determining a better time source signal based on the comparison results includes: Compare the quality parameters of the super master clock in at least two datasets. If the quality parameters of the super master clock represent the same clock quality and the super master clocks corresponding to the at least two time source signals are both available, compare the path time accuracy in the at least two datasets. If the path time precision is the same, compare the number of hops along the path in the at least two datasets, and determine the time source signal with the smaller number of hops as the better time source signal.

6. The method according to claim 1, characterized in that, The datasets obtained from at least two time source signals include: The network device receives at least two synchronization messages, each of which includes information about a time source signal; and obtains the dataset corresponding to the time source signal based on the information about the time source signal.

7. The method according to claim 6, characterized in that, If one of the two synchronization messages includes information related to the path time precision, while the other synchronization message does not, the path time precision corresponding to the other synchronization message is calculated based on the number of hops along the path.

8. The method according to claim 1, characterized in that, The quality parameters of the super master clock include at least one of the following parameters: Clock class, time accuracy, stability, priority.

9. The method according to claim 8, characterized in that, The time accuracy of the super master clock is either a fixed value or an instantaneous value.

10. A time source signal determination device, characterized in that, The device includes: an acquisition unit and a determination unit; wherein... The acquisition unit is used to acquire datasets of at least two time source signals respectively. The datasets include at least one of the following information corresponding to the time source signals: super master clock identifier, super master clock quality parameters, and path time accuracy. The path time accuracy includes one of the following: fixed time deviation; fixed time deviation and dynamic time deviation; fixed time deviation, dynamic time deviation, and transient time change; maximum time deviation. The datasets also include the number of hops traversed. If the synchronization message corresponding to the dataset does not include information related to path time accuracy, the path time accuracy corresponding to the synchronization message is obtained by multiplying the number of hops traversed by a preset node accuracy. The determining unit is configured to compare at least one piece of information in at least two datasets and determine a better time source signal based on the comparison result; it is also configured to compare the super master clock identifiers in at least two datasets, and if the super master clock identifiers are the same, compare the path time precision in the at least two datasets and determine the time source signal with the smaller path time precision as the better time source signal.

11. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the program implements the steps of the method according to any one of claims 1 to 9.

12. A network device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the method according to any one of claims 1 to 9.