WO2021238724A1 - Method and apparatus for transmitting timestamp information, and device and storage medium - Google Patents

Method and apparatus for transmitting timestamp information, and device and storage medium Download PDF

Info

Publication number
WO2021238724A1
WO2021238724A1 PCT/CN2021/094399 CN2021094399W WO2021238724A1 WO 2021238724 A1 WO2021238724 A1 WO 2021238724A1 CN 2021094399 W CN2021094399 W CN 2021094399W WO 2021238724 A1 WO2021238724 A1 WO 2021238724A1
Authority
WO
WIPO (PCT)
Prior art keywords
time stamp
frame header
sending
stamp information
time
Prior art date
Application number
PCT/CN2021/094399
Other languages
French (fr)
Chinese (zh)
Inventor
高睿
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Priority to KR1020227046141A priority Critical patent/KR20230018469A/en
Publication of WO2021238724A1 publication Critical patent/WO2021238724A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • H04J3/0635Clock or time synchronisation in a network
    • H04J3/0638Clock or time synchronisation among nodes; Internode synchronisation
    • H04J3/0658Clock or time synchronisation among packet nodes
    • H04J3/0661Clock or time synchronisation among packet nodes using timestamps
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/16Time-division multiplex systems in which the time allocation to individual channels within a transmission cycle is variable, e.g. to accommodate varying complexity of signals, to vary number of channels transmitted
    • H04J3/1605Fixed allocated frame structures
    • H04J3/1652Optical Transport Network [OTN]

Definitions

  • This application relates to the technical field of communication networks, and in particular to a method, device, device, and storage medium for transmitting time stamp information.
  • Communication networks have high requirements for time synchronization between devices. For example, when switching base stations during wireless communication, when the time error between the base stations of the base station is not within a certain range, the communication will be dropped.
  • Optical Transmission Unit Optical Transport Unit with AM/CWM and Reed-solomon (528, 514) 10 or (544, 514) 10 FEC) based on (528, 514) 10 or (544, 514) 10 forward error correction coding in communication networks , OTUw-RS) protocol
  • Optical Transport Network (Optical Transport Network, OTN) optical transmission equipment has broad application scenarios in the fronthaul network. By using KR4/KP4 encoding respectively, it can provide two bit rates of 25G or 50G.
  • the OTN optical transmission equipment based on the OTUw-RS protocol better meets the requirements of low latency, low cost, high reliability and high bandwidth in the fronthaul network.
  • the OTUw-RS protocol does not stipulate how the equipment collects time stamp information and the transmission of time stamp information. If the equipment is installed with a global positioning system (Global Positioning System, GPS) signal receiving device, it is received by the GPS signal receiving device. The time synchronization signal sent by the satellite realizes the time synchronization between the devices, which will increase the construction cost and threaten the safety of the OTN optical transmission equipment based on the OTUw-RS protocol.
  • GPS Global Positioning System
  • the embodiment of the application provides a time stamp information transmission method, which is applied to the sending end.
  • the method includes: inserting an OTUw-RS frame header into a parallel data stream and generating a frame header pulse; determining according to the frame header pulse and the sampling clock Sending time stamp information; sending the sending time stamp information to the receiving end through a time stamp data frame.
  • the embodiment of the application provides a method for transmitting time stamp information, using the receiving end, the method includes: searching for the OTUw-RS frame header in a parallel data stream, and generating a frame header pulse; determining according to the frame header pulse and the sampling clock Receive timestamp information; obtain the sending timestamp information sent by the sender through the timestamp data frame.
  • the embodiment of the application provides a time stamp information transmission device, which is applied to the sending end, and the device includes: a first pulse module for inserting an OTUw-RS frame header into a parallel data stream and generating a frame header pulse; a time determination module , Used to determine the sending time stamp information according to the frame header pulse and the sampling clock; the information sending module, used to send the sending time stamp information to the receiving end through a time stamp data frame.
  • the embodiment of the application provides a time stamp information transmission device, which is applied to the receiving end, and the device includes: a second pulse module for searching for the OTUw-RS frame header in the parallel data stream and generating the frame header pulse; receiving time The module determines the receiving time stamp information according to the frame header pulse and the sampling clock; the sending time module is used to obtain the sending time stamp information sent by the sending end through the time stamped data frame.
  • An embodiment of the present application also provides a device, which includes: one or more processors; a memory, configured to store one or more programs, when the one or more programs are used by the one or more processors Execution, so that the one or more processors implement the time stamp information transmission method as described in any of the embodiments of the present application.
  • the embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for transmitting time stamp information as described in any of the embodiments of the present application is implemented.
  • FIG. 1 is a flowchart of a method for transmitting time stamp information according to an embodiment of the present application
  • FIG. 2 is a flowchart of another method for transmitting time stamp information according to an embodiment of the present application
  • FIG. 3 is a flowchart of another method for transmitting time stamp information according to an embodiment of the present application.
  • FIG. 4 is a flowchart of yet another method for transmitting time stamp information according to an embodiment of the present application.
  • FIG. 5 is an exemplary diagram of a method for transmitting time stamp information according to an embodiment of the present application
  • FIG. 6 is a schematic structural diagram of a time stamp information transmission device provided by an embodiment of the present application.
  • FIG. 7 is a schematic structural diagram of another apparatus for transmitting time stamp information according to an embodiment of the present application.
  • FIG. 8 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • FIG. 9 is a diagram of an implementation example of an optical transmission device provided by an embodiment of the present application.
  • FIG. 10 is an example diagram of time synchronization provided by an embodiment of the present application.
  • OTN optical transmission equipment based on the OTUw-RS protocol has a wide range of application scenarios in the fronthaul network due to the characteristics of low latency, low cost, high reliability and high bandwidth, but because the OTUw-RS protocol does not determine and send the time stamp information
  • the OTN optical transmission network using the OTUw-RS protocol cannot perform time synchronization, which causes the problem of large time errors between devices.
  • This application uses the frame header of the OTUw-RS protocol to collect the time stamp information and send the time stamp information to the opposite device, thereby realizing the time synchronization of the OTN optical transmission network.
  • the embodiments of the application provide a method, device, device, and storage medium for transmitting time stamp information, so as to realize the determination and transmission of time stamp information of OTN optical transmission equipment based on the OTUw-RS protocol, and improve the accuracy of time synchronization of OTN equipment .
  • Figure 1 is a flow chart of a method for transmitting time stamp information provided by an embodiment of the present application.
  • the embodiment of the present application is applicable to the case of transmitting time stamp information on an OTN optical transmission network using the OTUw-RS protocol in a fronthaul network.
  • the time stamp information transmission device in the embodiment of the application is implemented.
  • the device can be implemented by software and/or hardware.
  • the device is generally integrated at the transmitting end of the OTN optical transmission network.
  • This method for transmitting time stamp information specifically includes the following steps.
  • Step 110 Insert the OTUw-RS frame header into the parallel data stream, and generate frame header pulses.
  • the OTUw-RS frame header is a message frame header that meets the requirements of the OTUw-RS protocol, and can include AM and CWM frame headers.
  • the parallel data stream can be the carrier of information transmission in the OTN optical transmission network, and the parallel data stream can be of different wavelengths. Adjusted light signal.
  • the frame header pulse can be a pulse signal generated after the OTUw-RS frame header is inserted into the parallel data stream, and it can indicate that the OTUw-RS frame header is sent through parallel data.
  • construct the message frame header conforming to the OTUw-RS protocol format insert the constructed OTUw-RS frame header into the parallel data stream and send it to the receiving end, and monitor the frame header pulse corresponding to the OTUw-RS frame header.
  • the pulse can be generated at the moment when the OTUw-RS frame header is sent.
  • Step 120 Determine sending time stamp information according to the frame header pulse and the sampling clock.
  • the sampling clock is a timing clock with a preset frequency in the OTN optical transmission network equipment.
  • the sampling clock can collect the frame header pulse signal according to the clock edge within a clock cycle, and the collected frame header pulse signal can correspond to different Clock time.
  • the sending time stamp information may indicate the sending time of the OTUw-RS frame header, and the sending time stamp information specifically refers to the total seconds from 00: 00: 00 on January 1, 1970, Greenwich Mean Time.
  • the pulse signal of the frame header pulse is collected, and the time when the signal is collected is locked.
  • the time stamp information can be determined by the collected time, for example, the average value of all locked times is determined as the sending time Stamp information or select the minimum time as the sending time stamp information, and each collected time can be used as the sending time stamp information.
  • Step 130 Send the sending time stamp information to the receiving end through a time stamp data frame.
  • the time stamp data frame is a data frame encapsulated with sending time stamp information.
  • the following table shows the structure data structure of a time stamp data frame.
  • the time stamp data frame can have a start bit, frame header synchronization byte 1,
  • the frame header is composed of synchronization byte 2, time stamp byte, check byte and stop bit.
  • the sending time stamp information is encapsulated into the time stamp byte of the time stamp data frame, and other constituent fields of the time stamp data frame are generated.
  • the encapsulated time stamp data frame can be sent to OTN optical transmission through parallel data.
  • the receiving end of the network can understand that the number of timestamp data frames sent by the sending end can be one or more according to the determined number of sending timestamp information.
  • the transmission time stamp is determined by the sampling clock and the frame header pulse, and the transmission time stamp information is sent to the receiving end through the time stamp data frame.
  • the transmission of time stamp information in the OTN optical transmission network improves the accuracy of the time stamp information and can reduce the time error between different devices.
  • FIG. 2 is a flowchart of another method for transmitting time stamp information provided by an embodiment of the present application.
  • the embodiment of the present application is based on the above-mentioned application embodiment, and determines the frame headers at the rising and falling edges of the acquisition clock respectively.
  • the time stamp information transmission method provided in the embodiment of the present application specifically includes the following steps.
  • Step 210 Insert the OTUw-RS frame header into the parallel data stream, and generate a frame header pulse.
  • Step 220 Collect the frame header pulses respectively according to the rising edge and the falling edge of the sampling clock, and lock the timer time of the sampling clock.
  • the sampling clock may include multiple clock cycles. In each clock cycle, the rising position of the level signal of the sampling clock can be used as a rising edge, and the falling position of the level signal can be used as a falling edge.
  • the frame header pulses are collected twice in each clock cycle of the sampling clock, and the corresponding frame header pulses can be collected on the rising and falling edges of the sampling clock respectively, and the rising and falling edges can correspond to
  • the timer time is determined as the timer time when the frame header pulse is collected.
  • the time when the pulse signal is present in the frame header pulse locks multiple timer times through the rising and falling edges of the sampling clock. The more clock cycles of the sampling clock, the more The more the timer time is, and accordingly, the higher the accuracy of sending the time stamp information.
  • the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  • the frequency of the sampling clock is set to 1 GHz, and the corresponding step is 1 nanosecond. Then the sampling clock can have a rising edge and a falling within 1 nanosecond. Correspondingly, the length of one clock cycle of the sampling clock can be 1 nanosecond.
  • Step 230 Determine the minimum value of the timer times corresponding to the same clock cycle as the sending time stamp information.
  • the acquisition clock includes multiple clock cycles, and the rising edge and falling edge of each clock cycle have corresponding timer times. The smaller one can be selected among the two timer times belonging to the same clock cycle.
  • the timer time is used as the sending time stamp information.
  • Step 240 Encapsulate the sending time stamp information into a high-precision time synchronization protocol packet.
  • the high-precision time synchronization protocol (Precision Time Protocol, PTP) packet is a high-precision time data packet, and the time accuracy can reach sub-microsecond precision.
  • the transmission time stamp information is encapsulated according to the format of a high-precision time synchronization protocol packet to realize the transmission of high-precision time information.
  • Step 250 Insert the high-precision time synchronization protocol packet into the overhead reserved field of the time stamp data frame.
  • the overhead reserved field may be a reserved field specified by the OTUw-RS protocol, and the encapsulated high-precision time synchronization protocol packet may be inserted into the corresponding position.
  • Step 260 Send the time stamp data frame to the receiving end before the next frame header pulse.
  • the time stamp data frame transmitted in the parallel data stream corresponds to the OTUw-RS frame header.
  • the time stamp data frame corresponding to the frame header needs to be sent before the next OTUw-RS frame header is sent Sent to the receiving end.
  • the frame header pulse lock corresponding timer time is collected through the rising edge and the falling edge of the sampling clock respectively, which will correspond to the same clock cycle
  • the minimum value of the timer time is determined to be the sending time stamp information
  • the sending time stamp information is encapsulated into a high-precision time synchronization protocol packet
  • the high-precision time synchronization protocol packet is inserted into the overhead reserved field of the time-stamp data frame, and in the next frame
  • the time stamp data frame is sent to the receiving end before the head pulse, which realizes the time stamp information transmission in the OTN optical transmission network, improves the accuracy of the time stamp information, and reduces the time error between different devices.
  • Fig. 3 is a flowchart of a method for transmitting time stamp information provided by an embodiment of the present application.
  • the embodiment of the present application is applicable to the case of transmitting time stamp information in an OTN optical transmission network using the OTUw-RS protocol in a fronthaul network.
  • the time stamp information transmission device in the embodiment of the application is implemented.
  • the device can be implemented by software and/or hardware.
  • the device is generally integrated at the receiving end of the OTN optical transmission network.
  • This method for transmitting time stamp information specifically includes the following steps.
  • Step 310 Search for the OTUw-RS frame header in the parallel data stream, and generate a frame header pulse.
  • the receiving end searches for the OTUw-RS frame header in the parallel data stream, for example, searches for the AM frame header in the parallel data stream on the parallel interface in the receiving direction.
  • the AM frame header can meet the requirements of the OTUw-RS protocol.
  • the frame header pulse can be output.
  • Step 320 Determine receiving time stamp information according to the frame header pulse and the sampling clock.
  • the received time stamp information may be the time when the OTUw-RS frame header is received, and the received time stamp information may specifically be the total number of seconds from 00: 00: 00 on January 1, 1970, Greenwich Mean Time.
  • the pulse signal of the frame head pulse is collected and the collected time information is determined according to the collection clock.
  • the time information can be used as the receiving time stamp information.
  • the frame head is collected according to each clock edge of the collection clock.
  • each clock edge can correspond to a piece of time information, and the average value of all collected time information can be used as receiving time stamp information, or each time information can be used as receiving time stamp information.
  • Step 330 Obtain the transmission time stamp information sent by the transmitting end through the time stamp data frame.
  • the receiving end can obtain the transmission time stamp in the received time stamp data frame, and can directly extract the information of the time stamp field position as the transmission time stamp information according to the frame structure of the time stamp time frame.
  • the OTUw-RS frame header is searched in the parallel data stream, and the frame header pulse is generated, the receiving time stamp information is determined according to the frame header pulse and the sampling clock, and the transmission time stamp sent by the sending end through the time stamp data frame is extracted Information, realizes the time information transmission of OTUw-RS equipment, improves the accuracy of time stamp information, and reduces the time error between different equipment in the communication network.
  • the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
  • the baud rate of the frame header pulse is configured to be at least 4 times the clock period of the sampling clock, where the baud rate can be Refers to the retention time of 1 bit of the frame header pulse.
  • the baud rate of the frame header pulse can be configured to be 16 or 32 clock cycles of the sampling clock.
  • FIG. 4 is a flowchart of another method for transmitting time stamp information provided by an embodiment of the present application.
  • the embodiment of the present application is based on the above-mentioned application embodiment, and determines the frame headers at the rising and falling edges of the acquisition clock respectively. Pulse receiving time stamp information, and determining the sending format of the received time stamp information according to the high-precision time synchronization protocol package.
  • the time stamp information transmission method provided in the embodiment of the present application specifically includes the following steps.
  • Step 410 Search for the OTUw-RS frame header in the parallel data stream, and generate a frame header pulse.
  • Step 420 Sample the frame header pulses according to the rising edge and the falling edge of the sampling clock, and lock the timer time corresponding to the sampling clock.
  • the receiving end collects two frame header pulses in each clock cycle of the sampling clock, which can be collected once at the rising edge and once at the falling edge.
  • the timer that collects the frame header pulses at the rising and falling edges respectively Time locked.
  • the clock cycle of the sampling clock at the receiving end may be the same as the clock cycle of the sampling clock at the transmitting end.
  • the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  • Step 430 Determine the minimum value of the timer time corresponding to the same clock cycle as the received time stamp information.
  • the receiving time stamp information is the time information when the receiving end receives the OTUw-RS frame header.
  • the acquisition clock can include multiple clock cycles, and each clock cycle can correspond to two timer times. In the same clock cycle, the two timer times are compared, and the minimum timer time is used as the receiving timestamp. information.
  • Step 440 Extract a high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame.
  • the receiving end sends the transmission time stamp information through the time stamp data frame, and obtains the high-precision time synchronization protocol packet in the time stamp data frame according to the position of the pre-appointed overhead reserved field.
  • Step 450 Extract the transmission time stamp information in the high-precision time synchronization protocol packet.
  • the transmission time stamp information can be extracted according to the data format of the high-precision time synchronization protocol packet.
  • Step 460 Determine the correspondence between the transmission time stamp information and the OTUw-RS frame header.
  • the receiving end can use the transmission time stamp information within the threshold time after receiving the OTUw-RS frame header as the corresponding OTUw-RS frame
  • the sending timestamp of the header, where the preset time can be one or more clock cycles corresponding to the acquisition clock.
  • the frame header pulse is collected according to the rising and falling edges of the sampling clock, and the corresponding timer time is locked, which will correspond to the same clock cycle
  • the minimum of the timer time is determined to receive the time stamp information, extract the high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame, extract the transmission time stamp information, and determine the transmission time stamp information and OTUw-RS frame
  • the correspondence between the headers realizes the time information transmission of the OTUw-RS device, improves the accuracy of the time stamp information, and reduces the time error between different devices in the communication network.
  • the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
  • FIG. 5 is an exemplary diagram of a time stamp information transmission method provided by an embodiment of the present application, using OTUw-RS protocol AM/CWM frame header to collect Precise Time Protocol (Precise Time Protocol, PTP) Packet timestamp, and use the overhead reserved field to send PTP packets.
  • Timestamp information transmission can include two processes: sending and receiving.
  • the sending process includes: 1. Inserting the OTUw-RS frame header in the parallel data stream in the sending direction. And generate the frame header pulse. 2. Using the frame header pulse, the time stamp of the OTUw-RS frame header in the sending direction is collected based on the rising and falling edges of the sampling clock. 3.
  • the receiving process includes: 1. Searching for the OTUw-RS frame header in the parallel data stream in the receiving direction, and generating frame header pulses. 2. Using the frame header pulse, the time stamp of the OTUw-RS frame header in the receiving direction is collected based on the rising and falling edges of the sampling clock.
  • FIG. 6 is a schematic structural diagram of a time stamp information transmission device provided by an embodiment of the present application, which can execute the time stamp information transmission method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method.
  • the device can be implemented by software and/or hardware.
  • the transmitting end of the integrated optical transmission network includes: a first pulse module 51, a time determination module 52, and an information sending module 53.
  • the first pulse module 51 is used to insert the OTUw-RS frame header into the parallel data stream and generate frame header pulses.
  • the time determining module 52 is configured to determine the sending time stamp information according to the frame header pulse and the sampling clock.
  • the information sending module 53 is configured to send the sending time stamp information to the receiving end through a time stamp data frame.
  • the OTUw-RS frame header is inserted into the parallel data stream through the first pulse module, and the frame header pulse is generated.
  • the time determination module determines the transmission time stamp by the sampling clock and the frame header pulse, and the information transmission module passes the time stamp data frame Sending the time stamp information to the receiving end realizes the time stamp information transmission in the OTN optical transmission network, improves the accuracy of the time stamp information, and can reduce the time error between different devices.
  • the time determination module 52 includes: a time locking unit, configured to separately collect the frame header pulses according to the rising edge and the falling edge of the sampling clock, and lock the The timer time of the sampling clock; the time stamp determining unit is used to determine the minimum value of the timer times corresponding to the same clock cycle as the sending time stamp information.
  • the frequency of the sampling clock in the time determining module 52 is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  • the information sending module 53 includes: a packet encapsulation unit, configured to encapsulate the transmission time stamp information into a high-precision time synchronization protocol packet; and a packet insertion unit, configured to The high-precision time synchronization protocol packet is inserted into the overhead reserved field of the time stamp data frame; the frame sending unit is configured to send the time stamp data frame to the receiving end before the next frame header pulse.
  • the baud rate of the frame header pulse in the device is configured to be at least 4 times the clock period corresponding to the sampling clock.
  • FIG. 7 is a schematic structural diagram of another time stamp information transmission device provided by an embodiment of the present application, which can execute the time stamp information transmission method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method.
  • the device may be implemented by software and/or hardware.
  • the receiving end of an integrated optical transmission network includes: a second pulse module 61, a receiving time module 62, and a sending time module 63.
  • the second pulse module 61 is used to search for the OTUw-RS frame header in the parallel data stream and generate frame header pulses.
  • the receiving time module 62 determines the receiving time stamp information according to the frame header pulse and the sampling clock.
  • the sending time module 63 is used to obtain the sending time stamp information sent by the sending end through the time stamp data frame.
  • the second pulse module searches for the OTUw-RS frame header in the parallel data stream and generates the frame header pulse.
  • the receiving time module determines the receiving time stamp information according to the frame header pulse and the sampling clock, and the sending time module extracts the sending end.
  • the time stamp information sent by the time stamp data frame realizes the time information transmission of the OTUw-RS device, improves the accuracy of the time stamp information, and reduces the time error between different devices in the communication network.
  • the receiving time module 62 includes: a time determining unit, configured to sample the frame header pulse according to the rising edge and the falling edge of the sampling clock, and lock The timer time corresponding to the sampling clock.
  • the time stamp selection unit is configured to determine the minimum value of the timer times corresponding to the same clock cycle as the received time stamp information.
  • the frequency of the sampling clock in the receiving time module 62 is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  • the sending time module 63 includes: a packet extraction unit, configured to extract a high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame.
  • the time stamp extraction unit is used to extract the transmission time stamp information in the high-precision time synchronization protocol packet.
  • the frame header corresponding unit is used to determine the correspondence between the transmission timestamp information and the OTUw-RS frame header.
  • the baud rate of the frame header pulse in the device is configured to be at least 4 times the clock period corresponding to the sampling clock.
  • FIG. 8 is a schematic structural diagram of a device provided by an embodiment of the present application.
  • the device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the device can be one Or more, one processor 70 is taken as an example in FIG. 8; the device processor 70, the memory 71, the input device 72, and the output device 73 may be connected by a bus or other methods. In FIG. 8, the connection by a bus is taken as an example.
  • the memory 71 can be used to store software programs, computer-executable programs, and modules, such as the modules (first pulse module 51, time determination module 52) corresponding to the time stamp information transmission device provided in the embodiment of the present application. And the information sending module 53, and/or, the second pulse module 61, the receiving time module 62, and the sending time module 63).
  • the processor 70 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 71, that is, realizes the above-mentioned time stamp information transmission method.
  • the memory 71 may mainly include a program storage area and a data storage area.
  • the program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like.
  • the memory 71 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 71 may further include a memory remotely provided with respect to the processor 70, and these remote memories may be connected to the device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the input device 72 can be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the device.
  • the output device 73 may include a display device such as a display screen.
  • FIG. 9 is an implementation example diagram of an optical transmission device provided in an embodiment of the present application.
  • the optical transmission device includes an equalization module, a clock and data recovery (Clock and Data Recovery, CDR). ) Module, Phase Locked Loop (PLL) Module, Serial-to-Parallel Conversion Module, Parallel-to-Serial Conversion Module, Asynchronous First Input First Output (FIFO) Module, Encoding/Adding Winding Module, Decoding/Descrambling Module It also includes OTUw-RS framing module, OTUw overhead extraction module, OTUw-RS frame header insertion module, OTUw overhead insertion module, timer and time stamp sampling module, off-chip processor and other modules.
  • PLL Phase Locked Loop
  • FIFO Asynchronous First Input First Output
  • OTUw-RS framing module OTUw overhead extraction module
  • OTUw-RS frame header insertion module OTUw overhead insertion module
  • timer and time stamp sampling module off-chip processor and other modules.
  • equalization module clock data recovery CDR module, phase-locked loop PLL module, serial-to-parallel conversion module, parallel-to-serial conversion module, asynchronous FIFO module, encoding/wrapping module, decoding/descrambling module, OTUw-RS framing module, OTUw
  • the overhead extraction module, the OTUw-RS frame header insertion module, and the OTUw overhead insertion module realize the determination and transmission of the time stamp information.
  • the OTUw-RS framing module realizes the function of real-time generation of OTUw-RS frame header pulse in the receiving direction, and sends the frame header pulse to the timer and time stamp sampling module to sample the time stamp, and then send it to the off-chip processor, and at the same time the OTUw overhead extraction module
  • the overhead corresponding to the OTUw-RS frame header is sent to the off-chip processor, and the off-chip processor parses the PTP packet in the overhead reserved field.
  • the timer and time stamp sampling module uses the rising and falling edges of a 1 gigahertz (GHz) clock to sample the frame header pulse signal. Compared with only using the rising edge to sample the frame header pulse signal, the sampling accuracy is doubled.
  • GHz gigahertz
  • the pins of the timer and time stamp sampling module output to the off-chip processor support 1-bit (bit) retention time, that is, the baud rate can be configured to 16 or 32 timing clock cycles, which can ensure that the off-chip processor is able to operate under a low-speed clock.
  • the off-chip processor that loads the correct sampling of the time stamp data frame realizes the receiving side PTP packet parsing and the sending side PTP packet grouping.
  • the PTP packet parsing on the receiving side refers to recombining the overhead sent by the OTUw overhead extraction module into a PTP packet, and the overhead reserved field used is negotiated with the peer device.
  • the sending-side PTP packet grouping refers to encapsulating the time stamp information into the PTP packet.
  • the time stamp information comes from the OTUw-RS frame header pulse in the sending direction sampled by the timer and the time stamp sampling module.
  • FIG. 10 is an example diagram of time synchronization provided by an embodiment of the present application. Based on the time-stamp transmission method implemented in the present application, the implementation of time synchronization between devices is taken as an example.
  • Step 1 the time issuer inserts the OTU25-RS protocol AM frame header on the parallel interface of the transmitting side, and outputs the frame header pulse signal at the same time.
  • the timing clock in the embodiment of the present application uses 1 GHz with a step of 1 nanosecond. Use the rising edge and the falling edge of the timing clock to sample the frame header pulse signal respectively, and latch the timer time, and select the smaller value of the two timer times as the frame header time stamp, which is marked as t1. After the frame header pulse signal goes low, after a configurable integer number of timing clocks, start sending the time stamp data frame Sync to the off-chip processor through the send side time stamp pin, and ensure that the transmission is completed before the next frame header pulse signal data.
  • the 1-bit hold time that is, the baud rate
  • the time stamp data frame is 106 bits in total, including 1 bit start bit, two 8 bit frame header synchronization bytes, 80 bit time stamp byte, 8 bit check byte and 1 bit stop bit.
  • the start bit is 1 bit high power Ping, used to identify the beginning of the time stamp data frame; the stop bit is 1bit low level, used to identify the end of the time stamp data frame; the frame header synchronization byte is used to synchronize the time stamp data frame; the time stamp byte is used to store the time stamp Information, 48bit second data, 32bit nanosecond data, you can send the second data first and then send the nanosecond data; the check byte is used to verify whether the data in the time stamp data frame is correct, you can use the 1PPS_TOD standard (where 1PPS is called 1Pulse per second, the second pulse; TOD is called Time of Day, the TOD frame cyclic redundancy check (Cyclic Redundancy Check, CRC), CRC check formula: x ⁇ 8+x ⁇ 5+x ⁇ 4+1, The initial value of the check code is set to 0xFF, and the input data does not need to be inverted.
  • the check algorithm adopts right shift calculation. When the check byte is sent, the least
  • Step 2 The off-chip processor encapsulates the time stamp t1 in the time stamp data frame into an IEEE1588v2 PTP packet Follow_Up message, adjusts the delay appropriately, and inserts it into the overhead reserved field of the OTU25 data packet within an OTU25-RS frame period.
  • Step 3 The receiving side of the time receiver searches for the AM frame header of the OTU25-RS on the parallel interface of the receiving direction in accordance with the requirements of the G.709.4 protocol, and outputs the frame header pulse signal.
  • Step 4 Use the rising edge and falling edge of the timing clock to sample the frame header pulse signal respectively, and latch the timer time, select the smaller value of the two as the frame header time stamp, and record it as t2.
  • Step 5 After the frame header pulse signal goes low, after a configurable integer number of timing clocks, start sending the time stamp data frame to the off-chip processor through the receiving side time stamp pin, and ensure that it is before the next frame header pulse signal Finish transmitting the data.
  • Step 6 The off-chip processor extracts the PTP packet in the overhead reserved field through the OTU25 overhead extraction module, and corresponds to the time stamp in the previous time stamp data frame, to obtain the sampling time stamp t1 of the PTP packet at the time issuer.
  • Step 7 The time receiver sends the PTP packet Delay_Req message to the time issuer, the sending time stamp is t3, and the sampling time stamp of the message received by the time issuer is t4.
  • Step 8 The time issuer encapsulates the t4 in Delay_Resp message and sends it to the time receiver.
  • the embodiment of the present application also provides a computer-readable storage medium.
  • the computer-executable instructions are executed by a computer processor, they are used to perform a time-stamp information transmission method.
  • the method includes: inserting an OTUw-RS frame header into a parallel data stream , And generate a frame header pulse; determine the transmission time stamp information according to the frame header pulse and the sampling clock; send the transmission time stamp information to the receiving end through a time stamp data frame. And/or search the OTUw-RS frame header in the parallel data stream, and generate the frame header pulse; determine the receiving time stamp information according to the frame header pulse and the sampling clock; obtain the transmission time stamp information sent by the sending end through the time stamp data frame .
  • a storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the method operations described above, and can also execute the function remote customization method provided by any embodiment of the present application. Related operations.
  • user terminal encompasses any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable web browser, or a vehicle-mounted mobile station.
  • the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof.
  • some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the application is not limited thereto.
  • Computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code written in any combination of one or more programming languages or Object code.
  • ISA instruction set architecture
  • the block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions.
  • the computer program can be stored on the memory.
  • the memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), and optical storage. Devices and systems (Digital Versatile Disc (DVD) or Compact Disc (CD)), etc.
  • Computer-readable media may include non-transitory storage media.
  • the data processor can be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (ASICs) ), programmable logic devices (Field-Programmable Gate Array, FPGA), and processors based on multi-core processor architecture.
  • DSP Digital Signal Processing
  • ASICs application specific integrated circuits
  • FPGA Field-Programmable Gate Array
  • FPGA Field-Programmable Gate Array

Landscapes

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

Abstract

Disclosed are a method and apparatus for transmitting timestamp information, and a device and a storage medium. The method comprises: inserting an OTUw-RS frame header into a parallel data stream, and generating a frame header pulse; determining sending timestamp information according to the frame header pulse and a sampling clock; and sending the sending timestamp information to a receiving end by means of a timestamp data frame.

Description

一种时间戳信息传输方法、装置、设备和存储介质Time stamp information transmission method, device, equipment and storage medium
交叉引用cross reference
本申请基于申请号为“202010479891.9”、申请日为2020年05月29日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此以引入方式并入本申请。This application is filed based on the Chinese patent application with the application number "202010479891.9" and the filing date on May 29, 2020, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this by way of introduction. Application.
技术领域Technical field
本申请涉及通信网络技术领域,尤其涉及一种时间戳信息传输方法、装置、设备和存储介质。This application relates to the technical field of communication networks, and in particular to a method, device, device, and storage medium for transmitting time stamp information.
背景技术Background technique
通信网络中对各设备间的时间同步具有较高要求,如无线通信过程中切换基站,当基站各基站之间的时间误差不在一定范围内,将会出现通信掉线的情况。通信网络中基于(528,514)10或(544,514)10前向纠错编码的光传输单元(Optical Transport Unit with AM/CWM and Reed-solomon(528,514)10or(544,514)10FEC,OTUw-RS)协议的光传送网络(Optical Transport Network,OTN)光传输设备在前传网络中具有广阔的应用场景,通过分别使用KR4/KP4编码,可提供25G或者50G的两种比特速率。基于OTUw-RS协议的OTN光传输设备较好的满足了前传网络中低延时、低成本、高可靠性和高带宽的要求。Communication networks have high requirements for time synchronization between devices. For example, when switching base stations during wireless communication, when the time error between the base stations of the base station is not within a certain range, the communication will be dropped. Optical Transmission Unit (Optical Transport Unit with AM/CWM and Reed-solomon (528, 514) 10 or (544, 514) 10 FEC) based on (528, 514) 10 or (544, 514) 10 forward error correction coding in communication networks , OTUw-RS) protocol Optical Transport Network (Optical Transport Network, OTN) optical transmission equipment has broad application scenarios in the fronthaul network. By using KR4/KP4 encoding respectively, it can provide two bit rates of 25G or 50G. The OTN optical transmission equipment based on the OTUw-RS protocol better meets the requirements of low latency, low cost, high reliability and high bandwidth in the fronthaul network.
然而OTUw-RS协议中未对设备如何采集时间戳信息和时间戳信息的传输进行规定,若通过在设备中加装全球定位系统(Global Positioning System,GPS)信号接收装置,通过GPS信号接收装置接收卫星发送的时间同步信号,实现各设备之间的时间同步,这将增加施工成本,并对基于OTUw-RS协议的OTN光传输设备的安全性产生威胁。However, the OTUw-RS protocol does not stipulate how the equipment collects time stamp information and the transmission of time stamp information. If the equipment is installed with a global positioning system (Global Positioning System, GPS) signal receiving device, it is received by the GPS signal receiving device. The time synchronization signal sent by the satellite realizes the time synchronization between the devices, which will increase the construction cost and threaten the safety of the OTN optical transmission equipment based on the OTUw-RS protocol.
发明内容Summary of the invention
本申请实施例提供了一种时间戳信息传输方法,应用于发送端,该方法包括:将OTUw-RS帧头插入并行数据流,并产生帧头脉冲;根据所述帧头脉冲和采样时钟确定发送 时间戳信息;将所述发送时间戳信息通过时戳数据帧发送到接收端。The embodiment of the application provides a time stamp information transmission method, which is applied to the sending end. The method includes: inserting an OTUw-RS frame header into a parallel data stream and generating a frame header pulse; determining according to the frame header pulse and the sampling clock Sending time stamp information; sending the sending time stamp information to the receiving end through a time stamp data frame.
本申请实施例提供了一种时间戳信息传输方法,应用接收端,该方法包括:在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲;根据所述帧头脉冲和采样时钟确定接收时间戳信息;获取发送端通过时戳数据帧发送的发送时间戳信息。The embodiment of the application provides a method for transmitting time stamp information, using the receiving end, the method includes: searching for the OTUw-RS frame header in a parallel data stream, and generating a frame header pulse; determining according to the frame header pulse and the sampling clock Receive timestamp information; obtain the sending timestamp information sent by the sender through the timestamp data frame.
本申请实施例提供了一种时间戳信息传输装置,应用于发送端,该装置包括:第一脉冲模块,用于将OTUw-RS帧头插入并行数据流,并产生帧头脉冲;时间确定模块,用于根据所述帧头脉冲和采样时钟确定发送时间戳信息;信息发送模块,用于将所述发送时间戳信息通过时戳数据帧发送到接收端。The embodiment of the application provides a time stamp information transmission device, which is applied to the sending end, and the device includes: a first pulse module for inserting an OTUw-RS frame header into a parallel data stream and generating a frame header pulse; a time determination module , Used to determine the sending time stamp information according to the frame header pulse and the sampling clock; the information sending module, used to send the sending time stamp information to the receiving end through a time stamp data frame.
本申请实施例提供了一种时间戳信息传输装置,应用于接收端,该装置包括:第二脉冲模块,用于在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲;接收时间模块,根据所述帧头脉冲和采样时钟确定接收时间戳信息;发送时间模块,用于获取发送端通过时戳数据帧发送的发送时间戳信息。The embodiment of the application provides a time stamp information transmission device, which is applied to the receiving end, and the device includes: a second pulse module for searching for the OTUw-RS frame header in the parallel data stream and generating the frame header pulse; receiving time The module determines the receiving time stamp information according to the frame header pulse and the sampling clock; the sending time module is used to obtain the sending time stamp information sent by the sending end through the time stamped data frame.
本申请实施例还提供了一种设备,该设备包括:一个或多个处理器;存储器,用于存储一个或多个程序,当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如本申请实施例中任一所述的时间戳信息传输方法。An embodiment of the present application also provides a device, which includes: one or more processors; a memory, configured to store one or more programs, when the one or more programs are used by the one or more processors Execution, so that the one or more processors implement the time stamp information transmission method as described in any of the embodiments of the present application.
本申请实施例还提供了一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如本申请实施例中任一所述的时间戳信息传输方法。The embodiment of the present application also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the method for transmitting time stamp information as described in any of the embodiments of the present application is implemented.
附图说明Description of the drawings
图1是本申请实施例提供的一种时间戳信息传输方法的流程图;FIG. 1 is a flowchart of a method for transmitting time stamp information according to an embodiment of the present application;
图2是本申请实施例提供的另一种时间戳信息传输方法的流程图;FIG. 2 is a flowchart of another method for transmitting time stamp information according to an embodiment of the present application;
图3是本申请实施例提供的又一种时间戳信息传输方法的流程图;FIG. 3 is a flowchart of another method for transmitting time stamp information according to an embodiment of the present application;
图4是本申请实施例提供的再一种时间戳信息传输方法的流程图;FIG. 4 is a flowchart of yet another method for transmitting time stamp information according to an embodiment of the present application;
图5是本申请实施例提供的一种时间戳信息传输方法的示例图;FIG. 5 is an exemplary diagram of a method for transmitting time stamp information according to an embodiment of the present application;
图6是本申请实施例提供的一种时间戳信息传输装置的结构示意图;FIG. 6 is a schematic structural diagram of a time stamp information transmission device provided by an embodiment of the present application;
图7是本申请实施例提供的另一种时间戳信息传输装置的结构示意图;FIG. 7 is a schematic structural diagram of another apparatus for transmitting time stamp information according to an embodiment of the present application;
图8是本申请实施例提供的一种设备的结构示意图;FIG. 8 is a schematic structural diagram of a device provided by an embodiment of the present application;
图9是本申请实施例提供的一种光传输设备的实现示例图;FIG. 9 is a diagram of an implementation example of an optical transmission device provided by an embodiment of the present application;
图10是本申请实施例提供的一种时间同步的示例图。FIG. 10 is an example diagram of time synchronization provided by an embodiment of the present application.
具体实施方式Detailed ways
为使本申请的目的、技术方案和优点更加清楚明白,下文中将结合附图对本申请的实施例进行详细说明。需要说明的是,在不冲突的情况下,本申请中的实施例及实施例中的特征可以相互任意组合。基于OTUw-RS协议的OTN光传输设备在前传网络中由于低延迟、低成本、高可靠性和高带宽的特性具有广阔的应用场景,但是由于OTUw-RS协议未对时间戳信息的确定和发送方式进行设定,应用OTUw-RS协议的OTN光传输网络不能进行时间同步,造成各设备之间时间误差较大的问题,上述问题的存在对前传网络的维度性具有不可忽略的影响,本申请实施例通过利用OTUw-RS协议的帧头采集时间戳信息,并将时间戳信息发送到对端设备,实现了OTN光传输网络的时间同步。In order to make the purpose, technical solutions, and advantages of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. It should be noted that the embodiments in this application and the features in the embodiments can be combined with each other arbitrarily if there is no conflict. OTN optical transmission equipment based on the OTUw-RS protocol has a wide range of application scenarios in the fronthaul network due to the characteristics of low latency, low cost, high reliability and high bandwidth, but because the OTUw-RS protocol does not determine and send the time stamp information The OTN optical transmission network using the OTUw-RS protocol cannot perform time synchronization, which causes the problem of large time errors between devices. The existence of the above problems has a non-negligible impact on the dimensionality of the fronthaul network. This application The embodiment uses the frame header of the OTUw-RS protocol to collect the time stamp information and send the time stamp information to the opposite device, thereby realizing the time synchronization of the OTN optical transmission network.
本申请实施例提供了一种时间戳信息传输方法、装置、设备和存储介质,以实现基于OTUw-RS协议的OTN光传输设备的时间戳信息的确定和发送,提高OTN设备时间同步的准确性。The embodiments of the application provide a method, device, device, and storage medium for transmitting time stamp information, so as to realize the determination and transmission of time stamp information of OTN optical transmission equipment based on the OTUw-RS protocol, and improve the accuracy of time synchronization of OTN equipment .
图1是本申请实施例提供的一种时间戳信息传输方法的流程图,本申请实施例适用于前传网络中应用OTUw-RS协议的OTN光传输网络传输时间戳信息的情况,该方法可以由本申请实施例中的时间戳信息传输装置来执行,该装置可以由软件和/或硬件的方式实现,该装置一般集成在OTN光传输网络的发送端,参见图1,本申请实施例提供的一种时间戳信息传输方法具体包括如下步骤。Figure 1 is a flow chart of a method for transmitting time stamp information provided by an embodiment of the present application. The embodiment of the present application is applicable to the case of transmitting time stamp information on an OTN optical transmission network using the OTUw-RS protocol in a fronthaul network. The time stamp information transmission device in the embodiment of the application is implemented. The device can be implemented by software and/or hardware. The device is generally integrated at the transmitting end of the OTN optical transmission network. This method for transmitting time stamp information specifically includes the following steps.
步骤110、将OTUw-RS帧头插入并行数据流,并产生帧头脉冲。Step 110: Insert the OTUw-RS frame header into the parallel data stream, and generate frame header pulses.
其中,OTUw-RS帧头是符合OTUw-RS协议要求的消息帧帧头,可以包括AM和CWM帧头等,并行数据流可以是OTN光传输网络中传输信息的载体,并行数据流可以是不同波长调整的光信号。帧头脉冲可以是OTUw-RS帧头插入并行数据流后产生的脉冲信号,可以表示OTUw-RS帧头通过并行数据发送。Among them, the OTUw-RS frame header is a message frame header that meets the requirements of the OTUw-RS protocol, and can include AM and CWM frame headers. The parallel data stream can be the carrier of information transmission in the OTN optical transmission network, and the parallel data stream can be of different wavelengths. Adjusted light signal. The frame header pulse can be a pulse signal generated after the OTUw-RS frame header is inserted into the parallel data stream, and it can indicate that the OTUw-RS frame header is sent through parallel data.
具体的,构建符合OTUw-RS协议格式的消息帧帧头,将构建的OTUw-RS帧头插入到并行数据流中发送到接收端,监测OTUw-RS帧头对应的帧头脉冲,该帧头脉冲可以在OTUw-RS帧头发送时刻产生。Specifically, construct the message frame header conforming to the OTUw-RS protocol format, insert the constructed OTUw-RS frame header into the parallel data stream and send it to the receiving end, and monitor the frame header pulse corresponding to the OTUw-RS frame header. The pulse can be generated at the moment when the OTUw-RS frame header is sent.
步骤120、根据所述帧头脉冲和采样时钟确定发送时间戳信息。Step 120: Determine sending time stamp information according to the frame header pulse and the sampling clock.
其中,采样时钟是OTN光传输网络设备中预设设置好频率的计时时钟,该采样时钟可以在一个时钟周期内按照时钟时沿采集帧头脉冲信号,采集到的帧头脉冲信号可以对应不同 的时钟时间。Among them, the sampling clock is a timing clock with a preset frequency in the OTN optical transmission network equipment. The sampling clock can collect the frame header pulse signal according to the clock edge within a clock cycle, and the collected frame header pulse signal can correspond to different Clock time.
在本申请实施例中,发送时间戳信息可以是表示OTUw-RS帧头的发送时间,发送时间戳信息具体是指距离格林威治时间1970年1月1日00时00分00秒的总秒数,根据采样时钟的时钟时沿采集帧头脉冲的脉冲信号,并锁定采集到信号时的时间,可以通过采集到的时间确定发送时间戳信息,例如,确定锁定的所有时间平均值作为发送时间戳信息或者选择时间最小值作为发送时间戳信息,以及,可以将每个采集到的时间均作为发送时间戳信息。In the embodiment of the present application, the sending time stamp information may indicate the sending time of the OTUw-RS frame header, and the sending time stamp information specifically refers to the total seconds from 00: 00: 00 on January 1, 1970, Greenwich Mean Time. According to the clock edge of the sampling clock, the pulse signal of the frame header pulse is collected, and the time when the signal is collected is locked. The time stamp information can be determined by the collected time, for example, the average value of all locked times is determined as the sending time Stamp information or select the minimum time as the sending time stamp information, and each collected time can be used as the sending time stamp information.
步骤130、将所述发送时间戳信息通过时戳数据帧发送到接收端。Step 130: Send the sending time stamp information to the receiving end through a time stamp data frame.
其中,时戳数据帧是封装有发送时间戳信息的数据帧,下表展示出了一种时戳数据帧的结构数据结构,时戳数据帧可以有起始位、帧头同步字节1、帧头同步字节2、时戳字节、校验字节和停止位等字段组成。Among them, the time stamp data frame is a data frame encapsulated with sending time stamp information. The following table shows the structure data structure of a time stamp data frame. The time stamp data frame can have a start bit, frame header synchronization byte 1, The frame header is composed of synchronization byte 2, time stamp byte, check byte and stop bit.
时戳数据帧示例表Time stamp data frame example table
起始位Start bit 帧头同步字节1Frame header sync byte 1 帧头同步字节2Frame header sync byte 2 时戳字节Timestamp byte 校验字节Check byte 停止位Stop bit
8比特8-bit 8比特8-bit 8比特8-bit 80比特80 bit 8比特8-bit 1比特1 bit
本申请实施例,将发送时间戳信息封装到时戳数据帧的时戳字节中,并生成时戳数据帧其他组成字段,可以将封装好的时戳数据帧通过并行数据发送到OTN光传输网络的接收端,可以理解的是,根据确定出的发送时间戳信息的个数,发送端发送的时戳数据帧的个数可以为一个或多个。In the embodiment of this application, the sending time stamp information is encapsulated into the time stamp byte of the time stamp data frame, and other constituent fields of the time stamp data frame are generated. The encapsulated time stamp data frame can be sent to OTN optical transmission through parallel data. The receiving end of the network can understand that the number of timestamp data frames sent by the sending end can be one or more according to the determined number of sending timestamp information.
本申请实施例,通过将OTUw-RS帧头插入并行数据流,并产生帧头脉冲,通过采样时钟和帧头脉冲确定发送时间戳,通过时戳数据帧将发送时间戳信息发送接收端,实现了OTN光传输网络中的时间戳信息传输,提高了时间戳信息的准确性,可减少不同设备之间的时间误差。In the embodiment of the application, by inserting the OTUw-RS frame header into the parallel data stream, and generating the frame header pulse, the transmission time stamp is determined by the sampling clock and the frame header pulse, and the transmission time stamp information is sent to the receiving end through the time stamp data frame. The transmission of time stamp information in the OTN optical transmission network improves the accuracy of the time stamp information and can reduce the time error between different devices.
图2是本申请实施例提供的另一种时间戳信息传输方法的流程图,本申请实施例是以上述申请实施例为基础的具体化,分别确定采集时钟上升沿和下降沿处的帧头脉冲的发送时间戳信息,并根据高精度时间同步协议包确定发送时间戳信息的发送格式,参见图2,本申请实施例提供的时间戳信息传输方法的具体包括如下步骤以下步骤。FIG. 2 is a flowchart of another method for transmitting time stamp information provided by an embodiment of the present application. The embodiment of the present application is based on the above-mentioned application embodiment, and determines the frame headers at the rising and falling edges of the acquisition clock respectively. Pulse transmission time stamp information, and determine the transmission format of the transmission time stamp information according to the high-precision time synchronization protocol package. Referring to FIG. 2, the time stamp information transmission method provided in the embodiment of the present application specifically includes the following steps.
步骤210、将OTUw-RS帧头插入并行数据流,并产生帧头脉冲。Step 210: Insert the OTUw-RS frame header into the parallel data stream, and generate a frame header pulse.
步骤220、根据采样时钟的上升沿和下降沿分别采集帧头脉冲,并锁定采样时钟的计时器时间。Step 220: Collect the frame header pulses respectively according to the rising edge and the falling edge of the sampling clock, and lock the timer time of the sampling clock.
其中,采样时钟可以包括多个时钟周期,每个时钟周期内采样时钟的电平信号上升的位 置可以作为上升沿,电平信号下降的位置可以作为下降沿。The sampling clock may include multiple clock cycles. In each clock cycle, the rising position of the level signal of the sampling clock can be used as a rising edge, and the falling position of the level signal can be used as a falling edge.
在本申请实施例中,在采样时钟的每个时钟周期内采集两次帧头脉冲,可以分别在采样时钟的上升沿和下降沿采集对应的帧头脉冲,可以将上升沿和下降沿对应的计时器时间确定为帧头脉冲被采集的计时器时间。在本实施例中,由于采样时钟具有多个时钟周期,在帧头脉冲存在脉冲信号的时间通过采样时钟的上升沿和下降沿锁定多个计时器时间,采样时钟的时钟周期越多,采集到的计时器时间也就越多,相应的,发送时间戳信息的精确度可以越高。In the embodiment of the present application, the frame header pulses are collected twice in each clock cycle of the sampling clock, and the corresponding frame header pulses can be collected on the rising and falling edges of the sampling clock respectively, and the rising and falling edges can correspond to The timer time is determined as the timer time when the frame header pulse is collected. In this embodiment, since the sampling clock has multiple clock cycles, the time when the pulse signal is present in the frame header pulse locks multiple timer times through the rising and falling edges of the sampling clock. The more clock cycles of the sampling clock, the more The more the timer time is, and accordingly, the higher the accuracy of sending the time stamp information.
在一个实施例中,在上述申请实施例的基础上,所述采样时钟的频率为1GHz,且所述采样时钟的步进为1纳秒。In one embodiment, based on the above-mentioned application embodiment, the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
在一个示例性的实施例中,为了提高时间的精确度,将采样时钟的频率设置为1GHz,相应的步进为1纳秒,则在1纳秒内采样时钟可以存在一个上升沿和一个下降沿,相应的,采样时钟的一个时钟周期的长度可以为1纳秒。In an exemplary embodiment, in order to improve the accuracy of the time, the frequency of the sampling clock is set to 1 GHz, and the corresponding step is 1 nanosecond. Then the sampling clock can have a rising edge and a falling within 1 nanosecond. Correspondingly, the length of one clock cycle of the sampling clock can be 1 nanosecond.
步骤230、将对应相同时钟周期的所述计时器时间中的最小值确定为发送时间戳信息。Step 230: Determine the minimum value of the timer times corresponding to the same clock cycle as the sending time stamp information.
在本申请实施例中,采集时钟包括多个时钟周期,每个时钟周期的上升沿和下降沿存在对应的计时器时间,可以在属于相同时钟周期的两个计时器时间中,选择较小的计时器时间作为发送时间戳信息。In the embodiment of this application, the acquisition clock includes multiple clock cycles, and the rising edge and falling edge of each clock cycle have corresponding timer times. The smaller one can be selected among the two timer times belonging to the same clock cycle. The timer time is used as the sending time stamp information.
步骤240、将发送时间戳信息封装为高精度时间同步协议包。Step 240: Encapsulate the sending time stamp information into a high-precision time synchronization protocol packet.
其中,高精度时间同步协议(Precision Time Protocol,PTP)包是一种高精度时间的数据包,时间精确度可以达到亚微秒精度。Among them, the high-precision time synchronization protocol (Precision Time Protocol, PTP) packet is a high-precision time data packet, and the time accuracy can reach sub-microsecond precision.
具体的,将发送时间戳信息按照高精时间同步协议包的格式进行封装,实现高精时间信息的发送。Specifically, the transmission time stamp information is encapsulated according to the format of a high-precision time synchronization protocol packet to realize the transmission of high-precision time information.
步骤250、将高精时间同步协议包插入时戳数据帧的开销保留字段。Step 250: Insert the high-precision time synchronization protocol packet into the overhead reserved field of the time stamp data frame.
本申请实施例中,开销保留字段可以是OTUw-RS协议规定的保留字段,可以将封装好的高精度时间同步协议包插入到对应位置。In the embodiment of the present application, the overhead reserved field may be a reserved field specified by the OTUw-RS protocol, and the encapsulated high-precision time synchronization protocol packet may be inserted into the corresponding position.
步骤260、在下一个帧头脉冲之前将时戳数据帧发送到接收端。Step 260: Send the time stamp data frame to the receiving end before the next frame header pulse.
具体的,并行数据流中传输的时戳数据帧与OTUw-RS帧头对应,当一个OTUw-RS帧头发送后,该帧头对应的时戳数据帧需要在下一个OTUw-RS帧头发送之前发送到接收端。Specifically, the time stamp data frame transmitted in the parallel data stream corresponds to the OTUw-RS frame header. After an OTUw-RS frame header is sent, the time stamp data frame corresponding to the frame header needs to be sent before the next OTUw-RS frame header is sent Sent to the receiving end.
本申请实施例,通过将OTUw-RS帧头插入并行数据流,并产生帧头脉冲,通过采样时钟的上升沿和下降沿分别采集帧头脉冲锁定对应的计时器时间,将对应相同时钟周期的计时器时间中的最小值确定为发送时间戳信息,将发送时间戳信息封装为高精度时间同步协议包, 将该高精时间同步协议包插入时间戳数据帧的开销保留字段,并在下一个帧头脉冲之前将时戳数据帧发送到接收端,实现了OTN光传输网络中的时间戳信息传输,提高了时间戳信息的准确性,可减少不同设备之间的时间误差。In the embodiment of the application, by inserting the OTUw-RS frame header into the parallel data stream, and generating the frame header pulse, the frame header pulse lock corresponding timer time is collected through the rising edge and the falling edge of the sampling clock respectively, which will correspond to the same clock cycle The minimum value of the timer time is determined to be the sending time stamp information, the sending time stamp information is encapsulated into a high-precision time synchronization protocol packet, and the high-precision time synchronization protocol packet is inserted into the overhead reserved field of the time-stamp data frame, and in the next frame The time stamp data frame is sent to the receiving end before the head pulse, which realizes the time stamp information transmission in the OTN optical transmission network, improves the accuracy of the time stamp information, and reduces the time error between different devices.
图3是本申请实施例提供的一种时间戳信息传输方法的流程图,本申请实施例适用于前传网络中应用OTUw-RS协议的OTN光传输网络传输时间戳信息的情况,该方法可以由本申请实施例中的时间戳信息传输装置来执行,该装置可以由软件和/或硬件的方式实现,该装置一般集成在OTN光传输网络的接收端,参见图3,本申请实施例提供的一种时间戳信息传输方法具体包括如下步骤。Fig. 3 is a flowchart of a method for transmitting time stamp information provided by an embodiment of the present application. The embodiment of the present application is applicable to the case of transmitting time stamp information in an OTN optical transmission network using the OTUw-RS protocol in a fronthaul network. The time stamp information transmission device in the embodiment of the application is implemented. The device can be implemented by software and/or hardware. The device is generally integrated at the receiving end of the OTN optical transmission network. This method for transmitting time stamp information specifically includes the following steps.
步骤310、在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲。Step 310: Search for the OTUw-RS frame header in the parallel data stream, and generate a frame header pulse.
具体的,接收端在并行数据流中搜索OTUw-RS帧头,例如,在接收方向并行接口上搜索并行数据流中的AM帧头,该AM帧头可以符合OTUw-RS协议的要求,搜索到OTUw-RS帧头后可以输出帧头脉冲。Specifically, the receiving end searches for the OTUw-RS frame header in the parallel data stream, for example, searches for the AM frame header in the parallel data stream on the parallel interface in the receiving direction. The AM frame header can meet the requirements of the OTUw-RS protocol. After the OTUw-RS frame header, the frame header pulse can be output.
步骤320、根据所述帧头脉冲和采样时钟确定接收时间戳信息。Step 320: Determine receiving time stamp information according to the frame header pulse and the sampling clock.
其中,接收时间戳信息可以是接收到OTUw-RS帧头的时间,接收时间戳信息具体可以是距离格林威治时间1970年1月1日00时00分00秒的总秒数。The received time stamp information may be the time when the OTUw-RS frame header is received, and the received time stamp information may specifically be the total number of seconds from 00: 00: 00 on January 1, 1970, Greenwich Mean Time.
在本申请实施例中,采集帧头脉冲的脉冲信号并根据采集时钟确定采集到的时间信息,可以将该时间信息作为接收时间戳信息,例如,根据采集时钟的每个时钟时沿采集帧头脉冲,每个时钟时沿可以对应一个时间信息,可以将采集到的所有时间信息的平均值作为接收时间戳信息,或者,将每个时间信息分别作为接收时间戳信息。In the embodiment of the present application, the pulse signal of the frame head pulse is collected and the collected time information is determined according to the collection clock. The time information can be used as the receiving time stamp information. For example, the frame head is collected according to each clock edge of the collection clock. For pulse, each clock edge can correspond to a piece of time information, and the average value of all collected time information can be used as receiving time stamp information, or each time information can be used as receiving time stamp information.
步骤330、获取发送端通过时戳数据帧发送的发送时间戳信息。Step 330: Obtain the transmission time stamp information sent by the transmitting end through the time stamp data frame.
在一个示例性的实施例中,接收端可以获取接收到的时戳数据帧中的发送时间戳,可以按照时戳时间帧的帧结构直接提取时戳字段位置的信息作为发送时间戳信息。In an exemplary embodiment, the receiving end can obtain the transmission time stamp in the received time stamp data frame, and can directly extract the information of the time stamp field position as the transmission time stamp information according to the frame structure of the time stamp time frame.
本申请实施例,通过在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲,根据帧头脉冲和采样时钟确定接收时间戳信息,提取发送端通过时戳数据帧发送的发送时间戳信息,实现了OTUw-RS设备的时间信息传输,提高了时间戳信息的准确性,降低通信网络中不同设备间的时间误差。In the embodiment of the application, the OTUw-RS frame header is searched in the parallel data stream, and the frame header pulse is generated, the receiving time stamp information is determined according to the frame header pulse and the sampling clock, and the transmission time stamp sent by the sending end through the time stamp data frame is extracted Information, realizes the time information transmission of OTUw-RS equipment, improves the accuracy of time stamp information, and reduces the time error between different equipment in the communication network.
在一个实施例中,在上述申请实施例的基础上,所述帧头脉冲的波特率至少配置为所述采样时钟对应时钟周期的4倍。In one embodiment, on the basis of the above-mentioned application embodiment, the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
具体的,为了保证在低速时钟下对帧头脉冲正确采样,提高时间戳信息获取的准确性, 帧头脉冲的波特率至少配置为采样时钟的时钟周期的4倍,其中,波特率可以指帧头脉冲1比特保持时长。在本实施例中,帧头脉冲的波特率可以配置为16或32个采样时钟的时钟周期。Specifically, in order to ensure the correct sampling of the frame header pulse under a low-speed clock and improve the accuracy of time stamp information acquisition, the baud rate of the frame header pulse is configured to be at least 4 times the clock period of the sampling clock, where the baud rate can be Refers to the retention time of 1 bit of the frame header pulse. In this embodiment, the baud rate of the frame header pulse can be configured to be 16 or 32 clock cycles of the sampling clock.
图4是本申请实施例提供的另一种时间戳信息传输方法的流程图,本申请实施例是以上述申请实施例为基础的具体化,分别确定采集时钟上升沿和下降沿处的帧头脉冲的接收时间戳信息,并根据高精度时间同步协议包确定接收时间戳信息的发送格式,参见图4,本申请实施例提供的时间戳信息传输方法的具体包括如下步骤。FIG. 4 is a flowchart of another method for transmitting time stamp information provided by an embodiment of the present application. The embodiment of the present application is based on the above-mentioned application embodiment, and determines the frame headers at the rising and falling edges of the acquisition clock respectively. Pulse receiving time stamp information, and determining the sending format of the received time stamp information according to the high-precision time synchronization protocol package. Referring to FIG. 4, the time stamp information transmission method provided in the embodiment of the present application specifically includes the following steps.
步骤410、在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲。Step 410: Search for the OTUw-RS frame header in the parallel data stream, and generate a frame header pulse.
步骤420、根据采样时钟的上升沿和下降沿分别采样帧头脉冲,并锁定采样时钟对应的计时器时间。Step 420: Sample the frame header pulses according to the rising edge and the falling edge of the sampling clock, and lock the timer time corresponding to the sampling clock.
具体的,接收端在采样时钟的每个时钟周期内采集两次帧头脉冲,可以在上升沿处采集一次,在下降沿采集一次,分别将上升沿和下降沿处采集帧头脉冲的计时器时间锁定。接收端的采样时钟的时钟周期可以与发送端的采样时钟的时钟周期相同。Specifically, the receiving end collects two frame header pulses in each clock cycle of the sampling clock, which can be collected once at the rising edge and once at the falling edge. The timer that collects the frame header pulses at the rising and falling edges respectively Time locked. The clock cycle of the sampling clock at the receiving end may be the same as the clock cycle of the sampling clock at the transmitting end.
在一个实施例中,在上述申请实施例的基础上,采样时钟的频率为1GHz,且所述采样时钟的步进为1纳秒。In one embodiment, based on the above-mentioned application embodiment, the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
步骤430、将对应相同时钟周期的计时器时间中的最小值确定为接收时间戳信息。Step 430: Determine the minimum value of the timer time corresponding to the same clock cycle as the received time stamp information.
其中,接收时间戳信息是接收端接收到OTUw-RS帧头的时间信息。Among them, the receiving time stamp information is the time information when the receiving end receives the OTUw-RS frame header.
具体的,采集时钟可以包括多个时钟周期,每个时钟周期可以对应两个的计时器时间,在相同时钟周期,对两个计时器时间进行比较,其中最小值的计时器时间作为接收时间戳信息。Specifically, the acquisition clock can include multiple clock cycles, and each clock cycle can correspond to two timer times. In the same clock cycle, the two timer times are compared, and the minimum timer time is used as the receiving timestamp. information.
步骤440、在时戳数据帧的开销保留字段提取高精度时间同步协议包。Step 440: Extract a high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame.
在本申请实施例中,接收端通过时戳数据帧将发送时间戳信息发送,根据预先约定的开销保留字段的位置在时戳数据帧中获取高精度时间同步协议包。In the embodiment of the present application, the receiving end sends the transmission time stamp information through the time stamp data frame, and obtains the high-precision time synchronization protocol packet in the time stamp data frame according to the position of the pre-appointed overhead reserved field.
步骤450、提取高精度时间同步协议包中的发送时间戳信息。Step 450: Extract the transmission time stamp information in the high-precision time synchronization protocol packet.
具体的,可以按照高精度时间同步协议包的数据格式提取发送时间戳信息。Specifically, the transmission time stamp information can be extracted according to the data format of the high-precision time synchronization protocol packet.
步骤460、确定发送时间戳信息与OTUw-RS帧头的对应关系。Step 460: Determine the correspondence between the transmission time stamp information and the OTUw-RS frame header.
在本申请实施例中,发送的OTUw-RS帧头与发送时间戳信息存在对应关系,接收端可以从接收到OTUw-RS帧头后阈值时间内的发送时间戳信息作为对应该OTUw-RS帧头的发送时间戳,其中,预设时间可以为一个或多个采集时钟对应的时钟周期。In the embodiment of this application, there is a correspondence between the transmitted OTUw-RS frame header and the transmission time stamp information, and the receiving end can use the transmission time stamp information within the threshold time after receiving the OTUw-RS frame header as the corresponding OTUw-RS frame The sending timestamp of the header, where the preset time can be one or more clock cycles corresponding to the acquisition clock.
本申请实施例,通过在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲,根据采样时钟的上升沿和下降沿采集帧头脉冲,锁定对应的计时器时间,将对应相同时钟周期的计时器时间中的最小值确定为接收时间戳信息,在时戳数据帧的开销保留字段提取高精度时间同步协议包,提取其中的发送时间戳信息,确定发送时间戳信息与OTUw-RS帧头的对应关系,实现了OTUw-RS设备的时间信息传输,提高了时间戳信息的准确性,降低通信网络中不同设备间的时间误差。In the embodiment of the application, by searching for the OTUw-RS frame header in the parallel data stream, and generating the frame header pulse, the frame header pulse is collected according to the rising and falling edges of the sampling clock, and the corresponding timer time is locked, which will correspond to the same clock cycle The minimum of the timer time is determined to receive the time stamp information, extract the high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame, extract the transmission time stamp information, and determine the transmission time stamp information and OTUw-RS frame The correspondence between the headers realizes the time information transmission of the OTUw-RS device, improves the accuracy of the time stamp information, and reduces the time error between different devices in the communication network.
在一个实施例中,在上述申请实施例的基础上,帧头脉冲的波特率至少配置为所述采样时钟对应时钟周期的4倍。In one embodiment, on the basis of the foregoing application embodiment, the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
在一个示例性的实施例中,图5是本申请实施例提供的一种时间戳信息传输方法的示例图,利用OTUw-RS协议AM/CWM帧头采集精确时间协议(Precise Time Protocol,PTP)包时间戳,并使用开销保留字段发送PTP包,参见图5,时间戳信息传输可以包括发送和接收两个流程,发送流程包括:一、在发送方向并行数据流中插入OTUw-RS帧头,并产生帧头脉冲。二、利用帧头脉冲,基于采样时钟的上升沿和下降沿采集发送方向的OTUw-RS帧头的时间戳。三、将时戳封装为PTP包,并插入到开销保留字段。接收流程包括:一、接收方向并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲。二、利用帧头脉冲,基于采样时钟的上升沿和下降沿采集接收方向OTUw-RS帧头的时间戳。In an exemplary embodiment, FIG. 5 is an exemplary diagram of a time stamp information transmission method provided by an embodiment of the present application, using OTUw-RS protocol AM/CWM frame header to collect Precise Time Protocol (Precise Time Protocol, PTP) Packet timestamp, and use the overhead reserved field to send PTP packets. See Figure 5. Timestamp information transmission can include two processes: sending and receiving. The sending process includes: 1. Inserting the OTUw-RS frame header in the parallel data stream in the sending direction. And generate the frame header pulse. 2. Using the frame header pulse, the time stamp of the OTUw-RS frame header in the sending direction is collected based on the rising and falling edges of the sampling clock. 3. Encapsulate the time stamp as a PTP packet and insert it into the overhead reserved field. The receiving process includes: 1. Searching for the OTUw-RS frame header in the parallel data stream in the receiving direction, and generating frame header pulses. 2. Using the frame header pulse, the time stamp of the OTUw-RS frame header in the receiving direction is collected based on the rising and falling edges of the sampling clock.
图6是本申请实施例提供的一种时间戳信息传输装置的结构示意图,可执行本申请任意实施例提供的时间戳信息传输方法,具备执行方法相应的功能模块和有益效果。该装置可以由软件和/或硬件实现,一般集成光传输网络的发送端中,具体包括:第一脉冲模块51、时间确定模块52和信息发送模块53。FIG. 6 is a schematic structural diagram of a time stamp information transmission device provided by an embodiment of the present application, which can execute the time stamp information transmission method provided in any embodiment of the present application, and has functional modules and beneficial effects corresponding to the execution method. The device can be implemented by software and/or hardware. Generally, the transmitting end of the integrated optical transmission network includes: a first pulse module 51, a time determination module 52, and an information sending module 53.
第一脉冲模块51,用于将OTUw-RS帧头插入并行数据流,并产生帧头脉冲。The first pulse module 51 is used to insert the OTUw-RS frame header into the parallel data stream and generate frame header pulses.
时间确定模块52,用于根据所述帧头脉冲和采样时钟确定发送时间戳信息。The time determining module 52 is configured to determine the sending time stamp information according to the frame header pulse and the sampling clock.
信息发送模块53,用于将所述发送时间戳信息通过时戳数据帧发送到接收端。The information sending module 53 is configured to send the sending time stamp information to the receiving end through a time stamp data frame.
本申请实施例,通过第一脉冲模块将OTUw-RS帧头插入并行数据流,并产生帧头脉冲,时间确定模块通过采样时钟和帧头脉冲确定发送时间戳,信息发送模块通过时戳数据帧将发送时间戳信息发送接收端,实现了OTN光传输网络中的时间戳信息传输,提高了时间戳信息的准确性,可减少不同设备之间的时间误差。In the embodiment of this application, the OTUw-RS frame header is inserted into the parallel data stream through the first pulse module, and the frame header pulse is generated. The time determination module determines the transmission time stamp by the sampling clock and the frame header pulse, and the information transmission module passes the time stamp data frame Sending the time stamp information to the receiving end realizes the time stamp information transmission in the OTN optical transmission network, improves the accuracy of the time stamp information, and can reduce the time error between different devices.
在一个实施例中,在上述申请实施例的基础上,时间确定模块52包括:时间锁定单元,用于根据所述采样时钟的上升沿和下降沿分别采集所述帧头脉冲,并锁定所述采样时钟的计 时器时间;时戳确定单元,用于将对应相同时钟周期的所述计时器时间中的最小值确定为发送时间戳信息。In one embodiment, on the basis of the above-mentioned application embodiment, the time determination module 52 includes: a time locking unit, configured to separately collect the frame header pulses according to the rising edge and the falling edge of the sampling clock, and lock the The timer time of the sampling clock; the time stamp determining unit is used to determine the minimum value of the timer times corresponding to the same clock cycle as the sending time stamp information.
在一个实施例中,在上述申请实施例的基础上,时间确定模块52中的采样时钟的频率为1GHz,且所述采样时钟的步进为1纳秒。In one embodiment, on the basis of the foregoing application embodiment, the frequency of the sampling clock in the time determining module 52 is 1 GHz, and the step of the sampling clock is 1 nanosecond.
在一个实施例中,在上述申请实施例的基础上,信息发送模块53包括:包封装单元,用于将所述发送时间戳信息封装为高精度时间同步协议包;包插入单元,用于将所述高精时间同步协议包插入所述时戳数据帧的开销保留字段;帧发送单元,用于在下一个帧头脉冲之前将所述时戳数据帧发送到接收端。In one embodiment, on the basis of the above application embodiment, the information sending module 53 includes: a packet encapsulation unit, configured to encapsulate the transmission time stamp information into a high-precision time synchronization protocol packet; and a packet insertion unit, configured to The high-precision time synchronization protocol packet is inserted into the overhead reserved field of the time stamp data frame; the frame sending unit is configured to send the time stamp data frame to the receiving end before the next frame header pulse.
在一个实施例中,在上述申请实施例的基础上,所述装置中的帧头脉冲的波特率至少配置为所述采样时钟对应时钟周期的4倍。In one embodiment, on the basis of the above-mentioned application embodiment, the baud rate of the frame header pulse in the device is configured to be at least 4 times the clock period corresponding to the sampling clock.
图7是本申请实施例提供的另一种时间戳信息传输装置的结构示意图,可执行本申请任意实施例提供的时间戳信息传输方法,具备执行方法相应的功能模块和有益效果。该装置可以由软件和/或硬件实现,一般集成光传输网络的接收端中,具体包括:第二脉冲模块61、接收时间模块62和发送时间模块63。FIG. 7 is a schematic structural diagram of another time stamp information transmission device provided by an embodiment of the present application, which can execute the time stamp information transmission method provided in any embodiment of the present application, and has the corresponding functional modules and beneficial effects of the execution method. The device may be implemented by software and/or hardware. Generally, the receiving end of an integrated optical transmission network includes: a second pulse module 61, a receiving time module 62, and a sending time module 63.
第二脉冲模块61,用于在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲。The second pulse module 61 is used to search for the OTUw-RS frame header in the parallel data stream and generate frame header pulses.
接收时间模块62,根据所述帧头脉冲和采样时钟确定接收时间戳信息。The receiving time module 62 determines the receiving time stamp information according to the frame header pulse and the sampling clock.
发送时间模块63,用于获取发送端通过时戳数据帧发送的发送时间戳信息。The sending time module 63 is used to obtain the sending time stamp information sent by the sending end through the time stamp data frame.
本申请实施例,通过第二脉冲模块在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲,接收时间模块根据帧头脉冲和采样时钟确定接收时间戳信息,发送时间模块提取发送端通过时戳数据帧发送的发送时间戳信息,实现了OTUw-RS设备的时间信息传输,提高了时间戳信息的准确性,降低通信网络中不同设备间的时间误差。In the embodiment of the application, the second pulse module searches for the OTUw-RS frame header in the parallel data stream and generates the frame header pulse. The receiving time module determines the receiving time stamp information according to the frame header pulse and the sampling clock, and the sending time module extracts the sending end The time stamp information sent by the time stamp data frame realizes the time information transmission of the OTUw-RS device, improves the accuracy of the time stamp information, and reduces the time error between different devices in the communication network.
在一个实施例中,在上述申请实施例的基础上,所述接收时间模块62包括:时间确定单元,用于根据所述采样时钟的上升沿和下降沿分别采样所述帧头脉冲,并锁定所述采样时钟对应的计时器时间。时戳选择单元,用于将对应相同时钟周期的所述计时器时间中的最小值确定为接收时间戳信息。In one embodiment, on the basis of the above-mentioned application embodiment, the receiving time module 62 includes: a time determining unit, configured to sample the frame header pulse according to the rising edge and the falling edge of the sampling clock, and lock The timer time corresponding to the sampling clock. The time stamp selection unit is configured to determine the minimum value of the timer times corresponding to the same clock cycle as the received time stamp information.
在一个实施例中,在上述申请实施例的基础上,所述接收时间模块62中的采样时钟的频率为1GHz,且所述采样时钟的步进为1纳秒。In one embodiment, on the basis of the foregoing application embodiment, the frequency of the sampling clock in the receiving time module 62 is 1 GHz, and the step of the sampling clock is 1 nanosecond.
在一个实施例中,在上述申请实施例的基础上,发送时间模块63包括:包提取单元,用于在所述时戳数据帧的开销保留字段提取高精度时间同步协议包。时戳提取单元,用于提 取所述高精度时间同步协议包中的发送时间戳信息。帧头对应单元,用于确定所述发送时间戳信息与OTUw-RS帧头的对应关系。In one embodiment, on the basis of the foregoing application embodiment, the sending time module 63 includes: a packet extraction unit, configured to extract a high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame. The time stamp extraction unit is used to extract the transmission time stamp information in the high-precision time synchronization protocol packet. The frame header corresponding unit is used to determine the correspondence between the transmission timestamp information and the OTUw-RS frame header.
在一个实施例中,在上述申请实施例的基础上,所述装置中的帧头脉冲的波特率至少配置所述采样时钟对应时钟周期的4倍。In one embodiment, on the basis of the above-mentioned application embodiment, the baud rate of the frame header pulse in the device is configured to be at least 4 times the clock period corresponding to the sampling clock.
图8是本申请实施例提供的一种设备的结构示意图,如图8所示,该设备包括处理器70、存储器71、输入装置72和输出装置73;设备中处理器70的数量可以是一个或多个,图8中以一个处理器70为例;设备处理器70、存储器71、输入装置72和输出装置73可以通过总线或其他方式连接,图8中以通过总线连接为例。FIG. 8 is a schematic structural diagram of a device provided by an embodiment of the present application. As shown in FIG. 8, the device includes a processor 70, a memory 71, an input device 72, and an output device 73; the number of processors 70 in the device can be one Or more, one processor 70 is taken as an example in FIG. 8; the device processor 70, the memory 71, the input device 72, and the output device 73 may be connected by a bus or other methods. In FIG. 8, the connection by a bus is taken as an example.
存储器71作为一种计算机可读存储介质,可用于存储软件程序、计算机可执行程序以及模块,如本申请实施例提供的时间戳信息传输装置对应的模块(第一脉冲模块51、时间确定模块52和信息发送模块53,和/或,第二脉冲模块61、接收时间模块62和发送时间模块63)。处理器70通过运行存储在存储器71中的软件程序、指令以及模块,从而执行设备的各种功能应用以及数据处理,即实现上述的时间戳信息传输方法。The memory 71, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and modules, such as the modules (first pulse module 51, time determination module 52) corresponding to the time stamp information transmission device provided in the embodiment of the present application. And the information sending module 53, and/or, the second pulse module 61, the receiving time module 62, and the sending time module 63). The processor 70 executes various functional applications and data processing of the device by running the software programs, instructions, and modules stored in the memory 71, that is, realizes the above-mentioned time stamp information transmission method.
存储器71可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序;存储数据区可存储根据终端的使用所创建的数据等。此外,存储器71可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实例中,存储器71可进一步包括相对于处理器70远程设置的存储器,这些远程存储器可以通过网络连接至设备。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。The memory 71 may mainly include a program storage area and a data storage area. The program storage area may store an operating system and an application program required by at least one function; the data storage area may store data created according to the use of the terminal, and the like. In addition, the memory 71 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices. In some examples, the memory 71 may further include a memory remotely provided with respect to the processor 70, and these remote memories may be connected to the device through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
输入装置72可用于接收输入的数字或字符信息,以及产生与设备的用户设置以及功能控制有关的键信号输入。输出装置73可包括显示屏等显示设备。The input device 72 can be used to receive inputted numeric or character information, and generate key signal inputs related to user settings and function control of the device. The output device 73 may include a display device such as a display screen.
在一个示例性的实施例中,图9是本申请实施例提供的一种光传输设备的实现示例图,参见图9,该光传输设备包括均衡模块、时钟数据恢复(Clock and Data Recovery,CDR)模块、锁相环(Phase Locked Loop,PLL)模块、串并转换模块、并串转换模块、异步先进先出(First Input First Output,FIFO)模块、编码/加绕模块、解码/解扰模块,还包括有OTUw-RS定帧模块、OTUw开销提取模块、OTUw-RS帧头插入模块、OTUw开销插入模块、计时器和时戳采样模块、片外处理器等模块。通过均衡模块、时钟数据恢复CDR模块、锁相环PLL模块、串并转换模块、并串转换模块、异步FIFO模块、编码/加绕模块、解码/解扰模块、OTUw-RS定帧模块、OTUw开销提取模块、OTUw-RS帧头插入模块、OTUw开销插入模块 实现时间戳信息的确定和传输。OTUw-RS定帧模块实现实时产生接收方向OTUw-RS帧头脉冲功能,并将帧头脉冲送给计时器和时戳采样模块采样时戳,然后发送到片外处理器,同时OTUw开销提取模块将该OTUw-RS帧头对应的开销送给片外处理器,片外处理器解析开销保留字段中的PTP包。计时器和时戳采样模块使用1千兆赫兹(GHz)时钟的上升沿和下降沿采样帧头脉冲信号,相较于只使用上升沿采样帧头脉冲信号,提高一倍采样精度。计时器和时戳采样模块输出给片外处理器的管脚支持1比特(bit)保持时长即波特率可配置为16或32个计时时钟周期,可以保证片外处理器在低速时钟下对加载时戳数据帧的正确采样片外处理器实现接收侧PTP包解析和发送侧PTP包组包。接收侧PTP包解析是指将OTUw开销提取模块送过来的开销重组成PTP包,所使用的开销保留字段和对端设备协商一致即可。发送侧PTP包组包是指将时戳信息封装到PTP包,时戳信息来自计时器和时戳采样模块采样的发送方向OTUw-RS帧头脉冲。In an exemplary embodiment, FIG. 9 is an implementation example diagram of an optical transmission device provided in an embodiment of the present application. Referring to FIG. 9, the optical transmission device includes an equalization module, a clock and data recovery (Clock and Data Recovery, CDR). ) Module, Phase Locked Loop (PLL) Module, Serial-to-Parallel Conversion Module, Parallel-to-Serial Conversion Module, Asynchronous First Input First Output (FIFO) Module, Encoding/Adding Winding Module, Decoding/Descrambling Module It also includes OTUw-RS framing module, OTUw overhead extraction module, OTUw-RS frame header insertion module, OTUw overhead insertion module, timer and time stamp sampling module, off-chip processor and other modules. Through the equalization module, clock data recovery CDR module, phase-locked loop PLL module, serial-to-parallel conversion module, parallel-to-serial conversion module, asynchronous FIFO module, encoding/wrapping module, decoding/descrambling module, OTUw-RS framing module, OTUw The overhead extraction module, the OTUw-RS frame header insertion module, and the OTUw overhead insertion module realize the determination and transmission of the time stamp information. The OTUw-RS framing module realizes the function of real-time generation of OTUw-RS frame header pulse in the receiving direction, and sends the frame header pulse to the timer and time stamp sampling module to sample the time stamp, and then send it to the off-chip processor, and at the same time the OTUw overhead extraction module The overhead corresponding to the OTUw-RS frame header is sent to the off-chip processor, and the off-chip processor parses the PTP packet in the overhead reserved field. The timer and time stamp sampling module uses the rising and falling edges of a 1 gigahertz (GHz) clock to sample the frame header pulse signal. Compared with only using the rising edge to sample the frame header pulse signal, the sampling accuracy is doubled. The pins of the timer and time stamp sampling module output to the off-chip processor support 1-bit (bit) retention time, that is, the baud rate can be configured to 16 or 32 timing clock cycles, which can ensure that the off-chip processor is able to operate under a low-speed clock. The off-chip processor that loads the correct sampling of the time stamp data frame realizes the receiving side PTP packet parsing and the sending side PTP packet grouping. The PTP packet parsing on the receiving side refers to recombining the overhead sent by the OTUw overhead extraction module into a PTP packet, and the overhead reserved field used is negotiated with the peer device. The sending-side PTP packet grouping refers to encapsulating the time stamp information into the PTP packet. The time stamp information comes from the OTUw-RS frame header pulse in the sending direction sampled by the timer and the time stamp sampling module.
图10是本申请实施例提供的一种时间同步的示例图,以本申请实施实现的时间戳传输方法为基础,实现设备间的时间同步为例。FIG. 10 is an example diagram of time synchronization provided by an embodiment of the present application. Based on the time-stamp transmission method implemented in the present application, the implementation of time synchronization between devices is taken as an example.
步骤一、按照G.709.4协议要求,时间发布方在发送侧并行接口上插入OTU25-RS协议AM帧头,同时输出帧头脉冲信号。本申请实施例计时时钟使用1GHz,步进为1纳秒。使用计时时钟上升沿和下降沿分别采样帧头脉冲信号,并锁存计时器时间,选取两个计时器时间中较小值做为帧头时戳,记为t1。在帧头脉冲信号变低后,经过可配置的整数个计时时钟后,通过发送侧时戳管脚开始向片外处理器发送时戳数据帧Sync,并保证在下一个帧头脉冲信号之前传完数据。为保证片外处理器在低速时钟下对加载时戳数据帧的正确采样,1bit保持时长即波特率可配置为16或32个计时时钟周期。时戳数据帧共106bit,包括1bit起始位、两个8bit帧头同步字节、80bit的时戳字节、8bit的校验字节和1bit的停止位,其中,起始位为1bit高电平,用于标识时戳数据帧开始;停止位为1bit低电平,用于标识时戳数据帧结束;帧头同步字节用于同步时戳数据帧;时戳字节用于存储时间戳信息,48bit秒数据,32bit纳秒数据,可以先发送秒数据后发送纳秒数据;校验字节用于验证时戳数据帧内数据是否正确,可以使用1PPS_TOD标准(其中,1PPS全称为1Pulse per second,即秒脉冲;TOD全称为Time of Day,即日时间)TOD帧循环冗余校验(Cyclic Redundancy Check,CRC),CRC校验公式:x^8+x^5+x^4+1,校验码初始值设置为0xFF,输入数据无需取反,校验算法采用右移算,校验字节发送时,最低有效位bit0先发送。Step 1. In accordance with the requirements of the G.709.4 protocol, the time issuer inserts the OTU25-RS protocol AM frame header on the parallel interface of the transmitting side, and outputs the frame header pulse signal at the same time. The timing clock in the embodiment of the present application uses 1 GHz with a step of 1 nanosecond. Use the rising edge and the falling edge of the timing clock to sample the frame header pulse signal respectively, and latch the timer time, and select the smaller value of the two timer times as the frame header time stamp, which is marked as t1. After the frame header pulse signal goes low, after a configurable integer number of timing clocks, start sending the time stamp data frame Sync to the off-chip processor through the send side time stamp pin, and ensure that the transmission is completed before the next frame header pulse signal data. In order to ensure that the off-chip processor correctly samples the loaded time stamp data frame under a low-speed clock, the 1-bit hold time, that is, the baud rate, can be configured to 16 or 32 timing clock cycles. The time stamp data frame is 106 bits in total, including 1 bit start bit, two 8 bit frame header synchronization bytes, 80 bit time stamp byte, 8 bit check byte and 1 bit stop bit. Among them, the start bit is 1 bit high power Ping, used to identify the beginning of the time stamp data frame; the stop bit is 1bit low level, used to identify the end of the time stamp data frame; the frame header synchronization byte is used to synchronize the time stamp data frame; the time stamp byte is used to store the time stamp Information, 48bit second data, 32bit nanosecond data, you can send the second data first and then send the nanosecond data; the check byte is used to verify whether the data in the time stamp data frame is correct, you can use the 1PPS_TOD standard (where 1PPS is called 1Pulse per second, the second pulse; TOD is called Time of Day, the TOD frame cyclic redundancy check (Cyclic Redundancy Check, CRC), CRC check formula: x^8+x^5+x^4+1, The initial value of the check code is set to 0xFF, and the input data does not need to be inverted. The check algorithm adopts right shift calculation. When the check byte is sent, the least significant bit bit0 is sent first.
步骤二、片外处理器将时戳数据帧中的时戳t1封装成IEEE1588v2PTP包Follow_Up报 文,适当调节延时,插入到一个OTU25-RS帧周期内部OTU25数据包的开销保留字段内。Step 2: The off-chip processor encapsulates the time stamp t1 in the time stamp data frame into an IEEE1588v2 PTP packet Follow_Up message, adjusts the delay appropriately, and inserts it into the overhead reserved field of the OTU25 data packet within an OTU25-RS frame period.
步骤三、时间接收方接收侧按照G.709.4协议要求,在接收方向并行接口上搜索OTU25-RS的AM帧头,输出帧头脉冲信号。Step 3. The receiving side of the time receiver searches for the AM frame header of the OTU25-RS on the parallel interface of the receiving direction in accordance with the requirements of the G.709.4 protocol, and outputs the frame header pulse signal.
步骤四、使用计时时钟上升沿和下降沿分别采样帧头脉冲信号,并锁存计时器时间,选取两者中较小值做为帧头时戳,记为t2。Step 4: Use the rising edge and falling edge of the timing clock to sample the frame header pulse signal respectively, and latch the timer time, select the smaller value of the two as the frame header time stamp, and record it as t2.
步骤五、在帧头脉冲信号变低后,经过可配置的整数个计时时钟后,通过接收侧时戳管脚开始向片外处理器发送时戳数据帧,并保证在下一个帧头脉冲信号之前传完数据。Step 5. After the frame header pulse signal goes low, after a configurable integer number of timing clocks, start sending the time stamp data frame to the off-chip processor through the receiving side time stamp pin, and ensure that it is before the next frame header pulse signal Finish transmitting the data.
步骤六、片外处理器通过OTU25开销提取模块将开销保留字段中的PTP包提取出来,和上一个时戳数据帧中的时戳对应,得到该PTP包在时间发布方的采样时戳t1。Step 6. The off-chip processor extracts the PTP packet in the overhead reserved field through the OTU25 overhead extraction module, and corresponds to the time stamp in the previous time stamp data frame, to obtain the sampling time stamp t1 of the PTP packet at the time issuer.
步骤七、时间接收方发送PTP包Delay_Req报文到时间发布方,发送时戳记为t3,时间发布方接收到该报文的采样时戳记为t4。Step 7. The time receiver sends the PTP packet Delay_Req message to the time issuer, the sending time stamp is t3, and the sampling time stamp of the message received by the time issuer is t4.
步骤八、时间发布方将t4封装到Delay_Resp报文发送到时间接收方。Step 8. The time issuer encapsulates the t4 in Delay_Resp message and sends it to the time receiver.
步骤九、片外处理器基于IEEE 1588v2协议计算主从设备时间差值,校准本地时钟,其中,t2=时间偏差(offset)+延迟(delay)+t1,t4=t3-offset+delay。根据前述公式可以算出:delay=((t2-t1)+(t4-t3))/2,时间偏差offset=((t2-t1)-(t4-t3))/2,基于确定出的时间偏差进行时间同步。Step 9. The off-chip processor calculates the time difference between the master and slave devices based on the IEEE 1588v2 protocol, and calibrates the local clock, where t2 = time offset (offset) + delay (delay) + t1, t4 = t3-offset + delay. According to the foregoing formula, it can be calculated: delay=((t2-t1)+(t4-t3))/2, time offset offset=((t2-t1)-(t4-t3))/2, based on the determined time offset Perform time synchronization.
本申请实施例还提供一种计算机可读存储介质,计算机可执行指令在由计算机处理器执行时用于执行一种时间戳信息传输方法,该方法包括:将OTUw-RS帧头插入并行数据流,并产生帧头脉冲;根据所述帧头脉冲和采样时钟确定发送时间戳信息;将所述发送时间戳信息通过时戳数据帧发送到接收端。和/或在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲;根据所述帧头脉冲和采样时钟确定接收时间戳信息;获取发送端通过时戳数据帧发送的发送时间戳信息。The embodiment of the present application also provides a computer-readable storage medium. When the computer-executable instructions are executed by a computer processor, they are used to perform a time-stamp information transmission method. The method includes: inserting an OTUw-RS frame header into a parallel data stream , And generate a frame header pulse; determine the transmission time stamp information according to the frame header pulse and the sampling clock; send the transmission time stamp information to the receiving end through a time stamp data frame. And/or search the OTUw-RS frame header in the parallel data stream, and generate the frame header pulse; determine the receiving time stamp information according to the frame header pulse and the sampling clock; obtain the transmission time stamp information sent by the sending end through the time stamp data frame .
当然,本申请实施例所提供的一种包含计算机可执行指令的存储介质,其计算机可执行指令不限于如上所述的方法操作,还可以执行本申请任意实施例所提供的功能远程定制方法中的相关操作。Of course, a storage medium containing computer-executable instructions provided by the embodiments of the present application is not limited to the method operations described above, and can also execute the function remote customization method provided by any embodiment of the present application. Related operations.
以上所述,仅为本申请的示例性实施例而已,并非用于限定本申请的保护范围。The above are only exemplary embodiments of the present application, and are not used to limit the protection scope of the present application.
本领域内的技术人员应明白,术语用户终端涵盖任何适合类型的无线用户设备,例如移动电话、便携数据处理装置、便携网络浏览器或车载移动台。Those skilled in the art should understand that the term user terminal encompasses any suitable type of wireless user equipment, such as a mobile phone, a portable data processing device, a portable web browser, or a vehicle-mounted mobile station.
一般来说,本申请的多种实施例可以在硬件或专用电路、软件、逻辑或其任何组合中实 现。例如,一些方面可以被实现在硬件中,而其它方面可以被实现在可以被控制器、微处理器或其它计算装置执行的固件或软件中,尽管本申请不限于此。Generally speaking, the various embodiments of the present application can be implemented in hardware or dedicated circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software that may be executed by a controller, microprocessor, or other computing device, although the application is not limited thereto.
本申请的实施例可以通过移动装置的数据处理器执行计算机程序指令来实现,例如在处理器实体中,或者通过硬件,或者通过软件和硬件的组合。计算机程序指令可以是汇编指令、指令集架构(ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码。The embodiments of the present application may be implemented by executing computer program instructions by a data processor of a mobile device, for example, in a processor entity, or by hardware, or by a combination of software and hardware. Computer program instructions can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code written in any combination of one or more programming languages or Object code.
本申请附图中的任何逻辑流程的框图可以表示程序步骤,或者可以表示相互连接的逻辑电路、模块和功能,或者可以表示程序步骤与逻辑电路、模块和功能的组合。计算机程序可以存储在存储器上。存储器可以具有任何适合于本地技术环境的类型并且可以使用任何适合的数据存储技术实现,例如但不限于只读存储器(Read Only Memory,ROM)、随机访问存储器(Random Access Memory,RAM)、光存储器装置和系统(数码多功能光碟(Digital Versatile Disc,DVD)或光盘(Compact Disc,CD))等。计算机可读介质可以包括非瞬时性存储介质。数据处理器可以是任何适合于本地技术环境的类型,例如但不限于通用计算机、专用计算机、微处理器、数字信号处理器(Digital Signal Processing,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、可编程逻辑器件(Field-Programmable Gate Array,FPGA)以及基于多核处理器架构的处理器。The block diagram of any logic flow in the drawings of the present application may represent program steps, or may represent interconnected logic circuits, modules, and functions, or may represent a combination of program steps and logic circuits, modules, and functions. The computer program can be stored on the memory. The memory can be of any type suitable for the local technical environment and can be implemented using any suitable data storage technology, such as but not limited to read only memory (Read Only Memory, ROM), random access memory (Random Access Memory, RAM), and optical storage. Devices and systems (Digital Versatile Disc (DVD) or Compact Disc (CD)), etc. Computer-readable media may include non-transitory storage media. The data processor can be any type suitable for the local technical environment, such as but not limited to general-purpose computers, special-purpose computers, microprocessors, digital signal processors (Digital Signal Processing, DSP), application specific integrated circuits (ASICs) ), programmable logic devices (Field-Programmable Gate Array, FPGA), and processors based on multi-core processor architecture.
通过示范性和非限制性的示例,上文已提供了对本申请的示范实施例的详细描述。但结合附图和权利要求来考虑,对以上实施例的多种修改和调整对本领域技术人员来说是显而易见的,但不偏离本申请的范围。因此,本申请的恰当范围将根据权利要求确定。By way of exemplary and non-limiting examples, a detailed description of the exemplary embodiments of the present application has been provided above. However, considering the accompanying drawings and claims, various modifications and adjustments to the above embodiments are obvious to those skilled in the art, but they do not deviate from the scope of the present application. Therefore, the proper scope of the application will be determined according to the claims.

Claims (14)

  1. 一种时间戳信息传输方法,应用于发送端,所述方法包括:A method for transmitting time stamp information, applied to a sending end, and the method includes:
    将OTUw-RS帧头插入并行数据流,并产生帧头脉冲;Insert the OTUw-RS frame header into the parallel data stream and generate frame header pulses;
    根据所述帧头脉冲和采样时钟确定发送时间戳信息;Determining the sending time stamp information according to the frame header pulse and the sampling clock;
    将所述发送时间戳信息通过时戳数据帧发送到接收端。The sending time stamp information is sent to the receiving end through a time stamp data frame.
  2. 根据权利要求1所述的方法,其中,所述根据所述帧头脉冲和采样时钟确定发送时间戳信息,包括:The method according to claim 1, wherein the determining the sending time stamp information according to the frame header pulse and the sampling clock comprises:
    根据所述采样时钟的上升沿和下降沿分别采集所述帧头脉冲,并锁定所述采样时钟的计时器时间;Collecting the frame header pulses respectively according to the rising edge and the falling edge of the sampling clock, and locking the timer time of the sampling clock;
    将对应相同时钟周期的所述计时器时间中的最小值确定为发送时间戳信息。The minimum value of the timer times corresponding to the same clock cycle is determined as the sending time stamp information.
  3. 根据权利要求2所述的方法,其中,所述采样时钟的频率为1GHz,且所述采样时钟的步进为1纳秒。The method according to claim 2, wherein the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  4. 根据权利要求2所述的方法,其中,所述将所述发送时间戳信息通过时戳数据帧发送到接收端,包括:The method according to claim 2, wherein the sending the sending timestamp information to the receiving end through a timestamp data frame comprises:
    将所述发送时间戳信息封装为高精度时间同步协议包;Encapsulating the sending timestamp information into a high-precision time synchronization protocol packet;
    将所述高精时间同步协议包插入所述时戳数据帧的开销保留字段;Inserting the high-precision time synchronization protocol packet into the overhead reserved field of the time stamp data frame;
    在下一个帧头脉冲之前将所述时戳数据帧发送到接收端。The time stamp data frame is sent to the receiving end before the next frame header pulse.
  5. 根据权利要求1-4中任一所述的方法,其中,所述帧头脉冲的波特率至少配置为所述采样时钟对应时钟周期的4倍。The method according to any one of claims 1 to 4, wherein the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
  6. 一种时间戳信息传输方法,应用于接收端,所述方法包括:A method for transmitting time stamp information, applied to a receiving end, and the method includes:
    在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲;Search for the OTUw-RS frame header in the parallel data stream and generate frame header pulses;
    根据所述帧头脉冲和采样时钟确定接收时间戳信息;Determining receiving time stamp information according to the frame header pulse and the sampling clock;
    获取发送端通过时戳数据帧发送的发送时间戳信息。Obtain the sending time stamp information sent by the sending end through the time stamp data frame.
  7. 根据权利要求6所述的方法,其中,所述根据所述帧头脉冲和采样时钟确定接收时间戳信息,包括:The method according to claim 6, wherein the determining the receiving time stamp information according to the frame header pulse and the sampling clock comprises:
    根据所述采样时钟的上升沿和下降沿分别采样所述帧头脉冲,并锁定所述采样时钟对应的计时器时间;Respectively sample the frame header pulse according to the rising edge and the falling edge of the sampling clock, and lock the timer time corresponding to the sampling clock;
    将对应相同时钟周期的所述计时器时间中的最小值确定为接收时间戳信息。The minimum value of the timer times corresponding to the same clock cycle is determined as the received time stamp information.
  8. 根据权利要求7所述的方法,其中,所述采样时钟的频率为1GHz,且所述采样时 钟的步进为1纳秒。The method according to claim 7, wherein the frequency of the sampling clock is 1 GHz, and the step of the sampling clock is 1 nanosecond.
  9. 根据权利要求8所述的方法,其中,所述获取发送端通过时戳数据帧发送的发送时间戳信息,包括:The method according to claim 8, wherein said obtaining the transmission timestamp information sent by the sending end through the timestamp data frame comprises:
    在所述时戳数据帧的开销保留字段提取高精度时间同步协议包;Extracting a high-precision time synchronization protocol packet from the overhead reserved field of the time stamp data frame;
    提取所述高精度时间同步协议包中的发送时间戳信息;Extracting the sending timestamp information in the high-precision time synchronization protocol package;
    确定所述发送时间戳信息与OTUw-RS帧头的对应关系。Determine the correspondence between the sending timestamp information and the OTUw-RS frame header.
  10. 根据权利要求6-9中任一所述的方法,其中,所述帧头脉冲的波特率至少配置所述采样时钟对应时钟周期的4倍。The method according to any one of claims 6-9, wherein the baud rate of the frame header pulse is configured to be at least 4 times the clock period corresponding to the sampling clock.
  11. 一种时间戳信息传输装置,应用于发送端,所述装置包括:A time stamp information transmission device, applied to a sending end, and the device includes:
    第一脉冲模块,用于将OTUw-RS帧头插入并行数据流,并产生帧头脉冲;The first pulse module is used to insert the OTUw-RS frame header into the parallel data stream and generate frame header pulses;
    时间确定模块,用于根据所述帧头脉冲和采样时钟确定发送时间戳信息;A time determining module, configured to determine the sending time stamp information according to the frame header pulse and the sampling clock;
    信息发送模块,用于将所述发送时间戳信息通过时戳数据帧发送到接收端。The information sending module is used to send the sending time stamp information to the receiving end through a time stamp data frame.
  12. 一种时间戳信息传输装置,应用于接收端,所述装置包括:A time stamp information transmission device, applied to a receiving end, and the device includes:
    第二脉冲模块,用于在并行数据流中搜索OTUw-RS帧头,并产生帧头脉冲;The second pulse module is used to search for the OTUw-RS frame header in the parallel data stream and generate frame header pulses;
    接收时间模块,根据所述帧头脉冲和采样时钟确定接收时间戳信息;The receiving time module determines the receiving time stamp information according to the frame header pulse and the sampling clock;
    发送时间模块,用于获取发送端通过时戳数据帧发送的发送时间戳信息。The sending time module is used to obtain the sending time stamp information sent by the sending end through the time stamp data frame.
  13. 一种设备,包括:A device that includes:
    一个或多个处理器;One or more processors;
    存储器,用于存储一个或多个程序,Memory, used to store one or more programs,
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10中任一所述的时间戳信息传输方法。When the one or more programs are executed by the one or more processors, the one or more processors implement the time stamp information transmission method according to any one of claims 1-10.
  14. 一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现如权利要求1-10中任一所述的时间戳信息传输方法。A computer-readable storage medium having a computer program stored thereon, and when the program is executed by a processor, the method for transmitting time stamp information according to any one of claims 1-10 is realized.
PCT/CN2021/094399 2020-05-29 2021-05-18 Method and apparatus for transmitting timestamp information, and device and storage medium WO2021238724A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020227046141A KR20230018469A (en) 2020-05-29 2021-05-18 Timestamp information transmission method, device, device and storage medium

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010479891.9 2020-05-29
CN202010479891.9A CN113746587A (en) 2020-05-29 2020-05-29 Timestamp information transmission method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
WO2021238724A1 true WO2021238724A1 (en) 2021-12-02

Family

ID=78725122

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/094399 WO2021238724A1 (en) 2020-05-29 2021-05-18 Method and apparatus for transmitting timestamp information, and device and storage medium

Country Status (3)

Country Link
KR (1) KR20230018469A (en)
CN (1) CN113746587A (en)
WO (1) WO2021238724A1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114885412A (en) * 2022-04-13 2022-08-09 广州万码科技有限公司 LTE frame offset value calculation method, device, system, equipment and storage medium
CN115801165A (en) * 2022-09-29 2023-03-14 成都赛力斯科技有限公司 Time synchronization method, system, device and medium for vehicle-mounted controller
WO2023109147A1 (en) * 2021-12-13 2023-06-22 深圳市紫光同创电子有限公司 Timestamp pulse synchronization method and apparatus, and electronic device and storage medium

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116232524B (en) * 2023-05-11 2023-07-25 北京米波通信技术有限公司 Method for synchronizing signals between receiver boards and related equipment
CN117009267B (en) * 2023-10-07 2024-01-30 成都博宇利华科技有限公司 Method for inserting time information in source synchronous data stream

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130735A (en) * 2010-11-09 2011-07-20 华为技术有限公司 Transmission equipment and method thereof for realizing synchronization of clock and time
US20120213508A1 (en) * 2011-02-23 2012-08-23 Jeffrey Scott Moynihan Network element clock synchronization systems and methods using optical transport network delay measurement
CN104426772A (en) * 2013-09-10 2015-03-18 中国移动通信集团公司 Precision time protocol (PTP) message transmitting and receiving methods and PTP message transmitting and receiving equipment
CN108631900A (en) * 2018-07-24 2018-10-09 北京新宇航星科技有限公司 The preposition of High Precision Time Stamps beats stamp method and system
CN109687927A (en) * 2017-10-19 2019-04-26 深圳市中兴微电子技术有限公司 A kind of method, communication equipment and the communication system of determining timestamp
CN110224775A (en) * 2018-03-01 2019-09-10 中兴通讯股份有限公司 A kind of method, device and equipment that temporal information determines

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016098742A1 (en) * 2014-12-15 2016-06-23 三菱電機株式会社 Transmitting device, communication device and signal transmission system
CN109787703B (en) * 2019-02-28 2020-08-25 烽火通信科技股份有限公司 Timestamp correction method, clock synchronization method and system
CN112583509A (en) * 2019-09-30 2021-03-30 深圳市中兴微电子技术有限公司 Method and device for acquiring time stamp of data stream, storage medium and electronic device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102130735A (en) * 2010-11-09 2011-07-20 华为技术有限公司 Transmission equipment and method thereof for realizing synchronization of clock and time
US20120213508A1 (en) * 2011-02-23 2012-08-23 Jeffrey Scott Moynihan Network element clock synchronization systems and methods using optical transport network delay measurement
CN104426772A (en) * 2013-09-10 2015-03-18 中国移动通信集团公司 Precision time protocol (PTP) message transmitting and receiving methods and PTP message transmitting and receiving equipment
CN109687927A (en) * 2017-10-19 2019-04-26 深圳市中兴微电子技术有限公司 A kind of method, communication equipment and the communication system of determining timestamp
CN110224775A (en) * 2018-03-01 2019-09-10 中兴通讯股份有限公司 A kind of method, device and equipment that temporal information determines
CN108631900A (en) * 2018-07-24 2018-10-09 北京新宇航星科技有限公司 The preposition of High Precision Time Stamps beats stamp method and system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023109147A1 (en) * 2021-12-13 2023-06-22 深圳市紫光同创电子有限公司 Timestamp pulse synchronization method and apparatus, and electronic device and storage medium
CN114885412A (en) * 2022-04-13 2022-08-09 广州万码科技有限公司 LTE frame offset value calculation method, device, system, equipment and storage medium
CN114885412B (en) * 2022-04-13 2024-03-08 广州万码科技有限公司 LTE frame offset value calculation method, device, system, equipment and storage medium
CN115801165A (en) * 2022-09-29 2023-03-14 成都赛力斯科技有限公司 Time synchronization method, system, device and medium for vehicle-mounted controller

Also Published As

Publication number Publication date
CN113746587A (en) 2021-12-03
KR20230018469A (en) 2023-02-07

Similar Documents

Publication Publication Date Title
WO2021238724A1 (en) Method and apparatus for transmitting timestamp information, and device and storage medium
US9667370B2 (en) Communication device with peer-to-peer assist to provide synchronization
US9667408B2 (en) Communication systems and methods for distributed power system measurement
US8982912B2 (en) Inter-packet gap network clock synchronization
US8660152B2 (en) Multi-frame network clock synchronization
CN107465965B (en) Optical port implementation method and device and field programmable gate array device
WO2018210277A1 (en) Clock synchronization method and device, and computer storage medium
US20100316069A1 (en) Network Clock Synchronization Floating Window and Window Delineation
US10778359B2 (en) Time synchronization method, programmable logic device, single board and network element
WO2021063303A1 (en) Method and apparatus for acquiring timestamp of data stream, storage medium, and electronic device
CN106936531B (en) A kind of synchronous method of multi-disc based on JESD204B agreements ADC
Pedretti et al. Nanoseconds timing system based on IEEE 1588 FPGA implementation
WO2021057756A1 (en) Delay measurement method, system and storage medium
WO2023109147A1 (en) Timestamp pulse synchronization method and apparatus, and electronic device and storage medium
WO2020038424A1 (en) Data packet transmission method and apparatus, storage medium, and electronic apparatus
CN110708133B (en) Method and device for clock synchronization and time synchronization in system based on FPGA
US8879610B2 (en) Apparatus and method for changing a clock rate for transmission data
EP3616354B1 (en) Frame synchronization
US9780897B2 (en) Optical transmission apparatus and optical reception apparatus
WO2023213080A1 (en) Method for realizing network node time synchronization based on fpga
WO2016000324A1 (en) Method and apparatus for implementing time synchronization
WO2020248865A1 (en) Control word transmission method, apparatus, and computer readable storage medium
CN116599621B (en) Method, equipment and device for recovering clock based on cross board transfer and regeneration
US20100246737A1 (en) Clock change device and clock change method
CN111181677B (en) Time synchronization method, network device and storage medium

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 20227046141

Country of ref document: KR

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21812875

Country of ref document: EP

Kind code of ref document: A1