WO2017097034A1 - Time stamp processing method and apparatus for time message in optical transport network - Google Patents
Time stamp processing method and apparatus for time message in optical transport network Download PDFInfo
- 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
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L1/00—Arrangements for detecting or preventing errors in the information received
- H04L1/004—Arrangements for detecting or preventing errors in the information received by using forward error control
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q11/00—Selecting arrangements for multiplex systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04Q—SELECTING
- H04Q11/00—Selecting arrangements for multiplex systems
- H04Q11/0001—Selecting arrangements for multiplex systems using optical switching
- H04Q11/0062—Network 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
Disclosed is a time stamp processing method for a time message in an optical transport network, comprising: determining time of a message header of a time message and a corresponding first multi-frame number according to a frame header and a multi-frame number of an optical transport network (OTN) frame; acquiring a second multi-frame number corresponding to a message header of a time message, subjected to forward error correction (FEC) decoding or coding, of the OTN frame; obtaining a difference between the first multi-frame number and the second multi-frame number according to a difference calculation rule; and obtaining a final time stamp of the time message according to the time of the message header of the time message and the difference, obtained according to the difference calculation rule, between the first multi-frame number and the second multi-frame number. Also disclosed is a time stamp processing apparatus for a time message in an optical transport network.
Description
本发明涉及光传输网络的传输技术,尤其涉及一种光传输网络中时间报文的时戳的处理方法及装置。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.
随着通信网络的发展,光传输网络(Optical Transport Network,OTN)已经成为传输网络的主流,各种业务都用OTN网络来承载,因此OTN网络必须能够提供高精度的网络参考时钟,以满足网络节点或终端的同步需求。With the development of communication networks, optical transport networks (OTNs) have become the mainstream of transmission 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.
在现有技术中,往往是利用OTN网络的时间处理装置处理时间报文来实现时间传递的,由于对时的需求,在时间报文进入时间处理装置的方向上,需要得到时间报文进入该时间处理装置的时候的时戳,在时间报文出时间处理装置的方向上,需要得到时间报文发出该时间处理装置的时候的时戳,时戳的采样和处理是必不可少的一部分,而在OTN网络中,OTN帧经过了跨时钟域、定帧、前向纠错(Forward Error Correction,FEC)编解码等处理,特别是FEC编解码每次复位会带来不同的帧延时,造成采样的时戳可能会有很大的偏差,最终影响对时精度。In the prior art, 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. In the OTN network, 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.
发明内容Summary of the invention
有鉴于此,本发明实施例期望提供一种光传输网络中时间报文的时戳的处理方法及装置,以消除FEC编解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。In view of this, 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.
为达到上述目的,本发明实施例的技术方案是这样实现的:
To achieve the above objective, the technical solution of the embodiment of the present invention is implemented as follows:
本发明实施例提供一种光传输网络中时间报文的时戳处理方法,所述方法包括:The embodiment of the invention provides a time stamp processing method for a time packet in an optical transmission network, and the method includes:
根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;Determining, 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;
获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;Acquiring a second multiframe number corresponding to a packet header of the time packet after the forward error correction FEC decoding or encoding of the OTN frame;
按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;Obtaining a difference between the first multiframe number and the second multiframe number according to a difference calculation rule;
根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。Obtaining 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 time stamp of the final time packet.
上述方法中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,具体包括:In the above method, the difference between the first multiframe number and the second multiframe number is obtained according to the difference calculation rule, and specifically includes:
在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;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;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。If the first multiframe number is smaller than 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.
上述方法中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:In the above method, 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:
将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;Subtracting the time of the packet header of the time packet by 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. Time stamp
所述最终的时间报文的时戳为入时戳。The time stamp of the final time message is an entry time stamp.
上述方法中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,具体包括:In the above method, the difference between the first multiframe number and the second multiframe number is obtained according to the difference calculation rule, and specifically includes:
在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小
于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;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;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。If the first multiframe number is greater than the second multiframe number, the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
上述方法中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:In the above method, 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:
将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;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. Time stamp
所述最终的时间报文的时戳为出时戳。The time stamp of the final time message is a time stamp.
上述方法中,在所述根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号之前,所述方法还包括:In the above 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 time at which the message header is generated;
上述方法中,在所述得到最终的时间报文的时戳之后,所述方法还包括:In the above method, after the time stamp of the final time message is obtained, the method further includes:
将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或将所述最终的时间报文的时戳加入所述时间报文的修正域中。Adding the timestamp of the last time message to the source timestamp field of the time message, or adding the timestamp of the final time message to the correction field of the time message.
本发明实施例还提供一种光传输网络中时间报文的时戳处理装置,所述装置包括:The embodiment of the invention further provides a time stamp processing device for a time message in an optical transmission network, the device comprising:
确定模块,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;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;
获取模块,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;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.
上述装置中,所述差值计算模块,还配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;In the above apparatus, 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;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。If the first multiframe number is smaller than 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.
上述装置中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;In the above apparatus, 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.
上述装置中,所述差值计算模块,还配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;In the above apparatus, 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;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。If the first multiframe number is greater than the second multiframe number, the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
上述装置中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;In the above apparatus, 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.
上述装置中,所述装置还包括:In the above device, the device further includes:
时间模块,配置为产生所述报文头的时间。
A time module configured to generate the time of the message header.
上述装置中,所述装置还包括:In the above device, 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.
所述确定模块、所述获取模块、所述差值计算模块、所述时戳计算模块、所述时间模块在执行处理时,可以采用中央处理器(CPU,Central Processing Unit)、数字信号处理器(DSP,Digital Singnal Processor)或可编程逻辑阵列(FPGA,Field-Programmable Gate Array)实现。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.
本发明实施例提供的光传输网络中时间报文的时戳的处理方法及装置,首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。The method and device for processing a time stamp of a time packet in an optical transmission network according to an embodiment of the present invention 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.
图1为本发明光传输网络中时间报文的时戳的处理方法实施例的流程图;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;
图2为本发明光传输网络中时间报文的时戳的处理装置实施例的结构示意图。
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.
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。The technical solutions in the embodiments of the present invention will be clearly and completely described in the following with reference to the accompanying drawings.
图1为本发明光传输网络中时间报文的时戳的处理方法实施例的流程图,如图1所示,本发明方法可以包括如下步骤: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:
步骤101、产生时间报文所需的本地时间。Step 101: Generate a local time required for the time message.
光传输网络中时间报文的时戳的处理装置(以下简称处理装置)的时间模块主要用来产生本地时间,供后续的时间报文、时间报文的报文头和OTN帧使用;其中,时间模块利用本地时钟计数,以一个固定的步进值进行累加,产生一个80bit的时间,其中高48bit为整秒部分,低32bit为纳秒部分,当低32bit纳秒部分累加到1秒时间后,向高位进1。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.
步骤102、根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号。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.
由于OTN网络中利用OTN帧中某个确定的保留开销来传送时间报文,且每个OTN帧只传送时间报文的一个字节,因此可以采样得到OTN帧的帧头处的时间作为时间报文的时间,即处理装置先获取OTN帧的帧头和复帧号,再根据获取到的OTN帧的帧头和复帧号可以确定出未经过FEC解码后的时间报文的报文头的时间和所对应的复帧号,将该复帧号定义为第一复帧号,用M1来表示,将该报文头的时间用T2来表示。Since the OTN network uses a certain reserved overhead in the OTN frame to transmit the time message, and each OTN frame transmits only one byte of the time message, 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.
步骤103、获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号。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.
处理装置从OTN帧经过FEC解码或编码后的保留开销中获取到时间报文的报文头所对应的复帧号,该复帧号定义为第二复帧号,用M2来表示。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.
步骤104、按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值。
Step 104: Obtain a difference between the first multiframe number and the second multiframe number according to a difference calculation rule.
处理装置在获取到第一复帧号M1和第二复帧号M2之后,按照差值计算规则可以得到两者的差值,其中,差值计算规则分为OTN帧经过FEC解码后(时间报文进入方向)和OTN帧经过FEC编码后(时间报文出去方向)这两种情况,具体的如下: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 specific conditions are as follows:
当在OTN帧经过FEC解码后(时间报文进入方向)的情况下,处理装置会判断第一复帧号M1是否大于等于第二复帧号M2,如果第一复帧号M1大于等于第二复帧号M2,则直接计算第一复帧号M1与第二复帧号的M2差值D,即D=M1-M2;如果第一复帧号M1小于第二复帧号M2,则将第一复帧号M1加256后再计算与第二复帧号M2的差值D,即D=M1+256-M2。When the OTN frame is subjected to FEC decoding (time message entering 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 complex frame number M2 directly calculates the M2 difference D of the first multiple frame number M1 and the second multiple frame number, that is, D=M1-M2; if the first multiple frame number M1 is smaller than the second multiple frame number M2, After the first multiframe number M1 is added to 256, the difference D from the second multiframe number M2 is calculated, that is, 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。After the OTN frame is FEC-encoded, 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. The difference D between the first multiple frame number M1 and the second multiple frame number M2, that is, D=M2-M1; if the first multiple frame number M1 is greater than the second multiple frame number M2, the second multiple frame number M2 is added to 256. Then calculate the difference D from the first multiframe number M1, that is, D=M2+256-M1.
步骤105、根据所述时间报文的报文头时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。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.
在OTN帧经过FEC解码后(时间报文进入方向)的条件下,处理装置将时间报文的报文头的时间T2减去第一复帧号M1与第二复帧号M2的差值D与单个OTN帧传送时间Ct的积,得到最终的时间报文的时戳Ti,即Ti=T2-D*Ct;该最终的时间报文的时戳Ti为时间报文的入时戳。After the OTN frame is subjected to FEC decoding (time packet entering direction), 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 product of the single OTN frame transmission time Ct is obtained as the time stamp Ti of the final time message, that is, Ti=T2-D*Ct; the time stamp Ti of the final time message is the time stamp of the time message.
在OTN帧经过FEC编码后(时间报文出去方向)的条件下,处理装置将时间报文的报文头的时间T2加上第一复帧号M1与第二复帧号M2的差值D与单个OTN帧传送时间Ct的积,得到最终的时间报文的时戳To,即To=T2+D*Ct;该最终的时间报文的时戳Ti为时间报文的出时戳。
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 stamp To of the final time message is obtained by the product of the single OTN frame transmission time Ct, that is, To=T2+D*Ct; the time stamp Ti of the final time message is the time stamp of the time message.
其中,由于OTN帧的速率是固定的,所以可以得到传送单个OTN帧所需的时间也是固定的,将传送单个OTN帧的时间定义为Ct。Wherein, since the rate of the OTN frame is fixed, 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.
步骤106、将所述最终的时间报文的时戳加入所述时间报文的源时戳域中或所述时间报文的修正域中。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.
本发明实施例提供的光传输网络中时间报文的时戳的处理方法,光传输网络中时间报文的时戳的处理装置首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。The processing method of the time stamp of the time packet in the optical transmission network provided by the embodiment of the present invention, 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. Obtaining the 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.
图2为本发明光传输网络中时间报文的时戳的处理装置实施例的结构示意图,如图2所示,该光传输网络中时间报文的时戳的处理装置02包括:确定模块21、获取模块22、差值计算模块23、时戳计算模块24;其中,2 is a schematic structural diagram of an apparatus for processing a time stamp of a time packet in an optical transmission network according to the present invention. As shown in FIG. 2, 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
所述确定模块21,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;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;
所述获取模块22,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;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;
所述差值计算模块23,配置为按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;
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;
所述时戳计算模块24,配置为根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。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.
在本发明实施例一实施方式中,所述差值计算模块23,具体配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;In an embodiment of the present invention, 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;
如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。If the first multiframe number is smaller than 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.
在本发明实施例一实施方式中,所述时戳计算模块24,具体配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;In an embodiment of the present invention, 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.
在本发明实施例一实施方式中,所述差值计算模块23,还具体配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;In an embodiment of the present invention, 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;
如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。If the first multiframe number is greater than the second multiframe number, the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
在本发明实施例一实施方式中,所述时戳计算模块24,还具体配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;In an embodiment of the present invention, 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.
在本发明实施例一实施方式中,所述装置还包括:In an embodiment of the present invention, the apparatus further includes:
时间模块25,配置为产生所述报文头的时间。
The time module 25 is configured to generate the time of the message header.
在本发明实施例一实施方式中,所述装置还包括:In an embodiment of the present invention, the apparatus further includes:
时戳处理模块26,配置为将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或配置为将所述最终的时间报文的时戳加入所述时间报文的修正域中。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.
在实际应用中,所述确定模块21、获取模块22、差值计算模块23、时戳计算模块24、时间模块25、时戳处理模块26可由位于装置上的中央处理器(CPU)、微处理器(MPU)、数字信号处理器(DSP)或现场可编程门阵列(FPGA)等器件实现。In an actual application, 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. Device (MPU), digital signal processor (DSP) or field programmable gate array (FPGA) implementation.
本领域内的技术人员应明白,本发明的实施例可提供为方法、系统、或计算机程序产品。因此,本发明可采用硬件实施例、软件实施例、或结合软件和硬件方面的实施例的形式。而且,本发明可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器和光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art will appreciate that 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 present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (system), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or FIG. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing device to produce a machine for the execution of instructions for execution by a processor of a computer or other programmable data processing device. Means for implementing the functions specified in one or more of the flow or in a block or blocks of the flow chart.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存
储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。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 above is only the preferred embodiment of the present invention and is not intended to limit the scope of the present invention.
本发明实施例提供的光传输网络中时间报文的时戳的处理方法及装置,首先通过根据OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;其次获取OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;然后按照差值计算规则得到第一复帧号与第二复帧号的差值;最后根据时间报文的报文头的时间与按照差值计算规则得到第一复帧号与第二复帧号的差值,得到最终的时间报文的时戳,即可以得到时间报文在光传输网络中时间报文的时戳的处理装置的入口处或者出口处的时戳;消除了FEC编码或解码每次异常复位的时候所带来的帧延时,减少采样时间报文的时戳的偏差,能够获得精准的时间报文的时戳。
The method and device for processing a time stamp of a time packet in an optical transmission network according to an embodiment of the present invention 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.
Claims (14)
- 一种光传输网络中时间报文的时戳处理方法,所述方法包括:A time stamp processing method for time packets in an optical transmission network, the method comprising:根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;Determining, 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;获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;Acquiring a second multiframe number corresponding to a packet header of the time packet after the forward error correction FEC decoding or encoding of the OTN frame;按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值;Obtaining a difference between the first multiframe number and the second multiframe number according to a difference calculation rule;根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳。Obtaining 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 time stamp of the final time packet.
- 根据权利要求1所述的方法,其中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,包括:The method according to claim 1, wherein the obtaining the difference between the first multiframe number and the second multiframe number according to the difference calculation rule comprises:在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;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;如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。If the first multiframe number is smaller than 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.
- 根据权利要求2所述的方法,其中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:The method according to claim 2, wherein said obtaining a first multiframe number and said second multiframe number according to a time of a message header of said time message and said difference calculation rule The difference, the time stamp of the final time message, including:将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;Subtracting the time of the packet header of the time packet by 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. Time stamp所述最终的时间报文的时戳为入时戳。The time stamp of the final time message is an entry time stamp.
- 根据权利要求1所述的方法,其中,所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,包括:The method according to claim 1, wherein the obtaining the difference between the first multiframe number and the second multiframe number according to the difference calculation rule comprises:在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小 于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;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;如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。If the first multiframe number is greater than the second multiframe number, the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
- 根据权利要求4所述的方法,其中,所述根据所述时间报文的报文头的时间与所述按照差值计算规则得到所述第一复帧号与所述第二复帧号的差值,得到最终的时间报文的时戳,包括:The method according to claim 4, wherein said obtaining a first multiframe number and said second multiframe number according to a time of a message header of said time message and said difference calculation rule The difference, the time stamp of the final time message, including:将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;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. Time stamp所述最终的时间报文的时戳为出时戳。The time stamp of the final time message is a time stamp.
- 根据权利要求1至5任一项所述的方法,其中,在所述根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号之前,所述方法还包括:The method according to any one of claims 1 to 5, wherein the time of the packet header of the time packet and the corresponding first multiframe are determined according to the frame header and the multiframe number of the OTN frame of the optical transmission network Before the number, the method further includes:产生所述报文头的时间;The time at which the message header is generated;
- 根据权利要求1至5任一项所述的方法,其中,在所述得到最终的时间报文的时戳之后,所述方法还包括:The method according to any one of claims 1 to 5, wherein after the time stamp of the final time message is obtained, the method further comprises:将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或将所述最终的时间报文的时戳加入所述时间报文的修正域中。Adding the timestamp of the last time message to the source timestamp field of the time message, or adding the timestamp of the final time message to the correction field of the time message.
- 一种光传输网络中时间报文的时戳处理装置,所述装置包括:A time stamp processing device for a time message in an optical transmission network, the device comprising:确定模块,配置为根据光传输网络OTN帧的帧头和复帧号确定出时间报文的报文头的时间和对应的第一复帧号;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;获取模块,配置为获取所述OTN帧经过前向纠错FEC解码或编码后的时间报文的报文头对应的第二复帧号;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.
- 根据权利要求8所述的装置,其中,所述差值计算模块,还配置为在所述OTN帧经过FEC解码后的情况下,判断所述第一复帧号是否大于等于所述第二复帧号,如果所述第一复帧号大于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;The apparatus according to claim 8, wherein the difference calculation module is further configured to determine whether the first multiframe number is greater than or equal to the second complex if the OTN frame is FEC decoded. 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;如果所述第一复帧号小于所述第二复帧号,则将所述第一复帧号加256后再计算与所述第二复帧号的差值。If the first multiframe number is smaller than 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.
- 根据权利要求9所述的装置,其中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间减去所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;The apparatus according to claim 9, wherein the time stamp calculation module is further configured to subtract the first multiframe number and the second multiframe number from a time of a 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.
- 根据权利要求8所述的装置,其中,所述差值计算模块,还配置为在所述OTN帧经过FEC编码后的情况下,判断所述第一复帧号是否小于等于所述第二复帧号,如果所述第一复帧号小于等于所述第二复帧号,则直接计算所述第一复帧号与所述第二复帧号的差值;The apparatus according to claim 8, wherein 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 complex a 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;如果所述第一复帧号大于所述第二复帧号,则将所述第二复帧号加256后再计算与所述第一复帧号的差值。If the first multiframe number is greater than the second multiframe number, the second multiframe number is added to 256 and then the difference from the first multiframe number is calculated.
- 根据权利要求11所述的装置,其中,所述时戳计算模块,还配置为将所述时间报文的报文头的时间加上所述第一复帧号与所述第二复帧号的差值与单个OTN帧传送时间的积,得到所述最终的时间报文的时戳;The apparatus according to claim 11, wherein the time stamp calculation module is further configured to add a time of a message header of the time message to the first multiframe number and the second multiframe number 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 a time stamp.
- 根据权利要求8至12任一项所述的装置,其中,所述装置还包括:The device according to any one of claims 8 to 12, wherein the device further comprises:时间模块,配置为产生所述报文头的时间。 A time module configured to generate the time of the message header.
- 根据权利要求8至12任一项所述的装置,其中,所述装置还包括:The device according to any one of claims 8 to 12, wherein the device further comprises:时戳处理模块,配置为将所述最终的时间报文的时戳加入所述时间报文的源时戳域中,或配置为将所述最终的时间报文的时戳加入所述时间报文的修正域中。 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.
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510903714.8A CN106856422B (en) | 2015-12-09 | 2015-12-09 | Timestamp processing method and device for time message in optical transmission network |
CN201510903714.8 | 2015-12-09 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2017097034A1 true WO2017097034A1 (en) | 2017-06-15 |
Family
ID=59012661
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2016/102279 WO2017097034A1 (en) | 2015-12-09 | 2016-10-17 | Time stamp processing method and apparatus for time message in optical transport network |
Country Status (2)
Country | Link |
---|---|
CN (1) | CN106856422B (en) |
WO (1) | WO2017097034A1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111162971A (en) * | 2019-12-30 | 2020-05-15 | 视联动力信息技术股份有限公司 | Time delay determination method and device |
WO2021073444A1 (en) * | 2019-10-15 | 2021-04-22 | 中兴通讯股份有限公司 | Synchronization method and apparatus, device and storage medium |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116996418A (en) * | 2022-04-26 | 2023-11-03 | 华为技术有限公司 | Message processing method and device |
Citations (7)
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 (en) * | 2010-11-09 | 2011-07-20 | 华为技术有限公司 | Transmission equipment and method thereof for realizing synchronization of clock and time |
CN102843293A (en) * | 2012-08-20 | 2012-12-26 | 中兴通讯股份有限公司 | Method for processing message and network element equipment |
CN102843620A (en) * | 2011-06-24 | 2012-12-26 | 北京邮电大学 | OTN (Optical Transport Network) device and method for realizing time synchronous transmission |
US20130121347A1 (en) * | 2011-11-16 | 2013-05-16 | Fujitsu Limited | Communication apparatus |
CN104052588A (en) * | 2013-03-14 | 2014-09-17 | 阿尔特拉公司 | Methods to achieve accurate time stamp in ieee 1588 for system with fec encoder |
CN104602141A (en) * | 2015-01-16 | 2015-05-06 | 深圳市中兴微电子技术有限公司 | Method, device and system for synchronizing time in OTN (Open Transport Network) |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011144263A1 (en) * | 2010-05-17 | 2011-11-24 | Telefonaktiebolaget L M Ericsson (Publ) | Optimizing timing packet transport |
-
2015
- 2015-12-09 CN CN201510903714.8A patent/CN106856422B/en active Active
-
2016
- 2016-10-17 WO PCT/CN2016/102279 patent/WO2017097034A1/en active Application Filing
Patent Citations (7)
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 (en) * | 2010-11-09 | 2011-07-20 | 华为技术有限公司 | Transmission equipment and method thereof for realizing synchronization of clock and time |
CN102843620A (en) * | 2011-06-24 | 2012-12-26 | 北京邮电大学 | OTN (Optical Transport Network) device and method for realizing time synchronous transmission |
US20130121347A1 (en) * | 2011-11-16 | 2013-05-16 | Fujitsu Limited | Communication apparatus |
CN102843293A (en) * | 2012-08-20 | 2012-12-26 | 中兴通讯股份有限公司 | Method for processing message and network element equipment |
CN104052588A (en) * | 2013-03-14 | 2014-09-17 | 阿尔特拉公司 | Methods to achieve accurate time stamp in ieee 1588 for system with fec encoder |
CN104602141A (en) * | 2015-01-16 | 2015-05-06 | 深圳市中兴微电子技术有限公司 | Method, device and system for synchronizing time in OTN (Open Transport Network) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021073444A1 (en) * | 2019-10-15 | 2021-04-22 | 中兴通讯股份有限公司 | Synchronization method and apparatus, device and storage medium |
CN111162971A (en) * | 2019-12-30 | 2020-05-15 | 视联动力信息技术股份有限公司 | Time delay determination method and device |
Also Published As
Publication number | Publication date |
---|---|
CN106856422A (en) | 2017-06-16 |
CN106856422B (en) | 2020-06-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9256247B2 (en) | Method and apparatus for communicating time information between time aware devices | |
WO2016112666A1 (en) | Method, device, system, and storage medium for implementing time synchronization in optical transport network | |
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 | |
US10158441B1 (en) | Securing time between nodes | |
US9960871B1 (en) | Method and apparatus for securing clock synchronization in a network | |
JP5518191B2 (en) | Method and system for optical transmission network carrying time synchronization protocol | |
WO2014032350A1 (en) | Method and node based on seamless redundant ring network for increasing precision of clock | |
JP5636093B2 (en) | Method and apparatus for performing clock synchronization between devices | |
WO2017097034A1 (en) | Time stamp processing method and apparatus for time message in optical transport network | |
US11689440B2 (en) | Method and apparatus for transmit time timestamping | |
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 | |
US9882705B2 (en) | Communication apparatus, communication method, and computer readable medium using propagation delay for time synchronization | |
CN114297833A (en) | Time synchronization method for distributed simulation | |
WO2015196637A1 (en) | Method and apparatus for service clock passthrough | |
WO2016150021A1 (en) | Packet forwarding delay measurement method, device and system | |
CN108155965A (en) | SDH transmits IEC61588 methods | |
CN103401813B (en) | A kind of asymmetric delay compensation method and switch | |
US9306695B2 (en) | Frame transmitting apparatus, frame receiving apparatus, and frame transmission/reception system and method | |
KR102093223B1 (en) | Apparatus and method for synchronizing time of power control system | |
JP2012134608A (en) | Optical transmission apparatus | |
US10931434B2 (en) | Relay apparatus, communication system, and failure detection method | |
JP5239405B2 (en) | TS receiver and timing reproduction method used therefor | |
CN104954630B (en) | Video time stamp acquisition methods, video processing equipment and video system |
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 |