WO2016078545A1 - 时间同步方法及装置 - Google Patents

时间同步方法及装置 Download PDF

Info

Publication number
WO2016078545A1
WO2016078545A1 PCT/CN2015/094503 CN2015094503W WO2016078545A1 WO 2016078545 A1 WO2016078545 A1 WO 2016078545A1 CN 2015094503 W CN2015094503 W CN 2015094503W WO 2016078545 A1 WO2016078545 A1 WO 2016078545A1
Authority
WO
WIPO (PCT)
Prior art keywords
time synchronization
message
frequency parameter
parameter
clock
Prior art date
Application number
PCT/CN2015/094503
Other languages
English (en)
French (fr)
Inventor
韩柳燕
李晗
Original Assignee
中国移动通信集团公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中国移动通信集团公司 filed Critical 中国移动通信集团公司
Priority to EP15861042.8A priority Critical patent/EP3223567B1/en
Publication of WO2016078545A1 publication Critical patent/WO2016078545A1/zh
Priority to US15/597,696 priority patent/US10050769B2/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter
    • H04L7/0008Synchronisation information channels, e.g. clock distribution lines
    • H04L7/0012Synchronisation information channels, e.g. clock distribution lines by comparing receiver clock with transmitter clock
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/14Monitoring arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W56/00Synchronisation arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0602Systems characterised by the synchronising information used
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0685Clock or time synchronisation in a node; Intranode synchronisation
    • H04J3/0697Synchronisation in a packet node

Definitions

  • the present disclosure relates to the field of communications technologies, and in particular, to a time synchronization method and apparatus.
  • the ground transmission time synchronization method transmits time information to each terminal device through a terrestrial transmission network time synchronization protocol.
  • a terrestrial transmission network time synchronization protocol In the Ethernet network, in order to achieve precise timing, it is necessary to implement corresponding clock synchronization.
  • clock synchronization is implemented by the delivery of precise time synchronization protocol packets, that is, synchronization of the entire network clock is achieved by synchronizing with the same reference clock in the network.
  • time synchronization packets used for time synchronization can be transmitted in multicast mode.
  • the master clock sends time synchronization packets to all downstream connected devices in multicast mode.
  • the slave clock receives time synchronization packets and slave clocks.
  • the time synchronization response message is sent to the master clock in response to the received time synchronization message.
  • each clock in a network must set the same time synchronization message transmission frequency. If the transmission frequency of the time synchronization message is inconsistent, normal synchronization cannot be guaranteed, and the reliability of the entire network is low.
  • the clocks of the devices in the entire network need to be configured in a unified manner to achieve the interworking and time synchronization performance of the entire network. Therefore, for the entire network, when joining or exiting a device, it needs to be re-integrated in the entire network.
  • the clocks of the devices are reconfigured, and the versatility is poor. If one of the devices is incorrectly configured, the device alarms are generated, which makes the reliability of the entire network low.
  • the present disclosure provides a time synchronization method and apparatus for solving the problem of poor versatility and low network reliability when clock synchronization is implemented in a clock synchronization network.
  • a time synchronization method includes: receiving the same time sent by the upstream device from the clock port Step message; obtaining a message frequency parameter in the time synchronization message; correcting a time synchronization message loss detection parameter of the slave clock port for detecting whether the time synchronization message is lost according to the message frequency parameter; The result of the calibration is kept in sync with the upstream device.
  • the time synchronization network does not need to manually set a unified packet frequency, and the automatic adaptation of the clock port is realized by extracting the packet frequency parameter, and each device in the time synchronization network is in the detection time synchronization report.
  • the text is lost, it will not be misjudged or falsely alarmed due to the inconsistent frequency of the message. It can better solve the problem of poor versatility and low network reliability when clock synchronization is implemented in the clock synchronization network.
  • each device in the time synchronization network does not suffer from misjudgment and false alarms due to the inconsistent frequency of the packets.
  • the method further includes: sending the time synchronization response message to the upstream device according to the obtained message frequency parameter.
  • each device in the time synchronization network can automatically realize the unified message frequency step by step, does not need manual setting, and has good versatility.
  • the method further includes: updating a transmission frequency parameter, where the sending frequency parameter is a time synchronization report sent by the primary clock port to the downstream device for maintaining time synchronization with the downstream device.
  • the frequency parameter of the text is a time synchronization report sent by the primary clock port to the downstream device for maintaining time synchronization with the downstream device.
  • the frequency parameter of the text is a time synchronization report sent by the primary clock port to the downstream device for maintaining time synchronization with the downstream device.
  • the frequency parameter of the text and sending the time synchronization message to the downstream device according to the updated transmission frequency parameter.
  • each device in the time synchronization network can automatically realize the unified message frequency step by step, does not need manual setting, and has good versatility.
  • Sending a time synchronization message to the downstream device according to the updated transmission frequency parameter including: triggering to send a time synchronization message to the downstream device according to the updated transmission frequency parameter when determining the update of the transmission frequency parameter; or determining the transmission frequency
  • the trigger sends a time synchronization message to the downstream device according to the updated transmission frequency parameter.
  • the mechanism of the new message can be triggered immediately, and the packet loss misjudgment which may be caused when the message frequency is changed or The problem that the downstream device sends an instant update of the message frequency.
  • a time synchronization device includes: an interface module, configured to receive a time synchronization message sent by an upstream device by using a slave clock port; and a message frequency parameter extraction module, configured to obtain a message frequency parameter in the time synchronization message; a message loss detection module, configured to correct, according to the message frequency parameter, a time synchronization message loss detection parameter of the slave clock port for detecting whether the time synchronization message is lost; and a clock synchronization module, configured to perform, according to the calibration result, The upstream device keeps the clock synchronized.
  • the time synchronization network does not need to manually set a unified packet frequency, and the automatic adaptation of the clock port is realized by extracting the packet frequency parameter, and each device in the time synchronization network is in the detection time synchronization report.
  • the text is lost, it will not be misjudged or falsely alarmed due to the inconsistent frequency of the message. It can better solve the problem of poor versatility and low network reliability when clock synchronization is implemented in the clock synchronization network.
  • the clock synchronization module is configured to determine that the clock of the upstream device is out of synchronization, if the time synchronization message sent by the upstream device is not received within a set time period in which the corrected time synchronization packet loss detection parameter is referenced.
  • each device in the time synchronization network does not suffer from misjudgment and false alarms due to the inconsistent frequency of the packets.
  • the interface module is further configured to send a time synchronization response message to the upstream device according to the obtained packet frequency parameter.
  • each device in the time synchronization network can automatically realize the unified message frequency step by step, does not need manual setting, and has good versatility.
  • the method further includes: a message frequency setting module, configured to update a transmission frequency parameter, where the transmission frequency parameter is a frequency parameter that the primary clock port sends a time synchronization message for maintaining time synchronization with the downstream device to the downstream device;
  • the sending frequency parameter sends a time synchronization message to the downstream device.
  • each device in the time synchronization network can automatically realize the unified message frequency step by step, does not need manual setting, and has good versatility.
  • the message frequency setting module is configured to: when the sending frequency parameter is updated, trigger to send a time synchronization message to the downstream device according to the updated sending frequency parameter; or arrive at the reservation time when determining the sending frequency parameter update When triggered, the trigger is set downstream according to the updated transmission frequency parameter.
  • the device sends a time synchronization packet.
  • FIG. 1 is a flowchart of a time synchronization method according to Embodiment 1 of the present disclosure
  • FIG. 2 is a schematic structural diagram of a time synchronization apparatus according to Embodiment 2 of the present disclosure.
  • the problem of low reliability of the entire network provides a time synchronization method in the technical solution proposed by the embodiments of the present disclosure.
  • the method includes: obtaining a message frequency parameter in a time synchronization message, and correcting a time synchronization message loss detection parameter according to the obtained message frequency parameter, and maintaining a clock synchronization with the upstream device according to the calibration result, thereby solving the current clock.
  • a first embodiment of the present disclosure provides a time synchronization method, as shown in FIG. 1 , and the specific processing flow is as follows:
  • Step 11 Receive a time synchronization message sent by the upstream device by using the slave clock port.
  • each device in the clock synchronization network includes a slave clock port and a master clock port, and receives a time synchronization message sent by the upstream device connected to the device from the clock port, and the master clock port. Used to send time synchronization packets to downstream devices connected to itself.
  • Step 12 Obtain a message frequency parameter in the received time synchronization message.
  • the 1588 time synchronization packet carries the logMessageInterval parameter in the packet header of the time synchronization packet.
  • the header of the time synchronization packet includes a total of 34 bytes.
  • the logMessageInterval parameter contains the message frequency parameter.
  • the frequency parameter of the message is hexadecimal. If the frequency parameter of the message is 16 times per second, that is, 16 times of time synchronization messages are received or sent every second, the value of the frequency parameter of the message is 0x04.
  • Step 13 Correct the time synchronization message loss detection parameter of the slave clock port for detecting whether the time synchronization message is lost according to the message frequency parameter.
  • the packet frequency parameter is obtained, that is, the packet frequency parameter in the time synchronization packet sent by the upstream device is detected
  • the time interval at which the upstream device sends the time synchronization packet is learned from the clock port, and the clock can automatically adjust the port.
  • Lost detection parameters For example, if five time synchronization packets are continuously lost from the clock port, the time synchronization message sent by the upstream device is learned from the clock port.
  • the time synchronization packet loss detection parameter of the slave port is set. To report the alarm on the time synchronization packet after 5 seconds, if the frequency of the time synchronization packet sent by the upstream device is 2 times per second, the time synchronization packet loss detection parameter of the slave clock port is set to After 2.5 seconds, the message is not received on the message.
  • step 14 according to the calibration result, the clock is synchronized with the upstream device.
  • the slave clock port synchronizes the packet loss detection parameters according to the corrected time to detect whether the time synchronization packet received by the port is lost. For example, if the determined packet frequency parameter is that the time synchronization message is received once per second, the clock synchronization port sent by the upstream device is considered to be received when the slave clock port can receive the time synchronization message after N seconds.
  • the file is lost, it is determined that the clock is out of synchronization with the upstream device, and an alarm can be issued. For example, if the determined message frequency parameter is one time synchronization message received every 2 seconds, then the slave device can be considered as the upstream device when the time synchronization message cannot be received after 2*N seconds. If the sent clock synchronization packet is lost, it is determined that the clock is out of synchronization with the upstream device, and an alarm can be issued.
  • the method may further include:
  • a time synchronization response message is sent to the upstream device according to the obtained packet frequency parameter.
  • the method may further include:
  • the sending frequency parameter is updated, and the time synchronization message is sent to the downstream device according to the updated sending frequency parameter.
  • the sending frequency parameter is a frequency parameter that the primary clock port sends to the downstream device a time synchronization message for maintaining time synchronization with the downstream device.
  • the sending frequency parameter is updated, and the sending frequency parameter may be updated according to the message frequency parameter. It is also possible to actively change the transmission frequency parameter.
  • the time synchronization message is sent to the downstream device according to the updated sending frequency parameter, which may include the following two methods:
  • the first method is: when determining the update of the sending frequency parameter, triggering to send the time synchronization message to the downstream device according to the updated sending frequency parameter.
  • the primary clock port is triggered to send the time synchronization message to the downstream device according to the updated transmission frequency parameter.
  • the time synchronization message sent at this time contains the updated transmission frequency parameter.
  • the downstream device can obtain the updated message frequency parameter immediately, so that the packet loss detection and downstream device are not affected. Send frequency.
  • the second mode when the transmission frequency parameter update is determined, when the reservation time arrives, the time synchronization message is sent to the downstream device according to the updated transmission frequency parameter.
  • the packet frequency parameter obtained from the clock port is used as the transmission frequency parameter of the time-synchronized packet sent by the master clock port, and the master clock port sends the time synchronization packet according to the sending frequency parameter, so that the clock network can be step-by-step. Automatic time synchronization.
  • a second embodiment of the present disclosure provides a time synchronization device, as shown in FIG. 2, and the specific structure thereof is as follows:
  • the interface module 201 is configured to receive, by using a slave clock port, a time synchronization message sent by the upstream device.
  • the message frequency parameter extraction module 202 is configured to obtain a message frequency parameter in the time synchronization message
  • the packet loss detection module 203 is configured to: according to the packet frequency parameter, correct a time synchronization packet loss detection parameter of the slave clock port for detecting whether the time synchronization packet is lost;
  • the clock synchronization module 204 is configured to keep clock synchronization with the upstream device according to the calibration result.
  • the clock synchronization module 204 is configured to determine the clock with the upstream device if the time synchronization message sent by the upstream device is not received within the set duration referenced by the corrected time synchronization packet loss detection parameter. Out of step.
  • the interface module is further configured to:
  • a time synchronization response message is sent to the upstream device according to the obtained packet frequency parameter.
  • the time synchronization device further includes:
  • the message frequency setting module 205 is configured to update a transmission frequency parameter, where the transmission frequency parameter is a frequency parameter that the primary clock port sends a time synchronization message for maintaining time synchronization with the downstream device to the downstream device; The frequency parameter sends a time synchronization message to the downstream device.
  • the message frequency setting module 205 is configured to: when it is determined that the sending frequency parameter is updated, trigger to send a time synchronization message to the downstream device according to the updated sending frequency parameter; or when determining the sending frequency parameter update, When the reservation time arrives, the trigger sends a time synchronization message to the downstream device according to the updated transmission frequency parameter.
  • the time synchronization message transmission is inconsistent in the time synchronization network, for example, the transmission frequency of the time synchronization message set by the downstream device is longer than the time synchronization message set by the upstream device. If the frequency is high, the downstream device may consider that the upstream device loses packets, so that the upstream device and the downstream device cannot perform normal time synchronization. The downstream device cannot receive or respond to the time synchronization packet sent by the upstream device correctly. The transmission frequency of the time synchronization packet is lower than that of the upstream device.
  • the embodiment of the present disclosure dynamically adjusts the frequency of sending the time synchronization message by receiving the frequency parameter of the message in the received time synchronization message, thereby realizing time synchronization automatically in the entire network.
  • the entire time synchronization network does not need to force the receiving or sending frequency of the unified time synchronization message, and realizes the automatic adaptation of the slave clock port or the master clock port.
  • embodiments of the present disclosure may be provided as a method, apparatus (device), or computer program product. Accordingly, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or a combination of software and hardware aspects. Moreover, the present disclosure may be employed in one or more A computer program product embodied on a computer usable storage medium (including but not limited to disk storage, read-only optical disk, optical storage, etc.) containing computer usable program code.
  • a computer usable storage medium including but not limited to disk storage, read-only optical disk, optical storage, etc.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer readable memory produce an article of manufacture comprising the instruction device.
  • the apparatus implements the functions specified in one or more blocks of a flow or a flow and/or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

本公开公开了一种时间同步方法及装置。该方法包括:通过从时钟端口接收上游设备发送的时间同步报文;获得所述时间同步报文中的报文频率参数;按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;根据校正结果,与上游设备保持时钟同步。

Description

时间同步方法及装置
相关申请的交叉引用
本申请主张在2014年11月17日在中国提交的中国专利申请号No.201410655696.1的优先权,其全部内容通过引用包含于此。
技术领域
本公开涉及通信技术领域,尤其是涉及一种时间同步方法及装置。
背景技术
统一、精确的时间在移动通信、电力、金融、传感等领域均有需求和应用。地面传输时间同步的方法通过地面传输网络时间同步协议将时间信息传送给各个终端设备。在以太网络中,为实现精确定时,需要实现相应的时钟同步。
目前,时钟同步是通过精确时间同步协议报文的传递来实现,即在网络中通过与同一个基准时钟同步实现全网时钟的同步。在网络中,用于保持时间同步的时间同步报文可以采用组播的方法进行传递,主时钟向下游所有连接设备以组播形式发送时间同步报文,从时钟接收时间同步报文,从时钟对接收到的时间同步报文进行响应,生成时间同步响应报文发送给主时钟。该种情况下,一个网络中的各个时钟必须设置相同的时间同步报文传输频率,如果时间同步报文的传输频率不一致,则无法保证正常同步,使得整个网络的可靠性较低。
当前情况下,整个网络中的各个设备的时钟需要统一进行配置,才能实现整个网络的互通和时间同步性能,因此,对于整个网络来说,加入或退出一个设备时,均需要重新对整个网络中的各个设备的时钟进行再配置,通用性较差,并且若其中某个设备配置错误,还会引起设备告警,使得整个网络的可靠性较低。
发明内容
本公开提供了一种时间同步方法及装置,用以解决目前时钟同步网络中实现时钟同步时通用性较差,网络可靠性较低的问题。
一种时间同步方法,包括:通过从时钟端口接收上游设备发送的时间同 步报文;获得所述时间同步报文中的报文频率参数;按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;根据校正结果,与上游设备保持时钟同步。
通过上述技术方案,时间同步网络中不需要通过人为强行设置统一的报文频率,通过报文频率参数的提取,实现时钟端口的自动适配,并且时间同步网络中的各个设备在检测时间同步报文丢失时,不会由于受到报文频率不统一的影响出现误判和误告警,能够较好地解决目前时钟同步网络中实现时钟同步时通用性较差,网络可靠性较低的问题。
根据校正结果,与上游设备保持时钟同步,包括:在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。
通过上述技术方案,时间同步网络中的各个设备在检测时间同步报文丢失时,不会由于受到报文频率不统一的影响出现误判和误告警。
在获得所述时间同步报文中的报文频率参数之后,还包括:按照获得的报文频率参数,向上游设备发送时间同步响应报文。
通过上述技术方案,可以实现时间同步网络中的各个设备逐级自动实现报文频率统一,不需要人工设置,通用性较好。
在获得所述时间同步报文中的报文频率参数之后,还包括:更新发送频率参数,其中所述发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数;并按照更新后的发送频率参数向下游设备发送时间同步报文。
通过上述技术方案,可以实现时间同步网络中的各个设备逐级自动实现报文频率统一,不需要人工设置,通用性较好。
按照更新后的发送频率参数向下游设备发送时间同步报文,包括:在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文;或在确定出发送频率参数更新时,在预订时间到达时,触发按照更新后的发送频率参数向下游设备发送时间同步报文。
通过上述技术方案,当时间同步网络中的报文频率发生变更时,可以立即触发新报文的机制,解决了报文频率改变时有可能引起的报文丢失误判或 下游设备发送报文频率即时更新的问题。
一种时间同步装置,包括:接口模块,用于通过从时钟端口接收上游设备发送的时间同步报文;报文频率参数提取模块,用于获得所述时间同步报文中的报文频率参数;报文丢失检测模块,用于按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;时钟同步模块,用于根据校正结果,与上游设备保持时钟同步。
通过上述技术方案,时间同步网络中不需要通过人为强行设置统一的报文频率,通过报文频率参数的提取,实现时钟端口的自动适配,并且时间同步网络中的各个设备在检测时间同步报文丢失时,不会由于受到报文频率不统一的影响出现误判和误告警,能够较好地解决目前时钟同步网络中实现时钟同步时通用性较差,网络可靠性较低的问题。
所述时钟同步模块,用于在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。
通过上述技术方案,时间同步网络中的各个设备在检测时间同步报文丢失时,不会由于受到报文频率不统一的影响出现误判和误告警。
所述接口模块,还用于按照获得的报文频率参数,向上游设备发送时间同步响应报文。
通过上述技术方案,可以实现时间同步网络中的各个设备逐级自动实现报文频率统一,不需要人工设置,通用性较好。
还包括:报文频率设置模块,用于更新发送频率参数,其中所述发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数;按照更新后的发送频率参数向下游设备发送时间同步报文。
通过上述技术方案,可以实现时间同步网络中的各个设备逐级自动实现报文频率统一,不需要人工设置,通用性较好。
所述报文频率设置模块,用于在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文;或在确定出发送频率参数更新时,在预订时间到达时,触发按照更新后的发送频率参数向下游设 备发送时间同步报文。
通过上述技术方案,当时间同步网络中的报文频率发生变更时,可以立即触发新报文的机制,解决了报文频率改变时有可能引起的报文丢失误判或下游设备发送报文频率即时更新的问题。
附图说明
图1为本公开实施例一中提出的一种时间同步方法流程图;
图2为本公开实施例二中提出的一种时间同步装置结构组成示意图。
具体实施方式
针对当前情况下,整个网络中的各个设备的时钟需要统一进行配置,才能实现整个网络的互通和时间同步性能,通用性较差,并且若其中某个设备配置错误,还会引起设备告警,使得整个网络的可靠性较低的问题,在本公开实施例提出的技术方案中,提供了一种时间同步方法。所述方法包括通过获得时间同步报文中的报文频率参数,并按照获得的报文频率参数来校正时间同步报文丢失检测参数,根据校正结果,与上游设备保持时钟同步,从而解决目前时钟同步网络中实现时钟同步时通用性较差,网络可靠性较低的问题。
下面将结合各个附图对本公开实施例技术方案的主要实现原理、具体实施方式及其对应能够达到的有益效果进行详细地阐述。
实施例一
本公开实施例一提出一种时间同步方法,如图1所示,其具体处理流程如下述:
步骤11,通过从时钟端口接收上游设备发送的时间同步报文。
本公开实施例一提出的技术方案中,时钟同步网络中的每个设备,包括从时钟端口和主时钟端口,从时钟端口接收和自身设备连接的上游设备发送的时间同步报文,主时钟端口用于向和自身连接的下游设备发送时间同步报文。
步骤12,获得接收到的时间同步报文中的报文频率参数。
1588时间同步报文在时间同步报文的报文头中携带了logMessageInterval参数。其中,时间同步报文的报文头一共包含34个字节。报文头中的 logMessageInterval参数中包含报文频率参数。
报文频率参数是16进制,若报文频率参数是每秒16次,即每秒接收或发送16次时间同步报文,则该报文频率参数的值为0x04。
一种较佳的实现方式,本公开实施例提出的技术方案中,接收到时间同步报文时,在接收到的时间同步报文的报文同中获得logMessageInterval参数,根据获得的logMessageInterval参数,确定接收到的时间同步报文的报文频率参数。
步骤13,按照报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数。
当获得报文频率参数时,即检测到上游设备发送的时间同步报文中的报文频率参数时,从时钟端口获知了上游设备发送时间同步报文的时间间隔,则时钟可以自动调整端口的丢失检测参数。例如从时钟端口连续丢失5个时间同步报文才上报告警,则若从时钟端口获知上游设备发送的时间同步报文为每秒1次,从时钟端口的时间同步报文丢失检测参数将设置为在5秒后收不到时间同步报文上报告警,如果从时钟端口获知上游设备发送时间同步报文频率为每秒2次,则从时钟端口的时间同步报文丢失检测参数将设置为在2.5秒后收不到报文上报告警。
步骤14,根据校正结果,与上游设备保持时钟同步。
其中,可以在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。进一步地,在确定出与上游设备时钟失步后,可以发出告警。从时钟端口根据校正后的时间同步报文丢失检测参数,对本端口接收时间同步报文是否丢失进行检测。例如若确定出的报文频率参数为每秒接收1次时间同步报文,则进一步地,从时钟端口可以在N秒后未接收到时间同步报文时,则认为上游设备发送的时钟同步报文丢失,则确定与上游设备之间时钟失步,进而可以发出告警。再如,若确定出的报文频率参数为每2秒接收1次时间同步报文,则进一步地,从时钟端口可以在2*N秒后未接收到时间同步报文时,则认为上游设备发送的时钟同步报文丢失,则确定与上游设备之间时钟失步,进而可以发出告警。
其中,在上述步骤12获得报文频率参数之后,还可以包括:
按照获得的报文频率参数,向上游设备发送时间同步响应报文。
其中,在上述步骤12获得报文频率参数之后,还可以包括:
更新发送频率参数,按照更新后的发送频率参数向下游设备发送时间同步报文。
其中发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数。
具体地,更新发送频率参数,可以是按照报文频率参数,来更新发送频率参数。也可以是主动更改发送频率参数。
其中,按照更新后的发送频率参数向下游设备发送时间同步报文,可以包括下述两种方式:
第一种方式:在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文。
该种方式中,在确定出发送频率参数更新时,立即触发主时钟端口按照更新后的发送频率参数向下游设备发送时间同步报文。此时发送的时间同步报文中包含更新后的发送频率参数,下游设备在接收到时间同步报文后,可以立即获得更新后的报文频率参数,从而不会影响报文丢失检测和下游设备发送频率。
第二种方式:在确定出发送频率参数更新时,在预订时间到达时,按照更新后的发送频率参数向下游设备发送时间同步报文。
该种方式中,将从时钟端口获得的报文频率参数,作为主时钟端口发送时间同步报文的发送频率参数,主时钟端口按照发送频率参数发送时间同步报文,这样,时钟网络可以逐级自动实现时间同步。
实施例二
本公开实施例二提出一种时间同步装置,如图2所示,其具体结构如下述:
接口模块201,用于通过从时钟端口接收上游设备发送的时间同步报文;
报文频率参数提取模块202,用于获得所述时间同步报文中的报文频率参数;
报文丢失检测模块203,用于按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;
时钟同步模块204,用于根据校正结果,与上游设备保持时钟同步。
具体地,上述时钟同步模块204,用于在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。
所述接口模块,还用于:
按照获得的报文频率参数,向上游设备发送时间同步响应报文。
所述时间同步装置还包括:
报文频率设置模块205,用于更新发送频率参数,其中所述发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数;按照更新后的发送频率参数向下游设备发送时间同步报文。
具体地,上述报文频率设置模块205,用于在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文;或在确定出发送频率参数更新时,在预订时间到达时,触发按照更新后的发送频率参数向下游设备发送时间同步报文。
通过本公开实施例上述提出的技术方案,对于时间同步网络中,时间同步报文发送不一致的情况,例如,下游设备设置的时间同步报文的传输频率比上游设备设置的时间同步报文的传输频率高,则下游设备有可能认为上游设备丢包,从而上游设备和下游设备无法进行正常的时间同步。或者下游设备设置的时间同步报文的传输频率比上游设备设置的时间同步报文的传输频率低,则下游设备无法正确接收或响应上游设备发送的时间同步报文。该些情况下,本公开实施例通过获得接收到的时间同步报文中的报文频率参数,动态调整自身的时间同步报文发送频率,从而实现全网自动实现时间同步。整个时间同步网络不需要强行设置统一的时间同步报文的接收或发送频率,实现了从时钟端口或主时钟端口的自动适配。
本领域的技术人员应明白,本公开的实施例可提供为方法、装置(设备)、或计算机程序产品。因此,本公开可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本公开可采用在一个或多个 其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、只读光盘、光学存储器等)上实施的计算机程序产品的形式。
本公开是参照根据本公开实施例的方法、装置(设备)和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
尽管已描述了本公开的优选实施例,但本领域内的技术人员一旦得知了基本创造性概念,则可对这些实施例作出另外的变更和修改。所以,所附权利要求意欲解释为包括优选实施例以及落入本公开范围的所有变更和修改。
显然,本领域的技术人员可以对本公开进行各种改动和变型而不脱离本公开的精神和范围。这样,倘若本公开的这些修改和变型属于本公开权利要求及其等同技术的范围之内,则本公开也意图包含这些改动和变型在内。

Claims (10)

  1. 一种时间同步方法,包括:
    通过从时钟端口接收上游设备发送的时间同步报文;
    获得所述时间同步报文中的报文频率参数;
    按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;
    根据校正结果,与上游设备保持时钟同步。
  2. 如权利要求1所述的方法,其中,根据校正结果,与上游设备保持时钟同步,包括:
    在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。
  3. 如权利要求1所述的方法,其中,在获得所述时间同步报文中的报文频率参数之后,还包括:
    按照获得的报文频率参数,向上游设备发送时间同步响应报文。
  4. 如权利要求1~3任一所述的方法,其中,在获得所述时间同步报文中的报文频率参数之后,还包括:
    更新发送频率参数,其中所述发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数;并
    按照更新后的发送频率参数向下游设备发送时间同步报文。
  5. 如权利要求4所述方法,其中,按照更新后的发送频率参数向下游设备发送时间同步报文,包括:
    在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文;或
    在确定出发送频率参数更新时,在预订时间到达时,按照更新后的发送频率参数向下游设备发送时间同步报文。
  6. 一种时间同步装置,包括:
    接口模块,用于通过从时钟端口接收上游设备发送的时间同步报文;
    报文频率参数提取模块,用于获得所述时间同步报文中的报文频率参数;
    报文丢失检测模块,用于按照所述报文频率参数,校正从时钟端口的用于检测时间同步报文是否丢失的时间同步报文丢失检测参数;
    时钟同步模块,用于根据校正结果,与上游设备保持时钟同步。
  7. 如权利要求6所述的装置,其中,所述时钟同步模块,用于在以校正后的时间同步报文丢失检测参数为参考的设定时长内,若未收到上游设备发送的时间同步报文,则确定与上游设备时钟失步。
  8. 如权利要求6所述的装置,其中,所述接口模块,还用于按照获得的报文频率参数,向上游设备发送时间同步响应报文。
  9. 如权利要求6~8任一所述的装置,其中,还包括:
    报文频率设置模块,用于更新发送频率参数,其中所述发送频率参数是主时钟端口向下游设备发送用于和下游设备保持时间同步的时间同步报文的频率参数;按照更新后的发送频率参数向下游设备发送时间同步报文。
  10. 如权利要求9所述装置,其中,所述报文频率设置模块,用于在确定出发送频率参数更新时,触发按照更新后的发送频率参数向下游设备发送时间同步报文;或在确定出发送频率参数更新时,在预订时间到达时,触发按照更新后的发送频率参数向下游设备发送时间同步报文。
PCT/CN2015/094503 2014-11-17 2015-11-13 时间同步方法及装置 WO2016078545A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
EP15861042.8A EP3223567B1 (en) 2014-11-17 2015-11-13 Time synchronization method and apparatus
US15/597,696 US10050769B2 (en) 2014-11-17 2017-05-17 Time synchronization method and apparatus

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201410655696.1A CN105681016B (zh) 2014-11-17 2014-11-17 一种时间同步方法及装置
CN201410655696.1 2014-11-17

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US15/597,696 Continuation US10050769B2 (en) 2014-11-17 2017-05-17 Time synchronization method and apparatus

Publications (1)

Publication Number Publication Date
WO2016078545A1 true WO2016078545A1 (zh) 2016-05-26

Family

ID=56013287

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2015/094503 WO2016078545A1 (zh) 2014-11-17 2015-11-13 时间同步方法及装置

Country Status (4)

Country Link
US (1) US10050769B2 (zh)
EP (1) EP3223567B1 (zh)
CN (1) CN105681016B (zh)
WO (1) WO2016078545A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2603125B (en) * 2021-01-22 2023-10-25 Canon Kk Method for generating control signals for an image capture device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102761407A (zh) * 2012-07-16 2012-10-31 中兴通讯股份有限公司 跨机框系统及其时间和频率透传的实现方法和装置
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN103684739A (zh) * 2014-01-09 2014-03-26 北京经纬恒润科技有限公司 一种实现时钟同步的装置、设备及方法
CN103905135A (zh) * 2012-12-24 2014-07-02 中国移动通信集团公司 实现时间同步的方法、设备和系统
EP2770678A1 (en) * 2011-10-17 2014-08-27 ZTE Corporation Clock synchronization method and system in 1588-2008 protocol

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8451763B2 (en) * 2006-12-07 2013-05-28 Digimarc Corporation Wireless local area network-based position locating systems and methods
US8504862B2 (en) * 2007-02-20 2013-08-06 Fujitsu Semiconductor Limited Device and method for preventing lost synchronization
CN102332973B (zh) * 2011-09-07 2014-07-09 上海交通大学 一种链状网络的实时通信与时钟同步方法
CN103441833B (zh) * 2013-08-26 2016-08-10 瑞斯康达科技发展股份有限公司 一种主从设备频率同步方法及系统
US9178637B2 (en) * 2013-12-09 2015-11-03 Khalifa University of Science, Technology, and Research Method and devices for synchronization using linear programming

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2770678A1 (en) * 2011-10-17 2014-08-27 ZTE Corporation Clock synchronization method and system in 1588-2008 protocol
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN102761407A (zh) * 2012-07-16 2012-10-31 中兴通讯股份有限公司 跨机框系统及其时间和频率透传的实现方法和装置
CN103905135A (zh) * 2012-12-24 2014-07-02 中国移动通信集团公司 实现时间同步的方法、设备和系统
CN103684739A (zh) * 2014-01-09 2014-03-26 北京经纬恒润科技有限公司 一种实现时钟同步的装置、设备及方法

Also Published As

Publication number Publication date
EP3223567A1 (en) 2017-09-27
EP3223567A4 (en) 2018-05-30
US10050769B2 (en) 2018-08-14
CN105681016A (zh) 2016-06-15
CN105681016B (zh) 2019-02-05
US20170250791A1 (en) 2017-08-31
EP3223567B1 (en) 2020-01-08

Similar Documents

Publication Publication Date Title
US11012335B2 (en) Error detection in communication networks
JP5941293B2 (ja) アビオニクスネットワーク内のフリーランニングノードを時間同期させる方法
US9548831B2 (en) Synchronizing system, synchronizing method, first synchronizing device, second synchronizing device, and computer program
WO2016004644A1 (zh) 一种监控以太网时钟同步的方法及装置
WO2016106908A1 (zh) 一种sdh网络中的时钟同步方法及系统
CN105393500B (zh) 环状同步网络系统以及时间从属站点
JP5930685B2 (ja) 時刻同期装置、無線端末および時刻同期システム
WO2013023530A1 (zh) 自动侦测1588链路非对称性时延的实现方法及装置
US20160065358A1 (en) Synchronization method, intermediate node, and slave node of communication network system
US9730172B2 (en) Base station device and method of updating counter of base station device
WO2018049545A1 (zh) Sdn中数据处理方法、装置、系统、电子设备和计算机程序产品
CA3073612A1 (en) Method and device for controlling frequency hopping transmitter and receiver
US8275001B1 (en) Systems and methods for synchronizing backup receivers to network clocks
WO2016078545A1 (zh) 时间同步方法及装置
US8861552B2 (en) Fault-tolerant self-stabilizing distributed clock synchronization protocol for arbitrary digraphs
JP2012105152A (ja) 時刻同期方法、通信システムおよび通信装置
EP3070926B1 (en) Synchronous camera
US7359367B2 (en) Device for preventing erroneous synchronization in wireless communication apparatus
WO2016000324A1 (zh) 时间同步的实现方法及装置
WO2016184225A1 (zh) 一种时间同步消息发送方法和装置
KR20150027606A (ko) 센서 네트워크에서의 시간 동기 장치 및 방법
US9307509B1 (en) Transmitting radio signals using simultaneous retransmission
WO2018001224A1 (zh) 网元设备及其传输模式配置装置和方法
WO2024021091A1 (zh) 周期同步方法、系统、装置及电子设备
TWI605700B (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: 15861042

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

REEP Request for entry into the european phase

Ref document number: 2015861042

Country of ref document: EP