WO2009076908A1 - 一种网络时钟同步的方法、装置及系统 - Google Patents

一种网络时钟同步的方法、装置及系统 Download PDF

Info

Publication number
WO2009076908A1
WO2009076908A1 PCT/CN2008/073478 CN2008073478W WO2009076908A1 WO 2009076908 A1 WO2009076908 A1 WO 2009076908A1 CN 2008073478 W CN2008073478 W CN 2008073478W WO 2009076908 A1 WO2009076908 A1 WO 2009076908A1
Authority
WO
WIPO (PCT)
Prior art keywords
timestamp
message
clock synchronization
network device
synchronization request
Prior art date
Application number
PCT/CN2008/073478
Other languages
English (en)
French (fr)
Inventor
Mingming Zhu
Original Assignee
Huawei Technologies Co., Ltd.
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 Huawei Technologies Co., Ltd. filed Critical Huawei Technologies Co., Ltd.
Publication of WO2009076908A1 publication Critical patent/WO2009076908A1/zh

Links

Classifications

    • 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

Definitions

  • the invention relates to a Chinese patent application filed on December 13, 2007 by the Chinese Patent Office, the application number is 200710032424.6, and the invention name is "a method and device for synchronizing network clocks". Priority is hereby incorporated by reference in its entirety.
  • the present invention relates to the field of communications, and in particular, to a method, device, and system for synchronizing network clocks. Background technique
  • NTP Network Time Protocol
  • TCP Transmission Control Protocol
  • IP Internet Protocol
  • UDP Application layer protocol on the Packet
  • the goal of the NTP protocol is to synchronize the clocks of all clocked devices in the network, so that the clocks of all devices in the network are consistent, so that the device can provide various applications based on unified time.
  • FIG. 1 shows a schematic diagram of the basic principle of NTP in the prior art:
  • the second network device is a time server.
  • Step 1 The first network device sends a request packet (Request Packet) to the second network device, where the NTP packet carries an origination timestamp (Offerate Timestamp) leaving the first network device, and the time is 10:00:00 am .
  • Request Packet a request packet
  • Origination timestamp Offerate Timestamp
  • Step 2 When the packet arrives at the second network device, the second network device records the received reception timestamp (Receive Timestamp), which is 11:00:01 am. And put the timestamp into the response packet (Response Packet).
  • Step 3 The second network device sends a Response Packet to the first network device, where the response packet includes a Transmit Timestamp leaving the second network device, where the time is ll: 00:02 am.
  • Step 4 The first network device records that the arrival timestamp (Arrive Timestamp) of the Response Packet is 10:00:03am.
  • the time offset relative to the second network device can be calculated on the first network device:
  • step 1 when the first network device performs NTP packet encapsulation, it first obtains a local timestamp, and encapsulates the timestamp into NTP.
  • the NTP packet is encapsulated into a UDP packet, and then the UDP packet is encapsulated into an IP packet, and then the Layer 2 packet is encapsulated, and then sent to the sending queue of the interface for transmission. Therefore, when the message is sent, the originating timestamp (Eternal Timestamp) carried in the message is earlier than the actual sending time.
  • the originating timestamp (Eternal Timestamp) carried in the message is earlier than the actual sending time.
  • the Transmit Timestamp in the message is earlier than the actual transmission time.
  • the second network device receives a packet, it does not know that it is an NTP packet, and the packet needs to be decapsulated layer by layer.
  • the decapsulation to the UDP packet port is 123, the network device knows this.
  • the packet is an NTP packet, and the arrival time is recorded at this time. Then, the recorded Receive Time (Receive Timestamp) will be later than the actual arrival time.
  • the arrival time (Arrive Timestamp) recorded by the first network device in step 4 is also later than the actual time.
  • the delay time is not fixed from the time when the packet enters the interface to the CPU to process the message, and when the message is sent to the interface to send the queue.
  • the software constructs an NTP message it does not know the actual departure time of the message.
  • the error of this part may reach several tens of milliseconds (ms), which seriously affects the time precision.
  • Embodiments of the present invention provide a method, device, and system for synchronizing network clocks, which improve the accuracy of network clock synchronization and meet the needs of users.
  • the embodiment of the present invention provides a method for synchronizing a network clock.
  • the method includes:
  • the receiving timestamp of the clock synchronization request message is obtained and saved from the return message. And returning the actual transmission time stamp of the text;
  • the embodiment of the invention further discloses a device for synchronizing a network clock, comprising: a sending module, configured to send a clock synchronization request message to the second network device;
  • a field programmable gate array (FPGA) module configured to receive a return message sent by the second network device, and record an actual start timestamp of the clock synchronization request message and an arrival timestamp of the return message;
  • FPGA field programmable gate array
  • the method is used to obtain the return message from the return message. a receiving timestamp of the clock synchronization request message, and an actual transmission timestamp of the return message;
  • a storage module configured to store an initiation timestamp in the clock synchronization request message, an actual initiation timestamp recorded by the FPGA module, and an arrival timestamp of the return message, and store a clock synchronization acquired by the acquisition module a receiving timestamp of the request message and an actual transfer timestamp of the return message; the processing module, configured to calculate a time offset relative to the second network device according to the timestamp information saved in the storage module, and according to the Time offset adjusts the clock.
  • the embodiment of the invention further discloses a network clock synchronization system comprising a first network device and a second network device that communicate with each other,
  • the first network device is configured to send a clock synchronization request message to the second network device, and save the start timestamp and the actual start timestamp of the clock synchronization request message, and receive the feedback from the second network device.
  • Returning a message recording and saving the arrival timestamp of the returned message; when the initiation timestamp in the returned message matches the saved timestamp of the clock synchronization request message successfully Obtaining and saving the received timestamp of the clock synchronization request message and the actual transmission timestamp of the return message from the return message; the actual start timestamp of the message according to the saved clock synchronization request message And receiving the timestamp, and the actual transmission timestamp and the arrival timestamp of the return message, calculating a time offset with respect to the second network device, and adjusting the clock according to the time offset.
  • the second network device is configured to: after receiving the clock synchronization request message, save the arrival time of the clock synchronization request message, and send a return message to the first network device.
  • the embodiment of the present invention implements the packet initiation time and the arrival time at the proximity interface, does not change the content of the packet, improves the clock precision, and the calculated time offset is more accurate, so that the network clock synchronization is more accurate and satisfies User needs.
  • FIG. 1 is a schematic diagram of a basic principle of NTP in the prior art
  • FIG. 2 is a schematic structural diagram of a specific embodiment of a device for synchronizing network clocks according to the present invention
  • FIG. 3 is a schematic structural diagram of an acquiring module according to FIG.
  • FIG. 4 is a flowchart of a method for synchronizing network clocks according to an embodiment of the present invention
  • FIG. 5 is a flow chart of a specific embodiment of a method of network clock synchronization of the present invention. detailed description
  • Embodiments of the present invention provide a method and apparatus for network clock synchronization.
  • the first network device improves the time precision by recording the actual initiation and arrival timestamps of the packets at the interface, and the calculated time offset is more accurate, so that the network clock is more synchronized, and the user's demand is improved to improve the network clock synchronization. Precision.
  • FIG. 4 a flowchart of a method for synchronizing network clocks according to an embodiment of the present invention is illustrated, which is specifically as follows:
  • Step S401 The first network device sends a clock synchronization request message, such as an NTP message, to the second network device, and identifies the NTP message by using the Ethernet type (EthType) at the second layer, and records the actual initiation of the NTP message.
  • a timestamp (Actual Originate Timestamp), the actual originating timestamp and the locally generated timestamp (originate timestamp) encapsulated in the NTP message are saved;
  • Step S402 The first network device receives the return message of the second network device And through the second layer Identifying, by the EthType, the return message, and recording an arrival timestamp (Arrive Timestamp) of the returned message;
  • Step S403 The first network device acquires and saves the receiving timestamp of the clock synchronization request message from the return message, and the actual transmission timestamp and the arrival timestamp of the response message.
  • Step S404 The first network device uses the formula according to the saved timestamp information:
  • Offset calculating the time offset of the first network device relative to the second network device
  • Step S406 End the process.
  • the request message and the return message are identified by using the EthType (EthType) at the second layer, where the request message and the return message are encapsulated into the Ethernet layer.
  • EthType EthType
  • a new EthType value is used to indicate that the packet is an NTP packet
  • an FPGA is added to the first network device and the second network device, and the FPGA can
  • the request packet and the return packet are identified as NTP packets by using an EthType value.
  • the second layer of the network can identify that the packet is a clock synchronization request packet or a return packet, and can record the initiation time and arrival time of the packet in time, based on such time record.
  • the time offset is more accurate and the clock synchronization adjustment is more accurate.
  • FIG. 5 is a flow chart of a specific embodiment of a method for synchronizing network clocks, the method of which is as follows:
  • Step S501 The first network device obtains a local timestamp when the clock synchronization request message (NTP message) is encapsulated, and encapsulates the local clock stamp as an originating timestamp (originate timestamp) into the clock synchronization request message, and When the clock synchronization request packet is encapsulated into the Ethernet layer, a new EthType value is allocated in the EthType field of the Ethernet packet header to indicate that the packet is an NTP packet, and an Ethernet type clock synchronization request is sent to the second network device.
  • Message Request Packet
  • the originating timestamp is saved to the synchronization timestamp table.
  • the synchronization timestamp table is as shown in Table 1.
  • the entries include: Originate Timestamp, Actual The start timestamp (Actual Originate Timestamp), the Receive Timestamp, the Actual Transmit Timestamp, and the Arrive Timestamp; while sending the clock synchronization request message, the FPGA
  • the EthType value identifies the clock synchronization request packet, and immediately records the actual initiation timestamp of the clock synchronization request packet leaving the sending port, and fills the actual initiation timestamp into the synchronization timestamp table;
  • Step S502 When the second network device receives the clock synchronization request message of the first network device, the FPGA identifies the clock synchronization request message by using the EthType, and records the receiving time stamp of the clock synchronization request message.
  • Step S503 The second network device fills the sending timestamp carried in the clock synchronization request message into the first response packet (Response Packet), and sets the transmission timestamp field in the first response packet to 0. And transmitting the first response message to the first network device;
  • Step S504 The second network device records the actual transmission timestamp of the first response message, and fills the receiving timestamp of the clock synchronization request message into a second response message (Follow Up Response), The transmission timestamp field in the second response message is set to the actual transmission timestamp, and the second response message is transmitted to the first network device;
  • Step S505 The first network device receives the first response message, and records the arrival timestamp of the first response message, and proceeds to step S507;
  • Step S506 The first network device receives the second response packet.
  • Step S507 The first network device acquires and saves timestamp information, which specifically includes:
  • the first network device decapsulates the received return message (including: the first response message and the second response message), obtains the start timestamp information, and initiates the initiation timestamp and the synchronization timestamp table. Timestamp for matching processing;
  • the indicator bit information in the returned packet is detected, and the timestamp information in the returned packet is extracted according to the value of the indicator bit.
  • the indicator bit may be returned by the packet.
  • the transmission timestamp field is implemented, and the timestamp information in the returned message is extracted according to the value of the indication bit, which is specifically:
  • the return message is a first response message
  • the first network device extracts an arrival timestamp of the record. And filling the arrival time stamp into the synchronization timestamp table;
  • the return The packet is a second response packet
  • the first network device extracts a receiving timestamp of the clock synchronization request packet and an actual transmission timestamp of the first response packet in the second response packet, and the receiving timestamp And the actual transfer timestamp is filled in the synchronization timestamp table.
  • Step S508 the first network device calculates a timestamp and a receiving timestamp according to the clock synchronization request message, and calculates a time offset of the first network device relative to the second network device according to the actual transmission timestamp and the arrival timestamp of the response message. Shift, and adjust the local clock according to the clock offset.
  • the receiving timestamp of the second network device may be filled in the first response message at the same time, and in step S507, when the transmission timestamp field is 0, the arrival timestamp is filled in the synchronization time. Outside the table, the receiving time stamp can also be filled in the timetable.
  • the first response message and the second response message may be used to carry the receiving timestamp of the second network device, and the first network device detects the first response message or the second response message.
  • the receiving time stamp can be filled into the synchronization timestamp table.
  • the method may further include:
  • the timer is turned off; when the timer expires, The first network device deletes the timestamp information of the synchronization schedule, and resends the clock synchronization request message;
  • step S507 after the initiation timestamp in the return message fails to match the initiation timestamp in the synchronization timestamp table, the first network device detects whether the timer expires, if the timer expires. Then, the timestamp information in the synchronization timestamp table is deleted, the clock synchronization request message is resent, and the timer is restarted.
  • the clock is used to identify the clock synchronization request packet and the response packet at the Ethernet layer (the second layer of the network) by using the EthType at the proximity interface, and the actual initiation time of the packet is recorded. And the arrival time, it is not necessary to decapsulate the packet to the fourth layer as in the prior art layer to recognize that the packet is an NTP message, which improves the clock precision, and the time offset calculated by using the time information is more accurate, so that the network Clock synchronization ⁇ plus precision.
  • the method for synchronizing the network clock proposed by the embodiment of the present invention is not limited to the point-to-point method applied to the client/server, and may also be applied to the broadcast/multicast mode of multiple clients to one server, The way the way works is basically the same, so I won't comment here.
  • FIG. 2 is a schematic diagram showing the structure of a device for synchronizing network clocks according to an embodiment of the present invention, including:
  • a sending module 21 configured to send a clock synchronization request message
  • the receiving module 23 is configured to receive a return message, where the return message includes a first response message and a second response message;
  • the FPGA module 22 identifies the clock synchronization request message and the return message by using an EtherType (EthType), and records an actual start timestamp of the clock synchronization request message and an arrival timestamp of the return message.
  • EtherType EtherType
  • the storage module 25 is configured to store an initiation timestamp in the clock synchronization request message, an actual initiation timestamp recorded by the FPGA module 22, and an arrival timestamp of the return message, and a clock synchronization request message acquired by the storage obtaining module 24.
  • the receiving timestamp and the actual transmission timestamp of the returned message may be stored in the form of a synchronous timestamp table, as shown in Table 1, the synchronization timestamp information in the synchronous timestamp table includes: initiation time Originate Timestamp, Actual Originate Timestamp, Receive Timestamp, Actual Transmit Timestamp, and Arrive Timestamp;
  • the processing module 26 is configured to use the formula according to the time stamp information stored in the storage module 25 as in the prior art:
  • Offset Calculate the time offset of the first network device relative to the second network device and adjust the clock based on the time offset. It should be noted that those skilled in the art should understand that the time offset is calculated according to the timestamp information, and the implementation manner of adjusting the clock according to the time offset is not limited thereto, and in the prior art, The method for calculating the time offset according to the timestamp information and adjusting the clock according to the time offset can be implemented by the processing module 26 of the embodiment of the present invention.
  • the device for synchronizing the network clock enters a timer 27, where the timing is started when the sending module 21 sends a clock synchronization request message, and the detecting module 28 is configured to During the timing range of the timer 27, it is detected whether the receiving module 23 receives the return message, that is, the first response message and the second response message;
  • the detection result processing module 29 is configured to delete the timestamp information in the storage module 25 when the detection module 28 detects that the first response message and the second response message are not received within the timer 27 timing range, and The trigger sending module 21 resends the clock synchronization request message.
  • the obtaining module 24 described in FIG. 2 includes:
  • the matching unit 241 is configured to perform matching processing on the initiation timestamp in the received return message and the initiation timestamp saved by the storage module 25;
  • the detecting unit 242 is configured to detect the indication bit information in the return message after the matching unit 241 is successfully matched, where the indication bit may be a transmission timestamp field in the return message.
  • the extracting unit 243 obtains the receiving timestamp of the clock synchronization request packet and the actual transmission timestamp of the returned packet according to the value of the indication bit detected by the detecting unit 242, which is specifically:
  • the returning message is a first response message
  • the first network device acquires a receiving timestamp carried in the first response message
  • the return message is the second response message, and the first network device obtains the actual transmission timestamp of the first response message carried in the second response message.
  • the detecting unit 242 detects that the transmission timestamp field information in the return message is a first predetermined value (such as 0), the return message is a first response message, and the extracting unit 243 obtains the first response message.
  • the detecting unit 242 detects that the transmission timestamp field information in the return message is not the first predetermined value, the returning message is the second response message, and the extracting unit 243 obtains the second response message.
  • the actual transmission timestamp of the first response message, or the extraction unit 243 acquires the second response report The actual transmission timestamp of the first response message carried in the text and the receiving timestamp in the second response message.
  • the first network device uses the EthType to identify the NTP message on the Layer 2 through the FPGA at the proximity interface, and does not need to decapsulate the NTP message to the fourth layer as in the prior art layer layer, so that the NTP message is recognized.
  • the actual initiation of the synchronization request message and the arrival timestamp of the first response message are more accurate and the time precision is improved.
  • the second network device uses the EthType to identify the NTP message through the FPGA at the proximity interface, and records The receiving timestamp of the clock synchronization request message and the actual transmission timestamp of the first response message, using the actual initiation timestamp and the reception timestamp of the clock synchronization request message, the actual transmission timestamp of the first response message, and the arrival
  • the time offset calculated by the time stamp is more accurate, which makes the network clock synchronization more accurate and meets the needs of users.
  • the storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

Description

一种网络时钟同步的方法、 装置及系统 本申请要求于 2007 年 12 月 13 日提交中国专利局、 申请号为 200710032424.6、发明名称为 "一种网络时钟同步的方法与装置" 的中国专利申 请的优先权, 其全部内容通过引用结合在本申请中。 技术领域
本发明涉及通信领域, 尤其涉及一种网络时钟同步的方法、 装置及系统。 背景技术
随着科技的日益发达, 特别是电子通信的迅猛发展, 人们的生活逐渐离不 开通信网络, 并且对通信网络可靠性和有效性的要求越来越严格。 网络同步是 保证通信网络有效性的重要技术, 人们正在不断提高网络同步技术。 网络时间十办议 ( Network Time Protocol, NTP )是传输控制协议 ( Transfer Control Protocol, TCP ) /网际协议 ( Internet Protocol, IP )协议簇的一部分, 是 运行在 IP协议和用户数据报文( User Data Packet, UDP )协议之上的应用层协议。 NTP协议的目标是对网络内所有具有时钟的设备进行时钟同步,使网络内所有设 备的时钟保持一致, 从而使设备能提供基于统一时间的各种应用。 请参照图 1, 图 1示出了现有技术中 NTP的基本原理示意图:
假如第一网络设备和第二网络设备在系统时钟同步前各自的时钟为
10:00am和 11 :00am , 第二网络设备为时间服务器。
步骤 1: 第一网络设备发送一个请求报文( Request Packet )给第二网络设备, 该 NTP报文带有离开第一网络设备的发起时间戳( Originate Timestamp ) , 该时 间为 10:00:00am。
步骤 2: 当该报文到达第二网络设备时, 第二网络设备记录下接收到的接收 时间戳 ( Receive Timestamp ) , 该时间为 11 :00:01 am。 并把该时间戳力口到响应 文 ( Response Packet ) 中。 步骤 3: 第二网络设备发送 Response Packet给第一网络设备, 该响应报文中 含有离开第二网络设备的传送时间戳(Transmit Timestamp ) , 该时间为 l l :00:02am。
步骤 4: 第一网络设备记录收到 Response Packet的到达时间戳(Arrive Timestamp )为 10:00:03am。
根据以上四个时间戳, 在第一网络设备上可计算出相对于第二网络设备的 时间偏移:
_ ((Re ceive Timestamp - Originate Timestamp) + (Transmit Timestamp - Arrive Timestamp)) °"Se ~ 2
在实现本发明的过程中,发明人发现现有技术至少存在以下缺陷: 在步骤 1 中, 当第一网络设备在进行 NTP报文封装时, 先获取本地时间戳, 将此时间戳 封装到 NTP报文中, 然后将 NTP报文封装到 UDP报文中,接着将 UDP报文封 装到 IP报文后再封装二层报文, 然后到接口的发送队列中等待发送。 因此当该 报文被发送时, 报文中所带的发起时间戳( Originate Timestamp )要比实际发送 时间早。 同样地, 在步骤 3 中当响应报文离开第二网络设备时, 报文中的传送 时间戳(Transmit Timestamp )要比实际传送时间早。 在步骤 2中, 当第二网络 设备收到一个报文时并不知道是 NTP报文, 需要对报文进行逐层的解封装, 当 解封装到 UDP报文端口为 123时, 才知道这个报文是 NTP报文,此时才会记录 到达时间。 那么, 记录的接收时间 (Receive Timestamp )将比实际达到时间晚。 同样地, 步骤 4中第一网络设备记录下的到达时间 (Arrive Timestamp )也比实 际时间要晚。
另外 , 从报文进入接口到 CPU处理报文 , 以及从报文放入接口发送队列到 被发送出去, 延时时间是不固定的。 实际上, 软件在构造 NTP报文时, 并不知 道报文实际的离开时间, 这部分的误差可能会达到几十个毫秒(ms ), 严重影响 时间精度。 发明内容
本发明实施例提供了一种网络时钟同步的方法、 装置及系统, 提高了网络 时钟同步的精度, 满足了用户的需求。
为了解决上述技术问题, 本发明实施例提出了一种网络时钟同步的方法, 所述方法包括::
向第二网络设备发送时钟同步请求报文, 并保存所述时钟同步请求报文的 发起时间戳和实际发起时间戳;
接收所述第二网络设备反馈的返回报文 , 记录并保存所述返回报文的到达 时间戳;
当所述返回报文中的发起时间戳与保存的所述时钟同步请求报文的发起时 间戳匹配成功时, 从所述返回报文中获取并保存所述时钟同步请求报文的接收 时间戳、 所述返回 ^艮文的实际传送时间戳;
根据保存的所述时钟同步请求报文的实际发起时间戳和接收时间戳, 以及 所述返回报文的实际传送时间戳和到达时间戳, 计算出相对于所述第二网络设 备的时间偏移并根据所述时间偏移调整时钟。
相应地, 本发明实施例还公开了一种网络时钟同步的装置, 包括: 发送模块, 用于发送时钟同步请求报文给第二网络设备;
现场可编程门阵列 (FPGA )模块, 用于接收所述第二网络设备发送的返回 报文, 并记录所述时钟同步请求报文的实际发起时间戳和所述返回报文的到达 时间戳;
获耳 ^莫块, 当所述 FPGA模块接收的返回报文中的发起时间戳与记录的的 所述时钟同步请求报文的发起时间戳匹配成功时, 用于从所述返回报文中获取 所述时钟同步请求报文的接收时间戳、 所述返回报文的实际传送时间戳;
存储模块, 用于存储所述时钟同步请求报文中的发起时间戳、 所述 FPGA 模块记录的实际发起时间戳和所述返回报文的到达时间戳 , 以及存储所述获取 模块获取的时钟同步请求报文的接收时间戳和返回报文的实际传送时间戳; 处理模块, 用于根据所述存储模块中保存的时间戳信息计算出相对于第二 网络设备的时间偏移 , 并且根据所述时间偏移调整时钟。
本发明实施例还公开了一种网络时钟同步系统包括相互通信的第一网络设 备和第二网络设备,
其中, 第一网络设备, 用于向第二网络设备发送时钟同步请求报文, 并保 存所述时钟同步请求报文的发起时间戳和实际发起时间戳; 并接收所述第二网 络设备反馈的返回报文, 记录并保存所述返回报文的到达时间戳; 当所述返回 报文中的发起时间戳与保存的所述时钟同步请求报文的发起时间戳匹配成功 时, 从所述返回报文中获取并保存所述时钟同步请求报文的接收时间戳和所述 返回报文的实际传送时间戳; 根据保存的所述时钟同步请求报文的实际发起时 间戳和接收时间戳, 以及所述返回报文的实际传送时间戳和到达时间戳, 计算 出相对于所述第二网络设备的时间偏移并根据所述时间偏移调整时钟。
第二网络设备, 用于接收所述时钟同步请求报文后, 并保存所述时钟同步 请求报文的到达时间 , 向所述第一网络设备发送返回报文。
实施本发明实施例, 通过在接近接口处记录报文发起时间和到达时间, 不 改动报文的内容, 提高了时钟精度, 计算出的时间偏移更加准确, 使网络时钟 同步更加精确, 满足了用户的需求。 附图说明
图 1是现有技术中 NTP的基本原理示意图;
图 2是本发明的一种网络时钟同步的装置的一具体实施例的结构示意图; 图 3是图 2所述的获取模块的结构示意图;
图 4是本发明实施例的一种网络时钟同步的方法流程图;
图 5是本发明的一种网络时钟同步的方法的一具体实施例的流程图。 具体实施方式
本发明实施例提供了一种网络时钟同步的方法和装置。 第一网络设备通过 在接口处记录报文的实际发起和到达时间戳, 提高了时间精度, 计算出的时间 偏移更加准确, 使网络时钟更加同步, 满足了用户的需求提高了网络时钟同步 的精度。
下面结合附图详细说明本发明的优选实施例。
参考图 4, 图示了本发明实施例的一种网络时钟同步的方法流程图, 具体如 下:
步骤 S401 : 第一网络设备向第二网络设备发送时钟同步请求报文, 如 NTP 报文, 并且通过二层利用以太类型 (EthType )识别所述 NTP报文, 记录所述 NTP报文的实际发起时间戳( Actual Originate Timestamp ), 把所述实际发起时 间戳和以及封装在 NTP报文中本地发起时间戳( Originate Timestamp )保存下来; 步骤 S402: 第一网络设备接收箅二网络设备的返回报文, 并且通过二层利 用以太类型 ( EthType )识别所述返回报文, 记录所述返回报文的到达时间戳 ( Arrive Timestamp );
步骤 S403: 第一网络设备从返回报文中获取并保存时钟同步请求报文的接 收时间戳、 以及响应报文的实际传送时间戳和到达时间戳。
步骤 S404: 第一网络设备根据所述保存的时间戳信息, 利用公式:
((Re ce ve Timestamp - Actual Originate Timestamp) + {Actual Transmit Timestamp - Arrive Timestamp )
offset = 计算出第一网络设备相对于第二网络设备的时间偏移;
步骤 S405: 第一网络设备根据所述时间偏移调整时钟, 使第一网络设备的 时钟与第二网络设备的时钟同步, 具体为: 本地时钟=本地时钟 -offset;
步骤 S406: 结束流程。
需要说明的是, 在本发明所有实施例中, 通过二层利用以太类型(EthType ) 识别所述请求报文和返回报文具体为: 在所述请求报文及返回报文封装到以太 层时成为以太报文, 在以太报文头部的 EthType字段, 分配一个新 EthType值用 来表示该报文为 NTP报文, 并在第一网络设备和第二网络设备上增加一个 FPGA, 该 FPGA能够通过 EthType值来识别所述请求报文和返回报文为 NTP 报文。 这样, 在报文解封装的过程中, 在网络第二层就可以识别出报文是时钟 同步请求报文或返回报文, 能及时记录报文的发起时间以及到达时间, 基于这 样的时间记录出的时间偏移更加准确 , 时钟同步调整更加精确。
下面结合图 5来进一步详细说明本发明实施例的网络时钟同步的方法。
图 5是一种网络时钟同步的方法的一具体实施例的流程图, 其方法具体如 下:
步骤 S501 : 第一网络设备在封装时钟同步请求报文(NTP报文) 时, 获取 本地时间戳, 并把该本地时钟戳作为发起时间戳( Originate Timestamp )封装到 时钟同步请求报文中 , 并在时钟同步请求报文封装到以太层时, 在以太报文头 部的 EthType字段分配一新的 EthType值用来表示该报文为 NTP报文, 向第二 网络设备发送以太类型的时钟同步请求报文( Request Packet );
将所述发起时间戳( Originate Timestamp )保存到同步时间戳表, 所述同步 时间戳表如表 1所示, 其表项包括: 发起时间戳 ( Originate Timestamp )、 实际 发起时间戳( Actual Originate Timestamp )、 接 4史时间戳( Receive Timestamp )、 实际传送时间戳( Actual Transmit Timestamp )和到达时间戳( Arrive Timestamp ); 发送所述时钟同步请求报文的同时 , FPGA从 EthType值识别出所述时钟同 步请求报文, 并立即记录所述时钟同步请求报文离开发送端口的实际发起时间 戳, 把所述实际发起时间戳填入同步时间戳表;
步骤 S502: 第二网络设备接收到第一网络设备的时钟同步请求报文时, FPGA通过 EthType识别所述时钟同步请求报文,并记录所述时钟同步请求报文 的接收时间戳;
步骤 S503: 第二网络设备将所述时钟同步请求报文中承载的发送时间戳填 入第一响应报文(Response Packet ), 将所述第一响应报文中的传送时间戳字段 设置为 0, 并把所述第一响应报文传送给第一网络设备;
步骤 S504: 第二网络设备记录所述第一响应报文的实际传送时间戳, 并把 所述时钟同步请求报文的接收时间戳填入第二响应报文( Follow Up Response ), 将所述第二响应报文中的传送时间戳字段设置为实际传送时间戳, 并把所述第 二响应报文传送给第一网络设备;
步骤 S505: 第一网络设备接收第一响应报文, 并记录所述第一响应报文的 到达时间戳, 转到步骤 S507;
步骤 S506: 第一网络设备接收第二响应报文;
步骤 S507: 第一网络设备获取并保存时间戳信息, 具体包括:
第一网络设备对接收到的返回报文(包括: 第一响应报文、 第二响应报文) 进行解封装, 获取发起时间戳信息, 将所述发起时间戳与同步时间戳表中的发 起时间戳进行匹配处理;
匹配成功后检测所述返回报文中的指示位信息, 并根据所述指示位的值提 取所述返回报文中的时间戳信息, 在本例中, 所述指示位可以由返回报文中的 传送时间戳字段实现, 则根据所述指示位的值提取所述返回报文中的时间戳信 息具体为:
当检测到所述返回报文中的传送时间戳字段为第一预定值(如 0 )时, 所述 返回报文为第一响应报文, 第一网络设备提取所述记录的到达时间戳, 并把所 述到达时间戳填入同步时间戳表;
当检测到所述返回报文中的传 ^时间戳字段不为第一预定值时, 所述返回 报文为第二响应报文, 第一网络设备提取所述第二响应报文中时钟同步请求报 文的接收时间戳和第一响应报文的实际传送时间戳, 并且把所述接收时间戳和 实际传送时间戳分别填入同步时间戳表。
步骤 S508, 第一网络设备根据时钟同步请求报文实际发起时间戳和接收时 间戳 , 以及响应报文的实际传送时间戳和到达时间戳计算出第一网络设备相对 于第二网络设备的时间偏移 , 并根据所述时钟偏移调整本地时钟。
需要说明的是, 以上是本发明的优选实施例, 本发明不局限于此, 根据本 发明权利要求做的等同变化亦在本发明的保护范围内, 如:
在步骤 S503中,同时可以将第二网络设备的接收时间戳填入第一响应报文, 则在步骤 S507中, 当所述传送时间戳字段为 0时, 除了把到达时间戳填入同步 时间表外, 还可以将所述接收时间戳填入时间表。
当然, 在本发明实施例中, 可以同时利用第一响应4艮文和第二响应 文携 带第二网络设备的接收时间戳, 则第一网络设备检测到第一响应报文或第二响 应报文均可以将所述接收时间戳填入同步时间戳表。
由于 NTP协议采用 UDP报文, UDP不是可靠消息, 第一网络设备发送时 钟同步请求报文后可能会收不到响应报文, 因此, 在步骤 S501中, 报文离开时 可启动一定时器计时, 则所述方法还可以包括:
检测第一网络设备是否接收到返回报文 , 当第一网络设备在所述定时器超 时前接收到第一响应报文和第二响应报文, 则关闭所述定时器; 当定时器超时, 则第一网络设备将删除所述同步时间表的时间戳信息 , 并重新发送时钟同步请 求报文;
在步骤 S507中, 当所述返回报文中的发起时间戳与所述同步时间戳表中的 发起时间戳匹配失败后, 第一网络设备检测所述定时器是否超时, 如果所述定 时器超时了, 则将同步时间戳表中的时间戳信息删除, 重新发送时钟同步请求 报文, 重新启动定时器。
通过实施本发明实施例的一种网络时钟同步的装置, 通过 FPGA在接近接 口处利用 EthType在以太网层(网络第二层)识别时钟同步请求报文及响应报文, 记录报文实际发起时间和到达时间 , 无需像现有技术层层解封装到第四层才能 识别出所述报文为 NTP报文, 提高了时钟精度, 利用所述时间信息计算出的时 间偏移更加准确, 使网络时钟同步^加精确。 需要说明的是, 本发明实施例提出的一种网络时钟同步的方法不限于应用 在客户机 /服务器的点对点方式外, 还可以应用在多个客户机对一个服务器的广 播 /多播方式, 两者方式的工作原理基本相同, 这里不再赞述。
以上对本发明实施例的一种网络时钟同步的方法进行了详细阐述, 下面结 合附图 , 具体阐述本发明实施例的一种网络时钟同步的装置。
请参阅图 2,图 2示出了本发明实施例的一种网络时钟同步的装置的结构示 意图, 包括:
发送模块 21 , 用于发送时钟同步请求报文;
接收模块 23, 用于接收返回报文, 所述返回报文包括第一响应报文和第二 响应 4艮文;
FPGA模块 22, 通过以太类型 (EthType )识别时钟同步请求报文和返回报 文, 并记录所述时钟同步请求报文的实际发起时间戳和所述返回报文的到达时 间戳;
获耳 ^莫块 24,用于从接收模块 23接收的返回报文中获取时钟同步请求报文 的接收时间戳、 返回报文的实际传送时间戳;
存储模块 25 , 用于存储时钟同步请求报文中的发起时间戳、 FPGA模块 22 记录的实际发起时间戳和所述返回报文的到达时间戳, 以及存储获取模块 24获 取的时钟同步请求报文的接收时间戳和返回报文的实际传送时间戳, 具体地, 可以以同步时间戳表的形式进行存储, 如表 1 所示, 所述同步时间戳表中的同 步时间戳信息包括:发起时间戳(Originate Timestamp )、实际发起时间戳( Actual Originate Timestamp )、接收时间戳( Receive Timestamp )、实际传送时间戳( Actual Transmit Timestamp )和到达时间戰 ( Arrive Timestamp );
处理模块 26, 用于根据存储模块 25中存储的时间戳信息, 与现有技术一样 利用公式:
((Re ce ve Timestamp - Actual Originate Timestamp) + {Actual Transmit Timestamp - Arrive Timestamp )
offset = 计算出第一网络设备相对于第二网络设备的时间偏移, 并且根据所述时间偏移 调整时钟。 需要说明的是, 本领域的普通技术人员应该理解, 根据时间戳信息 计算时间偏移, 并根据时间偏移调整时钟的实现方式不限于此, 现有技术中其 它的根据时间戳信息计算时间偏移及根据该时间偏移调整时钟的方法本发明实 施例的处理模块 26 均可以实现。
表 1
Figure imgf000011_0001
在本发明实施例的另一种实施方式中, 所述网络时钟同步的装置进 定时器 27, 用于在发送模块 21发送时钟同步请求报文时开始计时; 检测模块 28, 用于在所述定时器 27的定时范围内检测接收模块 23是否接 收到返回^艮文, 即: 第一响应^艮文和第二响应 文;
检测结果处理模块 29, 用于当检测模块 28检测到在所述定时器 27定时范 围内未接收到第一响应报文和第二响应报文时, 删除存储模块 25中的时间戳信 息, 并触发发送模块 21重新发送时钟同步请求报文。
如图 3所示, 图 2所述的获取模块 24包括:
匹配单元 241, 用于对接收到的返回报文中的发起时间戳与存储模块 25保 存的发起时间戳进行匹配处理;
检测单元 242, 当匹配单元 241匹配成功后 , 用于检测所述返回报文中的指 示位信息, 所述指示位具体可以为返回报文中的传送时间戳字段;
提取单元 243,根据检测单元 242检测到指示位的值获取时钟同步请求报文 的接收时间戳、 返回报文的实际传送时间戳, 具体为:
当检测到所述指示位为第一预定值时, 所述返回报文为第一响应报文, 第 一网络设备获取第一响应报文中携带的接收时间戳;
当检测所述指示位非第一预定值时, 所述返回报文为第二响应报文, 第一 网络设备获取第二响应报文中携带的所述第一响应报文的实际传送时间戳。
当检测单元 242检测到所述返回报文中的传送时间戳字段信息为第一预定 值(如 0 )时, 则所述返回报文为第一响应报文, 提取单元 243获取第一响应报 文中携带的时钟同步请求报文的接收时间戳;
当检测单元 242检测到所述返回报文中的传送时间戳字段信息不为第一预 定值时, 则所述返回报文为第二响应报文, 提取单元 243获取二响应报文中携 带的所述第一响应报文的实际传送时间戳, 或者提取单元 243获取第二响应报 文中携带的所述第一响应报文的实际传送时间戳和所述第二响应报文中的接收 时间戳。
由上述实施例可知, 第一网络设备通过在接近接口处通过 FPGA在二层利 用 EthType识别 NTP报文,无需像现有技术层层解封装到第四层才能识别出 NTP 报文, 这样记录时钟同步请求消息的实际发起和第一响应报文的到达时间戳, 更准确, 提高了时间精度, 同样地, 第二网络设备通过在接近接口处通过 FPGA 在二层利用 EthType识别 NTP报文, 记录时钟同步请求报文的接收时间戳以及 第一响应报文的实际传送时间戳, 利用所述时钟同步请求消息的实际发起时间 戳及接收时间戳、 第一响应报文的实际传送时间戳及到达时间戳计算出的时间 偏移更加准确, 使网络时钟同步更加精确, 满足了用户的需求。
另外, 本领域普通技术人员可以理解实现上述实施例方法中的全部或部分 流程, 是可以通过程序来指令相关的硬件来完成, 所述的程序可存储于一计算 机可读取存储介质中, 该程序在执行时, 可包括如上述各方法的实施例的流程。 其中, 所述的存储介质可为磁碟、 光盘、 只读存储记忆体(Read-Only Memory, ROM )或随机存储记忆体(Radom Access Memory, RAM )等。
以上所揭露的仅为本发明实施例中的一种较佳实施例而已, 当然不能以此 来限定本发明之权利范围, 因此依本发明权利要求所作的等同变化, 仍属本发 明所涵盖的范围。

Claims

权 利 要 求
1、 一种网络时钟同步的方法, 其特征在于, 该方法包括:
向第二网络设备发送时钟同步请求报文, 并保存所述时钟同步请求报文的 发起时间戳和实际发起时间戳;
接收所述第二网络设备反馈的返回报文 , 记录并保存所述返回报文的到达 时间戳;
当所述返回报文中的发起时间戳与保存的所述时钟同步请求报文的发起时 间戳匹配成功时, 从所述返回报文中获取并保存所述时钟同步请求报文的接收 时间戳和所述返回报文的实际传送时间戳;
根据保存的所述时钟同步请求报文的实际发起时间戳和接收时间戳, 以及 所述返回报文的实际传送时间戳和到达时间戳, 计算出相对于所述第二网络设 备的时间偏移并根据所述时间偏移调整时钟。
2、 如权利要求 1所述的网络时钟同步的方法, 其特征在于, 从所述返回报 文中获取并保存所述时钟同步请求报文的接收时间戳和所述返回报文的实际传 送时间戳具体为:
根据所述返回报文中携带的指示位获取所述时钟同步请求报文的接收时间 戳、 所述返回报文的实际传送时间戳;
保存所述获取的所述时钟同步请求报文的接收时间戳、 所述返回报文的实 际传送时间戳。
3、 如权利要求 2所述的网络时钟同步的方法, 其特征在于, 根据所述返回 报文中携带的指示位获取所述时钟同步请求报文的接收时间戳、 所述返回报文 的实际传送时间戳具体包括:
当检测到所述指示位为第一预定值时, 所述返回报文为第一响应报文, 获 取所述第一响应报文中携带的接收时间戳,
当检测所述指示位非第一预定值时, 所述返回报文为第二响应报文, 获取 所述第二响应报文中携带的所述第一响应报文的实际传送时间戳; 或者,
当检测到所述指示位为第一预定值时, 所述返回报文为第一响应报文; 当检测所述指示位非第一预定值时, 所述返回报文为第二响应报文, 第一 网络设备获取第二响应报文中携带的所述第一响应报文的实际传送时间戳和所 述第二响应报文中的接收时间戳。
4、 如权利要求 1所述的网络时钟同步的方法, 其特征在于, 所述方法还包 括:
发送所述时钟同步请求报文的同时, 启动定时器;
检测是否接收到所述返回报文, 在所述定时器超时前接收到所述返回报文, 则关闭所述定时器; 否则删除所述保存的所述时钟同步请求报文的发起时间戳、 实际发起时间戳和接收时间戳、 所述返回报文的实际传送时间戳和到达时间戳, 并将重新发送时钟同步请求报文, 重新启动定时器。
5、 如权利要求 4所述的网络时钟同步的方法, 其特征在于, 所述方法还进 一步包括:
当所述返回报文中的发起时间戳与所述同步时间戳表中的发起时间戳匹配 失败后, 第一网络设备检测所述定时器是否超时, 如果所述定时器超时了, 则 删除所述保存的所述时钟同步请求报文的发起时间戳、 实际发起时间戳和所述 返回报文的到达时间戳, 并重新发送时钟同步请求报文, 重新启动定时器。
6、 如权利要求 1所述的方法, 其特征在于, 所述时钟同步请求报文和返回 文通过现场可编程门阵列 FPGA在网络第二层通过以太类型来识别。
7、 一种网络时钟同步的装置, 其特征在于, 包括:
发送模块, 用于发送时钟同步请求报文给第二网络设备;
现场可编程门阵列 FPGA模块, 用于接收所述第二网络设备发送的返回报 文, 并记录所述时钟同步请求报文的实际发起时间戳和所述返回报文的到达时 间戳;
获取模块, 用于当所述 FPGA模块接收的返回报文中的发起时间戳与记录 的所述时钟同步请求报文的发起时间戳匹配成功时 , 从所述返回报文中获取所 述时钟同步请求报文的接收时间戳、 听述返回报文的实际传送时间戳; 存储模块, 用于存储所述时钟同步请求报文中的发起时间戳、 所述 FPGA 模块记录的实际发起时间戳和所述返回报文的到达时间戳 , 以及存储所述获取 模块获取的时钟同步请求报文的接收时间戳和所述返回报文的实际传送时间 戳;
处理模块, 用于根据所述存储模块中保存的时间戳信息计算出相对于第二 网络设备的时间偏移 , 并且根据所述时间偏移调整时钟。
8、 如权利要求 7所述的网络时钟同步的装置, 其特征在于, 所述获取模块 包括:
检测单元, 用于检测所述返回报文中的指示位信息;
提取单元, 用于当所述检测单元检测到所述指示位为第一预定值时, 所述 返回报文为第一响应报文, 获取所述第一响应报文中携带的接收时间戳, 当所 述检测单元检测到所述指示位非第一预定值时, 所述返回报文为第二响应报文, 获取所述第二响应报文中携带的所述第一响应报文的实际传送时间戳;
或者, 当所述检测单元检测到所述指示位为第一预定值时, 所述返回报文 为第一响应报文, 当所述检测单元检测到所述指示位非第一预定值时, 所述返 回报文为第二响应报文, 第一网络设备获取第二响应报文中携带的所述第一响 应报文的实际传送时间戳和所述第二响应报文中的接收时间戳。
9、 如权利要求 7或 8所述的网络时钟同步的装置, 其特征在于, 所述装置 还包括定时器, 用于在所述发送模块发送时钟同步请求报文时开始计时。
10、 如权利要求 9所述的网络时钟同步的装置, 其特征在于, 所述装置还 包括:
检测模块, 用于在所述定时器的定时范围内检测所述接收模块是否接收到 所述返回^艮文;
检测结果处理模块, 用于当检测模块检测到在所述定时器定时范围内所述 接收模块未接收到所述返回报文时, 删除所述存储模块中的时间戳信息, 并触 发所述发送模块重新发送时钟同步请求报文。
11、 一种网络时钟同步系统, 其特征在于, 包括相互通信的第一网络设备 和第二网络设备, 其中,
第一网络设备, 用于向第二网络设备发送时钟同步请求报文, 并保存所述 时钟同步请求报文的发起时间戳和实际发起时间戳; 并接收所述第二网络设备 反馈的返回报文, 记录并保存所述返回报文的到达时间戳; 当所述返回报文中 的发起时间戳与保存的所述时钟同步请求报文的发起时间戳匹配成功时 , 从所 述返回报文中获取并保存所述时钟同步请求报文的接收时间戳、 所述返回报文 的实际传送时间戳; 根据保存的所述时钟同步请求报文的实际发起时间戳和接 收时间戳, 以及所述返回报文的实际传送时间戳和到达时间戳, 计算出相对于 所述第二网络设备的时间偏移并根据所述时间偏移调整时钟。
第二网络设备 , 用于接收所述第一网络设备发送的时钟同步请求报文后 , 保存所述时钟同步请求报文的到达时间 , 向所述第一网络设备发送返回报文。
PCT/CN2008/073478 2007-12-13 2008-12-12 一种网络时钟同步的方法、装置及系统 WO2009076908A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN200710032424.6 2007-12-13
CNA2007100324246A CN101459502A (zh) 2007-12-13 2007-12-13 一种网络时钟同步的方法与装置

Publications (1)

Publication Number Publication Date
WO2009076908A1 true WO2009076908A1 (zh) 2009-06-25

Family

ID=40770148

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/073478 WO2009076908A1 (zh) 2007-12-13 2008-12-12 一种网络时钟同步的方法、装置及系统

Country Status (2)

Country Link
CN (1) CN101459502A (zh)
WO (1) WO2009076908A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106506107A (zh) * 2016-11-25 2017-03-15 中国科学院武汉物理与数学研究所 一种基于硬件时间戳的ntp服务器授时实现方法
US10187196B2 (en) 2014-11-03 2019-01-22 The Wuhan Digital Pet Co., Ltd Method and device for providing a global clock in a system
EP3979527A1 (en) * 2020-09-30 2022-04-06 Rockwell Automation Technologies, Inc. System and method of network synchronized time in safety applications

Families Citing this family (31)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101577715A (zh) * 2009-06-19 2009-11-11 腾讯科技(深圳)有限公司 一种同步网络游戏时间的方法及装置
CN101989906B (zh) 2009-07-30 2013-12-18 华为技术有限公司 报文同步方法、装置及系统
CN102026181B (zh) * 2009-09-21 2014-03-19 中兴通讯股份有限公司 一种实现is-856鉴权的优化方法及系统
CN102035613A (zh) * 2009-09-28 2011-04-27 华为技术有限公司 实现时间同步的方法、装置及网络系统
US8533355B2 (en) * 2009-11-02 2013-09-10 International Business Machines Corporation Techniques for improved clock offset measuring
CN102244925B (zh) 2010-05-14 2014-05-07 华为技术有限公司 时钟同步方法、用户端设备和时钟同步系统
CN102377556B (zh) * 2010-08-19 2016-04-13 中兴通讯股份有限公司 一种实现主备光线路终端时间戳同步的方法及系统
CN101986590A (zh) * 2010-11-03 2011-03-16 烟台持久钟表集团有限公司 子钟同步时间精确性检测装置及检测方法
CN102065472B (zh) * 2010-12-09 2013-02-06 重庆邮电大学 基于跨层设计的确定无线网络编码参与分组的方法
CN102209307A (zh) * 2011-05-20 2011-10-05 中兴通讯股份有限公司 时间同步方法及装置
CN102983959B (zh) * 2011-09-05 2015-05-13 盛科网络(苏州)有限公司 在多个mac中实现ptp一步模式和两步模式的方法及装置
CN102571911B (zh) * 2011-11-17 2014-11-19 电信科学技术第五研究所 一种基于ntp协议的计算机时间同步及监控方法
CN102404104B (zh) * 2011-11-24 2018-01-19 中兴通讯股份有限公司 基于不同延时机制的自适应同步方法及系统
US9125168B2 (en) 2013-01-23 2015-09-01 Intel Corporation Polled time-of-flight response
CN105116376B (zh) * 2013-01-23 2018-09-11 英特尔公司 轮询的飞行时间响应
CN103457714A (zh) * 2013-08-19 2013-12-18 国家电网公司 同步服务器时间的方法及系统
CN103686203A (zh) * 2013-12-04 2014-03-26 深圳市融创天下科技股份有限公司 视频转码方法及装置
CN105323054B (zh) * 2014-06-26 2019-05-17 中兴通讯股份有限公司 时钟同步方法及装置
CN105262555B (zh) * 2014-07-16 2021-05-28 中兴通讯股份有限公司 一种时间同步方法、可编程逻辑器件、单板及网元
CN104917645B (zh) * 2015-04-17 2018-04-13 浪潮电子信息产业股份有限公司 一种在线检测报文传输超时的方法与装置
WO2016205455A1 (en) 2015-06-17 2016-12-22 Thomson Licensing System and method for setting time and date in a device without access to network time protocol
CN104993920B (zh) * 2015-07-03 2017-10-31 上海斐讯数据通信技术有限公司 一种基于sntp 的同步时间方法及sntp 客户端
CN106656387B (zh) * 2015-10-30 2018-09-07 华为技术有限公司 用于检测时钟同步路径的方法、节点及系统
CN107786293B (zh) * 2016-08-29 2020-10-16 中兴通讯股份有限公司 时间同步方法、主时钟设备、从时钟设备及时间同步系统
CN109347851B (zh) * 2018-11-06 2021-11-02 杭州迪普科技股份有限公司 一种请求响应方法及装置
CN111865830B (zh) * 2019-04-29 2022-04-22 华为技术有限公司 一种时延敏感网络业务tsn的处理方法、装置及系统
CN111343482A (zh) * 2020-03-12 2020-06-26 青岛海信宽带多媒体技术有限公司 基于Ipv6扩展报头的时钟同步方法、装置及显示设备
CN114124275A (zh) * 2020-08-31 2022-03-01 深圳市中兴微电子技术有限公司 一种时间同步方法、装置、设备及存储介质
CN113014351B (zh) * 2021-03-15 2022-07-22 四川英得赛克科技有限公司 一种无侵入式对时方法、系统及存储介质
CN113179441B (zh) * 2021-03-26 2023-06-30 卡莱特云科技股份有限公司 一种同步播放方法、装置、系统及计算机设备
WO2023060390A1 (en) * 2021-10-11 2023-04-20 Telefonaktiebolaget Lm Ericsson (Publ) Method and network device for ptp clock synchronization

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073718A1 (en) * 2000-12-28 2004-04-15 Svein Johannessen Time synchronization in computer network
CN1859373A (zh) * 2005-11-02 2006-11-08 华为技术有限公司 一种通过网络时间协议对客户端校时的方法及设备
WO2007069041A2 (en) * 2005-12-15 2007-06-21 Abb Technology Ltd. Using travel-time as means for improving the accuracy of simple network time protocol

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040073718A1 (en) * 2000-12-28 2004-04-15 Svein Johannessen Time synchronization in computer network
CN1859373A (zh) * 2005-11-02 2006-11-08 华为技术有限公司 一种通过网络时间协议对客户端校时的方法及设备
WO2007069041A2 (en) * 2005-12-15 2007-06-21 Abb Technology Ltd. Using travel-time as means for improving the accuracy of simple network time protocol

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10187196B2 (en) 2014-11-03 2019-01-22 The Wuhan Digital Pet Co., Ltd Method and device for providing a global clock in a system
CN106506107A (zh) * 2016-11-25 2017-03-15 中国科学院武汉物理与数学研究所 一种基于硬件时间戳的ntp服务器授时实现方法
CN106506107B (zh) * 2016-11-25 2019-03-12 武汉中科坤德科技有限公司 一种基于硬件时间戳的ntp服务器授时实现方法
EP3979527A1 (en) * 2020-09-30 2022-04-06 Rockwell Automation Technologies, Inc. System and method of network synchronized time in safety applications
US11599090B2 (en) 2020-09-30 2023-03-07 Rockwell Automation Technologies, Inc. System and method of network synchronized time in safety applications

Also Published As

Publication number Publication date
CN101459502A (zh) 2009-06-17

Similar Documents

Publication Publication Date Title
WO2009076908A1 (zh) 一种网络时钟同步的方法、装置及系统
CN101455014B (zh) 传送所发送的或者所接收的消息的发送时间信息或者接收时间信息的方法和装置
US8451867B2 (en) Network time protocol precision timestamping service
US8879586B2 (en) Inband timestamping
US7349400B2 (en) Method and system for transport protocol reconstruction and timer synchronization for non-intrusive capturing and analysis of packets on a high-speed distributed network
US8730867B2 (en) Clock synchronization aid device for communication station(s) of a wireless network, and associated clock synchronization device
CN108880727B (zh) 一种基于PTPd2协议的精确时钟同步实现方法
JP4853625B2 (ja) 伝搬遅延時間測定方法、同期方法、及び無線lanシステム
JP2006081193A (ja) 信頼性のないプロトコルによる頑強な通信システム及び方法
US8351437B2 (en) Stereo bit clock tuning
WO2011076051A1 (zh) 时间同步的方法、设备及系统
WO2012151808A1 (zh) 基于精确时钟协议提高同步精度的方法及系统
WO2012003746A1 (zh) 一种实现边界时钟的方法和装置
WO2018107606A1 (zh) 物联网中消息传递方法和装置
WO2010072176A1 (zh) 一种时钟同步的方法、装置和系统
WO2004093386A1 (en) Sytem and method for measuring data network quality
WO2011009369A1 (zh) 一种实现rtp数据流多路复用的信令协商方法和装置
WO2017177751A1 (zh) 时间同步方法和装置
US9065748B2 (en) Symmetrical latency with TDM circuit emulated service
CN105634716A (zh) 一种机载网络ieee1588协议从时钟端口同步方法
CN103546273A (zh) 基于ptp帧的频率同步装置及方法
WO2018227703A1 (zh) 物联网中消息传递方法和装置
JP5041815B2 (ja) 通信装置および基地局システム
WO2020054219A1 (ja) 通信装置および通信システム
WO2013075493A1 (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: 08861650

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08861650

Country of ref document: EP

Kind code of ref document: A1