WO2012068845A1 - Method and system for time synchronization - Google Patents

Method and system for time synchronization Download PDF

Info

Publication number
WO2012068845A1
WO2012068845A1 PCT/CN2011/074301 CN2011074301W WO2012068845A1 WO 2012068845 A1 WO2012068845 A1 WO 2012068845A1 CN 2011074301 W CN2011074301 W CN 2011074301W WO 2012068845 A1 WO2012068845 A1 WO 2012068845A1
Authority
WO
WIPO (PCT)
Prior art keywords
physical network
network port
indicates
port rate
slave device
Prior art date
Application number
PCT/CN2011/074301
Other languages
French (fr)
Chinese (zh)
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 中兴通讯股份有限公司
Publication of WO2012068845A1 publication Critical patent/WO2012068845A1/en

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 present invention relates to the field of clock synchronization, and in particular, to a method and system for time synchronization.
  • IP-based packet network transmission data has been the mainstream of development.
  • new services and new applications impose higher requirements on the synchronization of the network, and on the other hand, traditional time division multiplexing
  • TDM Time Division Multiplexing
  • the Precision Time Synchronization Protocol (1588-2008) is a timing mechanism for overcoming the lack of real-time Ethernet. Its emergence has brought us hope. Its main principle is to all the network. The node performs time synchronization, and the clock of all nodes in the network is periodically synchronized and corrected by an accurate time source.
  • IEEE 1588 PTP is an Ethernet clock synchronization protocol that implements master-slave synchronization by synchronizing messages.
  • the PTP standard protocol can be carried over Ethernet 802.3, UDP/IPv4, and UDP/IPv6.
  • the format of the 802.3 frame structure is shown in Table 1.
  • the IEEE 1588v2 system is a master-slave synchronization system.
  • the master clock sends PTP time information according to a predetermined time interval
  • the clock port receives the timestamp information sent by the master clock port, and the system calculates the master according to the time.
  • the line time delay and the master-slave time difference are used, and the time difference is used to adjust the local time so that the slave time is kept at the same frequency and phase as the master time.
  • the body scheme is shown in Figure 1.
  • the master sends a Sync message and records the time tl.
  • the slave device receives the Sync message, it records t2.
  • the slave learns tl based on the Follow_up message sent by the master.
  • the slave device initiates a Delay_Req message and records the time t3.
  • the master device After receiving the Delay-Req message, the master device records the time t4 and fills in the Delay_Resp message.
  • the slave learns t4 based on the Delay_Resp message sent by the master.
  • tl and t2 are the timestamps for sending and receiving Sync messages, that is, t1 is the time when the Sync message is sent out to the master device, and t2 is the time when the Sync message arrives at the slave device.
  • T3 and t4 are the transmission and reception timestamps of the Delay-Req message respectively, that is, t3 is the time when the Delay-Req message is sent out from the device, and t4 is the time when the Delay-Req message is sent to the master device.
  • the difference between the time of the slave device and the time of the master device is the difference between the time of the slave device and the time of the master device.
  • the existing IEEE 1588-2008 standard does not explicitly describe whether the primary and secondary physical network ports are rate matched. If the rate of the primary and secondary physical network ports is inconsistent, the delay time from the master to the slave is different from the delay time from the master to the slave. Time synchronization error, resulting in phase asymmetry in synchronization.
  • the technical problem to be solved by the present invention is to provide a method and system for time synchronization, which solves the problem that the time between the master and the slave is inconsistent due to the inconsistent physical rate of the time stamp interface.
  • the present invention provides a method for time synchronization, including: The master device notifies the slave device of its physical network port rate information.
  • the device learns the physical network port rate of the master device, it compares it with its own physical network port rate. If it is not the same, it compensates the calculated average line transmission delay. Otherwise, no compensation is performed.
  • the above method has the following characteristics:
  • the step of the master device notifying the slave device of the physical network port rate includes:
  • the master device sends a notification packet to the slave device, where the notification packet carries its own physical network port rate information.
  • the above method has the following characteristics:
  • the master device Before the master device sends the notification packet to the slave device, the master device writes its own physical network port rate information into the reserved byte between the domain number of the notification packet and the identifier field.
  • the above method has the following characteristics:
  • 0001 indicates the physical network port rate of 10M
  • 0010 indicates the 100M physical network port rate
  • 0100 indicates the 1000M physical network port rate
  • 1000 indicates the 10000M physical network port rate.
  • the above method has the following characteristics:
  • the slave device compensates the clock offset by subtracting the delay error from the calculated average line transmission delay, where
  • J represents the entire frame length except the frame preamble and the check bit
  • J 2 represents the check bit length
  • represents the frame preamble length
  • Sm represents the time at which the physical network port of the master device forwards each bit of data
  • Ss represents the physical network port of the slave device. The time to forward each bit of data.
  • the present invention provides a time synchronization system including a master device and one or more slave devices.
  • the master device is configured to: notify the slave device of the physical network port rate information;
  • the slave device is set to: After the physical network port rate of the master device is learned, the physical network port rate is For comparison, if not the same, the calculated average line transmission delay is compensated, otherwise, no compensation is performed.
  • the above system has the following characteristics:
  • the master device is further configured to: notify the slave device by sending the notification message to the slave device, and the notification packet carries the rate information of the physical network port of the device.
  • the above system has the following characteristics:
  • the master device is further configured to: write the physical network port rate information of the notification message into the reserved byte between the domain number of the notification message and the identifier field before sending the notification message to the slave device.
  • the above system has the following characteristics:
  • 0001 indicates the physical network port rate of 10M
  • 0010 indicates the 100M physical network port rate
  • 0100 indicates the 1000M physical network port rate
  • 1000 indicates the 10000M physical network port rate.
  • the above system has the following characteristics:
  • the slave device is further configured to: compensate the clock offset by subtracting a delay error from the calculated average line transmission delay, where
  • indicates the entire frame length except the frame preamble and check digit
  • J 2 indicates the check bit length
  • indicates the frame preamble length
  • Sm indicates the time at which the physical network port of the master device forwards each bit of data
  • Ss indicates the physical network port of the slave device. The time to forward each bit of data.
  • the delay asymmetry caused by the inconsistent rate of the primary and secondary physical network ports can be solved in the delay request response mechanism, resulting in phase unsynchronization.
  • Figure 1 is a schematic diagram of a delay request response mechanism
  • FIG. 2 is a schematic diagram of networking
  • Fig. 3 is a flow chart showing an application example of the present invention. Preferred embodiment of the invention
  • the intermediate unknown network (cloud network) has the same delay
  • the check digit is 4 bits
  • the physical network port rate of the master device is Gigabit Ethernet
  • the physical network port rate of the slave device is 100 Mbps Ethernet
  • the delay of the event message is:
  • t2-tl (L l + L 2 ⁇ ytes x ltslbyte x GE nslbit + D PSN + (L 3) bytes x ltslbyte x FE mlbit ( Formula 3) wherein, A represents a frame preamble (pre-amble) and other checking The entire frame length outside the bit (FCS); J 2 represents the length of the check bit ( FCS );
  • J 3 represents the length of the frame preamble (re-amble).
  • FE m/bit indicates the time when the 100M physical network port forwards data per bit.
  • D PSN represents unknown time delay through the packet network
  • T4-t3 ⁇ L x + L 2 ) bytes x Usjbyte x FE nsjbu + D PSN + (L 3 ) bytes x ltslhyte x GE nsjbu (Formula 4) where A, 2 , L GE nslM , FE mlbtt , D layer and Equation 3 represents the same.
  • the average line transmission delay is as follows:
  • N meanPathDelayA (A + 2 ) X 8 X GE ⁇ FE + 3 ⁇ 8 x FE ⁇ GE (Equation 8) Equation 6
  • Subtraction 4 calculates the delay error from Master to Slave and Slave to Master: r _ (J ⁇ o GE ⁇ FE FE ⁇ GE ( - Q
  • the time required to transmit one bit of data is Ins.
  • the time required to transmit one bit of data is 10 ns. Substituting 8 or 9 can be obtained,
  • the primary device is the 1000M physical network port rate
  • the secondary device is the 100M physical network port rate, which is subjected to the primary switching and the nine-level switching respectively.
  • the experimental results are shown in the table below. It can be seen from Table 2 that the increase of the number of switching stages has no effect on the asymmetry, which is caused by the rate mismatch between the primary and secondary physical network ports.
  • the invention proposes to solve the problem of delay asymmetry caused by the inconsistent rate of the physical network port between the master and the slave.
  • the method is as follows: The master device informs the slave device of the physical network port rate information of the master device; after the slave device learns the rate of the physical network port of the master device, compares the rate with the physical network port of the master device, and if not, the calculated average route The transmission delay is compensated, otherwise, no compensation is performed.
  • the master device may send an Announce message to the slave device, where the notification packet carries its own physical network port rate information.
  • the physical network port rate information may be located in a reserved byte between the domainNumber and the flag field, that is, the master device sends the notification message to the slave device before the master device sends the notification message to the slave device.
  • the physical network port rate information can be written into the reserved byte between the domainNumber and the flagField of the notification message.
  • 0001 indicates the physical network port rate of 10M
  • 0010 indicates the 100M physical network port rate
  • 0100 indicates the 1000M physical network port rate
  • 1000 indicates the 10000M physical network port rate.
  • the slave device compensates the clock offset by subtracting the delay error from the calculated average line transmission delay, where
  • indicates the entire frame length except the frame preamble and check digit
  • J 2 indicates the check bit length
  • indicates the frame preamble length
  • Sm indicates the time at which the physical network port of the master device forwards each bit of data
  • Ss indicates the physical network port of the slave device. The time to forward each bit of data.
  • the time synchronization system of the embodiment of the present invention includes a master device and one or more slave devices, wherein
  • the master device notifies the slave device of the physical network port rate information while implementing the function of the master device;
  • the device After the device performs the function of its master device, it learns the rate of the physical network port of the master device through the Announce packet and compares it with the rate of its physical network port. If not, the calculated average line transmission delay is performed. Compensation, otherwise, no compensation will be made.
  • the master device may be further configured to notify the slave device of the physical network port rate information by sending the notification message to the slave device, where the notification message carries its own physical network port rate information.
  • the master device is further configured to write the physical network port rate information of the notification message into the reserved byte between the domain number of the notification message and the domain identifier before sending the notification message to the slave device.
  • the slave device may be further configured to compensate the clock offset by subtracting a delay error from the calculated average line transmission delay, where
  • indicates the entire frame length except the frame preamble and check digit
  • J 2 indicates the check bit length
  • indicates the frame preamble length
  • Sm indicates the time at which the physical network port of the master device forwards each bit of data
  • Ss indicates the physical network port of the slave device. The time to forward each bit of data.
  • the present invention is further illustrated by an application example in which the rate of the physical network port of the primary device is increased in the Announce message header.
  • the model for time synchronization using 1588 is shown in Figure 2. There may be multiple switches, routers, etc. in the middle.
  • this example includes the following steps:
  • Step 301 The master device writes its own physical network port rate information into the reserved bytes between the domainNumber and the flagField of the Announce message, where 0001 indicates 10M, 0010 indicates 100M, 0100 indicates 1000M, and 1000 indicates 10000M;
  • Step 302 The master device sends the Announce text to the slave device.
  • Step 303 After receiving the Announce message, the slave device parses the physical network port rate of the master device.
  • Step 304 The slave device compares the rate of the physical network port of the master device with the rate of the physical network port of the slave device. If they are the same, the device does not perform compensation. If not, the length of the packet is parsed. The calculated value is compensated.
  • the delay asymmetry caused by the inconsistent rate of the primary and secondary physical network ports can be solved in the delay request response mechanism, resulting in phase unsynchronization.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)

Abstract

The present invention discloses a method and system for time synchronization. The method includes: a master device notifies its own physical network port rate information to a slave device; after obtaining the physical network port rate of the master device, the slave device compares the physical network port rate with its own physical network port rate; if they are different, the slave device performs compensation for an average line transmission delay obtained by calculation, otherwise, the slave device does not perform compensation. By applying the technical solutions of the present invention, the problem that asymmetrical delays caused by inconsistent master and slave physical network port rates result in asynchronous phases can be solved in a delay request response mechanism.

Description

一种时间同步的方法和系统  Method and system for time synchronization
技术领域 Technical field
本发明涉及时钟同步领域, 尤其涉及一种时间同步的方法和系统。  The present invention relates to the field of clock synchronization, and in particular, to a method and system for time synchronization.
背景技术 Background technique
在通信系统中, 随着数据业务和多媒体业务的不断发展, 基于 IP的分组 网络传送数据已是发展的主流。 这时, 一方面新的业务和新的应用对网络的 同 步 性 能提 出 更 高 的 要求 , 另 一 方 面 对传 统 时分复用 In the communication system, with the continuous development of data services and multimedia services, IP-based packet network transmission data has been the mainstream of development. At this time, on the one hand, new services and new applications impose higher requirements on the synchronization of the network, and on the other hand, traditional time division multiplexing
( Time Division Multiplexing, TDM )业务的兼容等都需要分组网络提供高质 量的同步与定时性能。 (Time Division Multiplexing, TDM) service compatibility, etc. require packet networks to provide high quality synchronization and timing performance.
精密时钟同步协议 ( Precision Time Synchronization Protocol, 1588-2008 ) 是为克服以太网实时性不足而规定的一种对时机制, 它的出现给我们带来了 希望, 它的主要原理是对网络中所有节点进行对时同步, 由一个精确的时间 源周期性地对网络中所有节点的时钟进行校正同步。  The Precision Time Synchronization Protocol (1588-2008) is a timing mechanism for overcoming the lack of real-time Ethernet. Its emergence has brought us hope. Its main principle is to all the network. The node performs time synchronization, and the clock of all nodes in the network is periodically synchronized and corrected by an accurate time source.
IEEE 1588 PTP是一种以太网时钟同步协议, 通过同步报文实现主从同 步。 PTP标准协议可以承载在 Ethernet 802.3、 UDP/IPv4和 UDP/IPv6 , 802.3 帧结构的形式如表 1所示。  IEEE 1588 PTP is an Ethernet clock synchronization protocol that implements master-slave synchronization by synchronizing messages. The PTP standard protocol can be carried over Ethernet 802.3, UDP/IPv4, and UDP/IPv6. The format of the 802.3 frame structure is shown in Table 1.
表 1 preamble SFD Des MAC Sour MAC Data /Load FCS Table 1 preamble SFD Des MAC Sour MAC Data /Load FCS
Figure imgf000003_0001
Figure imgf000003_0001
7 bytes 1 byte 6 bytes 6 bytes 2 bytes 46-1500 bytes 4 bytes  7 bytes 1 byte 6 bytes 6 bytes 2 bytes 46-1500 bytes 4 bytes
IEEE 1588v2系统作为一种主从同步系统,在系统的同步过程中,主时钟 按照预定的时间间隔发送 PTP时间信息, 从时钟端口接收主时钟端口发来的 时间戳信息, 系统据此计算出主从线路时间延迟及主从时间差, 并利用该时 间差调整本地时间, 使从设备时间保持与主设备时间一致的频率与相位。 具 体方案如图 1所示。 主设备 ( Master )发送 Sync (同步)报文, 并记录时间 tl。 从设备(Slave )在接收到 Sync报文时, 记录 t2。 从设备根据主设备发送 的 Follow_up (跟踪 )报文, 获知 tl。 从设备相应的发起 Delay_Req (延迟请 求)报文, 同时记录时间 t3 , 主设备收到 Delay— Req报文后, 记录时间 t4, 并填入 Delay_Resp (延时响应 )报文。 从设备根据主设备发送的 Delay_Resp (延迟响应 )报文, 获知 t4。 图 1中 tl和 t2分别为 Sync报文的发送和接收时间戳,即 tl是 Sync报文 出主设备时的时间, t2 为 Sync报文到从设备时的时间。 t3 和 t4 分别为 Delay— Req报文的发送和接收时间戳, 即 t3为 Delay— Req报文出从设备的时 间, t4为 Delay— Req报文到主设备的时间。 The IEEE 1588v2 system is a master-slave synchronization system. During the synchronization process of the system, the master clock sends PTP time information according to a predetermined time interval, and the clock port receives the timestamp information sent by the master clock port, and the system calculates the master according to the time. The line time delay and the master-slave time difference are used, and the time difference is used to adjust the local time so that the slave time is kept at the same frequency and phase as the master time. With The body scheme is shown in Figure 1. The master sends a Sync message and records the time tl. When the slave device (Slave) receives the Sync message, it records t2. The slave learns tl based on the Follow_up message sent by the master. The slave device initiates a Delay_Req message and records the time t3. After receiving the Delay-Req message, the master device records the time t4 and fills in the Delay_Resp message. The slave learns t4 based on the Delay_Resp message sent by the master. In Figure 1, tl and t2 are the timestamps for sending and receiving Sync messages, that is, t1 is the time when the Sync message is sent out to the master device, and t2 is the time when the Sync message arrives at the slave device. T3 and t4 are the transmission and reception timestamps of the Delay-Req message respectively, that is, t3 is the time when the Delay-Req message is sent out from the device, and t4 is the time when the Delay-Req message is sent to the master device.
平均线路传输延时  Average line transmission delay
mean_path_delay = [(t2 - tl) + (t4 - 13)]/2 = [(t2 - 13) + (t4 - tl)]/2 (式 Mean_path_delay = [(t2 - tl) + (t4 - 13)]/2 = [(t2 - 13) + (t4 - tl)]/2 (
1 ) 1 )
从设备的时间与主设备的时间之差为  The difference between the time of the slave device and the time of the master device is
offset=[(tl - 12) + (t4 - 13)]/2 (式 2 ) 通过上面两式, 可以把从设备的时间同步于主设备。  Offset=[(tl - 12) + (t4 - 13)]/2 (Equation 2) By the above two equations, the slave device's time can be synchronized to the master device.
目前同步设备厂商们正在试图用 IEEE1588 网络时钟代替全球定位系统 ( Global Positioning System, GPS )时钟源, 但是发布的 IEEE1588-2008在实 现时还存在一些问题。 发明内容  Synchronous device vendors are currently trying to replace the Global Positioning System (GPS) clock source with the IEEE1588 network clock, but the IEEE1588-2008 release still has some problems. Summary of the invention
现有的 IEEE1588-2008标准没有明确描述主与从物理连接网口是否速率 匹配, 如果主从物理连接网口速率不一致, 会导致主到从的延迟时间与从到 主的延迟时间不同, 从而产生时间同步误差, 导致同步时相位不对称问题。  The existing IEEE 1588-2008 standard does not explicitly describe whether the primary and secondary physical network ports are rate matched. If the rate of the primary and secondary physical network ports is inconsistent, the delay time from the master to the slave is different from the delay time from the master to the slave. Time synchronization error, resulting in phase asymmetry in synchronization.
本发明要解决的技术问题提出一种时间同步的方法和系统, 解决主从间 由于时间戳接口物理速率不一致, 导致主从间时间不同步问题。  The technical problem to be solved by the present invention is to provide a method and system for time synchronization, which solves the problem that the time between the master and the slave is inconsistent due to the inconsistent physical rate of the time stamp interface.
为了解决上述问题, 本发明提供一种时间同步的方法, 包括: 主设备将自身的物理网口速率信息告知从设备; In order to solve the above problems, the present invention provides a method for time synchronization, including: The master device notifies the slave device of its physical network port rate information.
从设备获知主设备的物理网口速率后,与自身的物理网口速率进行比较, 如果不相同, 则对计算得到的平均线路传输延时进行补偿, 否则, 不进行补 偿。  After the device learns the physical network port rate of the master device, it compares it with its own physical network port rate. If it is not the same, it compensates the calculated average line transmission delay. Otherwise, no compensation is performed.
优选地, 上述方法具有以下特点:  Preferably, the above method has the following characteristics:
所述主设备将自身的物理网口速率告知从设备的步骤包括:  The step of the master device notifying the slave device of the physical network port rate includes:
主设备向从设备发送通知报文, 所述通知报文中携带自身的物理网口速 率信息。  The master device sends a notification packet to the slave device, where the notification packet carries its own physical network port rate information.
优选地, 上述方法具有以下特点:  Preferably, the above method has the following characteristics:
所述主设备向从设备发送通知报文之前, 所述主设备将自身的物理网口 速率信息写入所述通知报文的域号和标识域之间的保留字节中。  Before the master device sends the notification packet to the slave device, the master device writes its own physical network port rate information into the reserved byte between the domain number of the notification packet and the identifier field.
优选地, 上述方法具有以下特点:  Preferably, the above method has the following characteristics:
所述物理网口速率信息中, 釆用 0001表示 10M的物理网口速率、 0010 表示 100M物理网口速率、0100表示 1000M物理网口速率、1000表示 10000M 物理网口速率。  In the physical network port rate information, 0001 indicates the physical network port rate of 10M, 0010 indicates the 100M physical network port rate, 0100 indicates the 1000M physical network port rate, and 1000 indicates the 10000M physical network port rate.
优选地, 上述方法具有以下特点:  Preferably, the above method has the following characteristics:
所述从设备通过将计算得到的平均线路传输延时减去延时误差, 对所述 时钟偏差进行补偿, 其中,  The slave device compensates the clock offset by subtracting the delay error from the calculated average line transmission delay, where
所述延时误差为: N匪一一 tiy = ( +J2) x 8 x ^^ + J3 x 8 x ^^ The delay error is: N 匪一一tiy = ( + J 2 ) x 8 x ^^ + J 3 x 8 x ^^
J表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 J represents the entire frame length except the frame preamble and the check bit, J 2 represents the check bit length, ^ represents the frame preamble length, Sm represents the time at which the physical network port of the master device forwards each bit of data, and Ss represents the physical network port of the slave device. The time to forward each bit of data.
为了解决上述问题, 本发明提供一种时间同步的系统, 包括主设备和一 个或多个从设备,  In order to solve the above problems, the present invention provides a time synchronization system including a master device and one or more slave devices.
主设备设置为: 将自身的物理网口速率信息告知从设备;  The master device is configured to: notify the slave device of the physical network port rate information;
从设备设置为: 获知主设备的物理网口速率后, 与自身的物理网口速率 进行比较, 如果不相同, 则对计算得到的平均线路传输延时进行补偿, 否则, 不进行补偿。 The slave device is set to: After the physical network port rate of the master device is learned, the physical network port rate is For comparison, if not the same, the calculated average line transmission delay is compensated, otherwise, no compensation is performed.
优选地, 上述系统具有以下特点:  Preferably, the above system has the following characteristics:
主设备还设置为: 通过向从设备发送通知报文, 所述通知报文中携带自 身的物理网口速率信息, 将自身的物理网口速率信息告知从设备。  The master device is further configured to: notify the slave device by sending the notification message to the slave device, and the notification packet carries the rate information of the physical network port of the device.
优选地, 上述系统具有以下特点:  Preferably, the above system has the following characteristics:
所述主设备还设置为: 向从设备发送通知报文之前, 将自身的物理网口 速率信息写入所述通知报文的域号和标识域之间的保留字节中。  The master device is further configured to: write the physical network port rate information of the notification message into the reserved byte between the domain number of the notification message and the identifier field before sending the notification message to the slave device.
优选地, 上述系统具有以下特点:  Preferably, the above system has the following characteristics:
所述物理网口速率信息中, 釆用 0001表示 10M的物理网口速率、 0010 表示 100M物理网口速率、0100表示 1000M物理网口速率、1000表示 10000M 物理网口速率。  In the physical network port rate information, 0001 indicates the physical network port rate of 10M, 0010 indicates the 100M physical network port rate, 0100 indicates the 1000M physical network port rate, and 1000 indicates the 10000M physical network port rate.
优选地, 上述系统具有以下特点:  Preferably, the above system has the following characteristics:
所述从设备还设置为: 通过将计算得到的平均线路传输延时减去延时误 差, 对所述时钟偏差进行补偿, 其中,  The slave device is further configured to: compensate the clock offset by subtracting a delay error from the calculated average line transmission delay, where
所述延时误差为: N匪一一 tiy = ( +J2) x 8 x ^^ + J3 x 8 x ^^ The delay error is: N 匪一一tiy = ( + J 2 ) x 8 x ^^ + J 3 x 8 x ^^
^表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 ^ indicates the entire frame length except the frame preamble and check digit, J 2 indicates the check bit length, ^ indicates the frame preamble length, Sm indicates the time at which the physical network port of the master device forwards each bit of data, and Ss indicates the physical network port of the slave device. The time to forward each bit of data.
釆用本发明的技术方案, 在延时请求响应机制中将可以解决由于主从物 理网口速率不一致引起的延迟不对称, 导致相位不同步问题。 With the technical solution of the present invention, the delay asymmetry caused by the inconsistent rate of the primary and secondary physical network ports can be solved in the delay request response mechanism, resulting in phase unsynchronization.
附图概述 BRIEF abstract
图 1是延时请求响应机制示意图;  Figure 1 is a schematic diagram of a delay request response mechanism;
图 2是组网示意图; 图 3是本发明应用示例的流程图。 本发明的较佳实施方式 2 is a schematic diagram of networking; Fig. 3 is a flow chart showing an application example of the present invention. Preferred embodiment of the invention
首先, 对现有技术出现的问题进行分析:  First, analyze the problems that arise in the prior art:
如图 2所示的组网方式中, 主设备与从设备之间物理接口速率不匹配的 情况下, 会带来非对称延时问题。 对于图 2, 我们在如下条件下进行分析:  In the networking mode shown in Figure 2, if the physical interface rate between the master device and the slave device does not match, the asymmetric delay problem will occur. For Figure 2, we analyze under the following conditions:
1、 两个方向的线路传输延时相等;  1. The line transmission delays in both directions are equal;
2、 中间未知网络(云网络)延时相同;  2. The intermediate unknown network (cloud network) has the same delay;
3、 在帧前导(preamble)与目的 MAC之间打时间戳;  3. Time stamping between the preamble and the destination MAC;
为了分析问题需要, 同时做如下假设:  In order to analyze the problem, we also make the following assumptions:
( 1 )釆用 UDP/IPv4/Ethemet报头, 包括校验位, 整个包长为 86比特; (1) Using the UDP/IPv4/Ethemet header, including the check digit, the entire packet length is 86 bits;
(2)报文帧由交换机完全读入緩存后再开始转发; (2) The message frame is completely read into the buffer by the switch and then started to be forwarded;
(3) 帧前导为 8比特;  (3) The frame leading is 8 bits;
(4)校验位为 4比特;  (4) The check digit is 4 bits;
(5)主设备的物理网口速率为千兆以太网;  (5) The physical network port rate of the master device is Gigabit Ethernet;
(6)从设备的物理网口速率为百兆以太网;  (6) The physical network port rate of the slave device is 100 Mbps Ethernet;
在主设备到从设备的方向上, 事件报文的延时为:  In the direction from the master device to the slave device, the delay of the event message is:
t2-tl = (Ll+ L2 \ytes x ltslbyte x GEnslbit + DPSN + (L3 )bytes x ltslbyte x FEmlbit (式 3 ) 其中, A表示除帧前导(pre-amble)和校验位 (FCS)外整个帧长; J2表示检验位 ( FCS )长度; t2-tl = (L l + L 2 \ ytes x ltslbyte x GE nslbit + D PSN + (L 3) bytes x ltslbyte x FE mlbit ( Formula 3) wherein, A represents a frame preamble (pre-amble) and other checking The entire frame length outside the bit (FCS); J 2 represents the length of the check bit ( FCS );
J3表示帧前导 ( re-amble )长度; J 3 represents the length of the frame preamble (re-amble);
GE„s/blt表示 1000M物理网口转发每 bit数据的时间; GE„ s/blt indicates the time when the 1000M physical network port forwards each bit of data;
FEm/bit表示 100M物理网口转发每 bit数据的时间; FE m/bit indicates the time when the 100M physical network port forwards data per bit.
DPSN表示数据包经过未知网络的延迟时间; D PSN represents unknown time delay through the packet network;
在从设备到主设备的方向上, 事件报文的延时为: t4-t3 = {Lx + L2 )bytes x Usjbyte x FEnsjbu + DPSN + (L3 )bytes x ltslhyte x GEnsjbu (式 4 ) 其中 A、 2、 L GEnslM、 FEmlbtt、 D層与式 3表示相同。 In the direction from the device to the master device, the delay of the event message is: T4-t3 = {L x + L 2 ) bytes x Usjbyte x FE nsjbu + D PSN + (L 3 ) bytes x ltslhyte x GE nsjbu (Formula 4) where A, 2 , L GE nslM , FE mlbtt , D layer and Equation 3 represents the same.
平均线路传输延时如下式:  The average line transmission delay is as follows:
[(t2-tl) + (t4-t3)] (式 5 ) [(t2-tl) + (t4-t3)] (Equation 5)
N 将式(3)和式(4)代入式(5)为: N Substituting equations (3) and (4) into equation (5) is:
_ (L1 +L2+L3)xSx(GE + FE)ns ( , , _ (L 1 + L 2 + L 3 ) xSx(GE + FE) ns ( , ,
― 十"尸 、 U, 上面的计算结果是在主从两个方向的延迟认为是对称的基础上的, 也就 是认为 ― 十”尸, U , The above calculation results are based on the symmetry of the delay between the master and the slave, that is,
(t2-tl)=(t4-t3) (;式  (t2-tl)=(t4-t3) (;
而实际上这二者是不相等的。  In fact, the two are not equal.
式 3减式 6计算 Master到 Slave与 Slave到 Master延时误差为:  Equation 3 Subtraction 6 Calculation Master to Slave and Slave to Master delay error is:
NmeanPathDelayAtry = (A + 2 ) X 8 X GE ^FE + 3 χ 8 x FE ^GE (式 8 ) 式 6减式 4计算 Master到 Slave与 Slave到 Master延时误差为: r _ (J τ o GE― FE FE― GE ( - Q N meanPathDelayAtry = (A + 2 ) X 8 X GE ^ FE + 3 χ 8 x FE ^ GE (Equation 8) Equation 6 Subtraction 4 calculates the delay error from Master to Slave and Slave to Master: r _ (J τ o GE― FE FE― GE ( - Q
对于 1000M物理网口, 传一位数据所需要的时间为 Ins, 对于 100M物 理网口, 传一位数据所需要的时间为 10ns。 代入式 8或式 9可以得到, For a 1000M physical network port, the time required to transmit one bit of data is Ins. For a 100M physical network port, the time required to transmit one bit of data is 10 ns. Substituting 8 or 9 can be obtained,
N匪一— =(86 + = -2952ns (式 10 ) N匪一— =(86 + = -2952ns (Formula 10)
Figure imgf000008_0001
从理论上推导, 对于主从之间, 由于 1000M物理网口与 100M物理网口 速率不匹配的情况下, 导致 -2.952us 的误差, 这个误差将被误认为是由于主 从间的偏差造成的, 调整后将会引起主从间相位不同的问题。
Figure imgf000008_0001
Theoretically, for the case where the 1000M physical network port does not match the 100M physical network port rate, resulting in an error of -2.92us, this error will be mistaken for the deviation between the master and the slave. After adjustment, it will cause different problems between the master and the slave.
为了证明这个理论的正确性, 做了如下实验, 主设备为 1000M物理网口 速率, 从设备为 100M物理网口速率, 分别经过一级交换和九级交换。 实验 结果如下表所示。 从表 2中看出, 交换级数的增加, 对非对称性没有影响, 该非对称性是由主从物理网口速率不匹配导致。 表 2 In order to prove the correctness of this theory, the following experiments were performed: the primary device is the 1000M physical network port rate, and the secondary device is the 100M physical network port rate, which is subjected to the primary switching and the nine-level switching respectively. The experimental results are shown in the table below. It can be seen from Table 2 that the increase of the number of switching stages has no effect on the asymmetry, which is caused by the rate mismatch between the primary and secondary physical network ports. Table 2
Figure imgf000009_0001
说明: "-"表示 Slave的相位超前于 Master的相位 无论 PTP 报文承载在 Ethernet 802.3 上, 还是承载在 UDP/IPv4 和 UDP/IPv6上均存在同样的问题。 只要主从之间物理网口速率不一致, 则会导 致主到从的延时间与从到主 ^艮文延迟时间不同, 从而导致同步后主从间相位 不同步问题。
Figure imgf000009_0001
Explanation: "-" indicates that the phase of the slave is ahead of the master. The same problem exists in whether the PTP packet is carried on Ethernet 802.3 or on UDP/IPv4 and UDP/IPv6. As long as the rate of the physical network interface between the master and the slave is inconsistent, the delay time from the master to the slave is different from the delay time from the master to the slave, resulting in the phase out synchronization between the master and the slave after the synchronization.
本发明提出解决主从之间物理网口速率不一致导致延迟非对称性问题。 方法如下: 主设备将自身的物理网口速率信息告知从设备; 从设备获知主设 备的物理网口速率后, 与自身的物理网口速率进行比较, 如果不相同, 则对 计算得到的平均线路传输延时进行补偿, 否则, 不进行补偿。  The invention proposes to solve the problem of delay asymmetry caused by the inconsistent rate of the physical network port between the master and the slave. The method is as follows: The master device informs the slave device of the physical network port rate information of the master device; after the slave device learns the rate of the physical network port of the master device, compares the rate with the physical network port of the master device, and if not, the calculated average route The transmission delay is compensated, otherwise, no compensation is performed.
具体地, 主设备可通过向从设备发送 Announce (通知)报文, 所述通知 报文中携带自身的物理网口速率信息。  Specifically, the master device may send an Announce message to the slave device, where the notification packet carries its own physical network port rate information.
该物理网口速率信息可位于 domainNumber (域号)和 flagField (标识域) 之间的 reserved (保留)字节中, 也即: 所述主设备向从设备发送通知报文之 前, 所述主设备可将自身的物理网口速率信息写入所述通知报文的 domainNumber和 flagField之间的 reserved字节中。  The physical network port rate information may be located in a reserved byte between the domainNumber and the flag field, that is, the master device sends the notification message to the slave device before the master device sends the notification message to the slave device. The physical network port rate information can be written into the reserved byte between the domainNumber and the flagField of the notification message.
所述物理网口速率信息中,可采用 0001表示 10M的物理网口速率、 0010 表示 100M物理网口速率、0100表示 1000M物理网口速率、1000表示 10000M 物理网口速率。  In the physical network port rate information, 0001 indicates the physical network port rate of 10M, 0010 indicates the 100M physical network port rate, 0100 indicates the 1000M physical network port rate, and 1000 indicates the 10000M physical network port rate.
所述从设备通过将计算得到的平均线路传输延时减去延时误差, 对所述 时钟偏差进行补偿, 其中, 所述延时误差为: N匪一— = ( +J2) x 8 x ^^ + J3 x 8 x ^^ (式 The slave device compensates the clock offset by subtracting the delay error from the calculated average line transmission delay, where The delay error is: N匪一— = ( + J 2 ) x 8 x ^^ + J 3 x 8 x ^^
11 ) 11)
^表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 ^ indicates the entire frame length except the frame preamble and check digit, J 2 indicates the check bit length, ^ indicates the frame preamble length, Sm indicates the time at which the physical network port of the master device forwards each bit of data, and Ss indicates the physical network port of the slave device. The time to forward each bit of data.
相应地, 本发明实施例的时间同步的系统, 包括主设备和一个或多个从 设备, 其中, Correspondingly, the time synchronization system of the embodiment of the present invention includes a master device and one or more slave devices, wherein
主设备在实施其主设备功能的同时, 将自身的物理网口速率信息告知从 设备;  The master device notifies the slave device of the physical network port rate information while implementing the function of the master device;
从设备在实施其主设备功能的同时,通过 Announce报文获知主设备的物 理网口速率后, 与自身的物理网口速率进行比较, 如果不相同, 则对计算得 到的平均线路传输延时进行补偿, 否则, 不进行补偿。  After the device performs the function of its master device, it learns the rate of the physical network port of the master device through the Announce packet and compares it with the rate of its physical network port. If not, the calculated average line transmission delay is performed. Compensation, otherwise, no compensation will be made.
主设备可进一步用于通过向从设备发送通知报文, 所述通知报文中携带 自身的物理网口速率信息, 将自身的物理网口速率信息告知从设备。  The master device may be further configured to notify the slave device of the physical network port rate information by sending the notification message to the slave device, where the notification message carries its own physical network port rate information.
所述主设备进一步用于向从设备发送通知报文之前, 可将自身的物理网 口速率信息写入所述通知报文的域数目和领域标识之间的保留字节中。  The master device is further configured to write the physical network port rate information of the notification message into the reserved byte between the domain number of the notification message and the domain identifier before sending the notification message to the slave device.
所述从设备可进一步用于通过将计算得到的平均线路传输延时减去延时 误差, 对所述时钟偏差进行补偿, 其中,  The slave device may be further configured to compensate the clock offset by subtracting a delay error from the calculated average line transmission delay, where
所述延时误差为: N丽一 — = The delay error is: N Liyi — =
Figure imgf000010_0001
Figure imgf000010_0001
^表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 ^ indicates the entire frame length except the frame preamble and check digit, J 2 indicates the check bit length, ^ indicates the frame preamble length, Sm indicates the time at which the physical network port of the master device forwards each bit of data, and Ss indicates the physical network port of the slave device. The time to forward each bit of data.
下面通过一个在 Announce报文报头增加表示主设备物理网口速率应用 示例进一步说明本发明。 应用 1588进行时间同步的模型如图 2所示, 中间可能经过多个交换机、 路由器等。 The present invention is further illustrated by an application example in which the rate of the physical network port of the primary device is increased in the Announce message header. The model for time synchronization using 1588 is shown in Figure 2. There may be multiple switches, routers, etc. in the middle.
如图 3所示, 本示例包括如下步骤:  As shown in Figure 3, this example includes the following steps:
步骤 301 , 主设备将自身的物理网口速率信息写入 Announce报文的 domainNumber和 flagField之间的 reserved字节中,其中, 0001表示 10M、 0010 表示 100M、 0100表示 1000M、 1000表示 10000M;  Step 301: The master device writes its own physical network port rate information into the reserved bytes between the domainNumber and the flagField of the Announce message, where 0001 indicates 10M, 0010 indicates 100M, 0100 indicates 1000M, and 1000 indicates 10000M;
原 Announce报文报头可参见表 3 , 本示例的新 Announce报文报头可参 见表 4;  For the original Announce message header, see Table 3. The new Announce message header of this example can be found in Table 4.
步骤 302, 主设备将该 Announce 文发送给从设备;  Step 302: The master device sends the Announce text to the slave device.
步骤 303 , 从设备接收到 Announce报文后, 解析出主设备的物理网口速 率;  Step 303: After receiving the Announce message, the slave device parses the physical network port rate of the master device.
步骤 304 , 从设备把解析出来的主设备的物理网口速率与从设备的物理 网口速率比较, 如果相同, 则不进行补偿, 如果不相同, 解析出报文的长度, 然后按照式 11的计算出来的值进行补偿。  Step 304: The slave device compares the rate of the physical network port of the master device with the rate of the physical network port of the slave device. If they are the same, the device does not perform compensation. If not, the length of the packet is parsed. The calculated value is compensated.
按照上述步骤, 就可以保证主从之间物理网口速率不一致情况下, 不会 产生由于线路不对称引起同步后相位不对称的问题。  According to the above steps, it can be ensured that the rate of the physical network port between the master and the slave is inconsistent, and the phase asymmetry after synchronization due to line asymmetry is not generated.
表 3现有技术的 Announce报文报头  Table 3: Announce message header of the prior art
Bits (比特) Octets offset Bits (bits) Octets offset
7 6 5 4 3 2 1 0 (字节数) (偏移) transportSpecific 1 0 1 1 1 07 6 5 4 3 2 1 0 (number of bytes) (offset) transportSpecific 1 0 1 1 1 0
(传输特性) (transmission characteristics)
Reserved (保留) versionPTP (版本 ) 1 1 messageLength (才艮文长度 ) 2 2 domainNumber (域号 ) 1 4  Reserved (reserved) versionPTP (version) 1 1 messageLength (2) domainNumber (domain number) 1 4
Reserved (保留) 1 5 flagField (标识域 ) 2 6 correctionField (糾正域) 8 8 reserved (保留) 4 16 sourcePortldentity (源端口号) 10 20 sequencelD (序歹 'J号) 2 30 controlField (控制域) 1 32 logMessagelnterval (才艮文时间间隔) 1 33 Reserved 1 5 flagField 2 6 correctionField 8 8 Reserved 4 16 sourcePortldentity 10 20 sequencelD (Serial 'J number) 2 30 controlField 1 32 logMessagelnterval 1 33
表 4 本应用示例的 Announce 4艮文才艮头 Table 4 Announce 4 of this application example
Figure imgf000012_0001
本领域普通技术人员可以理解上述方法中的全部或部分步骤可通过程序 来指令相关硬件完成, 所述程序可以存储于计算机可读存储介质中, 如只读 存储器、 磁盘或光盘等。 可选地, 上述实施例的全部或部分步骤也可以使用 一个或多个集成电路来实现, 相应地, 上述实施例中的各模块 /单元可以釆用 硬件的形式实现, 也可以釆用软件功能模块的形式实现。 本发明不限制于任 何特定形式的硬件和软件的结合。
Figure imgf000012_0001
One of ordinary skill in the art will appreciate that all or a portion of the above steps may be performed by a program to instruct the associated hardware, such as a read only memory, a magnetic disk, or an optical disk. Optionally, all or part of the steps of the foregoing embodiments may also be implemented by using one or more integrated circuits. Accordingly, each module/unit in the foregoing embodiment may be used. The form of hardware implementation can also be implemented in the form of software function modules. The invention is not limited to any specific form of combination of hardware and software.
以上所述仅为本发明的优选实施例而已, 并不用于限制本发明, 对于本 领域的技术人员来说, 本发明可以有各种更改和变化。 凡在本发明的精神和 原则之内, 所作的任何修改、 等同替换、 改进等, 均应包含在本发明的保护 范围之内。  The above description is only the preferred embodiment of the present invention, and is not intended to limit the present invention, and various modifications and changes can be made to the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and scope of the present invention are intended to be included within the scope of the present invention.
工业实用性 Industrial applicability
釆用本发明的技术方案, 在延时请求响应机制中将可以解决由于主从物 理网口速率不一致引起的延迟不对称, 导致相位不同步问题。  With the technical solution of the present invention, the delay asymmetry caused by the inconsistent rate of the primary and secondary physical network ports can be solved in the delay request response mechanism, resulting in phase unsynchronization.

Claims

权 利 要 求 书 Claim
1、 一种时间同步的方法, 包括:  1. A method of time synchronization, comprising:
主设备将自身的物理网口速率信息告知从设备;  The master device notifies the slave device of its physical network port rate information.
从设备获知主设备的物理网口速率后,与自身的物理网口速率进行比较, 如果不相同, 则对计算得到的平均线路传输延时进行补偿, 否则, 不进行补 偿。  After the device learns the physical network port rate of the master device, it compares it with its own physical network port rate. If it is not the same, it compensates the calculated average line transmission delay. Otherwise, no compensation is performed.
2、 如权利要求 1所述的方法, 其中,  2. The method of claim 1 wherein
所述主设备将自身的物理网口速率告知从设备的步骤包括:  The step of the master device notifying the slave device of the physical network port rate includes:
主设备向从设备发送通知报文, 所述通知报文中携带自身的物理网口速 率信息。  The master device sends a notification packet to the slave device, where the notification packet carries its own physical network port rate information.
3、 如权利要求 2所述的方法, 其中,  3. The method of claim 2, wherein
所述主设备向从设备发送通知报文之前, 所述主设备将自身的物理网口 速率信息写入所述通知" ^艮文的域号和标识域之间的保留字节中。  Before the master device sends the notification message to the slave device, the master device writes its own physical network port rate information into the reserved byte between the domain number of the notification message and the identifier field.
4、 如权利要求 1 ~ 3中任意一项所述的方法, 其中,  4. The method according to any one of claims 1 to 3, wherein
所述物理网口速率信息中, 釆用 0001表示 10M的物理网口速率、 0010 表示 100M物理网口速率、0100表示 1000M物理网口速率、1000表示 10000M 物理网口速率。  In the physical network port rate information, 0001 indicates the physical network port rate of 10M, 0010 indicates the 100M physical network port rate, 0100 indicates the 1000M physical network port rate, and 1000 indicates the 10000M physical network port rate.
5、 如权利要求 1 ~ 3中任意一项所述的方法, 其中,  The method according to any one of claims 1 to 3, wherein
所述从设备通过将计算得到的平均线路传输延时减去延时误差, 对所述 时钟偏差进行补偿, 其中,  The slave device compensates the clock offset by subtracting the delay error from the calculated average line transmission delay, where
所述延时误差为: N画一— try = ( +J2)x8x^* + x8x^^ The delay error is: N draw one - try = ( + J 2 ) x8x^* + x8x^^
J,表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 J, indicates the entire frame length except for the frame preamble and check digit, J 2 indicates the check bit length, ^ indicates the frame preamble length, Sm indicates the time when the physical network port of the master device forwards each bit of data, and Ss indicates the physical network of the slave device. The time at which the port forwards each bit of data.
6、 一种时间同步的系统, 包括主设备和一个或多个从设备, 其中, 主设备设置为: 将自身的物理网口速率信息告知从设备; 从设备设置为: 获知主设备的物理网口速率后, 与自身的物理网口速率 进行比较, 如果不相同, 则对计算得到的平均线路传输延时进行补偿, 否则, 不进行补偿。 A time synchronization system, comprising: a master device and one or more slave devices, wherein the master device is configured to: notify the slave device of the physical network port rate information; The slave device is set to: After learning the physical network port rate of the master device, compare it with its own physical network port rate. If they are not the same, compensate the calculated average line transmission delay. Otherwise, no compensation is performed.
7、 如权利要求 6所述的系统, 其中,  7. The system of claim 6 wherein
主设备还设置为: 通过向从设备发送通知报文, 所述通知报文中携带自 身的物理网口速率信息, 将自身的物理网口速率信息告知从设备。  The master device is further configured to: notify the slave device by sending the notification message to the slave device, and the notification packet carries the rate information of the physical network port of the device.
8、 如权利要求 7所述的系统, 其中,  8. The system of claim 7, wherein
所述主设备还设置为: 向从设备发送通知报文之前, 将自身的物理网口 速率信息写入所述通知" ^艮文的域号和标识域之间的保留字节中。  The master device is further configured to: write the physical network port rate information of the local network port to the reserved byte between the domain number and the identifier field of the notification message before sending the notification message to the slave device.
9、 如权利要求 6 ~ 8中任意一项所述的系统, 其中,  9. The system according to any one of claims 6 to 8, wherein
所述物理网口速率信息中, 釆用 0001表示 10M的物理网口速率、 0010 表示 100M物理网口速率、0100表示 1000M物理网口速率、1000表示 10000M 物理网口速率。  In the physical network port rate information, 0001 indicates the physical network port rate of 10M, 0010 indicates the 100M physical network port rate, 0100 indicates the 1000M physical network port rate, and 1000 indicates the 10000M physical network port rate.
10、 如权利要求 6 ~ 8中任意一项所述的系统, 其中,  10. The system according to any one of claims 6 to 8, wherein
所述从设备还设置为: 通过将计算得到的平均线路传输延时减去延时误 差, 对所述时钟偏差进行补偿, 其中, 所述延时误差为: N画一— try = ( +J2)x8x^* + x8x^^ The slave device is further configured to: compensate the clock deviation by subtracting the calculated average line transmission delay from the delay error, wherein the delay error is: N draw one - try = ( + J 2 )x8x^* + x8x^^
J,表示除帧前导和校验位外整个帧长, J2表示检验位长度, ^表示帧前 导长度, Sm表示主设备的物理网口转发每比特数据的时间, Ss表示从设备 的物理网口转发每比特数据的时间。 J, indicates the entire frame length except for the frame preamble and check digit, J 2 indicates the check bit length, ^ indicates the frame preamble length, Sm indicates the time when the physical network port of the master device forwards each bit of data, and Ss indicates the physical network of the slave device. The time at which the port forwards each bit of data.
PCT/CN2011/074301 2010-11-26 2011-05-19 Method and system for time synchronization WO2012068845A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201010561070.6A CN102006157B (en) 2010-11-26 2010-11-26 Time synchronization method and system
CN201010561070.6 2010-11-26

Publications (1)

Publication Number Publication Date
WO2012068845A1 true WO2012068845A1 (en) 2012-05-31

Family

ID=43813252

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2011/074301 WO2012068845A1 (en) 2010-11-26 2011-05-19 Method and system for time synchronization

Country Status (2)

Country Link
CN (1) CN102006157B (en)
WO (1) WO2012068845A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3151471A1 (en) * 2015-09-29 2017-04-05 Tektronix, Inc. Adaptive compensation for internal asymmetric delay in network based timing systems
CN116915670A (en) * 2023-09-14 2023-10-20 浙江国利信安科技有限公司 Method, apparatus and medium for determining network recovery time

Families Citing this family (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102006157B (en) * 2010-11-26 2015-01-28 中兴通讯股份有限公司 Time synchronization method and system
CN102932905B (en) 2011-08-10 2017-06-16 中兴通讯股份有限公司 The realization method and system of 1588 link asymmetry time delays of automatic compensation
CN102549951A (en) * 2011-12-23 2012-07-04 华为技术有限公司 Method, device and system for data synchronization treatment of external clock
CN102843293B (en) * 2012-08-20 2018-01-26 中兴通讯股份有限公司 A kind of method and network element device for handling message
CN102833062B (en) * 2012-09-25 2015-08-12 广东电网公司珠海供电局 Intelligent substation IEEE1588 master-salve clock synchronization message setting means and system
CN103067113B (en) * 2012-12-24 2015-08-12 中兴通讯股份有限公司 Method and the device of PTP time synchronized is realized based on aggregated links
CN103118029A (en) * 2013-02-18 2013-05-22 中兴通讯股份有限公司 Synchronized method and device of encrypted messages between each other
CN103457715A (en) * 2013-08-20 2013-12-18 上海奇微通讯技术有限公司 Automatic delay compensation device and method based on network link status changes
CN104506268B (en) * 2014-12-15 2017-07-14 飞天诚信科技股份有限公司 A kind of method for realizing time calibration
CN105939243B (en) * 2016-04-14 2019-02-15 烽火通信科技股份有限公司 The processing system of multiport PTP message
CN110149257A (en) * 2018-12-20 2019-08-20 中铁十四局集团房桥有限公司 The locally applied synchronous method of Ethernet bus master-salve station and device
CN110061796B (en) * 2019-04-25 2024-05-14 广东优力普物联科技有限公司 Method and system for realizing remote POE transmission
CN112636861A (en) * 2020-12-31 2021-04-09 深圳市英特瑞半导体科技有限公司 Clock synchronization method, device, equipment and storage medium
CN116300693B (en) * 2023-02-17 2023-10-20 上海铼钠克数控科技有限公司 Synchronization method and application of numerical control servo system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0100077B1 (en) * 1982-07-26 1988-06-22 Siemens Aktiengesellschaft Circuit arrangement for clock generation in communication installations, especially tdm digital exchanges
CN101399653A (en) * 2007-09-25 2009-04-01 普然通讯技术(上海)有限公司 Time clock synchronization implementation method
CN101867431A (en) * 2010-05-27 2010-10-20 同济大学 Network clock synchronization method
CN102006157A (en) * 2010-11-26 2011-04-06 中兴通讯股份有限公司 Time synchronization method and system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7483448B2 (en) * 2004-03-10 2009-01-27 Alcatel-Lucent Usa Inc. Method and system for the clock synchronization of network terminals
CN101227246A (en) * 2008-01-28 2008-07-23 中兴通讯股份有限公司 Method and apparatus for master-salve clock synchronization

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP0100077B1 (en) * 1982-07-26 1988-06-22 Siemens Aktiengesellschaft Circuit arrangement for clock generation in communication installations, especially tdm digital exchanges
CN101399653A (en) * 2007-09-25 2009-04-01 普然通讯技术(上海)有限公司 Time clock synchronization implementation method
CN101867431A (en) * 2010-05-27 2010-10-20 同济大学 Network clock synchronization method
CN102006157A (en) * 2010-11-26 2011-04-06 中兴通讯股份有限公司 Time synchronization method and system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP3151471A1 (en) * 2015-09-29 2017-04-05 Tektronix, Inc. Adaptive compensation for internal asymmetric delay in network based timing systems
CN116915670A (en) * 2023-09-14 2023-10-20 浙江国利信安科技有限公司 Method, apparatus and medium for determining network recovery time
CN116915670B (en) * 2023-09-14 2023-12-05 浙江国利信安科技有限公司 Method, apparatus and medium for determining network recovery time

Also Published As

Publication number Publication date
CN102006157B (en) 2015-01-28
CN102006157A (en) 2011-04-06

Similar Documents

Publication Publication Date Title
WO2012068845A1 (en) Method and system for time synchronization
JP6931376B2 (en) Transmission of residence time information in the network
US8923346B2 (en) Time synchronization method, device and system
JP6032824B2 (en) Scheduling method, end node and core network switch in packet switched communication network
WO2010097035A1 (en) Clock message tunnel transmission method, network node and communication system thereof
WO2012003746A1 (en) Method and device for realizing boundary clock
WO2007031005A1 (en) Method, ethernet device and ethernet for solving the clock synchronization
WO2011120262A1 (en) Time synchronization processing method and device
WO2010111963A1 (en) Time synchronization device, method and system
WO2012065334A1 (en) Method, device and system for realizing time synchronization in time division multiplexing network
CN111385048A (en) Time synchronization method and system
JP2013187766A (en) Data block output device, communication system, data block output method and communication method
WO2007025452A1 (en) Method for transmitting service data and apparatus thereof
JP5373185B2 (en) Add and drop elements for NTP on-path support and interoperability method between NTP domain and IEEE-1588 protocol domain
US20190097744A1 (en) Pseudowire clock recovery
WO2012068848A1 (en) Method and system for time synchronization
WO2011032494A1 (en) Method and clock device for processing precision time protocol message
WO2012071910A1 (en) Method and device for achieving time synchronization
WO2014117489A1 (en) Clock synchronization method and device
WO2012065402A1 (en) Ethernet passive optical network system and method for implementing end-to-end transparent clock in such system
Simanic et al. Compensation of asymmetrical latency for ethernet clock synchronization
JP5653518B2 (en) Method for distributing time within synchronous Ethernet and SONET / SDH domains
WO2013189361A2 (en) Method for processing message and network element apparatus
EP2458757B1 (en) A method for transmitting IEEE 1588V2 synchronization packets over ethernet in link-by-link mode, via network elements having a transparent clock, and associated help device
WO2020103540A1 (en) Synchronization method and apparatus

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: 11843488

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: 11843488

Country of ref document: EP

Kind code of ref document: A1