WO2017097034A1 - 光传输网络中时间报文的时戳处理方法及装置 - Google Patents

光传输网络中时间报文的时戳处理方法及装置 Download PDF

Info

Publication number
WO2017097034A1
WO2017097034A1 PCT/CN2016/102279 CN2016102279W WO2017097034A1 WO 2017097034 A1 WO2017097034 A1 WO 2017097034A1 CN 2016102279 W CN2016102279 W CN 2016102279W WO 2017097034 A1 WO2017097034 A1 WO 2017097034A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
multiframe
difference
multiframe number
frame
Prior art date
Application number
PCT/CN2016/102279
Other languages
English (en)
French (fr)
Inventor
陈宗正
Original Assignee
深圳市中兴微电子技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市中兴微电子技术有限公司 filed Critical 深圳市中兴微电子技术有限公司
Publication of WO2017097034A1 publication Critical patent/WO2017097034A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/004Arrangements for detecting or preventing errors in the information received by using forward error control
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04QSELECTING
    • H04Q11/00Selecting arrangements for multiplex systems
    • H04Q11/0001Selecting arrangements for multiplex systems using optical switching
    • H04Q11/0062Network aspects

Definitions

  • the present invention relates to a transmission technology of an optical transmission network, and in particular, to a method and an apparatus for processing a time stamp of a time packet in an optical transmission network.
  • OTNs optical transport networks
  • Various services are carried by OTN networks. Therefore, OTN networks must be able to provide high-precision network reference clocks to meet the network. The synchronization requirements of the node or terminal.
  • the time processing device of the OTN network is used to process the time message to implement the time transmission. Due to the time requirement, in the direction that the time message enters the time processing device, the time message needs to be obtained.
  • the time stamp of the time processing device in the direction of the time message out of the time processing device, it is necessary to obtain the time stamp when the time message is sent to the time processing device, and the sampling and processing of the time stamp is an indispensable part.
  • the OTN frame undergoes processing such as cross-clock domain, framing, Forward Error Correction (FEC) codec, and the like, in particular, each frame reset of the FEC codec brings different frame delays.
  • the time stamp that causes the sampling may have a large deviation, which ultimately affects the accuracy of the time.
  • the embodiments of the present invention are directed to a method and a device for processing a time stamp of a time packet in an optical transmission network, so as to eliminate a frame delay caused by an abnormal reset of the FEC codec and reduce the sampling time.
  • the time stamp of the message can obtain the time stamp of the accurate time message.
  • the embodiment of the invention provides a time stamp processing method for a time packet in an optical transmission network, and the method includes:
  • the difference between the first multiframe number and the second multiframe number is obtained according to the difference calculation rule, and specifically includes:
  • the OTN frame After the OTN frame is FEC-decoded, it is determined whether the first multi-frame number is greater than or equal to the second multi-frame number, and if the first multi-frame number is greater than or equal to the second multi-frame number, Directly calculating a difference between the first multiframe number and the second multiframe number;
  • the difference between the first multiframe number and the second multiframe number is calculated by adding 256 to the first multiframe number.
  • the difference between the first multiframe number and the second multiframe number is obtained according to the time of the packet header of the time packet and the difference calculation rule, to obtain a final time.
  • Time stamp of the message including:
  • the time stamp of the final time message is an entry time stamp.
  • the difference between the first multiframe number and the second multiframe number is obtained according to the difference calculation rule, and specifically includes:
  • the OTN frame After the OTN frame is FEC-encoded, it is determined whether the first multi-frame number is small. And equal to the second multiple frame number, if the first multiple frame number is less than or equal to the second multiple frame number, directly calculating a difference between the first multiple frame number and the second multiple frame number;
  • the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
  • the difference between the first multiframe number and the second multiframe number is obtained according to the time of the packet header of the time packet and the difference calculation rule, to obtain a final time.
  • Time stamp of the message including:
  • Time stamp Adding the time of the packet header of the time packet to the product of the difference between the first multiframe number and the second multiframe number and the transmission time of the single OTN frame, to obtain the final time packet.
  • the time stamp of the final time message is a time stamp.
  • the method before the determining the time of the packet header of the time packet and the corresponding first multiframe number according to the frame header and the multiframe number of the OTN frame of the optical transmission network, the method further includes:
  • the method further includes:
  • the embodiment of the invention further provides a time stamp processing device for a time message in an optical transmission network, the device comprising:
  • a determining module configured to determine, according to a frame header and a multiframe number of the OTN frame of the optical transmission network, a time of the packet header of the time packet and a corresponding first multiframe number
  • An acquiring module configured to acquire a second multiframe number corresponding to a packet header of a time packet after the forward error correction FEC decoding or encoding of the OTN frame;
  • a difference calculation module configured to obtain a difference between the first multiframe number and the second multiframe number according to a difference calculation rule
  • the time stamp calculation module is configured to obtain a difference between the first multiframe number and the second multiframe number according to the time of the packet header of the time packet and the difference calculation rule, to obtain a final Time stamp of the time message.
  • the difference calculation module is further configured to: if the OTN frame is FEC-decoded, determine whether the first multi-frame number is greater than or equal to the second multi-frame number, if the If a multi-frame number is greater than or equal to the second multi-frame number, directly calculating a difference between the first multi-frame number and the second multi-frame number;
  • the difference between the first multiframe number and the second multiframe number is calculated by adding 256 to the first multiframe number.
  • the time stamp calculation module is further configured to subtract the difference between the first multiframe number and the second multiframe number and a single OTN frame by the time of the packet header of the time packet. Transmitting a product of time to obtain a time stamp of the final time message;
  • the time stamp of the final time message is an entry time stamp.
  • the difference calculation module is further configured to determine, when the OTN frame is FEC-encoded, whether the first multi-frame number is less than or equal to the second multi-frame number, if the If a multi-frame number is less than or equal to the second multi-frame number, directly calculating a difference between the first multi-frame number and the second multi-frame number;
  • the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
  • the time stamp calculation module is further configured to add a time of the packet header of the time packet to a difference between the first multiframe number and the second multiframe number and a single OTN frame. Transmitting a product of time to obtain a time stamp of the final time message;
  • the time stamp of the final time message is a time stamp.
  • the device further includes:
  • a time module configured to generate the time of the message header.
  • the device further includes:
  • a timestamp processing module configured to add a timestamp of the last time message to a source timestamp field of the time message, or configured to add a timestamp of the final time message to the timestamp The revised domain of the text.
  • the determining module, the obtaining module, the difference calculating module, the time stamp calculating module, and the time module may use a central processing unit (CPU) and a digital signal processor when performing processing. (DSP, Digital Singnal Processor) or Programmable Array (FPGA) implementation.
  • CPU central processing unit
  • DSP Digital Singnal Processor
  • FPGA Programmable Array
  • the method and device for processing a time stamp of a time packet in an optical transmission network first determines the time of the packet header of the time packet and the corresponding first by determining the frame header and the multiframe number of the OTN frame.
  • the second multi-frame number corresponding to the header of the time packet of the OTN frame after the forward error correction FEC decoding or encoding; and then obtaining the first multiframe number and the second complex according to the difference calculation rule The difference of the frame number; finally, according to the time of the packet header of the time packet and the difference between the first multiframe number and the second multiframe number according to the difference calculation rule, the time stamp of the final time packet is obtained, that is,
  • the time stamp at the entrance or the exit of the processing device of the time stamp of the time message in the optical transmission network can be obtained; the frame delay caused by the FEC encoding or decoding each abnormal reset is eliminated, and the frame delay is reduced.
  • the time stamp of the sampling time message can obtain the time stamp of the accurate time message.
  • FIG. 1 is a flowchart of an embodiment of a method for processing a time stamp of a time packet in an optical transmission network according to the present invention
  • FIG. 2 is a schematic structural diagram of an embodiment of a device for processing a time stamp of a time packet in an optical transmission network according to the present invention.
  • FIG. 1 is a flowchart of an embodiment of a method for processing a time stamp of a time packet in an optical transmission network according to the present invention. As shown in FIG. 1, the method of the present invention may include the following steps:
  • Step 101 Generate a local time required for the time message.
  • the time module of the processing device for the time stamp of the time packet in the optical transmission network (hereinafter referred to as the processing device) is mainly used for generating the local time for the subsequent time packet, the packet header of the time packet and the OTN frame;
  • the time module uses the local clock to count and accumulates at a fixed step value to generate an 80-bit time.
  • the upper 48 bits are the whole second part, and the lower 32 bits are the nanosecond part. When the low 32-bit nanosecond part is added to the 1 second time, , enter 1 to the high.
  • Step 102 Determine, according to a frame header and a multiframe number of the OTN frame of the optical transmission network, a time of the packet header of the time packet and a corresponding first multiframe number.
  • the time at the frame header of the OTN frame can be sampled as a time report.
  • the time of the text that is, the processing device first acquires the frame header and the multiframe number of the OTN frame, and then determines the header of the time packet that has not been FEC decoded according to the frame header and the multiframe number of the obtained OTN frame.
  • the time and the corresponding multiframe number are defined as the first multiframe number, represented by M1, and the time of the header is represented by T2.
  • Step 103 Acquire a second multiframe number corresponding to a packet header of a time packet in which the OTN frame is subjected to forward error correction FEC decoding or encoding.
  • the processing device obtains the multi-frame number corresponding to the header of the time packet from the reserved overhead of the OTN frame after FEC decoding or encoding, and the multi-frame number is defined as the second multi-frame number, which is represented by M2.
  • Step 104 Obtain a difference between the first multiframe number and the second multiframe number according to a difference calculation rule.
  • the processing device After acquiring the first multi-frame number M1 and the second multi-frame number M2, the processing device can obtain the difference between the two according to the difference calculation rule, wherein the difference calculation rule is divided into OTN frames after FEC decoding (time report) The text enters the direction) and the OTN frame is subjected to FEC encoding (time message outgoing direction).
  • the difference calculation rule is divided into OTN frames after FEC decoding (time report) The text enters the direction) and the OTN frame is subjected to FEC encoding (time message outgoing direction).
  • the processing device determines whether the first multiframe number M1 is greater than or equal to the second multiframe number M2, if the first multiframe number M1 is greater than or equal to the second
  • the processing device determines whether the first multi-frame number M1 is less than or equal to the second multi-frame number M2, and directly calculates if the first multi-frame number M1 is less than or equal to the second multi-frame number M2.
  • Step 105 Obtain a difference between the first multiframe number and the second multiframe number according to the packet header time of the time packet and the difference calculation rule, to obtain a final time packet. stamp.
  • the processing device subtracts the difference D between the first complex frame number M1 and the second complex frame number M2 from the time T2 of the packet header of the time message.
  • the processing device After the OTN frame is subjected to FEC encoding (time message outgoing direction), the processing device adds the time T2 of the packet header of the time packet to the difference D between the first multiframe number M1 and the second complex frame number M2.
  • the time required to transmit a single OTN frame is also fixed, and the time for transmitting a single OTN frame is defined as Ct.
  • Step 106 Add a timestamp of the final time packet to a source timestamp field of the time message or a modified field of the time message.
  • the processing device adds the time stamp of the final time packet to the source time stamp domain of the time packet, or adds the time stamp of the final time packet to the correction domain of the time packet, and performs subsequent processing.
  • the processing device for the time stamp of the time packet in the optical transmission network first determines the time packet according to the frame header and the multiframe number of the OTN frame.
  • the time of the packet header and the corresponding first multiframe number secondly, the second multiframe number corresponding to the header of the time packet of the OTN frame subjected to the forward error correction FEC decoding or encoding; and then calculated according to the difference
  • the rule obtains a difference between the first multiframe number and the second multiframe number; and finally obtains a difference between the first multiframe number and the second multiframe number according to the time of the packet header of the time packet and the difference calculation rule.
  • time stamp of the final time message that is, the time stamp at the entrance or the exit of the processing device of the time stamp of the time message in the optical transmission network; eliminating the FEC encoding or decoding each abnormal reset
  • the frame delay brought by the time frame reduces the time stamp deviation of the sampling time message, and can obtain the accurate time stamp of the time message.
  • the processing apparatus 02 for time stamping of a time packet in the optical transmission network includes: a determining module 21 , the obtaining module 22, the difference calculating module 23, and the time stamp calculating module 24; wherein
  • the determining module 21 is configured to determine, according to a frame header and a multiple frame number of the OTN frame of the optical transmission network, a time of the packet header of the time packet and a corresponding first multiple frame number;
  • the acquiring module 22 is configured to acquire a second multi-frame number corresponding to a packet header of a time packet in which the OTN frame is subjected to forward error correction FEC decoding or encoding;
  • the difference calculation module 23 is configured to obtain a difference between the first multiframe number and the second multiframe number according to a difference calculation rule
  • the timestamp calculation module 24 is configured to obtain a difference between the first multiframe number and the second multiframe number according to the time of the packet header of the time packet and the difference calculation rule. Get the time stamp of the final time message.
  • the difference calculation module 23 is configured to determine, when the OTN frame is FEC-decoded, whether the first multi-frame number is greater than or equal to the second complex. a frame number, if the first multiframe number is greater than or equal to the second multiframe number, directly calculating a difference between the first multiframe number and the second multiframe number;
  • the difference between the first multiframe number and the second multiframe number is calculated by adding 256 to the first multiframe number.
  • the timestamp calculation module 24 is specifically configured to subtract the first multiframe number and the second multiple frame number from the time of the packet header of the time packet. The product of the difference between the difference and the transmission time of the single OTN frame, and the time stamp of the final time message is obtained;
  • the time stamp of the final time message is an entry time stamp.
  • the difference calculation module 23 is further configured to determine, when the OTN frame is FEC-encoded, whether the first multi-frame number is less than or equal to the second. a multi-frame number, if the first multi-frame number is less than or equal to the second multi-frame number, directly calculating a difference between the first multi-frame number and the second multi-frame number;
  • the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
  • the time stamp calculation module 24 is further configured to add the time of the packet header of the time packet to the first multiframe number and the second multiframe. The product of the difference between the number and the transmission time of the single OTN frame, and the time stamp of the final time message is obtained;
  • the time stamp of the final time message is a time stamp.
  • the apparatus further includes:
  • the time module 25 is configured to generate the time of the message header.
  • the apparatus further includes:
  • the timestamp processing module 26 is configured to add the timestamp of the final time message to the source timestamp field of the time message, or configured to add the timestamp of the final time message to the timestamp The revised field of the message.
  • the device in this embodiment may be used to implement the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, and details are not described herein again.
  • the determining module 21, the obtaining module 22, the difference calculating module 23, the time stamp calculating module 24, the time module 25, and the time stamp processing module 26 may be processed by a central processing unit (CPU) located on the device.
  • CPU central processing unit
  • Device MPU
  • DSP digital signal processor
  • FPGA field programmable gate array
  • embodiments of the present invention can be provided as a method, system, or computer program product. Accordingly, the present invention can take the form of a hardware embodiment, a software embodiment, or a combination of software and hardware. Moreover, the invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) including computer usable program code.
  • the computer program instructions can also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the computer is readable and stored
  • the instructions in the reservoir produce an article of manufacture comprising an instruction device that implements the functions specified in one or more blocks of the flow or in a flow or block diagram of the flowchart.
  • These computer program instructions can also be loaded onto a computer or other programmable data processing device such that a series of operational steps are performed on a computer or other programmable device to produce computer-implemented processing for execution on a computer or other programmable device.
  • the instructions provide steps for implementing the functions specified in one or more of the flow or in a block or blocks of a flow diagram.
  • the method and device for processing a time stamp of a time packet in an optical transmission network first determines the time of the packet header of the time packet and the corresponding first by determining the frame header and the multiframe number of the OTN frame.
  • the second multi-frame number corresponding to the header of the time packet of the OTN frame after the forward error correction FEC decoding or encoding; and then obtaining the first multiframe number and the second complex according to the difference calculation rule The difference of the frame number; finally, according to the time of the packet header of the time packet and the difference between the first multiframe number and the second multiframe number according to the difference calculation rule, the time stamp of the final time packet is obtained, that is,
  • the time stamp at the entrance or the exit of the processing device of the time stamp of the time message in the optical transmission network can be obtained; the frame delay caused by the FEC encoding or decoding each abnormal reset is eliminated, and the frame delay is reduced.
  • the time stamp of the sampling time message can obtain the time stamp of the accurate time message.

Landscapes

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

Abstract

本发明实施例公开了一种光传输网络中时间报文的时戳处理方法,包括:根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。本发明实施例同时还公开了一种光传输网络中时间报文的时戳处理装置。

Description

光传输网络中时间报文的时戳处理方法及装置 技术领域
本发明涉及光传输网络的传输技术,尤其涉及一种光传输网络中时间报文的时戳的处理方法及装置。
背景技术
随着通信网络的发展,光传输网络(Optical Transport Network,OTN)已经成为传输网络的主流,各种业务都用OTN网络来承载,因此OTN网络必须能够提供高精度的网络参考时钟,以满足网络节点或终端的同步需求。
在现有技术中,往往是利用OTN网络的时间处理装置处理时间报文来实现时间传递的,由于对时的需求,在时间报文进入时间处理装置的方向上,需要得到时间报文进入该时间处理装置的时候的时戳,在时间报文出时间处理装置的方向上,需要得到时间报文发出该时间处理装置的时候的时戳,时戳的采样和处理是必不可少的一部分,而在OTN网络中,OTN帧经过了跨时钟域、定帧、前向纠错(Forward Error Correction,FEC)编解码等处理,特别是FEC编解码每次复位会带来不同的帧延时,造成采样的时戳可能会有很大的偏差,最终影响对时精度。
发明内容
有鉴于此,本发明实施例期望提供一种光传输网络中时间报文的时戳的处理方法及装置,以消除FEC编解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。
为达到上述目的,本发明实施例的技术方案是这样实现的:
本发明实施例提供一种光传输网络中时间报文的时戳处理方法,所述方法包括:
根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;
获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;
按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
上述方法中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,具体包括:
在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。
上述方法中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:
将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为入时戳。
上述方法中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,具体包括:
在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小 于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。
上述方法中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:
将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为出时戳。
上述方法中,在所述根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号之前,所述方法还包括:
产生所述报文头的时间;
上述方法中,在所述得到最终的时间报文的时戳之后,所述方法还包括:
将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或将所述最终的时间报文的时戳加入所述时间报文的修正域中。
本发明实施例还提供一种光传输网络中时间报文的时戳处理装置,所述装置包括:
确定模块,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;
获取模块,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;
差值计算模块,配置为按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
时戳计算模块,配置为根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
上述装置中,所述差值计算模块,还配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。
上述装置中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为入时戳。
上述装置中,所述差值计算模块,还配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。
上述装置中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为出时戳。
上述装置中,所述装置还包括:
时间模块,配置为产生所述报文头的时间。
上述装置中,所述装置还包括:
时戳处理模块,配置为将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或配置为将所述最终的时间报文的时戳加入所述时间报文的修正域中。
所述确定模块、所述获取模块、所述差值计算模块、所述时戳计算模块、所述时间模块在执行处理时,可以采用中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Singnal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现。
本发明实施例提供的光传输网络中时间报文的时戳的处理方法及装置,首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。
附图说明
图1为本发明光传输网络中时间报文的时戳的处理方法实施例的流程图;
图2为本发明光传输网络中时间报文的时戳的处理装置实施例的结构示意图。
具体实施方式
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。
图1为本发明光传输网络中时间报文的时戳的处理方法实施例的流程图,如图1所示,本发明方法可以包括如下步骤:
步骤101、产生时间报文所需的本地时间。
光传输网络中时间报文的时戳的处理装置(以下简称处理装置)的时间模块主要用来产生本地时间,供后续的时间报文、时间报文的报文头和OTN帧使用;其中,时间模块利用本地时钟计数,以一个固定的步进值进行累加,产生一个80bit的时间,其中高48bit为整秒部分,低32bit为纳秒部分,当低32bit纳秒部分累加到1秒时间后,向高位进1。
步骤102、根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号。
由于OTN网络中利用OTN帧中某个确定的保留开销来传送时间报文,且每个OTN帧只传送时间报文的一个字节,因此可以采样得到OTN帧的帧头处的时间作为时间报文的时间,即处理装置先获取OTN帧的帧头和复帧号,再根据获取到的OTN帧的帧头和复帧号可以确定出未经过FEC解码后的时间报文的报文头的时间和所对应的复帧号,将该复帧号定义为第一复帧号,用M1来表示,将该报文头的时间用T2来表示。
步骤103、获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号。
处理装置从OTN帧经过FEC解码或编码后的保留开销中获取到时间报文的报文头所对应的复帧号,该复帧号定义为第二复帧号,用M2来表示。
步骤104、按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值。
处理装置在获取到第一复帧号M1和第二复帧号M2之后,按照差值计算规则可以得到两者的差值,其中,差值计算规则分为OTN帧经过FEC解码后(时间报文进入方向)和OTN帧经过FEC编码后(时间报文出去方向)这两种情况,具体的如下:
当在OTN帧经过FEC解码后(时间报文进入方向)的情况下,处理装置会判断第一复帧号M1是否大于等于第二复帧号M2,如果第一复帧号M1大于等于第二复帧号M2,则直接计算第一复帧号M1与第二复帧号的M2差值D,即D=M1-M2;如果第一复帧号M1小于第二复帧号M2,则将第一复帧号M1加256后再计算与第二复帧号M2的差值D,即D=M1+256-M2。
在OTN帧经过FEC编码后的情况下,处理装置会判断第一复帧号M1是否小于等于第二复帧号M2,如果第一复帧号M1小于等于第二复帧号M2,则直接计算第一复帧号M1与第二复帧号M2的差值D,即D=M2-M1;如果第一复帧号M1大于第二复帧号M2,则将第二复帧号M2加256后再计算与第一复帧号M1的差值D,即D=M2+256-M1。
步骤105、根据所述时间报文的报文头时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
在OTN帧经过FEC解码后(时间报文进入方向)的条件下,处理装置将时间报文的报文头的时间T2减去第一复帧号M1与第二复帧号M2的差值D与单个OTN帧传送时间Ct的积,得到最终的时间报文的时戳Ti,即Ti=T2-D*Ct;该最终的时间报文的时戳Ti为时间报文的入时戳。
在OTN帧经过FEC编码后(时间报文出去方向)的条件下,处理装置将时间报文的报文头的时间T2加上第一复帧号M1与第二复帧号M2的差值D与单个OTN帧传送时间Ct的积,得到最终的时间报文的时戳To,即To=T2+D*Ct;该最终的时间报文的时戳Ti为时间报文的出时戳。
其中,由于OTN帧的速率是固定的,所以可以得到传送单个OTN帧所需的时间也是固定的,将传送单个OTN帧的时间定义为Ct。
步骤106、将所述最终的时间报文的时戳加入所述时间报文的源时戳域中或所述时间报文的修正域中。
处理装置将最终的时间报文的时戳加入时间报文的源时戳域中,或将最终的时间报文的时戳加入时间报文的修正域中,进行相应的后续处理。
本发明实施例提供的光传输网络中时间报文的时戳的处理方法,光传输网络中时间报文的时戳的处理装置首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。
图2为本发明光传输网络中时间报文的时戳的处理装置实施例的结构示意图,如图2所示,该光传输网络中时间报文的时戳的处理装置02包括:确定模块21、获取模块22、差值计算模块23、时戳计算模块24;其中,
所述确定模块21,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;
所述获取模块22,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;
所述差值计算模块23,配置为按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
所述时戳计算模块24,配置为根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
在本发明实施例一实施方式中,所述差值计算模块23,具体配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。
在本发明实施例一实施方式中,所述时戳计算模块24,具体配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为入时戳。
在本发明实施例一实施方式中,所述差值计算模块23,还具体配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。
在本发明实施例一实施方式中,所述时戳计算模块24,还具体配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
所述最终的时间报文的时戳为出时戳。
在本发明实施例一实施方式中,所述装置还包括:
时间模块25,配置为产生所述报文头的时间。
在本发明实施例一实施方式中,所述装置还包括:
时戳处理模块26,配置为将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或配置为将所述最终的时间报文的时戳加入所述时间报文的修正域中。
本实施例的装置,可以用于执行上述所示方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。
在实际应用中,所述确定模块21、获取模块22、差值计算模块23、时戳计算模块24、时间模块25、时戳处理模块26可由位于装置上的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等器件实现。
本领域内的技术人员应明白,本发明的实施例可提供为方法、***、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。
本发明是参照根据本发明实施例的方法、设备(***)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存 储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。
工业实用性
本发明实施例提供的光传输网络中时间报文的时戳的处理方法及装置,首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。

Claims (14)

  1. 一种光传输网络中时间报文的时戳处理方法,所述方法包括:
    根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;
    获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;
    按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
    根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
  2. 根据权利要求1所述的方法,其中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,包括:
    在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
    如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。
  3. 根据权利要求2所述的方法,其中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:
    将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
    所述最终的时间报文的时戳为入时戳。
  4. 根据权利要求1所述的方法,其中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,包括:
    在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小 于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
    如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。
  5. 根据权利要求4所述的方法,其中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:
    将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
    所述最终的时间报文的时戳为出时戳。
  6. 根据权利要求1至5任一项所述的方法,其中,在所述根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号之前,所述方法还包括:
    产生所述报文头的时间;
  7. 根据权利要求1至5任一项所述的方法,其中,在所述得到最终的时间报文的时戳之后,所述方法还包括:
    将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或将所述最终的时间报文的时戳加入所述时间报文的修正域中。
  8. 一种光传输网络中时间报文的时戳处理装置,所述装置包括:
    确定模块,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;
    获取模块,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;
    差值计算模块,配置为按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
    时戳计算模块,配置为根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。
  9. 根据权利要求8所述的装置,其中,所述差值计算模块,还配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
    如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。
  10. 根据权利要求9所述的装置,其中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
    所述最终的时间报文的时戳为入时戳。
  11. 根据权利要求8所述的装置,其中,所述差值计算模块,还配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;
    如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。
  12. 根据权利要求11所述的装置,其中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;
    所述最终的时间报文的时戳为出时戳。
  13. 根据权利要求8至12任一项所述的装置,其中,所述装置还包括:
    时间模块,配置为产生所述报文头的时间。
  14. 根据权利要求8至12任一项所述的装置,其中,所述装置还包括:
    时戳处理模块,配置为将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或配置为将所述最终的时间报文的时戳加入所述时间报文的修正域中。
PCT/CN2016/102279 2015-12-09 2016-10-17 光传输网络中时间报文的时戳处理方法及装置 WO2017097034A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510903714.8 2015-12-09
CN201510903714.8A CN106856422B (zh) 2015-12-09 2015-12-09 光传输网络中时间报文的时戳处理方法及装置

Publications (1)

Publication Number Publication Date
WO2017097034A1 true WO2017097034A1 (zh) 2017-06-15

Family

ID=59012661

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/102279 WO2017097034A1 (zh) 2015-12-09 2016-10-17 光传输网络中时间报文的时戳处理方法及装置

Country Status (2)

Country Link
CN (1) CN106856422B (zh)
WO (1) WO2017097034A1 (zh)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111162971A (zh) * 2019-12-30 2020-05-15 视联动力信息技术股份有限公司 一种时延确定方法及装置
WO2021073444A1 (zh) * 2019-10-15 2021-04-22 中兴通讯股份有限公司 同步方法、装置、设备和存储介质

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116996418A (zh) * 2022-04-26 2023-11-03 华为技术有限公司 报文的处理方法及装置

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110129218A1 (en) * 2009-11-27 2011-06-02 Electronics And Telecommunications Research Institute Optical network terminal, method for time syncronization thereof, optical line terminal, and method for managing network thereof
CN102130735A (zh) * 2010-11-09 2011-07-20 华为技术有限公司 一种传送设备及其实现时钟和时间同步的方法
CN102843293A (zh) * 2012-08-20 2012-12-26 中兴通讯股份有限公司 一种处理报文的方法和网元设备
CN102843620A (zh) * 2011-06-24 2012-12-26 北京邮电大学 一种实现时间同步传送的otn设备及方法
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN104052588A (zh) * 2013-03-14 2014-09-17 阿尔特拉公司 用于为利用fec编码器的***实现按ieee 1588的精确时间戳的方法
CN104602141A (zh) * 2015-01-16 2015-05-06 深圳市中兴微电子技术有限公司 一种otn网络中实现时间同步的方法、设备和***

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2572462B1 (en) * 2010-05-17 2019-08-28 Telefonaktiebolaget LM Ericsson (publ) Optimizing timing packet transport

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110129218A1 (en) * 2009-11-27 2011-06-02 Electronics And Telecommunications Research Institute Optical network terminal, method for time syncronization thereof, optical line terminal, and method for managing network thereof
CN102130735A (zh) * 2010-11-09 2011-07-20 华为技术有限公司 一种传送设备及其实现时钟和时间同步的方法
CN102843620A (zh) * 2011-06-24 2012-12-26 北京邮电大学 一种实现时间同步传送的otn设备及方法
US20130121347A1 (en) * 2011-11-16 2013-05-16 Fujitsu Limited Communication apparatus
CN102843293A (zh) * 2012-08-20 2012-12-26 中兴通讯股份有限公司 一种处理报文的方法和网元设备
CN104052588A (zh) * 2013-03-14 2014-09-17 阿尔特拉公司 用于为利用fec编码器的***实现按ieee 1588的精确时间戳的方法
CN104602141A (zh) * 2015-01-16 2015-05-06 深圳市中兴微电子技术有限公司 一种otn网络中实现时间同步的方法、设备和***

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021073444A1 (zh) * 2019-10-15 2021-04-22 中兴通讯股份有限公司 同步方法、装置、设备和存储介质
CN111162971A (zh) * 2019-12-30 2020-05-15 视联动力信息技术股份有限公司 一种时延确定方法及装置

Also Published As

Publication number Publication date
CN106856422A (zh) 2017-06-16
CN106856422B (zh) 2020-06-16

Similar Documents

Publication Publication Date Title
US9256247B2 (en) Method and apparatus for communicating time information between time aware devices
US11038609B2 (en) Sensing system and time synchronization method
US9203725B2 (en) Update of a cumulative residence time of a packet in a packet-switched communication network
WO2016112666A1 (zh) Otn网络中实现时间同步的方法、设备、***及存储介质
US9960871B1 (en) Method and apparatus for securing clock synchronization in a network
US10158441B1 (en) Securing time between nodes
JP5518191B2 (ja) 光伝送網が時刻同期プロトコルをキャリングする方法及びシステム
JP5636093B2 (ja) デバイス間におけるクロック同期の実行方法及び装置
WO2017097034A1 (zh) 光传输网络中时间报文的时戳处理方法及装置
US9491106B2 (en) Non-intrusive method for synchronizing master and slave clocks of a packet-switched network, and associated synchronization devices
US8948037B1 (en) Checksum trailer in timing protocols
JP2019501458A (ja) データ処理方法及び装置
JP2007282093A (ja) クロック信号発生装置及び方法
JP2008053872A (ja) Ipストリーム送受信システム、ipストリーム受信装置及びそれらに用いる受信処理タイミング同期化方法
CN114297833A (zh) 一种面向分布式仿真的时间同步方法
WO2015196637A1 (zh) 业务时钟透传的方法及装置
US9882705B2 (en) Communication apparatus, communication method, and computer readable medium using propagation delay for time synchronization
WO2016150021A1 (zh) 一种报文转发时延的测量方法、装置及***
CN108155965A (zh) Sdh传输iec61588方法
US9306695B2 (en) Frame transmitting apparatus, frame receiving apparatus, and frame transmission/reception system and method
KR102093223B1 (ko) 전력 제어 시스템의 시간 동기화 장치 및 그 방법
JP2012134608A (ja) 光伝送装置
US10931434B2 (en) Relay apparatus, communication system, and failure detection method
JP5239405B2 (ja) Ts受信装置及びそれに用いるタイミング再生方法
CN105099593B (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: 16872228

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

Country of ref document: EP

Kind code of ref document: A1