WO2019242321A1 - 时间同步方法、装置、网络设备及计算机可读存储介质 - Google Patents
时间同步方法、装置、网络设备及计算机可读存储介质 Download PDFInfo
- Publication number
- WO2019242321A1 WO2019242321A1 PCT/CN2019/076340 CN2019076340W WO2019242321A1 WO 2019242321 A1 WO2019242321 A1 WO 2019242321A1 CN 2019076340 W CN2019076340 W CN 2019076340W WO 2019242321 A1 WO2019242321 A1 WO 2019242321A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- time synchronization
- time
- synchronization
- system clock
- chip
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04J—MULTIPLEX COMMUNICATION
- H04J3/00—Time-division multiplex systems
- H04J3/02—Details
- H04J3/06—Synchronising arrangements
- H04J3/0635—Clock or time synchronisation in a network
- H04J3/0638—Clock or time synchronisation among nodes; Internode synchronisation
- H04J3/0658—Clock or time synchronisation among packet nodes
- H04J3/0661—Clock or time synchronisation among packet nodes using timestamps
Definitions
- the present invention relates to, but is not limited to, the field of communications, and in particular, to a time synchronization method, apparatus, network device, and computer-readable storage medium.
- the Institute of Electrical and Electronics Engineers (Electronics and Engineers, IEEE) 1588 time synchronization protocol is in Network clock time synchronization plays an important role.
- the 1588 clock provides high-precision clock time synchronization for the entire communication network, and provides strong support and guarantee for the normal operation of network communication services.
- a 1588 time synchronization protocol stack can be run through a central processing unit (CPU) of a network device to interact with a master device to achieve synchronization of a system clock.
- CPU central processing unit
- the accuracy of this time synchronization scheme is not high.
- this scheme also has the disadvantages of being sensitive to network oscillation and noise interference, and having poor stability.
- embodiments of the present invention expect to provide a time synchronization method, apparatus, network device, and computer-readable storage medium to solve the problems of low accuracy and poor stability of time synchronization solutions in the related art.
- An embodiment of the present invention provides a time synchronization method, including:
- the processor performs time synchronization on the system clock according to the time synchronization protocol
- the time synchronization chip is switched to continue the time synchronization of the system clock.
- switching to continue the time synchronization of the system clock by the synchronization chip includes:
- the time synchronization chip After the time synchronization chip locks the time of the system clock, the time synchronization chip is controlled to synchronize the time of the system clock and stop the processor from synchronizing the time of the system clock.
- determining that the time synchronization of the system clock reaches a stable state includes:
- the time deviation ⁇ t between the device and the master device is less than the preset deviation ⁇ Th for N times, N and K are both positive integers greater than 0, and K is greater than or equal to N.
- N is equal to K.
- the time synchronization protocol is a precision clock synchronization protocol standard (PTP) of a network measurement and control system.
- PTP precision clock synchronization protocol standard
- the method further includes:
- control processor When the synchronization chip is in an abnormal state, the control processor continues to time synchronize the system clock according to the time synchronization protocol.
- An embodiment of the present invention further provides a time synchronization device, including:
- a first synchronization module configured to perform time synchronization on a system clock according to a time synchronization protocol
- a synchronization detection module configured to detect whether the time synchronization of the system clock has reached a stable state
- the second synchronization module is configured to, after determining that the time synchronization of the system clock reaches a stable state, switch the time synchronization chip to continue to perform time synchronization on the system clock.
- An embodiment of the present invention further provides a network device, including a processor, a memory, a time synchronization chip, a communication unit, and a communication bus;
- a communication bus configured to implement connection and communication between the processor and a memory, a time synchronization chip, and a communication unit;
- the processor is configured to execute one or more programs stored in the memory to implement the steps of the time synchronization method provided by the embodiment of the present invention.
- the time synchronization chip is a 1588 function chip.
- An embodiment of the present invention further provides a computer storage medium.
- the computer-readable storage medium stores one or more programs, and the one or more programs can be executed by one or more processors to implement the foregoing time provided by the embodiment of the present invention Steps of the synchronization method.
- the processor first time synchronizes the system clock according to the time synchronization protocol, and switches the time when the time synchronization of the system clock reaches a stable state.
- the time synchronization chip continues to time synchronize the system clock. Because the processor performs time synchronization according to the time synchronization protocol, which has the advantage of fast synchronization convergence, using this solution at the beginning of time synchronization can make the time deviation between the local device and the master device quickly converge.
- time synchronization chip will fully suppress and filter the message data with the master device, after the time synchronization of the system clock reaches a stable state, the time synchronization chip will continue to perform time synchronization, which can prevent network oscillation, interference noise, and other problems.
- the effect of the time synchronization result improves the synchronization stability and accuracy of the system clock time synchronization.
- FIG. 1 is a flowchart of a time synchronization method according to an embodiment of the present invention
- FIG. 2 is a flowchart of switching a system clock to time synchronization by a time synchronization chip according to an embodiment of the present invention
- FIG. 3 is a flowchart of a time synchronization method according to an embodiment of the present invention.
- FIG. 4 is a schematic diagram of a display interface of a network device according to an embodiment of the present invention.
- FIG. 5 is a schematic structural diagram of a time synchronization device according to an embodiment of the present invention.
- FIG. 6 is a schematic structural diagram of a time synchronization device according to an embodiment of the present invention.
- FIG. 7 is a schematic diagram of a hardware structure of a network device according to an embodiment of the present invention.
- the full name of the IEEE 1588 time synchronization protocol is the precision clock synchronization protocol standard for the network measurement and control system (IEEE 1588 Precision Clock Synchronization Protocol), referred to as Precision Time Protocol (PTP). It supports time synchronization between master and slave devices through packet exchange, with sub-subtle time synchronization accuracy.
- the 1588 time synchronization system can be implemented in pure software.
- the CPU implements the 1588 protocol stack to complete the sending and receiving of PTP packets, time stamp processing, and time synchronization.
- Using a CPU-only software to implement the 1588 time synchronization system has some advantages: simple implementation, only need to maintain the 1588 protocol stack, has nothing to do with the underlying hardware; fast synchronization convergence; low cost, etc.
- the packet sending rate of PTP packets is low.
- due to the uncertainty of the delay of the path from the device port to the CPU and the delay of software processing this time method cannot achieve high accuracy.
- the 1588 time synchronization system can be implemented by a combination of CPU software and underlying hardware.
- the CPU software is responsible for the operation of the protocol stack, and sends the calculation result of each synchronous message transmission and adjustment to the underlying hardware.
- the underlying hardware is responsible for measuring and correcting the delay of messages on the device's internal transmission path.
- this method generally does not perform or simply suppresses the filtering during the time stamp calculation and processing. Therefore, the time synchronization result is very sensitive to network oscillation and noise interference, and the stability of time synchronization is poor.
- a special 1588 function chip can be considered when designing the 1588 time synchronization system solution.
- the 1588 function chip can run the 1588 protocol stack independently of the CPU, send and receive PTP packets, and perform time stamp processing and operations.
- the CPU only needs to do the configuration management of the 1588 function chip. Compared with running the entire 1588 protocol stack, the CPU overhead is negligible.
- the 1588 function chip performs sliding window filtering on the message data during synchronization.
- This process can prevent the clock time synchronization from being affected by network oscillations, but at the same time, the sliding window filtering process also increases the length of time when the synchronization tends to stabilize, and although the larger the sliding window, the better the effect of preventing network oscillations, but the time synchronization reaches The longer it takes to stabilize the state. Especially when the start synchronization time of the 1588 function chip is too different from the time of the peer device, the time required for synchronization convergence will be significantly increased.
- S102 The processor performs time synchronization on the system clock according to the time synchronization protocol.
- the slave device synchronizes its system clock time with the master device time. Therefore, in this embodiment, the time synchronization method may be performed by a slave device. After the time synchronization starts, the slave device can control the processor of the device to synchronize the system clock of the device according to the time synchronization protocol.
- processor time synchronization of the system clock refers to the scenario where the processor performs the main tasks such as running the protocol stack when the system clock is time synchronized, rather than the processor simply participating in the system clock For example, if the processor only configures the parameters of the time synchronization chip and does not perform other tasks of time synchronization, this situation cannot be regarded as the processor performing time synchronization.
- the following describes the process of the processor synchronizing the system clock according to the time synchronization protocol, for example:
- the slave device control processor runs the time synchronization protocol stack, performs time synchronization message transmission and reception with the master device, and then calculates the time deviation between the device and the master device based on the message timestamp, and then the system clock time according to the calculation result. Make adjustments to achieve time synchronization with the system clock of this device.
- the slave device controls the processor according to the time synchronization protocol.
- the time of the system clock can be synchronized quickly.
- the control processor synchronizes the time of the system clock
- the slave device detects the current time synchronization of the system clock to determine whether the time synchronization of the system clock is satisfied to reach a stable state.
- the slave device can control the switching and the time synchronization chip continues to time synchronize the system clock.
- the time synchronization of the time synchronization chip can overcome the process of synchronization not converging, thereby avoiding the problem of slow synchronization convergence speed of the time synchronization chip.
- the slave device detects whether the time synchronization of the system clock has reached a stable state while performing time synchronization with the controller processor. Once it detects that the time synchronization of the system clock has reached a stable state, it switches the The time synchronization chip continues to time synchronize the system clock.
- the processor may continue to perform time synchronization for a period of time, and then switch to the synchronization phase where the time synchronization chip performs synchronization.
- the time synchronization accuracy of the system clock meets the requirements; second, the time synchronization of the system clock tends to be stable, that is, the time difference between the system clock and the master device does not fluctuate much.
- the slave device In order to determine whether the time synchronization of the system clock has reached a stable state, after the slave device calculates the time difference between the current time of the system clock and the time of the master device, the slave device will perform a synchronization check to determine the system clock of the device and the master device. Whether the time deviation ⁇ t between the devices is smaller than the preset deviation ⁇ Th.
- the slave device determines that N consecutive detection results in ⁇ t are less than ⁇ Th in K consecutive detections, it can be determined that the time synchronization of the system clock of the device has reached a stable state. For example, if K is set to 50 and N is set to 45, at least 45 of the last 50 synchronous detections of the slave device have a detection result of ⁇ t less than ⁇ Th, and it can be determined that the time synchronization of the system clock has reached stability. status.
- ⁇ t is less than ⁇ Th
- the slave device detects that the time deviation ⁇ t between the system clock and the master device is less than the preset deviation ⁇ Th for 5 consecutive times, it can be determined that the time synchronization of the system clock has reached a stable state, and time synchronization can be switched.
- the chip continues to time synchronize the system clock.
- the general process of time synchronization of the system clock by the time synchronization chip is basically similar to the general process of time synchronization of the system clock by the processor: the time synchronization chip is independent of the processor time synchronization protocol stack, allowing the time between the slave device and the master device Synchronize the sending and receiving of messages, and calculate the time deviation between this device and the master device, and adjust the system clock time based on the time deviation.
- the so-called “continue” means that the time synchronization chip synchronizes the system clock based on the time synchronization performed by the processor. Therefore, when switching to the time synchronization chip for time synchronization, the slave device Should ensure that the time synchronization chip first obtains the current time of the system clock.
- the process of switching from the time synchronization of the system clock by the processor to the time synchronization of the system clock by the time synchronization chip can be shown in the flowchart of FIG. 2:
- the slave device In the process of time synchronization of the system clock by the control processor, the slave device will simultaneously detect whether the time synchronization of the system clock has reached a stable state. If the detection result indicates that the current state has reached a stable state, the slave device can control the system clock to time. The synchronization chip outputs the time so that the time synchronization chip can lock the time of the system clock. This process enables the time synchronization chip to obtain the synchronization result of the processor for time synchronization. The synchronization result will be used as the basis for the subsequent time synchronization of the time synchronization chip.
- the slave device After detecting that the time synchronization chip has locked the time of the system clock output, the slave device can control the time synchronization chip to time synchronize the system clock and stop the processor from synchronizing the system clock time. After that, the synchronization time received by the system clock should be output by the time synchronization chip.
- the time synchronization process of the time synchronization chip to the system clock is substantially similar to the time synchronization process of the processor to the system clock, in this embodiment, the time synchronization chip performs sliding window on the received and transmitted message data.
- the filtering process can prevent the time synchronization result of the system clock from being affected by network oscillation and interference noise. Therefore, the time synchronization method provided in this embodiment can combine the advantages of fast synchronization convergence when the processor performs time synchronization and the advantages of good synchronization stability and high synchronization accuracy when the time synchronization chip performs time synchronization.
- the so-called time synchronization protocol in this embodiment may be the PTP protocol, and the time synchronization chip may be a 1588 function chip, or another chip for time synchronization that has similar functions to the 1588 function chip.
- the 1588 function chip has a greater advantage in the packet sending rate than the way in which the processor runs the PTP protocol stack, and can well cope with scenarios that require higher message sending and receiving rates such as frequency recovery.
- the time synchronization method provided in this embodiment first uses a processor to run a time synchronization protocol stack to time synchronize the system clock, so that the time-to-time synchronization quickly converges. After determining that the time synchronization of the system clock is in a stable state, you can switch to a time synchronization chip and continue the subsequent time synchronization based on the time synchronization result of the processor, so that the time synchronization has better synchronization accuracy and stability, and improve the system Clock synchronization effect.
- time synchronization chip Because the time synchronization chip has a better message sending and receiving rate, it is suitable for frequency synchronization of the system clock and can meet the needs of scenarios such as frequency reply.
- the time synchronization protocol is a 1588 time synchronization protocol, that is, the PTP protocol, and the time synchronization chip is a 1588 function chip.
- the system clock can be realized by a Field-Programmable Gate Array (FPGA), and provided to each device, module, etc. that needs to use system time in the device.
- FIG. 3 is a flowchart of a time synchronization method according to an embodiment of the present invention. Referring to FIG. 3, a time synchronization method provided by an embodiment of the present invention includes:
- S302 The processor performs time synchronization on the system clock according to the time synchronization protocol.
- the slave device control processor runs the time synchronization protocol stack according to the time synchronization protocol, performs message interaction with the master device, calculates the time deviation from the master device based on the message timestamp, and performs the system clock time based on the time deviation. Adjustment. It should be understood that when the processor synchronizes the protocol stack at runtime, it controls the communication unit of the slave device to send and receive messages with the master device.
- the judgment result is yes, it means that the time synchronization of the system clock has reached a stable state, so it can proceed to S306; otherwise, it means that the time synchronization of the system clock has not reached a stable state, so it is necessary to continue to execute S302.
- it is detected whether the time synchronization of the system clock reaches a stable state, and whether the time deviation ⁇ t between the system clock and the master device is less than a preset deviation ⁇ Th has reached a preset number of times.
- the value of the preset number of times is related to the currently synchronized network environment. For example, in a synchronous environment with synchronous Ethernet support, the value of the preset number of times can be appropriately reduced. In a synchronous environment that does not support synchronous Ethernet, such as a simple 1588 synchronization environment, the value of the preset number of times can be appropriately increased.
- the value of ⁇ Th is also related to the current synchronization network environment. In the synchronization environment with synchronous Ethernet support, the value of ⁇ Th can be appropriately reduced. In the environment that does not support synchronous Ethernet, such as pure 1588 synchronization, , You can appropriately increase the value of ⁇ Th.
- the value of ⁇ Th cannot be lower than the synchronization accuracy supported by the slave device.
- the value of ⁇ Th should be greater than or equal to 8ns.
- the value of ⁇ Th is usually greater than 8ns.
- S306 Control the system clock to output time to the time synchronization chip.
- the slave device After the slave device detects that the time synchronization of the system clock has reached a stable state, the slave device can control the system clock to output time to the time synchronization chip, that is, let the system clock transmit the time synchronization result of the processor to the time synchronization chip.
- the slave device controls to switch to allow the system clock to synchronize time according to the output of the time synchronization chip.
- the processor does not need to run the time synchronization protocol stack to send messages to the master device. Interaction, which can greatly reduce the processing overhead of the processor.
- the time synchronization chip runs the time synchronization protocol stack to send and receive messages at a rate that can meet the requirements of frequency recovery, after controlling the time synchronization chip to continue time synchronization with the system clock, the frequency of the system clock can also be synchronized with the master device. Frequency.
- the slave device While controlling the time synchronization chip to time synchronize the system clock, the slave device also detects the work of the time synchronization chip to determine whether the time synchronization chip is in an abnormal state, such as whether the time synchronization chip is faulty. If the time synchronization chip is determined, If it is in an abnormal state, it proceeds to S312, otherwise it continues to S308.
- S312 Switch the processor to time synchronize the system clock.
- the slave device can control the switch to the processor to time synchronize the system clock, so that the system clock no longer performs time synchronization based on the output of the time synchronization chip. At this time, the slave device can control the time synchronization to be turned off. chip. In addition, the slave device can also send an alarm message to remind the manager of the slave device that the time synchronization chip is abnormal, so that the manager can handle the abnormal situation in time.
- FIG. 4 shows a schematic diagram of a display interface that sends a prompt message to a manager after a network device detects a failure of a 1588 function chip. It should be understood that in addition to displaying a way to prompt the manager, the network device also Alarms can be issued by sounding prompts and sounds.
- the slave device will no longer switch time synchronization mode based on the system clock time synchronization reaching a stable state, so the slave device does not need to detect the system clock again. Whether the time synchronization has reached a steady state.
- the time synchronization method provided in this embodiment not only integrates the advantages of the scheme of using the processor to run the protocol stack for time synchronization and the scheme of using the time synchronization chip for time synchronization, so that the entire time synchronization process shows fast synchronization convergence and synchronization. It has the advantages of high accuracy and good synchronization stability; moreover, it can also use the advantages of time synchronization chip message transmission and reception speed to synchronize the system clock frequency.
- the slave device In the process of using the time synchronization chip to synchronize the system clock, the slave device also monitors whether the time synchronization chip is faulty and switches to the processor to continue time synchronization when the time synchronization chip fails to work normally, avoiding time synchronization. When the chip has a hardware failure, it cannot output or the output clock is abnormal, which seriously affects the normal operation of the system.
- the time synchronization device 50 includes a software synchronization module 502 and a chip synchronization module 504.
- the first synchronization module 502 is configured to control the processor to time synchronize the system clock according to the time synchronization protocol, and the synchronization detection module 504 is configured to detect whether the time synchronization of the system clock has reached a stable state; the second synchronization module 506 is configured to After the detection result of the synchronization detection module 504 is yes, the time synchronization chip continues to time synchronize the system clock.
- the time synchronization device 50 may be deployed on various network devices as slave devices.
- the first synchronization module 502 can time synchronize the system clock of the device according to the time synchronization protocol. It should be understood that the so-called first synchronization module 502 time-synchronizes the system clock here refers to the scenario where the first synchronization module 502 performs the main work such as running the protocol stack when the system clock is time-synchronized, rather than the first A synchronization module 502 simply participates in the time synchronization of the system clock.
- the synchronization module 502 performs time synchronization.
- the following describes the process of time synchronization of the system clock by the first synchronization module 502 according to the time synchronization protocol, for example:
- the first synchronization module 502 runs a time synchronization protocol stack, performs time synchronization message transmission and reception with the master device, and then calculates the time deviation between the device and the master device according to the message timestamp, and then according to the calculation result, the time of the system clock Make adjustments to achieve time synchronization with the system clock of this device.
- the first synchronization module 502 runs the time synchronization protocol stack to time synchronize the system clock, it only performs simple suppression filtering or does not perform time filtering at all. Therefore, the first synchronization module 502 When the synchronization protocol synchronizes the system clock, the time of the system clock can reach synchronization convergence relatively quickly.
- the synchronization detection module 504 detects the current time synchronization of the system clock to determine whether the time synchronization of the system clock has reached a stable state.
- the second synchronization module 506 may control switching to continue the time synchronization of the system clock by the time synchronization chip. In this way, when time synchronization is switched by the time synchronization chip, the time synchronization of the time synchronization chip can overcome the process of synchronization not converging, thereby avoiding the problem of slow synchronization convergence speed of the time synchronization chip. In some embodiments, while the first synchronization module 502 controller is performing time synchronization, the synchronization detection module 504 detects whether the time synchronization of the system clock has reached a stable state.
- the second synchronization module 506 immediately controls switching to continue time synchronization by the time synchronization chip.
- the first synchronization module 502 can also continue to use the processor for a period of time synchronization after the synchronization detection module 504 detects that the time synchronization of the system clock has reached a stable state, and then the second synchronization module 506 Only switched to the synchronization phase for synchronization by the time synchronization chip.
- the synchronization detection module 504 will perform a synchronization test to determine the system clock of the device after the processor calculates the time deviation between the current time of the system clock and the time of the master device. Whether the time deviation ⁇ t from the master device is smaller than a preset deviation ⁇ Th.
- the synchronization detection module 504 determines that there are N detection results of ⁇ t less than ⁇ Th in the K consecutive detections, it can be determined that the time synchronization of the system clock of the device has currently reached a stable state. For example, if K is set to 50 and N is set to 45, at least 45 of the last 50 synchronization tests performed by the synchronization detection module 504 have at least 45 detection results with ⁇ t less than ⁇ Th, and it can be determined that the time synchronization of the system clock has been Reached steady state.
- the time synchronization chip continues to time synchronize the system clock.
- the general process of the second synchronization module 506 controlling the time synchronization chip to synchronize the system clock is basically similar to the general process of the processor to synchronize the system clock time: the second synchronization module 506 controls the time synchronization chip to be independent of the processor runtime synchronization protocol
- the stack sends and receives time synchronization messages with the master device, calculates the time deviation between the device and the master device, and adjusts the system clock time based on the time deviation.
- the so-called “continue” means that the time synchronization chip synchronizes the system clock based on the time synchronization performed by the processor. Therefore, when switching to the time synchronization chip for time synchronization, the second The synchronization module 506 should ensure that the time synchronization chip first obtains the current time of the system clock.
- the synchronization detection module 504 simultaneously detects whether the time synchronization of the system clock has reached a stable state. If the detection result indicates that the current state has reached a stable state, the first The two synchronization modules 506 can control the system clock to output time to the time synchronization chip, so that the time synchronization chip can lock the time of the system clock. This process enables the time synchronization chip to obtain the synchronization result of the processor for time synchronization. The synchronization result will be used as Time synchronization chip is the basis for subsequent time synchronization.
- the second synchronization module 506 can control the time synchronization chip to time synchronize the system clock and stop the processor from synchronizing the system clock time. After that, the synchronization time received by the system clock should be output by the time synchronization chip.
- the time synchronization chip performs sliding windowing on the received and transmitted message data.
- the filtering process can prevent the time synchronization result of the system clock from being affected by network oscillation and interference noise. Therefore, the time synchronization device 50 provided in this embodiment can combine the advantages of fast synchronization convergence when the processor performs time synchronization and the advantages of good synchronization stability and high synchronization accuracy when the time synchronization chip performs time synchronization.
- the time synchronization protocol may be a PTP protocol
- the time synchronization chip may be a 1588 function chip, or other chips having time similar functions to the 1588 function chip for time synchronization.
- the 1588 function chip has a greater advantage in the packet sending rate than the way in which the processor runs the PTP protocol stack, and can well cope with scenarios that require higher message sending and receiving rates such as frequency recovery.
- the time synchronization device first uses a processor to run a time synchronization protocol stack to time synchronize the system clock, so that the time-to-time synchronization quickly converges. After determining that the time synchronization of the system clock is in a stable state, you can switch to a time synchronization chip and continue the subsequent time synchronization based on the time synchronization result of the processor, so that the time synchronization has better synchronization accuracy and stability, and improve the system Clock synchronization effect.
- time synchronization chip Because the time synchronization chip has a better message sending and receiving rate, it is suitable for frequency synchronization of the system clock and can meet the needs of scenarios such as frequency reply.
- the time synchronization protocol is the 1588 time synchronization protocol, that is, the PTP protocol, and the time synchronization chip is a 1588 function chip.
- the time synchronization protocol is the 1588 time synchronization protocol, that is, the PTP protocol
- the time synchronization chip is a 1588 function chip.
- the time synchronization device 60 includes a first synchronization module 602, a synchronization detection module 604, and a second synchronization module 606, and further includes an exception handling module 608, where the first synchronization
- the module 602, the synchronization detection module 604, and the second synchronization module 606 are similar in function to each module in FIG. 5, and the exception processing module 608 is configured to control the processor to continue to perform system operation on the system according to the time synchronization protocol when the synchronization chip is in an abnormal state.
- the clock is time synchronized. The following describes the process of time synchronization of the slave system clock by the time synchronization device 60:
- the first synchronization module 602 controls the processor to run the time synchronization protocol stack according to the time synchronization protocol, to perform message interaction with the master device, and to calculate a time deviation from the master device according to the message timestamp, and to use the time deviation to the system clock. Time to adjust. It should be understood that when the processor synchronizes the protocol stack at runtime, the processor sends and receives messages to and from the master device by controlling the communication unit of the slave device.
- the synchronization detection module 604 can detect whether the time synchronization of the system clock has reached a stable state. If the determination result of the synchronization detection module 604 is yes, it indicates that the time synchronization of the system clock has reached a stable state, and therefore, the second synchronization module 606 can start to work. Otherwise, it means that the time synchronization of the system clock has not reached a stable state, so the first synchronization module 602 will continue to work.
- the synchronization detection module 604 detects whether the time synchronization of the system clock has reached a stable state, and can detect whether the time deviation ⁇ t between the system clock and the master device is less than a preset deviation ⁇ Th reaches a preset number of times.
- the value of the preset number of times is related to the currently synchronized network environment. For example, in a synchronous environment with synchronous Ethernet support, the value of the preset number of times can be appropriately reduced. In a synchronous environment that does not support synchronous Ethernet, such as a simple 1588 synchronization environment, the value of the preset number of times can be appropriately increased.
- the value of ⁇ Th is also related to the current synchronization network environment. In the synchronization environment with synchronous Ethernet support, the value of ⁇ Th can be appropriately reduced. In the environment that does not support synchronous Ethernet, such as pure 1588 synchronization, , You can appropriately increase the value of ⁇ Th.
- the value of ⁇ Th cannot be lower than the synchronization accuracy supported by the slave device.
- the value of ⁇ Th should be greater than or equal to 8ns.
- the value of ⁇ Th is usually greater than 8ns.
- the second synchronization module 606 can control the system clock to output time to the time synchronization chip, that is, let the system clock transmit the time synchronization result of the processor to the time synchronization chip.
- the second synchronization module 606 controls the switching so that the system clock performs time synchronization according to the output of the time synchronization chip.
- the processor does not need to run the time synchronization protocol stack and the master device again. The message interaction is performed, so the processing overhead of the processor can be greatly reduced.
- the time synchronization chip runs the time synchronization protocol stack to send and receive messages at a rate that can meet the requirements of frequency recovery, after controlling the time synchronization chip to continue time synchronization with the system clock, the frequency of the system clock can also be synchronized with the master device. Frequency.
- the exception handling module 608 While controlling the time synchronization chip to time synchronize the system clock, the exception handling module 608 detects the work of the time synchronization chip to determine whether the time synchronization chip is in an abnormal state, such as whether the time synchronization chip is faulty. If it is determined that the time synchronization If the chip is in an abnormal state, enter the exception handling module 608 to switch the time synchronization of the system clock by the processor, so that the system clock no longer performs time synchronization based on the output of the time synchronization chip. At this time, the exception handling module 608 can control the time synchronization chip to be turned off. .
- the exception handling module 608 can also allow the slave device to send an alarm message to prompt the management personnel of the slave device to synchronize the chip abnormality in time, so that the management personnel can handle the abnormal situation in time.
- FIG. 4 shows a schematic diagram of a display interface that sends a prompt message to a manager after a network device detects a failure of a 1588 function chip. It should be understood that in addition to displaying a way to prompt the manager, the network device also Alarms can be issued by sounding prompts and sounds.
- the second synchronization module 606 will no longer switch the time synchronization mode according to the system clock time synchronization reaching a stable state, so the synchronization detection module 604 does not need to Then check whether the time synchronization of the system clock has reached a stable state. Therefore, both the synchronization detection module 604 and the second synchronization module 606 can be in a sleep state.
- the time synchronization apparatus may be deployed on a network device, wherein functions of the first synchronization module, the synchronization detection module, the second synchronization module, and the exception handling module may be implemented by a processor of the network device.
- the time synchronization device not only integrates the advantages of a scheme in which a processor runs a protocol stack for time synchronization and a scheme in which a time synchronization chip is used for time synchronization, so that the entire time synchronization process shows fast synchronization convergence. It has the advantages of high synchronization accuracy and good synchronization stability; moreover, it can also use the advantages of time synchronization chip message transmission and reception speed to synchronize the system clock frequency.
- the slave device In the process of using the time synchronization chip to synchronize the system clock, the slave device also monitors whether the time synchronization chip is faulty and switches to the processor to continue time synchronization when the time synchronization chip fails to work normally, avoiding time synchronization. When the chip has a hardware failure, it cannot output or the output clock is abnormal, which seriously affects the normal operation of the system.
- An embodiment of the present invention also provides a computer-readable storage medium.
- the computer-readable storage medium may store one or more computer programs that can be read, compiled, and executed by one or more processors.
- a time synchronization program may be stored, and the time synchronization program may be used by one or more processors to implement the foregoing time synchronization method provided by the embodiment of the present invention.
- An embodiment of the present invention further provides a network device.
- a network device Refer to a schematic diagram of a hardware structure of the network device 7 shown in FIG. 7:
- the network device 7 includes a processor 71, a memory 72, a time synchronization chip 73, a communication unit 74, and a communication bus 75 configured to implement a communication connection between the processor 71 and the memory 72, the time synchronization chip 73, and the communication unit 74, respectively.
- the memory 72 may be the foregoing storage medium storing the time synchronization program.
- the processor 71 may read the time synchronization program stored in the memory 72, compile and execute the time synchronization method provided by the embodiment of the present invention.
- the processor 71 of the network device 7 performs time synchronization on the system clock of the device according to a time synchronization program, which may be performed according to the 1588 time synchronization protocol, and the time synchronization chip 73 may also be a 1588 function chip.
- a time synchronization program which may be performed according to the 1588 time synchronization protocol
- the time synchronization chip 73 may also be a 1588 function chip.
- the processor 71 may run a time synchronization protocol stack, such as the 1588 time synchronization protocol stack, and control the communication unit 74 to perform message interaction with the master device, calculate the time deviation between the device and the master device according to the message time stamp, and according to the time The deviation adjusts the system time of the device synchronously.
- the processor 71 runs the protocol stack to synchronize the time of the system clock, it also detects whether the time synchronization of the system clock has reached a stable state. If the detection result is yes, the processor 71 notifies the time synchronization chip 73 to continue to synchronize the system clock. Time. In some embodiments, the processor 71 may notify the system clock, for example, the FPGA chip outputs the time to the time synchronization chip 73.
- the processor 71 may stop running the time synchronization protocol stack.
- the time synchronization chip 73 independently runs a time synchronization protocol stack to synchronize the system clock.
- the processor 71 can also monitor the working status of the time synchronization chip 73. If it is determined that the time synchronization chip 73 is in an abnormal state, for example, the time synchronization chip 73 is faulty, then the processing is performed. The processor 71 will continue to run the protocol stack to time synchronize the system clock. At the same time, the processor 71 may control the abnormal time synchronization chip 73 to be turned off, so as to prevent the time synchronization chip 73 from outputting incorrect synchronization information to the system clock.
- the network device and the computer-readable storage medium provided in this embodiment ensure fast synchronization convergence speed, high synchronization accuracy, and good synchronization stability of the system clock time synchronization.
- the processor can be immediately switched to continue the time synchronization by the processor, which avoids the problem that the hardware failure of the time synchronization chip affects the normal operation of the system.
- modules or steps of the embodiments of the present invention described above can be implemented by a general-purpose computing device, which can be centralized on a single computing device or distributed by multiple computing devices.
- they can be implemented with program code executable by a computing device, so that they can be stored in a computer storage medium (Read-Only Memory (ROM, Read-Only Memory) / Random Access Memory ( RAM, Random Access (Memory, Disk, CD-ROM) are executed by a computing device, and in some cases, the steps shown or described can be performed in a different order than here, or they can be made separately Integrated circuit modules, or multiple modules or steps made into a single integrated circuit module for implementation. Therefore, the present invention is not limited to any specific combination of hardware and software.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Synchronisation In Digital Transmission Systems (AREA)
- Electric Clocks (AREA)
Abstract
本发明公开了一种时间同步方法、装置、网络设备及计算机可读存储介质,方法包括:处理器先根据时间同步协议对系统时钟进行时间同步,并在确定系统时钟的时间同步达到稳定状态后,切换由时间同步芯片继续对系统时钟进行时间同步。
Description
相关申请的交叉引用
本申请基于申请号为201810631978.6、申请日为2018年06月19日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。
本发明涉及但不限于通信领域,尤其涉及一种时间同步方法、装置、网络设备及计算机可读存储介质。
随着第五代移动通信(5th Generation,5G)网络技术的兴起,以及5G相关应用需求、时钟技术标准的推动,电气和电子工程师协会(Institute of Electrical and Electronics Engineers,IEEE)1588时间同步协议在网络时钟时间同步上起到了重要的作用。作为全球定位系统(Global Positioning System,GPS)时间源的重要备份,1588时钟为整个通讯网络提供高精度的时钟时间同步功能,为网络通讯业务的正常运行提供有力的支撑和保障。
相关技术中可以通过网络设备的中央处理器(Central Processing Unit,CPU)运行1588时间同步协议栈,与主设备交互从而实现对系统时钟的同步。不过由于从网络设备端口到CPU的路径时延不确定,因此这种时间同步方案精度不高。而且考虑到CPU的处理能力和处理速度,一般在时戳计算和处理时不做或者只做简单的抑制滤波处理。所以这种方案还具有对网络震荡和噪声干扰敏感,稳定性差的缺陷。
发明内容
有鉴于此,本发明实施例期望提供一种时间同步方法、装置、网络设备及计算机可读存储介质,以解决相关技术中时间同步方案精度低、稳定性差的问题。
本发明实施例提供一种时间同步方法,包括:
处理器根据时间同步协议对系统时钟进行时间同步;
在确定系统时钟的时间同步达到稳定状态时,切换由时间同步芯片继续对系统时钟进行时间同步。
上述方案中,切换由同步芯片继续对系统时钟进行时间同步包括:
控制系统时钟向时间同步芯片输出时间;
在时间同步芯片锁定系统时钟的时间后,控制时间同步芯片对系统时钟进行时间同步,并停止处理器对系统时钟的时间同步。
上述方案中,确定系统时钟的时间同步达到稳定状态包括:
确定在连续K次同步检测中,本设备与主设备间的时间偏差Δt小于预设偏差ΔTh的次数达到N次,N与K均为大于0的正整数,且K大于等于N。
上述方案中,N等于K。
上述方案中,时间同步协议为网络测量和控制系统的精密时钟同步协议标准(Precision Timing Protocol,PTP)。
上述方案中,控制同步芯片继续对系统时钟进行时间同步之后,还包括:
在同步芯片处于异常状态时,控制处理器继续根据时间同步协议对系统时钟进行时间同步。
本发明实施例还提供一种时间同步装置,包括:
第一同步模块,配置为根据时间同步协议对系统时钟进行时间同步;
同步检测模块,配置为检测系统时钟的时间同步是否达到稳定状态;
第二同步模块,配置为在确定系统时钟的时间同步达到稳定状态后,切换由时间同步芯片继续对系统时钟进行时间同步。
本发明实施例还提供一种网络设备,包括处理器、存储器、时间同步芯片、通信单元及通信总线;
通信总线,配置为实现处理器分别同存储器、时间同步芯片以及通信单元之间的连接通信;
处理器,配置为执行存储器中存储的一个或者多个程序,以实现本发明实施例提供的上述时间同步方法的步骤。
上述方案中,时间同步芯片为1588功能芯片。
本发明实施例还提供一种计算机存储介质,计算机可读存储介质存储有一个或者多个程序,一个或者多个程序可被一个或者多个处理器执行,以实现本发明实施例提供的上述时间同步方法的步骤。
应用本发明实施例的有益效果是:
根据本发明实施例提供的时间同步方法、装置、网络设备及计算机可读存储介质,处理器先根据时间同步协议对系统时钟进行时间同步,并在系统时钟的时间同步达到稳定状态时,切换由时间同步芯片继续对系统时钟进行时间同步。由于处理器根据时间同步协议进行时间同步的方案具有同步收敛速度快的优点,因此在时间同步的开始使用该方案能够使得本设备与主设备之间的时间偏差快速收敛。由于时间同步芯片会对与主设备间的报文数据进行充分的抑制滤波处理,因此系统时钟的时间同步达到稳定状态后切换由时间同步芯片继续进行时间同步,能够避免网络震荡、干扰噪声等对时间同步结果的影响,从而提升了系统时钟时间同步的同步稳定性和同步精度。
图1为本发明实施例提供的时间同步方法的一种流程图;
图2为本发明实施例提供的切换由时间同步芯片对系统时钟进行时间同步的一种流程图;
图3为本发明实施例提供的时间同步方法的一种流程图;
图4为本发明实施例提供的一种网络设备的显示界面示意图;
图5为本发明实施例提供的时间同步装置的一种结构示意图;
图6为本发明实施例提供的时间同步装置的一种结构示意图;
图7为本发明实施例提供的网络设备的一种硬件结构示意图。
为了使本发明的目的、技术方案及优点更加清楚明白,下面通过具体实施方式结合附图对本发明实施例作进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本发明,并不用于限定本发明。
IEEE 1588时间同步协议的全称是网络测量和控制系统的精密时钟同步协议标准(IEEE 1588 Precision Clock Synchronization Protocol),简称精确时间协议(Precision timing Protocol,PTP)。其支持主从设备之间通过包交换的方式进行时间同步,具有亚微妙级的时间同步精度。1588时间同步系统可以用纯软件的方式来实现,例如利用CPU实现1588协议栈,完成PTP报文的收发、时间戳处理和时间同步。利用CPU纯软件的方式实现1588时间同步系统具有这样一些优点:实现简单,只需要维护1588协议栈,与底层的硬件无关;同步收敛快;成本低等。但是,受CPU的性能限制,PTP报文的发包速率较低。并且,由于报文从设备端口到CPU的这一段路径时延的不确定性以及软件处理的延时性,导致这种时间方式无法达到很高的精度。
为了提高时间同步的精度,可以通过CPU软件和底层硬件结合的方式 来实现1588时间同步系统。CPU软件负责协议栈运行,将每次收发报文同步的计算结果下发调整底层硬件。底层硬件负责报文在设备内部传输路径上的延时测量和修正。通过这种方式能够极大的提高网络设备的时间同步精度(可以达到纳秒级),而且同步收敛速度非常快。但是考虑到CPU的处理能力和速度,这种方式一般在时戳计算和处理时不做或者只做简单的抑制滤波处理。因此使得时间同步结果对于网络震荡和噪声干扰非常敏感,时间同步的稳定性较差。
为了摆脱上述方案中CPU软件实现的限制,在设计1588时间同步系统方案时可以考虑增加专门的1588功能芯片。1588功能芯片能够独立于CPU运行1588协议栈,收发PTP报文,进行时间戳处理和运算。CPU只需要做1588功能芯片的配置管理工作,相对于运行整个1588协议栈来说,CPU的开销可以忽略不计。1588功能芯片为了保证1588时间同步的稳定性,在同步时对报文数据做了滑窗滤波处理。这种处理可以防止时钟时间同步受网络震荡的影响,但同时,滑窗滤波处理也增加了同步趋于稳定的时长,而且虽然滑窗越大,防止网络震荡的效果越好,但是时间同步达到稳定状态需要的时间也越长。特别是在1588功能芯片的起始同步时间和对端设备的时间差别太大的情况下,会明显增加同步收敛所需要的时长。
针对上述方案为了解决CPU纯软件实现时间同步时,同步精度与同步稳定性差的问题而采用1588功能芯片进行时间同步,在提升时间同步的精度与稳定性的同时,增加了同步收敛时长的问题,本实施例提供一种时间同步方案,请参见图1:
S102:处理器根据时间同步协议对系统时钟进行时间同步。
在两个网络设备进行交互时,需要保证两个网络设备的系统时间一致,在通常情况下,是由从设备根据主设备的时间同步自己系统时钟的时间。所以,在本实施例中,时间同步方法可以由从设备来执行。在时间同步开 始后,从设备可以控制本设备的处理器根据时间同步协议对本设备的系统时钟进行时间同步。应当理解的是,这里所谓的处理器对系统时钟进行时间同步,是指在对系统时钟进行时间同步时,处理器会进行运行协议栈等主要工作的情景,而非处理器简单地参与系统时钟的时间同步,例如如果处理器仅仅是对时间同步芯片进行参数配置,而不进行时间同步的其他工作,则这种情形不能算作是由处理器进行时间同步。下面对处理器根据时间同步协议对系统时钟进行时间同步的过程进行介绍,例如:
从设备控制处理器运行时间同步协议栈,与主设备之间进行时间同步报文收发,然后根据报文时间戳计算本设备与主设备之间的时间偏差,然后根据计算结果对系统时钟的时间进行调整,实现对本设备系统时钟的时间同步。
应当理解的是,由于处理器运行时间同步协议栈对系统时钟进行时间同步时,只会做简单的抑制滤波处理甚至是完全不做时间滤波处理,因此,从设备控制处理器根据时间同步协议对系统时钟进行同步时,能够使得系统时钟的时间较为快速的达到同步收敛。在控制处理器对系统时钟进行时间同步的同时,从设备会对系统时钟当前的时间同步进行检测,确定系统时钟的时间同步是否满足达到稳定状态。
S104:在确定系统时钟的时间同步达到稳定状态后,切换由时间同步芯片继续对系统时钟进行时间同步。
在确定系统时钟的时间同步达到稳定状态后,从设备可以控制切换由时间同步芯片继续对系统时钟进行时间同步。这样,当切换由时间同步芯片进行时间同步时,时间同步芯片的时间同步能够越过同步未收敛的过程,从而避免时间同步芯片同步收敛速度慢的问题。在本实施例的一种示例中,从设备在控制器处理器进行时间同步的同时,会检测系统时钟的时间同步是否达到稳定状态,一旦检测到系统时钟的时间同步达到稳定状态,就切 换由时间同步芯片继续对系统时钟进行时间同步。当然,在一些特殊的情形下,也可以在系统时钟的时间同步达到稳定状态以后,继续采用处理器进行一段时间的时间同步,然后才切换到由时间同步芯片进行同步的同步阶段。
系统时钟的同步达到稳定状态有这样两方面的要求:一、系统时钟的时间同步精度满足要求;二、系统时钟的时间同步趋于稳定,也即系统时钟与主设备间的时间差波动不大。为了确定系统时钟的时间同步是否达到稳定状态,从设备在处理器每一次计算出系统时钟当前时间与主设备时间之间的时间偏差后,就会做一次同步检测,确定本设备系统时钟与主设备之间的时间偏差Δt是否小于预设偏差ΔTh。如果从设备确定在连续的K次检测中,有N次检测结果均为Δt小于ΔTh,则可以判定本设备系统时钟的时间同步当前已达到稳定状态。例如,如果将K设置为50,N设置为45,则至少在从设备最近的50次同步检测中,存在至少45次的检测结果为Δt小于ΔTh,就可以判定系统时钟的时间同步已达到稳定状态。当然在本实施例的一些示例中,还可以将K和N的取值设置为相同,即N=K,在这种情况下,只要从设备确定已经有连续K次的检测结果均为Δt小于ΔTh,则可以判定系统时钟的时间同步达到稳定状态。例如,N=K=5,则只要从设备连续5次检测到系统时钟与主设备间的时间偏差Δt小于预设偏差ΔTh,就可以判定系统时钟的时间同步达到稳定状态,可以切换由时间同步芯片继续对系统时钟进行时间同步。
时间同步芯片对系统时钟进行时间同步的大体过程与处理器对系统时钟进行时间同步的大体过程基本相似:时间同步芯片独立于处理器运行时间同步协议栈,让从设备与主设备之间进行时间同步报文的收发,并计算本设备与主设备之间的时间偏差,并根据该时间偏差对系统时钟的时间进行调整。
应当理解的是,前面所谓的“继续”是指时间同步芯片是在处理器已进行的时间同步的基础上对系统时钟进行时间同步,因此,在切换到时间同步芯片进行时间同步时,从设备应当保证时间同步芯片先获取到系统时钟当前的时间。在本实施例中,从由处理器对系统时钟进行时间同步切换到由时间同步芯片对系统时钟进行时间同步的过程可以参见图2的流程图所示:
S202:控制系统时钟向时间同步芯片输出时间。
在控制处理器对系统时钟进行时间同步同步的过程中,从设备会同时检测系统时钟的时间同步是否满足达到稳定状态,如果检测结果表征当前已达到稳定状态,则从设备可以控制系统时钟向时间同步芯片输出时间,以使时间同步芯片能够锁定系统时钟的时间,该过程能够使得时间同步芯片获取到处理器进行时间同步的同步结果,该同步结果将作为时间同步芯片后续时间同步的基础。
S204:在时间同步芯片锁定系统时钟的时间后,控制时间同步芯片对系统时钟进行时间同步,并停止处理器对系统时钟的时间同步。
在检测到时间同步芯片已经锁定了系统时钟输出的时间后,从设备可以控制时间同步芯片对系统时钟进行时间同步,同时停止处理器对系统时钟的时间同步。此后,系统时钟所接收的同步时间应当是由时间同步芯片输出的。
应当明白的是,虽然时间同步芯片对系统时钟的时间同步过程与处理器对系统时钟的时间同步过程大体类似,但是,在本实施例中,时间同步芯片会对收发的报文数据进行滑窗滤波处理,因此可以防止系统时钟的时间同步结果受到网络震荡与干扰噪声的影响。所以,本实施例提供的时间同步方法,能够综合处理器进行时间同步时同步收敛快的优点以及时间同步芯片进行时间同步时同步稳定性好、同步精度高的优点。
本实施例中所谓的时间同步协议可以是PTP协议,时间同步芯片可以是1588功能芯片,或者是具有与1588功能芯片相似功能的用于时间同步的其他芯片。1588功能芯片在报文发包速率上比处理器运行PTP协议栈的方式存在较大的优势,可以很好的应对频率恢复等对报文收发速率要求较高的场景。
本实施例提供的时间同步方法,首先采用处理器运行时间同步协议栈,对系统时钟进行时间同步,从而时间时间同步快速收敛。在确定系统时钟的时间同步处于稳定状态后,可以切换采用时间同步芯片,以处理器的时间同步结果为基础继续进行后续时间同步,从而使得时间同步拥有较好的同步精度与稳定性,提升系统时钟的同步效果。
由于时间同步芯片具有较好的报文收发速率,因此,适合对系统时钟进行频率同步,能够应对频率回复等场景的需求。
在一些实施例中,以时间同步协议为1588时间同步协议,即PTP协议,时间同步芯片为1588功能芯片为例进行说明,不过本领域技术人员应当明白的是,这只是本实施例给出的一种示例,并不是本发明唯一的实现方式。另外,在从设备中,系统时钟可以通过现场可编程门阵列(Field-Programmable Gate Array,FPGA)来实现,并提供给设备内各个需要使用系统时间的器件、模块等。图3为本发明实施例提供的时间同步方法的一种流程图,参见图3,本发明实施例提供的时间同步方法包括:
S302:处理器根据时间同步协议对系统时钟进行时间同步。
从设备控制处理器根据时间同步协议运行时间同步协议栈,与主设备进行报文交互,并根据报文时间戳计算与主设备之间的时间偏差,并根据该时间偏差对系统时钟的时间进行调整。应当理解的是,处理器在运行时间同步协议栈的时候,是控制从设备的通信单元与主设备进行报文收发。
S304:检测系统时钟的时间同步是否达到稳定状态。
若判断结果为是,则说明系统时钟的时间同步当前已达到稳定状态,因此可以进入S306,否则的话说明系统时钟的时间同步尚未达到稳定状态,因此需要继续执行S302。在本实施例中,检测系统时钟的时间同步是否达到稳定状态,可以检测系统时钟与主设备之间的时间偏差Δt小于预设偏差ΔTh的连续次数是否达到预设次数。
应当理解的是,预设次数的取值与当前同步的网络环境相关。例如,在有同步以太网支持的同步环境下,可以适当减小预设次数的取值,在不支持同步以太网,如单纯的1588同步环境下,可以适当增大预设次数的取值。同样地,ΔTh的取值也与当前同步的网络环境有关,在有同步以太网支持的同步环境下,ΔTh的取值可以适当减小,在不支持同步以太网,如单纯1588同步的环境下,可以适当增大ΔTh的取值。不过ΔTh的取值不能低于从设备所支持的同步精度,例如对于自身支持的时间精度为8ns的从设备,ΔTh取值应当大于等于8ns。考虑到处理器的同步精度不高,因此,对于自身支持的时间精度为8ns的从设备,ΔTh取值通常大于8ns。
S306:控制系统时钟向时间同步芯片输出时间。
在从设备检测到系统时钟的时间同步达到稳定状态之后,从设备可以控制系统时钟向时间同步芯片输出时间,即让系统时钟将处理器的时间同步结果传输给时间同步芯片。
S308:控制时间同步芯片继续对系统时钟进行时间同步。
在确保时间同步芯片锁定系统时钟的时间后,从设备控制进行切换,让系统时钟根据时间同步芯片的输出进行时间同步,此时,处理器不需要再运行时间同步协议栈与主设备进行报文交互,因此可以在极大程度上降低处理器的处理开销。另外,由于时间同步芯片运行时间同步协议栈进行报文收发的速度可以满足频率恢复的要求,因此,在控制时间同步芯片继续对系统时钟进行时间同步后,也可以对系统时钟的频率与主设备的频率 进行同步。
S310:检测时间同步芯片是否处于异常状态。
在控制时间同步芯片对系统时钟进行时间同步的同时,从设备还会对时间同步芯片的工作进行检测,以确定时间同步芯片是否处于异常状态,例如时间同步芯片是否故障等,如果确定时间同步芯片处于异常状态,则进入S312,否则继续执行S308。
S312:切换由处理器对系统时钟进行时间同步。
如果确定时间同步芯片处于异常状态,则从设备可以控制切换为处理器对系统时钟进行时间同步,让系统时钟不再根据时间同步芯片的输出进行时间同步,此时,从设备可以控制关闭时间同步芯片。另外,从设备还可以发出告警信息,提示从设备的管理人员时间同步芯片异常,让管理人员及时对异常情况进行处理。图4示出了一种网络设备检测到1588功能芯片故障后,向管理人员发出提示信息的一种显示界面示意图,应当理解的是,除了通过显示对管理人员进行提示的方式以外,网络设备还可以通过发出提示音,发出提示语音等方式进行告警。
另外,在重新切回由处理器对系统时钟进行时间同步以后,从设备将不再根据系统时钟的时间同步达到稳定状态来进行时间同步方式的切换,因此从设备也不需要再检测系统时钟的时间同步是否达到稳定状态。
本实施例提供的时间同步方法,不仅综合了采用处理器运行协议栈进行时间同步的方案与采用时间同步芯片进行时间同步的方案各自的优点,使得整个时间同步过程表现出同步收敛速度快,同步精度高,同步稳定性好等优点;而且,还可以利用时间同步芯片报文收发速度快的优点对系统时钟进行频率同步。在采用时间同步芯片对系统时钟进行时间同步的过程中,从设备还会监测时间同步芯片是否故障,并在时间同步芯片不能正常工作时,切换到由处理器继续进行时间同步,避免了时间同步芯片发生硬 件故障的情况下,无法输出或者输出时钟异常,严重影响系统正常工作的问题。
本发明实施例提供一种时间同步装置,请参见图5,该时间同步装置50包括软件同步模块502以及芯片同步模块504。其中第一同步模块502,配置为控制处理器根据时间同步协议对系统时钟进行时间同步,而同步检测模块504,配置为检测系统时钟的时间同步是否达到稳定状态;第二同步模块506,配置为在同步检测模块504的检测结果为是后,切换由时间同步芯片继续对系统时钟进行时间同步。
在两个网络设备进行交互时,需要保证两个网络设备的系统时间一致,在通常情况下,是由从设备根据主设备的时间同步自己系统时钟的时间。所以,在一些实施例中,时间同步装置50可以部署在各种作为从设备上网络设备上。在时间同步开始后,第一同步模块502可以根据时间同步协议对本设备的系统时钟进行时间同步。应当理解的是,这里所谓的第一同步模块502对系统时钟进行时间同步,是指在对系统时钟进行时间同步时,第一同步模块502会进行运行协议栈等主要工作的情景,而非第一同步模块502简单地参与系统时钟的时间同步,例如如果第一同步模块502仅仅是对时间同步芯片进行参数配置,而不进行时间同步的其他工作,则这种情形不能算作是由第一同步模块502进行时间同步。下面对第一同步模块502根据时间同步协议对系统时钟进行时间同步的过程进行介绍,例如:
第一同步模块502运行时间同步协议栈,与主设备之间进行时间同步报文收发,然后根据报文时间戳计算本设备与主设备之间的时间偏差,然后根据计算结果对系统时钟的时间进行调整,实现对本设备系统时钟的时间同步。
应当理解的是,由于第一同步模块502运行时间同步协议栈对系统时钟进行时间同步时,只会做简单的抑制滤波处理甚至是完全不做时间滤波 处理,因此,第一同步模块502根据时间同步协议对系统时钟进行同步时,能够使得系统时钟的时间较为快速的达到同步收敛。在对系统时钟进行时间同步的同时,同步检测模块504会对系统时钟当前的时间同步进行检测,确定系统时钟的时间同步是否达到稳定状态。
在同步检测模块504确定系统时钟的时间同步达到稳定状态后,第二同步模块506可以控制切换由时间同步芯片继续对系统时钟进行时间同步。这样,当切换由时间同步芯片进行时间同步时,时间同步芯片的时间同步能够越过同步未收敛的过程,从而避免时间同步芯片同步收敛速度慢的问题。在一些实施例中,在第一同步模块502控制器处理器进行时间同步的同时,同步检测模块504会检测系统时钟的时间同步是否达到稳定状态,一旦检测到系统时钟的时间同步达到稳定状态,则第二同步模块506立即控制切换由时间同步芯片继续进行时间同步。当然,在一些特殊的情形下,第一同步模块502也可以在同步检测模块504检测到系统时钟的时间同步达到稳定状态以后,继续采用处理器进行一段时间的时间同步,然后第二同步模块506才切换到由时间同步芯片进行同步的同步阶段。
系统时钟的同步达到稳定状态有这样两方面的要求:一、系统时钟的时间同步精度满足要求;二、系统时钟的时间同步趋于稳定,也即系统时钟与主设备间的时间差波动不大。为了确定系统时钟的时间同步是否达到稳定状态,同步检测模块504在处理器每一次计算出系统时钟当前时间与主设备时间之间的时间偏差后,就会做一次同步检测,确定本设备系统时钟与主设备之间的时间偏差Δt是否小于预设偏差ΔTh。如果同步检测模块504确定在连续的K次检测中,有N次检测结果均为Δt小于ΔTh,则可以判定本设备系统时钟的时间同步当前已达到稳定状态。例如,如果将K设置为50,N设置为45,则至少在同步检测模块504最近的50次同步检测中,存在至少45次的检测结果为Δt小于ΔTh,就可以判定系统时钟的时 间同步已达到稳定状态。在一些实施例中,还可以将K和N的取值设置为相同,即N=K,在这种情况下,只同步检测模块504确定已经有连续K次的检测结果均为Δt小于ΔTh,则可以判定系统时钟的时间同步达到稳定状态。例如,N=K=5,则只要同步检测模块504连续5次检测到系统时钟与主设备间的时间偏差Δt小于预设偏差ΔTh,就可以判定系统时钟的时间同步达到稳定状态,可以切换由时间同步芯片继续对系统时钟进行时间同步。
第二同步模块506控制时间同步芯片对系统时钟进行时间同步的大体过程与处理器对系统时钟进行时间同步的大体过程基本相似:第二同步模块506控制时间同步芯片独立于处理器运行时间同步协议栈,与主设备之间进行时间同步报文的收发,并计算本设备与主设备之间的时间偏差,并根据该时间偏差对系统时钟的时间进行调整。
应当理解的是,前面所谓的“继续”是指时间同步芯片是在处理器已进行的时间同步的基础上对系统时钟进行时间同步,因此,在切换到时间同步芯片进行时间同步时,第二同步模块506应当保证时间同步芯片先获取到系统时钟当前的时间。
在第一同步模块502控制处理器对系统时钟进行时间同步同步的过程中,同步检测模块504会同时检测系统时钟的时间同步是否满足达到稳定状态,如果检测结果表征当前已达到稳定状态,则第二同步模块506可以控制系统时钟向时间同步芯片输出时间,以使时间同步芯片能够锁定系统时钟的时间,该过程能够使得时间同步芯片获取到处理器进行时间同步的同步结果,该同步结果将作为时间同步芯片后续时间同步的基础。
在检测到时间同步芯片已经锁定了系统时钟输出的时间后,第二同步模块506可以控制时间同步芯片对系统时钟进行时间同步,同时停止处理器对系统时钟的时间同步。此后,系统时钟所接收的同步时间应当是由时间同步芯片输出的。
应当明白的是,虽然时间同步芯片对系统时钟的时间同步过程与处理器对系统时钟的时间同步过程大体类似,但是,在一些实施例中,时间同步芯片会对收发的报文数据进行滑窗滤波处理,因此可以防止系统时钟的时间同步结果受到网络震荡与干扰噪声的影响。所以,本实施例提供的时间同步装置50,能够综合处理器进行时间同步时同步收敛快的优点以及时间同步芯片进行时间同步时同步稳定性好、同步精度高的优点。
在一些实施例中,时间同步协议可以是PTP协议,时间同步芯片可以是1588功能芯片,或者是具有与1588功能芯片相似功能的用于时间同步的其他芯片。1588功能芯片在报文发包速率上比处理器运行PTP协议栈的方式存在较大的优势,可以很好的应对频率恢复等对报文收发速率要求较高的场景。
本实施例提供的时间同步装置,首先采用处理器运行时间同步协议栈,对系统时钟进行时间同步,从而时间时间同步快速收敛。在确定系统时钟的时间同步处于稳定状态后,可以切换采用时间同步芯片,以处理器的时间同步结果为基础继续进行后续时间同步,从而使得时间同步拥有较好的同步精度与稳定性,提升系统时钟的同步效果。
由于时间同步芯片具有较好的报文收发速率,因此,适合对系统时钟进行频率同步,能够应对频率回复等场景的需求。
在一些实施例中,假定时间同步协议为1588时间同步协议,即PTP协议,时间同步芯片为1588功能芯片,不过本领域技术人员应当明白的是,这只是本实施例给出的一种示例,并不是本发明实施例唯一的实现方式。
请参见图6示出的时间同步装置的一种结构示意图:时间同步装置60包括第一同步模块602、同步检测模块604、第二同步模块606以外,还包括异常处置模块608,其中第一同步模块602、同步检测模块604、第二同步模块606与图5中各模块的功能对应类似,而异常处理模块608,配置为 在同步芯片处于异常状态时,控制处理器继续根据时间同步协议对系统时钟进行时间同步。下面对时间同步装置60对从设备系统时钟进行时间同步的过程进行介绍:
第一同步模块602控制处理器根据时间同步协议运行时间同步协议栈,与主设备进行报文交互,并根据报文时间戳计算与主设备之间的时间偏差,并根据该时间偏差对系统时钟的时间进行调整。应当理解的是,处理器在运行时间同步协议栈的时候,是通过控制从设备的通信单元与主设备进行报文收发。
在第一同步模块602控制处理器运行时间同步协议栈对系统时钟进行时间同步时,同步检测模块604可以检测系统时钟的时间同步是否达到稳定状态。若同步检测模块604的判断结果为是,则说明系统时钟的时间同步当前已达到稳定状态,因此,第二同步模块606可以开始工作。否则的话说明系统时钟的时间同步尚未达到稳定状态,所以会由第一同步模块602继续工作。在一些实施例中,同步检测模块604检测系统时钟的时间同步是否达到稳定状态,可以检测系统时钟与主设备之间的时间偏差Δt小于预设偏差ΔTh的连续次数是否达到预设次数。
应当理解的是,预设次数的取值与当前同步的网络环境相关。例如,在有同步以太网支持的同步环境下,可以适当减小预设次数的取值,在不支持同步以太网,如单纯的1588同步环境下,可以适当增大预设次数的取值。同样地,ΔTh的取值也与当前同步的网络环境有关,在有同步以太网支持的同步环境下,ΔTh的取值可以适当减小,在不支持同步以太网,如单纯1588同步的环境下,可以适当增大ΔTh的取值。不过ΔTh的取值不能低于从设备所支持的同步精度,例如对于自身支持的时间精度为8ns的从设备,ΔTh取值应当大于等于8ns。考虑到处理器的同步精度不高,因此,对于自身支持的时间精度为8ns的从设备,ΔTh取值通常大于8ns。
在同步检测模块604检测到系统时钟的时间同步达到稳定状态之后,第二同步模块606可以控制系统时钟向时间同步芯片输出时间,即让系统时钟将处理器的时间同步结果传输给时间同步芯片。
在确保时间同步芯片锁定系统时钟的时间后,第二同步模块606控制进行切换,让系统时钟根据时间同步芯片的输出进行时间同步,此时,处理器不需要再运行时间同步协议栈与主设备进行报文交互,因此可以在极大程度上降低处理器的处理开销。另外,由于时间同步芯片运行时间同步协议栈进行报文收发的速度可以满足频率恢复的要求,因此,在控制时间同步芯片继续对系统时钟进行时间同步后,也可以对系统时钟的频率与主设备的频率进行同步。
在控制时间同步芯片对系统时钟进行时间同步的同时,异常处置模块608会对时间同步芯片的工作进行检测,以确定时间同步芯片是否处于异常状态,例如时间同步芯片是否故障等,如果确定时间同步芯片处于异常状态,则进入异常处置模块608切换由处理器对系统时钟进行时间同步,让系统时钟不再根据时间同步芯片的输出进行时间同步,此时,异常处置模块608可以控制关闭时间同步芯片。另外,异常处置模块608还可以让从设备发出告警信息,以提示从设备的管理人员时间同步芯片异常,让管理人员及时对异常情况进行处理。图4示出了一种网络设备检测到1588功能芯片故障后,向管理人员发出提示信息的一种显示界面示意图,应当理解的是,除了通过显示对管理人员进行提示的方式以外,网络设备还可以通过发出提示音,发出提示语音等方式进行告警。
另外,在重新切回由处理器对系统时钟进行时间同步以后,第二同步模块606将不再根据系统时钟的时间同步达到稳定状态来进行时间同步方式的切换,因此同步检测模块604也不需要再检测系统时钟的时间同步是否达到稳定状态。所以同步检测模块604和第二同步模块606均可以处于 休眠状态。
在一些实施例中,时间同步装置可以部署在网络设备上,其中第一同步模块、同步检测模块、第二同步模块以及异常处置模块的功能均可以通过网络设备的处理器来实现。
本发明实施例提供的时间同步装置,不仅综合了采用处理器运行协议栈进行时间同步的方案与采用时间同步芯片进行时间同步的方案各自的优点,使得整个时间同步过程表现出同步收敛速度快,同步精度高,同步稳定性好等优点;而且,还可以利用时间同步芯片报文收发速度快的优点对系统时钟进行频率同步。在采用时间同步芯片对系统时钟进行时间同步的过程中,从设备还会监测时间同步芯片是否故障,并在时间同步芯片不能正常工作时,切换到由处理器继续进行时间同步,避免了时间同步芯片发生硬件故障的情况下,无法输出或者输出时钟异常,严重影响系统正常工作的问题。
本发明实施例还提供一种计算机可读存储介质,该计算机可读存储介质中可以存储有一个或多个可供一个或多个处理器读取、编译并执行的计算机程序,在本实施例中,该计算机可读存储介质可以存储有时间同步程序,该时间同步程序可供一个或多个处理器执行实现本发明实施例提供的前述时间同步方法。
本发明实施例还提供一种网络设备,请参见图7示出的网络设备7的硬件结构示意图:
网络设备7包括处理器71、存储器72、时间同步芯片73、通信单元74以及配置为实现处理器71分别同存储器72、时间同步芯片73、通信单元74三者之间通信连接的通信总线75,其中存储器72可以为前述存储有时间同步程序的存储介质。处理器71可以读取存储器72中存储的时间同步程序,进行编译并执行实现本发明实施例提供的前述时间同步方法。
在本发明实施例中,网络设备7的处理器71根据时间同步程序对本设备的系统时钟进行时间同步,可以根据1588时间同步协议进行,并且,时间同步芯片73也可以是1588功能芯片。下面对网络设备7的时间同步过程进行简单介绍:
处理器71可以运行时间同步协议栈,例如1588时间同步协议栈,控制通信单元74与主设备进行报文交互,根据报文时间戳计算本设备与主设备之间的时间偏差,并根据该时间偏差对本设备的系统时间进行同步调整。处理器71在运行协议栈对系统时钟的时间进行同步的同时,还会检测系统时钟的时间同步是否已达到稳定状态,如果检测结果为是,则处理器71通知时间同步芯片73继续对系统时钟的时间进行同步。在一些实施例中,处理器71可以通知系统时钟,例如FPGA芯片向时间同步芯片73输出时间,在确定时间同步芯片73锁定系统时钟的时间后,处理器71可以停止运行时间同步协议栈,由时间同步芯片73独立运行时间同步协议栈对系统时钟进行同步。
另外,在时间同步芯片73对系统时钟进行同步的同时,处理器71还可以对时间同步芯片73的工作状态进行监测,如果确定时间同步芯片73处于异常状态,例如时间同步芯片73故障,则处理器71将继续运行协议栈对系统时钟进行时间同步。与此同时,处理器71可以控制关闭异常的时间同步芯片73,避免时间同步芯片73向系统时钟输出错误的同步信息。
对于网络设备7的时间同步的其他细节,可以参见前述实施例的介绍,这里不再赘述。
本实施例提供的网络设备及计算机可读存储介质,确保系统时钟时间同步的同步收敛速度快,同步精度高,同步稳定性好。同时,在时间同步芯片故障后,还能即时切换到由处理器继续进行时间同步,避免了时间同步芯片发生硬件故障影响系统正常工作的问题。
显然,本领域的技术人员应该明白,上述本发明实施例的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,在一些实施例中,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在计算机存储介质(只读存储器(ROM,Read-Only Memory)/随机存取存储器(RAM,Random Access Memory)、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本发明不限制于任何特定的硬件和软件结合。
以上内容是结合具体的实施方式对本发明实施例所作的进一步详细说明,不能认定本发明的具体实施只局限于这些说明。对于本发明所属技术领域的普通技术人员来说,在不脱离本发明构思的前提下,还可以做出若干简单推演或替换,都应当视为属于本发明的保护范围。
Claims (10)
- 一种时间同步方法,包括:处理器根据时间同步协议对系统时钟进行时间同步;在确定所述系统时钟的时间同步达到稳定状态后,切换由时间同步芯片继续对所述系统时钟进行时间同步。
- 如权利要求1所述的时间同步方法,其中,所述切换由同步芯片继续对所述系统时钟进行时间同步包括:控制所述系统时钟向所述时间同步芯片输出时间;在所述时间同步芯片锁定所述系统时钟的时间后,控制所述时间同步芯片对所述系统时钟进行时间同步,并停止所述处理器对所述系统时钟的时间同步。
- 如权利要求1所述的时间同步方法,其中,所述确定所述系统时钟的时间同步达到稳定状态包括:确定本设备与所述主设备间的时间偏差Δt小于预设偏差ΔTh的次数达到预设次数。
- 如权利要求3所述的时间同步方法,其中,所述确定本设备与所述主设备间的时间偏差Δt小于预设偏差ΔTh的次数达到预设次数包括:确定本设备与所述主设备间的时间偏差Δt小于预设偏差ΔTh的连续次数是否达到预设次数。
- 如权利要求1所述的时间同步方法,其中,所述时间同步协议为网络测量和控制系统的精密时钟同步协议标准PTP。
- 如权利要求1-5任一项所述的时间同步方法,其中,所述控制所述同步芯片继续对所述系统时钟进行时间同步之后,还包括:在所述同步芯片处于异常状态时,控制所述处理器继续根据所述时间同步协议对所述系统时钟进行时间同步。
- 一种时间同步装置,包括:第一同步模块,配置为根据时间同步协议对系统时钟进行时间同步;同步检测模块,配置为检测所述系统时钟的时间同步是否达到稳定状态;第二同步模块,配置为在确定所述系统时钟的时间同步达到稳定状态后,切换由时间同步芯片继续对系统时钟进行时间同步。
- 一种网络设备,所述网络设备包括处理器、存储器、时间同步芯片、通信单元及通信总线;所述通信总线,配置为实现所述处理器分别同所述存储器、所述时间同步芯片以及所述通信单元之间的连接通信;所述处理器,配置为执行存储器中存储的一个或者多个程序,以实现如权利要求1至6中任一项所述的时间同步方法的步骤。
- 如权利要求8所述的网络设备,其中,所述时间同步芯片为1588功能芯片。
- 一种计算机可读存储介质,所述计算机可读存储介质存储有一个或者多个程序,所述一个或者多个程序可被一个或者多个处理器执行,以实现如权利要求1至6中任一项所述的时间同步方法的步骤。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810631978.6A CN110620630B (zh) | 2018-06-19 | 2018-06-19 | 时间同步方法、装置、网络设备及计算机可读存储介质 |
CN201810631978.6 | 2018-06-19 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2019242321A1 true WO2019242321A1 (zh) | 2019-12-26 |
Family
ID=68920281
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2019/076340 WO2019242321A1 (zh) | 2018-06-19 | 2019-02-27 | 时间同步方法、装置、网络设备及计算机可读存储介质 |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN110620630B (zh) |
WO (1) | WO2019242321A1 (zh) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098650A (zh) * | 2021-03-29 | 2021-07-09 | 大连市共进科技有限公司 | 时间偏差测量方法、装置、通信设备和可读存储介质 |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113839730A (zh) * | 2020-06-24 | 2021-12-24 | 中兴通讯股份有限公司 | 时间同步方法、网络设备及存储介质 |
CN112040472B (zh) * | 2020-08-10 | 2022-10-18 | 烽火通信科技股份有限公司 | 时钟同步方法、系统及可读存储介质 |
CN115085850A (zh) * | 2022-06-27 | 2022-09-20 | 中国电信股份有限公司 | 一种时钟同步方法、装置、电子设备及存储介质 |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1845546A (zh) * | 2006-03-15 | 2006-10-11 | 重庆邮电学院 | 面向测量与控制的精确时间同步方法与系统 |
CN101217330A (zh) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | 一种用于时间同步校正的方法和装置 |
CN102447553A (zh) * | 2010-10-12 | 2012-05-09 | 研祥智能科技股份有限公司 | 一种精确时间同步协议的实现装置 |
CN202353572U (zh) * | 2011-11-25 | 2012-07-25 | 中国西电电气股份有限公司 | 电子式互感器合并单元的ieee1588时间同步系统 |
KR101682978B1 (ko) * | 2016-07-26 | 2016-12-07 | 쿨사인 주식회사 | Precision Time Protocol를 이용한 영상 재생 동기화 시스템 및 방법 |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7447931B1 (en) * | 2005-12-09 | 2008-11-04 | Rockwell Automation Technologies, Inc. | Step time change compensation in an industrial automation network |
CN101867469B (zh) * | 2010-06-10 | 2014-09-24 | 北京东土科技股份有限公司 | 一种精密同步时钟的实现方法 |
CN102104475B (zh) * | 2011-01-31 | 2013-07-03 | 上海交通大学 | 基于ieee1588的同步系统及其同步方法 |
CN108234057A (zh) * | 2018-01-24 | 2018-06-29 | 郑州云海信息技术有限公司 | 基于bmc的服务器的时间同步方法、装置及存储介质 |
-
2018
- 2018-06-19 CN CN201810631978.6A patent/CN110620630B/zh active Active
-
2019
- 2019-02-27 WO PCT/CN2019/076340 patent/WO2019242321A1/zh active Application Filing
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1845546A (zh) * | 2006-03-15 | 2006-10-11 | 重庆邮电学院 | 面向测量与控制的精确时间同步方法与系统 |
CN101217330A (zh) * | 2008-01-02 | 2008-07-09 | 中兴通讯股份有限公司 | 一种用于时间同步校正的方法和装置 |
CN102447553A (zh) * | 2010-10-12 | 2012-05-09 | 研祥智能科技股份有限公司 | 一种精确时间同步协议的实现装置 |
CN202353572U (zh) * | 2011-11-25 | 2012-07-25 | 中国西电电气股份有限公司 | 电子式互感器合并单元的ieee1588时间同步系统 |
KR101682978B1 (ko) * | 2016-07-26 | 2016-12-07 | 쿨사인 주식회사 | Precision Time Protocol를 이용한 영상 재생 동기화 시스템 및 방법 |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113098650A (zh) * | 2021-03-29 | 2021-07-09 | 大连市共进科技有限公司 | 时间偏差测量方法、装置、通信设备和可读存储介质 |
Also Published As
Publication number | Publication date |
---|---|
CN110620630B (zh) | 2022-04-26 |
CN110620630A (zh) | 2019-12-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2019242321A1 (zh) | 时间同步方法、装置、网络设备及计算机可读存储介质 | |
US11316605B2 (en) | Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology | |
US11444747B2 (en) | Measure and improve clock synchronization using combination of transparent and boundary clocks | |
JP5321923B2 (ja) | クロック同期システム、ノード、クロック同期方法及びプログラム | |
WO2017101528A1 (zh) | 一种时钟链路切换方法、装置及基站 | |
US11456849B2 (en) | Method and apparatus for synchronizing different communication ports | |
EP4027585A1 (en) | Method for achieving clock source selection, device, system and storage medium | |
WO2016004644A1 (zh) | 一种监控以太网时钟同步的方法及装置 | |
CN102843205A (zh) | 一种基于精确时间协议的时间同步收敛的方法和装置 | |
EP3352392B1 (en) | Time synchronization packet processing method and device | |
US9641269B2 (en) | Apparatus and method for synchronizing clocks among communication devices | |
EP3893427A1 (en) | Clock synchronization method and apparatus and storage medium | |
WO2009043299A1 (en) | A determining method and device for the synchronization port of a transparent clock equipment | |
EP3785383A1 (en) | Timing synchronization over cable networks | |
WO2020135198A1 (zh) | 时钟同步方法、装置和存储介质 | |
US20200119550A1 (en) | Frequency adjustment method for islanded virtual synchronous micro-grid | |
JP6684409B1 (ja) | 時刻同期システム | |
US10771067B2 (en) | System and method for hitless clock switching | |
FI124040B (fi) | Menetelmä ja laite taajuustahdistuksen ohjaamiseksi | |
US9395748B1 (en) | Method and system for time synchronization in a network device | |
WO2022127924A1 (zh) | 选择时钟源的方法及装置 | |
Li et al. | A high-accuracy clock synchronization method in distributed real-time system | |
CN115021857B (zh) | 一种时钟同步方法、装置、电子设备及存储介质 | |
US12132567B2 (en) | Method, apparatus, and system for selecting clock source, and storage medium | |
WO2022037654A1 (zh) | 处理时间同步故障的方法、装置、系统及存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 19823543 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18/05/2021) |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 19823543 Country of ref document: EP Kind code of ref document: A1 |