WO2021082674A1 - Time synchronization method, communication device, and system - Google Patents

Time synchronization method, communication device, and system Download PDF

Info

Publication number
WO2021082674A1
WO2021082674A1 PCT/CN2020/111117 CN2020111117W WO2021082674A1 WO 2021082674 A1 WO2021082674 A1 WO 2021082674A1 CN 2020111117 W CN2020111117 W CN 2020111117W WO 2021082674 A1 WO2021082674 A1 WO 2021082674A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
communication device
optical signal
deviation
wavelength
Prior art date
Application number
PCT/CN2020/111117
Other languages
French (fr)
Chinese (zh)
Inventor
罗俊
蒋志平
孟凡顺
李江
孙春
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2021082674A1 publication Critical patent/WO2021082674A1/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
    • H04J3/0667Bidirectional timestamps, e.g. NTP or PTP for compensation of clock drift and for compensation of propagation delays
    • 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 field of communications, and in particular to a method, communication device and system for time synchronization.
  • the 1588V2 protocol is a precise time synchronization protocol, referred to as the precision time protocol (PTP), which can realize the time synchronization of multiple network devices.
  • PTP precision time protocol
  • the 1588V2 protocol can synchronize the time of the receiving end device with the time of the sending end device through the combination of software and hardware.
  • the stamping point can be defined in the protocol stack.
  • a timestamp is generated, and the timestamp is carried in the message, and calculated by the message exchange with the sending device The time offset is compensated to realize the time synchronization between the receiving end device and the sending end device.
  • the time delay measurement methods in the prior art include one-way measurement and two-way measurement. If one-way measurement is performed between node A and node B, the one-way delay from node A to node B can be measured, and the one-way delay from node B to node A can also be measured. If a two-way service strategy is implemented for node A and node B, the time delay from node A to node B and then to node A can be measured, or the time delay from node B to node A and then to node B can be measured.
  • Time synchronization is based on the equal delay of the transceiver link between node A and node B. If the two-way delay is completely symmetrical, that is, the delay from node A to node B and the delay from node B to node A are the same, there will be no Introduce synchronization error; if the delay of the transceiver link between node A and node B is asymmetric, that is, the delays from node A to node B and node B to node A are not the same, synchronization error will be introduced. Since the physical links and wavelengths of two-way time stamp transmission may be different, it is difficult to achieve two-way delay symmetry.
  • the time synchronization error introduced by the two-way delay asymmetry is generally on the order of tens of nanoseconds.
  • the requirements for time synchronization accuracy of base stations are getting higher and higher.
  • a time synchronization method, communication equipment and system are urgently needed to eliminate or reduce the error caused by the unequal delay of the transceiver link. .
  • the embodiments of the present application provide a time synchronization method, communication device, and system, which are used to improve the accuracy of time synchronization in a communication network.
  • this application discloses a time synchronization method, including:
  • the second communication device receives the first optical signal of the first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first light
  • the time of the signal is the first time t1;
  • the second communication device generates a second time stamp, and the second time stamp indicates that the time when the second communication device receives the first optical signal is the second time t2;
  • the second communication device communicates with the first
  • the device sends the second optical signal with the second wavelength on the first optical fiber, the second communication device generates a third time stamp, and the third time stamp indicates that the time when the second communication device sends the second optical signal is the third time t3;
  • the second communication device receives the fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
  • the second communication device receives a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the third light
  • the time of the signal is the fifth time t5;
  • the second communication device generates a sixth time stamp, and the sixth time stamp indicates that the time when the second communication device receives the third optical signal is the sixth time t6;
  • the second communication device communicates with the first
  • the device sends a fourth optical signal with a wavelength of the first wavelength on the second optical fiber, the second communication device generates a seventh time stamp, and the seventh time stamp indicates that the time when the second communication device sends the fourth optical signal is the seventh time t7;
  • the second communication device receives the eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
  • the second communication device communicates with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8. Time synchronization.
  • the above-mentioned second communication device includes:
  • the second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
  • the second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
  • the second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the second communication device performs time synchronization with the first communication device according to the time deviation N.
  • the above-mentioned time synchronization method further includes: the second communication device determines the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, and the approximate synchronization error S1 is the first deviation The difference between N1 and the time deviation N.
  • the above-mentioned time synchronization method further includes: the second communication device determines the approximate synchronization error S2 of the two-way delay on the second optical fiber according to the time deviation N and the second deviation N2, and the approximate synchronization error S2 is the second deviation The difference between N2 and the time deviation N.
  • the above-mentioned time synchronization method further includes: the second communication device performs time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; and the second communication device is in the second The first optical pulse signal with the second wavelength is received on the optical fiber for detection, and the second communication device sends the second optical pulse signal with the first wavelength on the second optical fiber for detection.
  • the above-mentioned time synchronization method further includes: the second communication device performs time synchronization with the first communication device on the second optical fiber according to the second deviation N2 and the approximate synchronization error S2;
  • the optical fiber receives the third optical pulse signal with the first wavelength for detection, and the second communication device sends the fourth optical pulse signal with the second wavelength on the first optical fiber for detection.
  • this application discloses a time synchronization method, including:
  • the first communication device sends a first optical signal with a first wavelength on the first optical fiber to the second communication device, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first optical signal Is the first time t1, and the second communication device receives the first optical signal at the second time t2; the first communication device receives the second communication device sent by the second communication device on the first optical fiber with a second wavelength of the second wavelength Optical signal, the second communication device sends the second optical signal at the third time t3; the first communication device sends a fourth time stamp on the first optical fiber to the second communication device, and the fourth time stamp indicates that the first communication device receives The time when the second optical signal is reached is the fourth time t4;
  • the first communication device sends a third optical signal with a second wavelength on the second optical fiber to the second communication device, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the third optical signal
  • the time at is the fifth time t5, and the time at which the second communication device receives the third optical signal is the sixth time t6; the first communication device receives the fourth optical signal sent by the second communication device on the second optical fiber, and the second communication device
  • the time when the device sends the fourth optical signal is the seventh time t7;
  • the first communication device sends the eighth time stamp on the second optical fiber to the second communication device, so that the second communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, and the fifth time Time t5, sixth time t6, seventh time t7, and eighth time t8 are time synchronized with the first communication device, and the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8.
  • the above-mentioned second communication device includes:
  • the second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
  • the second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
  • the second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the second communication device performs time synchronization with the first communication device according to the time deviation N.
  • this application discloses a time-synchronized communication device, including a processor and a channel medium conversion module, and the processor and the channel medium conversion module establish a communication connection;
  • the channel medium conversion module is configured to receive a first optical signal with a wavelength of the first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send The time of the first optical signal is the first time t1, and the time when the channel medium conversion module receives the first optical signal is the second time t2;
  • the channel medium conversion module is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device, and the time when the channel medium conversion module sends the second optical signal is the third time t3;
  • the channel medium conversion module is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
  • the channel medium conversion module is also used to receive a third optical signal with a second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first communication device
  • the time when the third optical signal is sent is the fifth time t5, and the time when the channel medium conversion module receives the third optical signal is the sixth time t6;
  • the channel medium conversion module is further configured to send the fourth optical signal with the first wavelength on the second optical fiber to the first communication device, and the time when the channel medium conversion module sends the fourth optical signal is the seventh time t7;
  • the channel medium conversion module is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
  • the processor is configured to communicate with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 Perform time synchronization.
  • the above-mentioned processor is based on the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time.
  • Time synchronization between t8 and the first communication device includes: the processor determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
  • the processor determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
  • the processor determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the processor performs time synchronization with the first communication device according to the time deviation N.
  • the above-mentioned processor is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the first deviation N1 and the time deviation N The difference.
  • the foregoing processor is further configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1;
  • the above-mentioned channel medium conversion module is further configured to receive the first optical pulse signal with the second wavelength on the second optical fiber for detection, and send the second optical pulse signal with the first wavelength on the second optical fiber. Light pulse signal for detection.
  • the second communication device further includes a stamping module.
  • the stamping module When the channel medium conversion module receives the first optical signal, the stamping module generates the first time stamp; when the channel medium conversion module sends the second optical signal, The stamping module generates a second time stamp; when the channel medium conversion module receives the third optical signal, the stamping module generates a fifth time stamp; when the channel medium conversion module sends the fourth optical signal, the stamping module generates an eighth time stamp.
  • the channel medium conversion module includes an optical transmitting and receiving module.
  • this application also discloses a time-synchronized communication device, including a processor and a channel medium conversion module, and the processor and the channel medium conversion module establish a communication connection;
  • the channel medium conversion module is used to send the first optical signal with the first wavelength on the first optical fiber to the second communication device, the first optical signal carries a first time stamp, and the first time stamp instructs the channel medium conversion module to send the first optical signal.
  • the time of an optical signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
  • the channel medium conversion module is further configured to receive a second optical signal with a second wavelength sent by the second communication device on the first optical fiber, and the time when the second communication device sends the second optical signal is the third time t3;
  • the channel medium conversion module is further configured to send a fourth time stamp on the first optical fiber to the second communication device, where the fourth time stamp indicates that the time when the channel medium conversion module receives the second optical signal is the fourth time t4;
  • the channel medium conversion module is also used to send a third optical signal with a wavelength of the second wavelength to the second communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the channel medium conversion module to send
  • the time of the third optical signal is the fifth time t5, and the time of the second communication device receiving the third optical signal is the sixth time t6;
  • the channel medium conversion module is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
  • the channel medium conversion module is also used to send an eighth time stamp on the second optical fiber to the second communication device, so that the second communication device can be based on the first time t1, the second time t2, the third time t3, and the fourth time Time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 are time synchronized with the first communication device.
  • the eighth time stamp indicates that the time when the channel medium conversion module receives the fourth optical signal is the eighth time. Time t8;
  • the processor is used to communicate with the channel medium conversion module.
  • this application discloses a time-synchronized communication device, including a processing unit and a communication unit, and the processing unit and the communication unit establish a communication connection;
  • the communication unit is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first
  • the time of the optical signal is the first time t1, and the time when the channel medium conversion module receives the first optical signal is the second time t2;
  • the communication unit is further configured to send a second optical signal with a wavelength of the second wavelength to the first communication device on the first optical fiber, and the time when the channel medium conversion module sends the second optical signal is the third time t3;
  • the communication unit is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
  • the communication unit is further configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the second wavelength
  • the time of the three optical signals is the fifth time t5, and the time when the channel medium conversion module receives the third optical signal is the sixth time t6;
  • the communication unit is further configured to send a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the channel medium conversion module sends the fourth optical signal is the seventh time t7;
  • the communication unit is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
  • the processing unit is configured to communicate with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 Perform time synchronization.
  • this application also discloses a time-synchronized communication device, including a processing unit and a communication unit, and the processing unit and the communication unit establish a communication connection;
  • the communication unit is configured to send a first optical signal with a wavelength of a first wavelength to the second communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the channel medium conversion module to send the first light
  • the time of the signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
  • the communication unit is further configured to receive a second optical signal with a wavelength of the second wavelength sent by the second communication device on the first optical fiber, and the time when the second communication device sends the second optical signal is the third time t3;
  • the communication unit is further configured to send a fourth time stamp on the first optical fiber to the second communication device, where the fourth time stamp indicates that the time when the channel medium conversion module receives the second optical signal is the fourth time t4;
  • the communication unit is further configured to send a third optical signal with a wavelength of the second wavelength to the second communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the channel medium conversion module to send the third optical signal.
  • the time of the optical signal is the fifth time t5, and the time of the second communication device receiving the third optical signal is the sixth time t6;
  • the communication unit is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
  • the communication unit is further configured to send an eighth time stamp on the second optical fiber to the second communication device, so that the second communication device can according to the first time t1, the second time t2, the third time t3, and the fourth time t4,
  • the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device, and the eighth time stamp indicates that the time when the channel medium conversion module receives the fourth optical signal is the eighth time t8 ;
  • the processing unit is used to communicate with the communication unit.
  • the present application discloses a communication system.
  • the communication system includes any communication device described in the third aspect and any communication device described in the fourth aspect, or the communication system includes Any communication device described in the above fifth aspect and any communication device described in the above sixth aspect.
  • the communication system may further include a first optical fiber and a second optical fiber.
  • the time synchronization method, communication equipment and system disclosed in the present application can realize a more accurate estimation of the clock time deviation value between communication equipment, improve the time synchronization accuracy in the communication network, without dispersion compensation, and support high-precision clock synchronization and OTDR technology is combined and applied.
  • FIG. 1 is a schematic diagram of the principle of time synchronization performed by the 1588V2 protocol provided by an embodiment of the present application;
  • Figure 2a is a time synchronization system disclosed in an embodiment of the present application.
  • Figure 2b is a time synchronization method disclosed in an embodiment of the present application.
  • Figure 3a is another time synchronization system disclosed in an embodiment of the present application.
  • Figure 3b is another time synchronization method disclosed in an embodiment of the present application.
  • Fig. 4a is a schematic structural diagram of a second communication device disclosed in an embodiment of the present application.
  • 4b is a schematic structural diagram of another second communication device disclosed in an embodiment of the present application.
  • Fig. 5a is a schematic structural diagram of a first communication device disclosed in an embodiment of the present application.
  • Fig. 5b is a schematic structural diagram of another first communication device disclosed in an embodiment of the present application.
  • the embodiments of the present application provide a time synchronization method, communication equipment and system, which are used to improve the accuracy of time synchronization. Detailed descriptions are given below.
  • multiple can be understood as “at least two”; “multiple” can be understood as “at least two”; “the difference between A and B” refers to AB, that is, A minus B , Or, refers to BA, that is, B minus A.
  • GSM Global System of Mobile Communication
  • CDMA Code Division Multiple Access
  • WCDMA broadband code division multiple Address
  • OFDM orthogonal frequency division multiplexing
  • GPRS General Packet Radio Service
  • LTE Long Term Evolution
  • FDD Frequency Division Duplex
  • TDD Time Division Duplex
  • UMTS Universal Mobile Telecommunication System
  • WiFi Wireless Fidelity
  • WiMAX Worldwide Interoperability for Microwave Access
  • WLAN Wireless Local Area Networks
  • PLMN Public Land Mobile Network
  • PLMN Public Land Mobile Network
  • the communication method in the embodiments of the present application can be used in application scenarios that are sensitive to time synchronization or delay, such as automatic or assisted driving, augmented reality (AR), virtual reality (Virtual Reality, VR), and tactile Internet , Industrial control, smart grid (smart grid), real-time games, process automation (Process automation), industrial automation (Factory automation) and other scenarios, which are not limited in the embodiment of the present application.
  • AR augmented reality
  • VR Virtual Reality
  • tactile Internet Industrial control
  • smart grid smart grid
  • real-time games e.g., real-time games, process automation (Process automation), industrial automation (Factory automation) and other scenarios, which are not limited in the embodiment of the present application.
  • the controller sends control signaling to the actuator to instruct the actuator to execute the command at a certain time. If the actuator and the controller have different perceptions of time, that is, the time is not synchronized, the actuator will execute the command at the wrong time and cause the task execution to fail.
  • the actuator starts to rotate at 3 o'clock and 1 s, and rotates for 5 s, and continues to 3 o'clock and 6 s.
  • This lag of 1s may cause the actuator to conflict with other actuators and affect the smooth operation of industrial control. Therefore, time synchronization in industrial control is particularly important.
  • phase measurement modules such as Data Terminal Unit (DTU)
  • DTU Data Terminal Unit
  • the distribution network can use DTU to realize the differential protection of the distribution network.
  • Adjacent DTUs learn their respective sampling values of currents through periodic interaction. The sampling time of each DTU to the current is fixed and the same (pre-configured).
  • Each DTU compares the current values sampled by itself and its neighbor DTU at the same time. If the difference between the two exceeds a current threshold, it is considered that the circuit between the two is faulty, and each DTU will open the switch to perform current isolation protection. In this scenario, the time of adjacent DTUs must be synchronized in pairs.
  • the asynchronous DTU will sample the current at different times, which will cause deviations in the current value normally sampled. The greater the time synchronization error, the greater the current deviation value may appear. Once the current threshold is exceeded, a false alarm will be generated. In user power consumption, false alarms will be reflected in the power failure of the entire community or area, resulting in poor user experience; in industrial power use, false alarms will be reflected in the power failure of the factory or workshop, causing unnecessary economic losses. Therefore, the importance of time synchronization in the smart grid is particularly prominent.
  • FIG. 1 is a schematic diagram of the principle of time synchronization performed by the 1588V2 protocol provided by an embodiment of the present application.
  • the receiving end device and the sending end device interact through a message carrying a timestamp, and the receiving end device performs time synchronization with the sending end device according to the timestamp.
  • the sending end device sends a synchronization message at time t1, and carries the t1 timestamp indicating time t1 in the synchronization message; the receiving end device receives the synchronization message at time t2, and locally generates t2 indicating time t2 on the receiving end device.
  • Timestamp, and extract the t1 timestamp from the synchronization message the receiving device sends a delay request message at t3, and locally generates a t3 timestamp indicating t3 on the receiving device; the sending device receives the delay request message at t4 , And locally generate a t4 timestamp indicating t4 on the sending end device; the sending end device carries the t4 timestamp in the delayed response message and sends it to the receiving end device; the receiving end device extracts the t4 timestamp from the delayed response message; The receiving end device can calculate the time deviation between the receiving end device and the sending end device according to the obtained timestamps t1, t2, t3, and t4, and adjust the time of the receiving end device itself to achieve time synchronization with the sending end device.
  • the path delay from the sender device to the receiver device is Delay1
  • the path delay from the receiver device to the sender device is Delay2
  • the time offset between the receiver device and the sender device is N
  • the calculation of the time offset is specifically:
  • the above-mentioned time stamp is the information indicating the time at which its own clock is located when the sending end device or the receiving end device stamps.
  • the time stamp is, for example, a character string or encoded information.
  • the sending end device and the receiving end device may be ports, modules, network devices, etc. that need to be time synchronized. Synchronization messages, delayed request messages, and delayed response messages may be delivered in the form of messages.
  • Event messages are time-concept messages and need to be stamped with accurate time stamps when entering and leaving the device port, while general messages are non-time concept messages, and no time stamp is generated when entering and leaving the device.
  • Event messages include 4: Sync, Delay_Req, Pdelay_Req and Pdelay_Resp; general messages include 6: Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, Management and Signalling.
  • Figures 2a and 2b show a time synchronization system and method disclosed in an embodiment of the present application.
  • the first communication device and the second communication device in the embodiment of the present application may be a wavelength division device in an optical network, an OTN device, or a node unit in another wavelength division network; the first communication device in the embodiment of the present application
  • the communication device can also be a wireless access network device or node (such as a base station (Base Station, BS), a base station gNB in a 5G mobile communication system, an evolved base station eNodeB, a centralized unit (CU), and a distributed unit (Distributed Unit).
  • the second communication device may also be a terminal device, user equipment (User Equipment, UE), D2D (Device to Device, D2D) equipment, BS, gNB, eNB, CU, DU; the first communication device may It is the above-mentioned sending-end device, and the second communication device may be the above-mentioned receiving-end device.
  • user equipment User Equipment, UE
  • D2D Device to Device, D2D
  • BS gNB, eNB, CU, DU
  • the first communication device may It is the above-mentioned sending-end device
  • the second communication device may be the above-mentioned receiving-end device.
  • a time synchronization system includes a first communication device 20 and a second communication device 21.
  • the first communication device 20 and the second communication device 21 are connected by a single-fiber bidirectional optical fiber, and the second communication device 21 needs to adjust its own clock to achieve synchronization with the time of the first communication device 20.
  • the signals sent by the first communication device 20 are all signals of the first wavelength
  • the signals sent by the second communication device 21 are all signals of the second wavelength.
  • the first wavelength signal may be an optical signal with a wavelength of 1490 nm based on the 1588 protocol.
  • the second wavelength signal may be an optical signal with a wavelength of 1510nm based on the 1588 protocol; or the first wavelength signal may also be an optical signal with a wavelength of 1506nm, and the second wavelength signal may also be an optical signal with a wavelength of 1514nm.
  • This application lists The optical signal of is a commonly used optical signal, but it is not limited to this.
  • a time synchronization method includes:
  • Step S201 The first communication device sends a first optical signal to the second communication device, and at the same time, when the first communication device sends the first optical signal, it places a first time stamp locally on the first communication device, and the first optical signal carries the first optical signal.
  • a first time stamp where the first time stamp indicates that the time when the first communication device sends the first optical signal is the first time t1, and the second communication device extracts the first time t1 from the first time stamp;
  • Step S202 When the second communication device receives the first optical signal, it puts a second time stamp locally on the second communication device, and the second time stamp indicates that the time when the second communication device receives the first optical signal is The second moment t2;
  • Step S203 The second communication device sends a second optical signal to the first communication device, and at the same time, when the second communication device sends the second optical signal, a third time stamp is printed locally on the second communication device, and the third time stamp indicates The time when the second communication device sends the second optical signal is the third time t3;
  • Step S204 When the first communication device receives the second optical signal, it places a fourth time stamp locally on the first communication device, and the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time.
  • Step S205 The first communication device sends the fourth time stamp to the second communication device, and the second communication device extracts the fourth time t4 from the fourth time stamp.
  • the delayed response message is the Delay_Resp message.
  • Each Delay_Resp message generated is used to carry the fourth timestamp generated this time, and the originTimestamp field of the Delay_Resp message can be used to carry the fourth timestamp. .
  • Step S206 The second communication device performs time synchronization with the first communication device according to the aforementioned first time t1, second time t2, third time t3, and fourth time t4. Specifically, the second communication device determines the time deviation N according to the following calculation formula:
  • N [(t2-t1)-(t4-t3)]/2
  • the second communication device performs time synchronization with the first communication device according to the calculated time deviation.
  • the message transmission of the time synchronization method and system provided in this embodiment adopts a single-fiber bidirectional transmission configuration. Since the message transmission is carried out on the same optical fiber, the time synchronization method or system eliminates or avoids the transmission and reception link optical fiber.
  • the difference in the length of the transceiver link causes the error of the delay of the transceiver link.
  • the difference in the fiber length of the transceiver link refers to the length of the fiber where the link sent by the first communication device to the second communication device is and the length of the fiber sent by the second communication device to the first communication device The fiber length of the link is different.
  • the transceiver link mentioned in the embodiment of the present application refers to the link from the first communication device to the second communication device and the link from the second communication device to the first communication device.
  • the calculation method of the dispersion delay can be used to calculate the two-way delay caused by the fiber dispersion. Asymmetry is compensated, but at the same time, the actual length of the fiber, the fiber dispersion curve, and the wavelength of the message transmission in the two directions on the transceiver link need to be input. The deployment complexity is greatly increased, and there is a risk of error. Even for the same fiber type, the fiber dispersion curve still has a certain difference, and the actual dispersion curve of the fiber has no better measurement method. If the standard dispersion curve of the corresponding fiber type is substituted for compensation, the dispersion delay difference still cannot be eliminated. The error caused by the two-way delay of the transceiver link.
  • the synchronization error M (Delay1-Delay2)/2.
  • the synchronization error M0 of the two-way delay of the transceiver link is:
  • the synchronization error of the two-way delay of the transceiver link is positively correlated with the length of the optical fiber link.
  • first and second in this application are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that The described embodiments can be implemented in a sequence not described in this application.
  • “And/or” is used to describe the association relationship of associated objects, indicating that there can be three types of relationships. For example, A and/or B can mean that: A alone exists, A and B exist at the same time, and B exists alone.
  • the specific operation method in the method embodiment can also be applied to the device embodiment.
  • the present application uses the same drawing numbers to represent components with the same or similar functions in the different embodiments.
  • FIGs 3a and 3b show yet another time synchronization system and method disclosed in an embodiment of the present application.
  • a time synchronization system includes a first communication device 20 and a second communication device 21.
  • the first communication device 20 and the second communication device 21 are connected by a first optical fiber 22 and a second optical fiber 23 Wherein, the fiber lengths of the first optical fiber 22 and the second optical fiber 23 are kept the same as far as possible, and a certain error may be allowed in practice.
  • the second communication device 21 needs to adjust its own clock to achieve time synchronization with the first communication device 20.
  • the signals sent by the first communication device 20 on the first optical fiber 22 are all signals of the first wavelength
  • the signals sent by the second communication device 21 on the first optical fiber 22 are all signals of the second wavelength, for example, signals of the first wavelength. It may be an optical signal with a wavelength of 1490nm based on the 1588 protocol
  • the second wavelength signal may be an optical signal with a wavelength of 1510nm based on the 1588 protocol; or the first wavelength signal may also be an optical signal with a wavelength of 1506nm, and the second wavelength signal may also It can be an optical signal with a wavelength of 1514 nm.
  • the signals sent by the first communication device 20 on the second optical fiber 23 are all signals of the second wavelength
  • the signals sent by the second communication device 21 on the second optical fiber 23 are all signals of the first wavelength.
  • a method of time synchronization includes:
  • Step S301 the first communication device 20 and the second communication device 21 perform message transfer on the first optical fiber 22 and the second optical fiber 23;
  • the message transfer process between the first communication device 20 and the second communication device 21 is as follows:
  • the first communication device 20 sends a first optical signal with a wavelength of the first wavelength to the second communication device 21 on the first optical fiber 22, and the first communication device 20 sends the first optical signal while marking the first time stamp.
  • An optical signal carries a first time stamp, and the first time stamp indicates that the time at which the first communication device 20 sends the first optical signal is the first time t1;
  • a second time stamp is printed, and the second time stamp indicates that the time when the second communication device 21 receives the first optical signal is the second time t2;
  • the second communication device 21 sends a second optical signal with a second wavelength on the first optical fiber 22 to the first communication device 20, and the second communication device 21 stamps a third time stamp, which indicates the second communication device 21
  • the time when the above-mentioned second optical signal is sent is the third time t3;
  • the second communication device 21 receives the fourth time stamp sent by the first communication device 20 on the first optical fiber 22, and the fourth time stamp indicates that the time when the first communication device 20 receives the second optical signal is the fourth time t4.
  • the message transfer process between the first communication device 20 and the second communication device 21 is as follows:
  • the second communication device 21 receives a third optical signal with a wavelength of the above-mentioned second wavelength sent by the first communication device 20 on the second optical fiber 23, and the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first
  • the time when the communication device 20 sends the third optical signal is the fifth time t5, and the time when the second communication device 21 receives the third optical signal is the sixth time t6;
  • the second communication device 21 sends the fourth optical signal with the wavelength of the first wavelength to the first communication device 20 on the second optical fiber 23, and the time when the second communication device 21 sends the fourth optical signal is the seventh time t7;
  • the first communication device 20 sends an eighth time stamp on the second optical fiber 23 to the second communication device 21, and the eighth time stamp indicates that the time when the first communication device 20 receives the fourth optical signal is the eighth time t8.
  • the first communication device 20 and the second communication device 21 perform message transmission on the first optical fiber 22 and the second optical fiber 23 at the same time.
  • the first communication device 20 transmits the first optical signal on the first optical fiber 22 at the same time.
  • the third optical signal is sent on the second optical fiber 23, and an error within a certain range is allowed in practice.
  • Step S302 the second communication device 21 performs time synchronization with the first communication device 20, and the second communication device 21 adjusts its own time to be synchronized with the first communication device 20;
  • the second communication device 21 is based on the first time t1, the second time t2, the third time t3, and the fourth time generated during the message transmission between the first communication device 20 and the second communication device 21 on the first optical fiber 22.
  • the second communication device 21 determines the first communication device 20 and the second communication device 21 at the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 during the message transmission on the second optical fiber 23 described above.
  • Two deviations N2, where the calculation formula of N2 is: N2 [(t6-t5)-(t8-t7)]/2;
  • the second communication device 21 performs time synchronization with the first communication device 20 according to the calculated time deviation N.
  • the first wavelength is wavelength ⁇ 1 and the second wavelength is wavelength ⁇ 2
  • the refractive indices corresponding to the wavelengths are n1 and n2, respectively
  • the length of the first optical fiber 22 is L1
  • the length of the second optical fiber 23 is L2
  • the speed of light is c
  • Step S303-Step 306 are optional steps, which are possible extended implementations of the above solution.
  • Step S303 The second communication device 21 determines the approximate synchronization error of the two-way time delay between the first communication device 20 and the second communication device 21 on the first optical fiber 22;
  • the time deviation N is infinitely close to the real time deviation N0, so here, the value of (N1-N) is taken as the approximate synchronization error S1, and the approximate synchronization error S1 is used for clock compensation.
  • the following is the approximate synchronization error S2 similar.
  • Step S304 the second communication device 21 performs time synchronization on the first optical fiber 22, and performs a pulse test on the second optical fiber 23;
  • the second communication device 21 performs time synchronization with the first communication device 20 on the first optical fiber 22 according to the first deviation N1 and the approximate synchronization error S1, and the second communication device further compensates the approximate synchronization error S1 calculated above to the first optical fiber.
  • the time of the second communication device 21 on 22 is synchronized with the time of the first communication device 20. At this time, time synchronization can be achieved only through message transmission on the first optical fiber 22;
  • the first communication device 20 sends the first optical pulse signal with the above-mentioned second wavelength on the second optical fiber 23 to the second communication device 21 for detection, and the second communication device 21 sends the wavelength to the first communication device 20 on the second optical fiber. Detect the second optical pulse signal of the first wavelength mentioned above.
  • Step S305 The second communication device 21 determines the synchronization error of the two-way time delay between the first communication device 20 and the second communication device 21 on the second optical fiber 23;
  • Step S306 the second communication device performs time synchronization on the second optical fiber, and performs a pulse test on the first optical fiber;
  • the second communication device 21 performs time synchronization with the first communication device 20 on the second optical fiber 23 according to the second deviation N2 and the approximate synchronization error S2.
  • the second communication device further compensates the approximate synchronization error S2 obtained by the calculation to the first communication device 20.
  • the time of the second communication device 21 and the first communication device 20 on the second optical fiber 23 is synchronized. At this time, time synchronization can be realized only through message transmission on the second optical fiber 23;
  • the first communication device 20 sends a third optical pulse signal with a wavelength of the above-mentioned first wavelength to the second communication device 21 on the first optical fiber 22 for detection, and the second communication device 21 sends to the first communication device 20 on the first optical fiber 22
  • the fourth optical pulse signal whose wavelength is the above-mentioned second wavelength is detected.
  • the foregoing optical pulse signal may be an OTDR (Optical Time Domain Reflectometer, Optical Time Domain Reflectometer) pulse signal or an OFDR (Optical Frequency Domain Reflectometer, Optical Frequency Domain Reflectometer) pulse signal.
  • OTDR Optical Time Domain Reflectometer
  • OFDR Optical Frequency Domain Reflectometer
  • step 303-step 306 is to first perform a pulse test on the second optical fiber 23, and then perform a pulse test on the first optical fiber 22, or perform a pulse test on the first optical fiber 22 first, and then perform a pulse test on the first optical fiber 22.
  • the pulse test is performed on the second optical fiber 23, that is, step 305 to step 306 are performed first, and then step 303 to step 304 are performed.
  • the time synchronization method and system disclosed in this embodiment implements accurate estimation of clock time deviation values between communication devices, improves time synchronization accuracy in communication networks, does not require dispersion compensation, and supports the combined application of high-precision clock synchronization and OTDR technology.
  • FIG. 4a is a schematic structural diagram of a second communication device 21 disclosed in an embodiment of the present application. As shown in Fig. 4a, the second communication device 21 includes a communication unit 401 and a processing unit 402, wherein:
  • the communication unit 401 is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device 20 on a first optical fiber, the first optical signal carries a first time stamp, and the first time stamp indicates the first The time when the communication device sends the first optical signal is the first time t1, and the time when the communication unit 401 receives the first optical signal is the second time t2;
  • the communication unit 401 is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device, and the time when the communication unit 401 sends the second optical signal is the third time t3;
  • the communication unit 401 is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
  • the communication unit 401 is further configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first optical signal.
  • the time when a communication device sends the third optical signal is the fifth time t5, and the time when the communication unit 401 receives the third optical signal is the sixth time t6;
  • the communication unit 401 is further configured to send a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the communication unit 401 sends the fourth optical signal is the seventh time t7;
  • the communication unit 401 is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
  • the processing unit 402 is configured to compare the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8.
  • a communication device performs time synchronization.
  • the processing unit 402 compares the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8.
  • a communication device performs time synchronization, including:
  • the processing unit 402 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4.
  • the processing unit 402 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8.
  • the processing unit 402 performs time synchronization with the first communication device 20 according to the time deviation N.
  • the processing unit 402 is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N .
  • the processing unit 402 is also configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; the communication unit 401 is also configured to receive the second optical fiber with a wavelength of the above-mentioned second optical fiber. The first optical pulse signal with the wavelength is detected, and the second optical pulse signal with the wavelength of the first wavelength is sent on the second optical fiber for detection.
  • the processing unit 402 is further configured to determine the approximate synchronization error S2 of the two-way delay on the second optical fiber according to the time deviation N and the second deviation N2, where the approximate synchronization error S2 is the difference between the first deviation N2 and the time deviation N .
  • the processing unit 402 is further configured to perform time synchronization with the first communication device on the second optical fiber according to the second deviation N2 and the approximate synchronization error S2; the communication unit 401 is also configured to receive the first optical fiber with a wavelength of the above-mentioned first optical fiber.
  • the third optical pulse signal with the wavelength is detected, and the fourth optical pulse signal with the wavelength of the second wavelength is sent on the first optical fiber for detection.
  • the stamping module in the second communication device 21 when the communication unit 401 receives the above-mentioned first optical signal, the stamping module in the second communication device 21 generates the first time stamp; when the communication unit 401 sends the above-mentioned second optical signal, the second communication The stamping module in the device 21 generates the second time stamp; in the same way, the sixth time stamp and the seventh time stamp are also generated by the above stamping module.
  • the second time stamp is .
  • the third time stamp, the sixth time stamp, the sixth time stamp, or the seventh time stamp are sent to the processor in the second communication device 21, and a certain time stamp indicates the time corresponding to the time stamp, for example, the first time stamp indicates At the aforementioned first time, the processor may store the second time stamp, the third time stamp, the sixth time stamp, or the seventh time stamp in the memory of the second communication device 21.
  • the processing unit 402 may be used to implement the functions of the processor and the stamping module in the second communication device 21 described above.
  • the communication unit 401 may include at least two sub-units, for example, a first communication unit and a second communication unit.
  • the first communication unit is used to process communications on the first optical fiber
  • the second communication unit is used for the second communication. Communication on optical fiber.
  • each unit may also correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
  • FIG. 4b is a schematic structural diagram of another second communication device 21 disclosed in an embodiment of the present application.
  • the second communication device 21 may include a processor 411 and a channel medium conversion module 413, where the processor 411 and the channel medium conversion module 413 establish a communication connection, where:
  • the channel medium conversion module 413 is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device 20 on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp indicates the foregoing The time when the first communication device 20 sends the first optical signal is the first time t1, and the time when the channel medium conversion module 413 receives the first optical signal is the second time t2;
  • the channel medium conversion module 413 is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device 20, and the time when the channel medium conversion module 413 sends the second optical signal is the third time t3 ;
  • the channel medium conversion module 413 is further configured to receive a fourth time stamp sent by the first communication device 20 on the first optical fiber, and the fourth time stamp indicates that the time when the first communication device 20 receives the second optical signal is the fourth Time t4;
  • the channel medium conversion module 413 is configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device 20 on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates The time when the first communication device sends the third optical signal is the fifth time t5, and the time when the channel medium conversion module 413 receives the third optical signal is the sixth time t6;
  • the channel medium conversion module 413 is further configured to send the fourth optical signal with the wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the channel medium conversion module 413 sends the fourth optical signal is the seventh Time t7;
  • the channel medium conversion module 413 is further configured to receive the eighth time stamp sent by the first communication device 20 on the second optical fiber, and the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time. Time t8;
  • the processor 411 is configured to compare the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, A communication device 20 performs time synchronization.
  • the processor 411 compares the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8.
  • a communication device performs time synchronization, including:
  • the processing unit 402 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4.
  • the processor 411 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8.
  • the processor 411 performs time synchronization with the first communication device 20 according to the time deviation N.
  • the processor 411 is further configured to determine an approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N .
  • the processor 411 is further configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1;
  • the channel medium conversion module 413 is also configured to receive the wavelength on the second optical fiber as described above The first optical pulse signal with the second wavelength is detected, and the second optical pulse signal with the wavelength of the first wavelength is sent on the second optical fiber for detection.
  • the second communication device 21 further includes a stamping module 412.
  • the stamping module 412 When the channel medium conversion module 413 receives the first optical signal, the stamping module 412 generates a first time stamp; the channel medium conversion module 413 sends When the second optical signal is used, the stamping module 412 generates a second time stamp; when the channel medium conversion module 413 receives the third optical signal, the stamping module 412 generates a fifth time stamp; the channel medium conversion module 413 sends the first In the case of four optical signals, the stamping module 412 generates an eighth time stamp.
  • the stamping module 412 sends the second, third, sixth, and seventh timestamps to the processor 411, and the processor 411 may send the second, third, sixth, or The seventh time stamp is stored in the memory of the second communication device 21.
  • the channel media conversion module 413 includes a fiber optic transceiver or an optical module; the channel media conversion module 413 may include two fiber optic transceivers, or two optical modules, or one fiber transceiver and one optical module, one of which is a fiber transceiver.
  • the optical transceiver or optical module is used to process the communication on the above-mentioned first optical fiber, and the other optical transceiver or optical module is used to process the communication on the above-mentioned second optical fiber.
  • the channel medium conversion module 413 may be an optical transmitting and receiving module for sending or receiving optical signals or optical pulse signals.
  • the channel medium conversion module 413 may also include a receiver and a transmitter, and the receiver and the transmitter may be integrated on a chip.
  • the stamping module 412 may also include two sub-modules. One of the stamping sub-modules is used to process the communication on the above-mentioned first optical fiber, and the other stamping sub-module is used to process the communication on the above-mentioned second optical fiber.
  • the stamping module 412 may be implemented by a field programmable gate array, for example.
  • each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
  • the processor involved in the embodiment of the present application may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP.
  • the processor may also be a hardware chip, which may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • ASIC application-specific integrated circuit
  • PLD programmable logic device
  • the above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
  • FIG. 5a is a schematic structural diagram of a first communication device 20 disclosed in an embodiment of the present application. As shown in Fig. 5a, the first communication device 20 includes a communication unit 501 and a processing unit 502, wherein:
  • the communication unit 501 is configured to send a first optical signal with a first wavelength on the first optical fiber to the second communication device 21, the first optical signal carries a first time stamp, and the first time stamp instructs the communication unit 501 to send the first optical signal
  • the time of an optical signal is the first time t1, and the time when the second communication device 21 receives the first optical signal is the second time t2;
  • the communication unit 501 is further configured to receive a second optical signal with a second wavelength sent by the second communication device 21 on the above-mentioned first optical fiber, and the time when the second communication device 21 sends the second optical signal is the third time t3;
  • the communication unit 501 is further configured to send a fourth time stamp on the first optical fiber to the second communication device 21, where the fourth time stamp indicates that the time when the communication unit 501 receives the second optical signal is the fourth time t4;
  • the communication unit 501 is further configured to send a third optical signal with a wavelength of the second wavelength on the second optical fiber to the second communication device 21, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the communication unit 501
  • the time when the third optical signal is sent is the fifth time t5, and the time when the second communication device receives the third optical signal is the sixth time t6;
  • the communication unit 501 is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
  • the communication unit 501 is further configured to send an eighth time stamp on the second optical fiber to the second communication device 21, so that the second communication device 21 can be based on the first time t1, the second time t2, and the third time t3.
  • the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device 20, and the eighth time stamp indicates that the first communication device 20 receives the fourth
  • the time of the optical signal is the eighth time t8;
  • the processing unit 502 is configured to communicate with the communication unit 501.
  • the second communication device 21 compares the relationship between the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 according to the foregoing first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, and
  • the above-mentioned first communication device performing time synchronization includes:
  • the second communication device 21 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4.
  • the second communication device 21 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8.
  • the second communication device 21 performs time synchronization with the first communication device 20 according to the time deviation N.
  • the second communication device 21 is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, and the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N Difference.
  • the second communication device 21 is also used to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; the communication unit 501 is also used to transmit on the second optical fiber with a wavelength of the above The first optical pulse signal with the second wavelength is detected and the second optical pulse signal with the wavelength of the first wavelength is received on the second optical fiber for detection.
  • the stamping module in the first communication device 20 when the communication unit 501 sends the above-mentioned first optical signal, the stamping module in the first communication device 20 generates a first time stamp, and when the communication unit 501 receives the above-mentioned second optical signal, the first communication The stamping module in the device 20 generates the fourth time stamp; in the same way, the fifth and eighth time stamps are also generated by the stamping module in the first communication device 20.
  • the above-mentioned stamping module sends the first time stamp, the fourth time stamp, the fifth time stamp or the eighth time stamp to the processor in the first communication device 20, and the processor can send the first time stamp, the fourth time stamp, the The fifth time stamp or the eighth time stamp is stored in the memory of the first communication device 20.
  • the communication unit 501 sends the first time stamp to the second communication device 21, including:
  • the processing unit 502 After receiving the first time stamp sent by the stamping module, the processing unit 502 sends a synchronization message to the second communication device 21 via the channel medium conversion module in the first communication device 20.
  • the synchronization message carries the first time stamp. It may be the above-mentioned first optical signal.
  • the first communication device 20 sending the fourth time stamp to the second communication device 21 includes: after the processor in the first communication device 20 receives the fourth time stamp sent by the stamping module, The delay response message is sent to the second communication device 21 via the channel medium conversion module in the first communication device 20, and the delay response message carries the fourth time stamp.
  • the communication unit 501 may be used to implement the function of the channel media conversion module in the first communication device 20, and the processing unit 502 may be used to implement the functions of the processor and the stamping module in the first communication device 20.
  • each unit may also correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
  • FIG. 5b is a schematic structural diagram of another first communication device 20 disclosed in an embodiment of the present application.
  • the first communication device 20 may include a processor 511 and the channel media conversion module 513, wherein: the processor 511 and the channel media conversion module 513 establish a communication connection, wherein:
  • the channel medium conversion module 513 is configured to send a first optical signal with a first wavelength on the first optical fiber to the second communication device 21, the first optical signal carries a first time stamp, and the first time stamp indicates the communication unit 501
  • the time when the first optical signal is sent is the first time t1, and the time when the second communication device 21 receives the first optical signal is the second time t2;
  • the channel medium conversion module 513 is also used to receive the second optical signal with the second wavelength sent by the second communication device 21 on the first optical fiber, and the time when the second communication device 21 sends the second optical signal is the third time t3;
  • the channel medium conversion module 513 is further configured to send a fourth time stamp on the first optical fiber to the second communication device 21, where the fourth time stamp indicates that the time when the communication unit 501 receives the second optical signal is the fourth time t4;
  • the channel medium conversion module 513 is further configured to send a third optical signal with a wavelength of the second wavelength to the second communication device 21 on the second optical fiber.
  • the third optical signal carries a fifth time stamp, and the fifth time stamp indicates The time when the communication unit 501 sends the third optical signal is the fifth time t5, and the time when the second communication device receives the third optical signal is the sixth time t6;
  • the channel medium conversion module 513 is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
  • the channel media conversion module 513 is further configured to send an eighth time stamp on the second optical fiber to the second communication device 21, so that the second communication device can perform according to the first time t1, the second time t2, and the third time.
  • t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device 20.
  • the eighth time stamp indicates that the first communication device 20 receives the first communication device 20.
  • the time of the four-light signal is the eighth time t8;
  • the processor 511 is configured to communicate with the channel medium conversion module 513.
  • the first communication device 20 further includes a stamping module 512.
  • the stamping module 512 When the channel medium conversion module 513 sends the above-mentioned first optical signal, the stamping module 512 generates the first time stamp, and the channel medium conversion module 513 receives For the above-mentioned second optical signal, the stamping module 512 generates a fourth time stamp; similarly, the fifth time stamp and the eighth time stamp are also generated by the stamping module 512.
  • the stamping module 512 sends the first, fourth, fifth, or eighth timestamp to the processor 511, and the processor 511 may send the first, fourth, fifth, or The eighth time stamp is stored in the memory of the first communication device 20.
  • the channel media conversion module 513 includes a fiber optic transceiver or an optical module; the channel media conversion module 513 may include two fiber optic transceivers, or two optical modules, or one fiber transceiver and one optical module, one of which is a fiber transceiver.
  • the optical transceiver or optical module is used to process the communication on the above-mentioned first optical fiber, and the other optical transceiver or optical module is used to process the communication on the above-mentioned second optical fiber.
  • the channel medium conversion module 513 may be an optical transmitting and receiving module for sending or receiving optical signals or optical pulse signals.
  • the channel medium conversion module 413 may also include a receiver and a transmitter, and the receiver and the transmitter may be integrated on a chip.
  • the stamping module 512 may also include two sub-modules. One of the stamping sub-modules is used to process the communication on the above-mentioned first optical fiber, and the other stamping sub-module is used to process the communication on the above-mentioned second optical fiber.
  • each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
  • the embodiment of the present application further discloses a communication system.
  • the communication system includes a first communication device 20 and a second communication device 21.
  • the first communication device 20 is shown in FIG. 5a or FIG. 5b.
  • the first communication device 20 disclosed in the described embodiment, and the second communication device 21 is the second communication device 21 disclosed in the embodiment described in FIG. 4a or FIG. 4b.
  • the communication system may also include a first optical fiber and a second optical fiber. optical fiber.
  • each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
  • the embodiment of the present application provides a computer-readable storage medium, including computer-readable instructions.
  • the computer reads and executes the computer-readable instructions, the computer executes the method executed by the above-mentioned processor.
  • the embodiment of the present application also provides a computer program product containing instructions, which when the computer program product runs on a computer, causes the computer to execute the method executed by the above-mentioned processor.
  • modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed on a network composed of multiple computing devices.
  • they can be implemented with program codes executable by the computing device, so that they can be stored in a storage medium (ROM/RAM, magnetic disk, optical disk) and executed by the computing device, and in some cases
  • ROM/RAM read-only memory
  • magnetic disk magnetic disk
  • optical disk optical disk
  • the steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules, or multiple modules or steps of them can be made into a single integrated circuit module to achieve. Therefore, this application is not limited to any specific combination of hardware and software.

Abstract

The present application relates to a time synchronization method, a communication device, and a system. A second device receives a first optical signal having a first wavelength that is sent by a first device over a first optical fiber, the moment for sending the first optical signal being t1, and the moment for receiving the first optical signal being t2, and the second devices sends a second optical signal having a second wavelength to the first device over the first optical fiber, the moment for sending the second optical signal being t3, and the moment for receiving the second optical signal being t4; the second device receives a third optical signal having the second wavelength that is sent by the first device over a second optical fiber, the moment for sending the third optical signal being t5, and the moment for receiving the third optical signal being t6, and the second devices sends a fourth optical signal having the first wavelength to the first device over the second optical fiber, the moment for sending the fourth optical signal being t7, and the moment for receiving the fourth optical signal being t8; the second device performs time synchronization with the first device according to t1, t2, t3, t4, t5, t6, t7, and t8.

Description

时间同步的方法、通信设备和系统Time synchronization method, communication equipment and system
本申请要求于2019年10月31日提交中国国家知识产权局、申请号为201911053055.8、发明名称为“时间同步的方法、通信设备和系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the State Intellectual Property Office of China, the application number is 201911053055.8, and the invention title is "time synchronization method, communication equipment and system" on October 31, 2019, the entire content of which is incorporated by reference In this application.
技术领域Technical field
本申请涉及通信领域,尤其涉及一种时间同步的方法、通信设备和系统。This application relates to the field of communications, and in particular to a method, communication device and system for time synchronization.
背景技术Background technique
在通信网络中,业务的正常运行有时要求网络时间同步,即网络各设备间的时间差保持在合理的误差水平内。1588V2协议是一种精确的时间同步协议,简称精密时间协议(precision time protocol,PTP),可以实现多个网络设备的时间同步。In communication networks, the normal operation of services sometimes requires network time synchronization, that is, the time difference between network devices is kept within a reasonable error level. The 1588V2 protocol is a precise time synchronization protocol, referred to as the precision time protocol (PTP), which can realize the time synchronization of multiple network devices.
1588V2协议可以通过软件和硬件的结合,将接收端设备的时间与发送端设备的时间同步。可以在协议栈中定义打戳点,在需要同步的接收端设备中,PTP消息通过打戳点时,产生时间戳,并将该时间戳携带在消息中,通过与发送端设备的消息交换计算时间偏移量并进行补偿,来实现接收端设备与发送端设备的时间同步。The 1588V2 protocol can synchronize the time of the receiving end device with the time of the sending end device through the combination of software and hardware. The stamping point can be defined in the protocol stack. In the receiving device that needs to be synchronized, when the PTP message passes the stamping point, a timestamp is generated, and the timestamp is carried in the message, and calculated by the message exchange with the sending device The time offset is compensated to realize the time synchronization between the receiving end device and the sending end device.
现有技术中时延的测量方式包括单向测量和双向测量。如果对于节点A与节点B进行单向测量,可以测量节点A到节点B的单向时延,也可以测量节点B到节点A的单向时延。如果对于节点A与节点B进行双向业务策略,可以测量出节点A到节点B再到节点A的时延,或者节点B到节点A再到节点B的时延。The time delay measurement methods in the prior art include one-way measurement and two-way measurement. If one-way measurement is performed between node A and node B, the one-way delay from node A to node B can be measured, and the one-way delay from node B to node A can also be measured. If a two-way service strategy is implemented for node A and node B, the time delay from node A to node B and then to node A can be measured, or the time delay from node B to node A and then to node B can be measured.
时间同步是建立在节点A与节点B之间的收发链路延迟相等的基础上的,如果双向时延完全对称,即节点A到节点B和节点B到节点A的时延相同,将不会引入同步误差;如果节点A与节点B之间的收发链路延时不对称,即节点A到节点B和节点B到节点A的时延不相同,将引入同步误差。由于双向时间戳传输的物理链路、波长可能不一样,双向时延对称是难以达成的。双向时延不对称性引入时间同步的误差一般在几十纳秒量级。未来对基站的时间同步精度要求越来越高,为了实现高精度的时间同步,亟须一种时间同步的方法、通信设备和系统来消除或减小收发链路延迟不相等所带来的误差。Time synchronization is based on the equal delay of the transceiver link between node A and node B. If the two-way delay is completely symmetrical, that is, the delay from node A to node B and the delay from node B to node A are the same, there will be no Introduce synchronization error; if the delay of the transceiver link between node A and node B is asymmetric, that is, the delays from node A to node B and node B to node A are not the same, synchronization error will be introduced. Since the physical links and wavelengths of two-way time stamp transmission may be different, it is difficult to achieve two-way delay symmetry. The time synchronization error introduced by the two-way delay asymmetry is generally on the order of tens of nanoseconds. In the future, the requirements for time synchronization accuracy of base stations are getting higher and higher. In order to achieve high-precision time synchronization, a time synchronization method, communication equipment and system are urgently needed to eliminate or reduce the error caused by the unequal delay of the transceiver link. .
发明内容Summary of the invention
鉴于此,本申请实施例提供了一种时间同步的方法、通信设备和系统,用于提高通信网络中的时间同步精度。In view of this, the embodiments of the present application provide a time synchronization method, communication device, and system, which are used to improve the accuracy of time synchronization in a communication network.
第一方面,本申请公开了一种时间同步的方法,包括:In the first aspect, this application discloses a time synchronization method, including:
第二通信设备接收第一通信设备在第一光纤上发送的波长为第一波长的第一光信号,第一光信号携带第一时间戳,第一时间戳指示第一通信设备发送第一光信号的时刻为第一时刻t1;第二通信设备生成第二时间戳,第二时间戳指示第二通信设备接收到第一光信号的时刻为第二时刻t2;第二通信设备向第一通信设备在第一光纤上发送波长为第二波长的第二光信号,第二通信设备生成第三时间戳,第三时间戳指示第二通信设备发送第二光信号的时刻为第三时刻t3;第二通信设备接收第一通信设备在第一光纤上发送的第四时间戳,第四时间戳 指示第一通信设备接收到第二光信号的时刻为第四时刻t4;The second communication device receives the first optical signal of the first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first light The time of the signal is the first time t1; the second communication device generates a second time stamp, and the second time stamp indicates that the time when the second communication device receives the first optical signal is the second time t2; the second communication device communicates with the first The device sends the second optical signal with the second wavelength on the first optical fiber, the second communication device generates a third time stamp, and the third time stamp indicates that the time when the second communication device sends the second optical signal is the third time t3; The second communication device receives the fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
第二通信设备接收第一通信设备在第二光纤上发送的波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示第一通信设备发送第三光信号的时刻为第五时刻t5;第二通信设备生成第六时间戳,第六时间戳指示第二通信设备接收到第三光信号的时刻为第六时刻t6;第二通信设备向第一通信设备在第二光纤上发送波长为第一波长的第四光信号,第二通信设备生成第七时间戳,第七时间戳指示第二通信设备发送第四光信号的时刻为第七时刻t7;第二通信设备接收第一通信设备在第二光纤上发送的第八时间戳,第八时间戳指示第一通信设备接收到第四光信号的时刻为第八时刻t8;The second communication device receives a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the third light The time of the signal is the fifth time t5; the second communication device generates a sixth time stamp, and the sixth time stamp indicates that the time when the second communication device receives the third optical signal is the sixth time t6; the second communication device communicates with the first The device sends a fourth optical signal with a wavelength of the first wavelength on the second optical fiber, the second communication device generates a seventh time stamp, and the seventh time stamp indicates that the time when the second communication device sends the fourth optical signal is the seventh time t7; The second communication device receives the eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步。The second communication device communicates with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8. Time synchronization.
一种可能的实现方式中,上述第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,包括:In a possible implementation manner, the above-mentioned second communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the first time t1. The time synchronization with the first communication device at eight time t8 includes:
第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1;The second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
第二通信设备根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2;The second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
第二通信设备根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N;第二通信设备根据时间偏差N与第一通信设备进行时间同步。The second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the second communication device performs time synchronization with the first communication device according to the time deviation N.
一种可能的实现方式中,上述第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,包括:第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;In a possible implementation manner, the above-mentioned second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4, including: the first deviation N1 satisfies the calculation formula: N1 =[(t2-t1)-(t4-t3)]/2;
上述第二通信设备根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,包括:第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The above-mentioned second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8, including: the first deviation N2 satisfies the calculation formula: N2=[(t6-t5)- (t8-t7)]/2;
上述第二通信设备根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N,包括:时间偏差N满足计算公式:N=(N1+N2)/2。The above-mentioned second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation, including: the time deviation N satisfies the calculation formula: N=(N1+N2)/2.
一种可能的实现方式中,上述时间同步方法还包括:第二通信设备根据时间偏差N和第一偏差N1确定第一光纤上双向时延的近似同步误差S1,近似同步误差S1为第一偏差N1与时间偏差N的差值。In a possible implementation manner, the above-mentioned time synchronization method further includes: the second communication device determines the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, and the approximate synchronization error S1 is the first deviation The difference between N1 and the time deviation N.
一种可能的实现方式中,上述时间同步方法还包括:第二通信设备根据时间偏差N和第二偏差N2确定第二光纤上双向时延的近似同步误差S2,近似同步误差S2为第二偏差N2与时间偏差N的差值。In a possible implementation manner, the above-mentioned time synchronization method further includes: the second communication device determines the approximate synchronization error S2 of the two-way delay on the second optical fiber according to the time deviation N and the second deviation N2, and the approximate synchronization error S2 is the second deviation The difference between N2 and the time deviation N.
一种可能的实现方式中,上述时间同步方法还包括:第二通信设备根据第一偏差N1和近似同步误差S1在第一光纤上与第一通信设备进行时间同步;第二通信设备在第二光纤上接收波长为第二波长的第一光脉冲信号进行探测,第二通信设备在第二光纤上发送波长为第一波长的第二光脉冲信号进行探测。In a possible implementation manner, the above-mentioned time synchronization method further includes: the second communication device performs time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; and the second communication device is in the second The first optical pulse signal with the second wavelength is received on the optical fiber for detection, and the second communication device sends the second optical pulse signal with the first wavelength on the second optical fiber for detection.
一种可能的实现方式中,上述时间同步方法还包括:第二通信设备根据第二偏差N2和近似同步误差S2在第二光纤上与第一通信设备进行时间同步;第二通信设备在第一光纤上接收波长为第一波长的第三光脉冲信号进行探测,第二通信设备在第一光纤上发送波长为第二波长的第四光脉冲信号进行探测。In a possible implementation manner, the above-mentioned time synchronization method further includes: the second communication device performs time synchronization with the first communication device on the second optical fiber according to the second deviation N2 and the approximate synchronization error S2; The optical fiber receives the third optical pulse signal with the first wavelength for detection, and the second communication device sends the fourth optical pulse signal with the second wavelength on the first optical fiber for detection.
第二方面,本申请公开了一种时间同步的方法,包括:In the second aspect, this application discloses a time synchronization method, including:
第一通信设备向第二通信设备在第一光纤上发送波长为第一波长的第一光信号,第一光信号携带第一时间戳,第一时间戳指示第一通信设备发送第一光信号的时刻为第一时刻t1,第二通信设备接收到第一光信号的时刻为第二时刻t2;第一通信设备接收第二通信设备在第一光纤上发送的波长为第二波长的第二光信号,第二通信设备发送第二光信号的时刻为第三时刻t3;第一通信设备向第二通信设备在第一光纤上发送第四时间戳,第四时间戳指示第一通信设备接收到第二光信号的时刻为第四时刻t4;The first communication device sends a first optical signal with a first wavelength on the first optical fiber to the second communication device, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first optical signal Is the first time t1, and the second communication device receives the first optical signal at the second time t2; the first communication device receives the second communication device sent by the second communication device on the first optical fiber with a second wavelength of the second wavelength Optical signal, the second communication device sends the second optical signal at the third time t3; the first communication device sends a fourth time stamp on the first optical fiber to the second communication device, and the fourth time stamp indicates that the first communication device receives The time when the second optical signal is reached is the fourth time t4;
第一通信设备向第二通信设备在第二光纤上发送波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示第一通信设备发送第三光信号的时刻为第五时刻t5,第二通信设备接收到第三光信号的时刻为第六时刻t6;第一通信设备接收第二通信设备在第二光纤上发送的第四光信号,第二通信设备发送第四光信号的时刻为第七时刻t7;The first communication device sends a third optical signal with a second wavelength on the second optical fiber to the second communication device, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the third optical signal The time at is the fifth time t5, and the time at which the second communication device receives the third optical signal is the sixth time t6; the first communication device receives the fourth optical signal sent by the second communication device on the second optical fiber, and the second communication device The time when the device sends the fourth optical signal is the seventh time t7;
第一通信设备向第二通信设备在第二光纤上发送第八时间戳,以使得第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,第八时间戳指示第一通信设备接收到第四光信号的时刻为第八时刻t8。The first communication device sends the eighth time stamp on the second optical fiber to the second communication device, so that the second communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, and the fifth time Time t5, sixth time t6, seventh time t7, and eighth time t8 are time synchronized with the first communication device, and the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8.
一种可能的实现方式中,上述第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,包括:In a possible implementation manner, the above-mentioned second communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the first time t1. The time synchronization with the first communication device at eight time t8 includes:
第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1;The second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
第二通信设备根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2;The second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
第二通信设备根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N;第二通信设备根据时间偏差N与第一通信设备进行时间同步。The second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the second communication device performs time synchronization with the first communication device according to the time deviation N.
一种可能的实现方式中,上述第二通信设备根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,包括:第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;In a possible implementation manner, the above-mentioned second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4, including: the first deviation N1 satisfies the calculation formula: N1 =[(t2-t1)-(t4-t3)]/2;
上述第二通信设备根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,包括:第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The above-mentioned second communication device determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8, including: the first deviation N2 satisfies the calculation formula: N2=[(t6-t5)- (t8-t7)]/2;
上述第二通信设备根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N,包括:时间偏差N满足计算公式:N=(N1+N2)/2。The above-mentioned second communication device determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation, including: the time deviation N satisfies the calculation formula: N=(N1+N2)/2.
第三方面,本申请公开了一种时间同步的通信设备,包括处理器和信道媒介转换模块,处理器和信道媒介转换模块建立通信连接;In a third aspect, this application discloses a time-synchronized communication device, including a processor and a channel medium conversion module, and the processor and the channel medium conversion module establish a communication connection;
信道媒介转换模块,用于接收第一通信设备在第一光纤上发送的波长为第一波长的第一光信号,第一光信号携带第一时间戳,第一时间戳指示第一通信设备发送第一光信号的时刻为第一时刻t1,信道媒介转换模块接收到第一光信号的时刻为第二时刻t2;The channel medium conversion module is configured to receive a first optical signal with a wavelength of the first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send The time of the first optical signal is the first time t1, and the time when the channel medium conversion module receives the first optical signal is the second time t2;
信道媒介转换模块,还用于向第一通信设备在第一光纤上发送波长为第二波长的第二光信号,信道媒介转换模块发送第二光信号的时刻为第三时刻t3;The channel medium conversion module is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device, and the time when the channel medium conversion module sends the second optical signal is the third time t3;
信道媒介转换模块,还用于接收第一通信设备在第一光纤上发送的第四时间戳,第四时间戳指示第一通信设备接收到第二光信号的时刻为第四时刻t4;The channel medium conversion module is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
信道媒介转换模块,还用于接收第一通信设备在第二光纤上发送的波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示第一通信设备发送第三光信号的时刻为第五时刻t5,信道媒介转换模块接收到第三光信号的时刻为第六时刻t6;The channel medium conversion module is also used to receive a third optical signal with a second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first communication device The time when the third optical signal is sent is the fifth time t5, and the time when the channel medium conversion module receives the third optical signal is the sixth time t6;
信道媒介转换模块,还用于向第一通信设备在第二光纤上发送的波长为第一波长的第四光信号,信道媒介转换模块发送第四光信号的时刻为第七时刻t7;The channel medium conversion module is further configured to send the fourth optical signal with the first wavelength on the second optical fiber to the first communication device, and the time when the channel medium conversion module sends the fourth optical signal is the seventh time t7;
信道媒介转换模块,还用于接收第一通信设备在第二光纤上发送的第八时间戳,该第八时间戳指示第一通信设备接收到第四光信号的时刻为第八时刻t8;The channel medium conversion module is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
处理器,用于根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步。The processor is configured to communicate with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 Perform time synchronization.
一种可能的实现方式中,上述处理器根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,包括:处理器根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1;In a possible implementation manner, the above-mentioned processor is based on the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time. Time synchronization between t8 and the first communication device includes: the processor determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
处理器根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2;The processor determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
处理器根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N;处理器根据时间偏差N与第一通信设备进行时间同步。The processor determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation; the processor performs time synchronization with the first communication device according to the time deviation N.
一种可能的实现方式中,上述处理器根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,包括:第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;In a possible implementation manner, the foregoing processor determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4, including: the first deviation N1 satisfies the calculation formula: N1=[ (t2-t1)-(t4-t3)]/2;
上述处理器根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,包括:第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The foregoing processor determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8, including: the first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8 -t7)]/2;
上述处理器根据第一偏差和第二偏差确定第二通信设备相对第一通信设备的时间偏差N,包括:时间偏差N满足计算公式:N=(N1+N2)/2。The above-mentioned processor determines the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation, including: the time deviation N satisfies the calculation formula: N=(N1+N2)/2.
一种可能的实现方式中,上述处理器还用于根据时间偏差N和第一偏差N1确定第一光纤上双向时延的近似同步误差S1,近似同步误差S1为第一偏差N1与时间偏差N的差值。In a possible implementation manner, the above-mentioned processor is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the first deviation N1 and the time deviation N The difference.
一种可能的实现方式中,上述处理器还用于根据第一偏差N1和近似同步误差S1在第一光纤上与第一通信设备进行时间同步;In a possible implementation manner, the foregoing processor is further configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1;
一种可能的实现方式中,上述信道媒介转换模块还用于在第二光纤上接收波长为第二波长的第一光脉冲信号进行探测且在第二光纤上发送波长为第一波长的第二光脉冲信号进行探测。In a possible implementation manner, the above-mentioned channel medium conversion module is further configured to receive the first optical pulse signal with the second wavelength on the second optical fiber for detection, and send the second optical pulse signal with the first wavelength on the second optical fiber. Light pulse signal for detection.
一种可能的实现方式中,第二通信设备还包括打戳模块,信道媒介转换模块接收到第一光信号时,打戳模块生成第一时间戳;信道媒介转换模块发送第二光信号时,打戳模块生成第二时间戳;信道媒介转换模块接收到第三光信号时,打戳模块生成第五时间戳;信道媒介转换模块发送第四光信号时,打戳模块生成第八时间戳。In a possible implementation manner, the second communication device further includes a stamping module. When the channel medium conversion module receives the first optical signal, the stamping module generates the first time stamp; when the channel medium conversion module sends the second optical signal, The stamping module generates a second time stamp; when the channel medium conversion module receives the third optical signal, the stamping module generates a fifth time stamp; when the channel medium conversion module sends the fourth optical signal, the stamping module generates an eighth time stamp.
一种可能的实现方式中,信道媒介转换模块包括光发射与接收模块。In a possible implementation manner, the channel medium conversion module includes an optical transmitting and receiving module.
第四方面,本申请还公开了一种时间同步的通信设备,包括处理器和信道媒介转换模块,处理器和信道媒介转换模块建立通信连接;In a fourth aspect, this application also discloses a time-synchronized communication device, including a processor and a channel medium conversion module, and the processor and the channel medium conversion module establish a communication connection;
信道媒介转换模块,用于向第二通信设备在第一光纤上发送波长为第一波长的第一光信 号,第一光信号携带第一时间戳,第一时间戳指示信道媒介转换模块发送第一光信号的时刻为第一时刻t1,第二通信设备接收到第一光信号的时刻为第二时刻t2;The channel medium conversion module is used to send the first optical signal with the first wavelength on the first optical fiber to the second communication device, the first optical signal carries a first time stamp, and the first time stamp instructs the channel medium conversion module to send the first optical signal. The time of an optical signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
信道媒介转换模块,还用于接收第二通信设备在第一光纤上发送的波长为第二波长的第二光信号,第二通信设备发送第二光信号的时刻为第三时刻t3;The channel medium conversion module is further configured to receive a second optical signal with a second wavelength sent by the second communication device on the first optical fiber, and the time when the second communication device sends the second optical signal is the third time t3;
信道媒介转换模块,还用于向第二通信设备在第一光纤上发送第四时间戳,第四时间戳指示信道媒介转换模块接收到第二光信号的时刻为第四时刻t4;The channel medium conversion module is further configured to send a fourth time stamp on the first optical fiber to the second communication device, where the fourth time stamp indicates that the time when the channel medium conversion module receives the second optical signal is the fourth time t4;
信道媒介转换模块,还用于向第二通信设备在第二光纤上发送波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示信道媒介转换模块发送第三光信号的时刻为第五时刻t5,第二通信设备接收到第三光信号的时刻为第六时刻t6;The channel medium conversion module is also used to send a third optical signal with a wavelength of the second wavelength to the second communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the channel medium conversion module to send The time of the third optical signal is the fifth time t5, and the time of the second communication device receiving the third optical signal is the sixth time t6;
信道媒介转换模块,还用于接收第二通信设备在第二光纤上发送的第四光信号,第二通信设备发送第四光信号的时刻为第七时刻t7;The channel medium conversion module is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
信道媒介转换模块,还用于向第二通信设备在第二光纤上发送第八时间戳,以使得第二通信设备能够根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,第八时间戳指示信道媒介转换模块接收到第四光信号的时刻为第八时刻t8;The channel medium conversion module is also used to send an eighth time stamp on the second optical fiber to the second communication device, so that the second communication device can be based on the first time t1, the second time t2, the third time t3, and the fourth time Time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 are time synchronized with the first communication device. The eighth time stamp indicates that the time when the channel medium conversion module receives the fourth optical signal is the eighth time. Time t8;
处理器,用于与信道媒介转换模块进行通信。The processor is used to communicate with the channel medium conversion module.
第五方面,本申请公开了一种时间同步的通信设备,包括处理单元和通信单元,处理单元和通信单元建立通信连接;In a fifth aspect, this application discloses a time-synchronized communication device, including a processing unit and a communication unit, and the processing unit and the communication unit establish a communication connection;
通信单元,用于接收第一通信设备在第一光纤上发送的波长为第一波长的第一光信号,第一光信号携带第一时间戳,第一时间戳指示第一通信设备发送第一光信号的时刻为第一时刻t1,信道媒介转换模块接收到第一光信号的时刻为第二时刻t2;The communication unit is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the first communication device to send the first The time of the optical signal is the first time t1, and the time when the channel medium conversion module receives the first optical signal is the second time t2;
通信单元,还用于向第一通信设备在第一光纤上发送波长为第二波长的第二光信号,信道媒介转换模块发送第二光信号的时刻为第三时刻t3;The communication unit is further configured to send a second optical signal with a wavelength of the second wavelength to the first communication device on the first optical fiber, and the time when the channel medium conversion module sends the second optical signal is the third time t3;
通信单元,还用于接收第一通信设备在第一光纤上发送的第四时间戳,第四时间戳指示第一通信设备接收到第二光信号的时刻为第四时刻t4;The communication unit is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
通信单元,还用于接收第一通信设备在第二光纤上发送的波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示第一通信设备发送第三光信号的时刻为第五时刻t5,信道媒介转换模块接收到第三光信号的时刻为第六时刻t6;The communication unit is further configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the first communication device to send the second wavelength The time of the three optical signals is the fifth time t5, and the time when the channel medium conversion module receives the third optical signal is the sixth time t6;
通信单元,还用于向第一通信设备在第二光纤上发送的波长为第一波长的第四光信号,信道媒介转换模块发送第四光信号的时刻为第七时刻t7;The communication unit is further configured to send a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the channel medium conversion module sends the fourth optical signal is the seventh time t7;
通信单元,还用于接收第一通信设备在第二光纤上发送的第八时间戳,该第八时间戳指示第一通信设备接收到第四光信号的时刻为第八时刻t8;The communication unit is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
处理单元,用于根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步。The processing unit is configured to communicate with the first communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 Perform time synchronization.
第六方面,本申请还公开了一种时间同步的通信设备,包括处理单元和通信单元,处理单元和通信单元建立通信连接;In a sixth aspect, this application also discloses a time-synchronized communication device, including a processing unit and a communication unit, and the processing unit and the communication unit establish a communication connection;
通信单元,用于向第二通信设备在第一光纤上发送波长为第一波长的第一光信号,第一光信号携带第一时间戳,第一时间戳指示信道媒介转换模块发送第一光信号的时刻为第一时 刻t1,第二通信设备接收到第一光信号的时刻为第二时刻t2;The communication unit is configured to send a first optical signal with a wavelength of a first wavelength to the second communication device on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp instructs the channel medium conversion module to send the first light The time of the signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
通信单元,还用于接收第二通信设备在第一光纤上发送的波长为第二波长的第二光信号,第二通信设备发送第二光信号的时刻为第三时刻t3;The communication unit is further configured to receive a second optical signal with a wavelength of the second wavelength sent by the second communication device on the first optical fiber, and the time when the second communication device sends the second optical signal is the third time t3;
通信单元,还用于向第二通信设备在第一光纤上发送第四时间戳,第四时间戳指示信道媒介转换模块接收到第二光信号的时刻为第四时刻t4;The communication unit is further configured to send a fourth time stamp on the first optical fiber to the second communication device, where the fourth time stamp indicates that the time when the channel medium conversion module receives the second optical signal is the fourth time t4;
通信单元,还用于向第二通信设备在第二光纤上发送波长为第二波长的第三光信号,第三光信号携带第五时间戳,第五时间戳指示信道媒介转换模块发送第三光信号的时刻为第五时刻t5,第二通信设备接收到第三光信号的时刻为第六时刻t6;The communication unit is further configured to send a third optical signal with a wavelength of the second wavelength to the second communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp instructs the channel medium conversion module to send the third optical signal. The time of the optical signal is the fifth time t5, and the time of the second communication device receiving the third optical signal is the sixth time t6;
通信单元,还用于接收第二通信设备在第二光纤上发送的第四光信号,第二通信设备发送第四光信号的时刻为第七时刻t7;The communication unit is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
通信单元,还用于向第二通信设备在第二光纤上发送第八时间戳,以使得第二通信设备能够根据第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备进行时间同步,第八时间戳指示信道媒介转换模块接收到第四光信号的时刻为第八时刻t8;The communication unit is further configured to send an eighth time stamp on the second optical fiber to the second communication device, so that the second communication device can according to the first time t1, the second time t2, the third time t3, and the fourth time t4, The fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device, and the eighth time stamp indicates that the time when the channel medium conversion module receives the fourth optical signal is the eighth time t8 ;
处理单元,用于与通信单元进行通信。The processing unit is used to communicate with the communication unit.
第七方面,本申请公开了一种通信系统,该通信系统包括上述第三方面中所描述的任一种通信设备和上述第四方面中所描述的任一种通信设备,或该通信系统包括上述第五方面中所描述的任一种通信设备和上述第六方面中所描述的任一种通信设备。In a seventh aspect, the present application discloses a communication system. The communication system includes any communication device described in the third aspect and any communication device described in the fourth aspect, or the communication system includes Any communication device described in the above fifth aspect and any communication device described in the above sixth aspect.
一种可能的实现方式中,该通信系统还可以包括第一光纤和第二光纤。In a possible implementation manner, the communication system may further include a first optical fiber and a second optical fiber.
本申请公开的时间同步的方法、通信设备和系统,可实现通信设备之间时钟时间偏差值的较精确的估计,提高通信网络中的时间同步精度,无需色散补偿,同时支持高精度时钟同步与OTDR技术结合应用。The time synchronization method, communication equipment and system disclosed in the present application can realize a more accurate estimation of the clock time deviation value between communication equipment, improve the time synchronization accuracy in the communication network, without dispersion compensation, and support high-precision clock synchronization and OTDR technology is combined and applied.
附图说明Description of the drawings
为了更清楚地说明本申请的实施例或现有技术中的技术方案,下面将对描述背景技术和实施例时所使用的附图作简单的介绍。显而易见地,下面附图中描述的仅仅是本申请的一部分实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图和描述得到其他的附图或实施例,而本申请旨在涵盖所有这些衍生的附图或实施例。In order to explain the embodiments of the present application or the technical solutions in the prior art more clearly, the following will briefly introduce the drawings used when describing the background technology and the embodiments. Obviously, the following drawings describe only a part of the embodiments of the present application. For those of ordinary skill in the art, without creative work, other drawings or descriptions can be obtained based on these drawings and descriptions. Embodiments, and this application intends to cover all these derivative drawings or embodiments.
图1是本申请实施例提供的1588V2协议进行时间同步的原理示意图;FIG. 1 is a schematic diagram of the principle of time synchronization performed by the 1588V2 protocol provided by an embodiment of the present application;
图2a是本申请实施例公开的一种时间同步的系统;Figure 2a is a time synchronization system disclosed in an embodiment of the present application;
图2b是本申请实施例公开的一种时间同步的方法;Figure 2b is a time synchronization method disclosed in an embodiment of the present application;
图3a是本申请实施例公开的又一种时间同步的系统;Figure 3a is another time synchronization system disclosed in an embodiment of the present application;
图3b是本申请实施例公开的又一种时间同步的方法;Figure 3b is another time synchronization method disclosed in an embodiment of the present application;
图4a是本申请实施例公开的一种第二通信设备的结构示意图;Fig. 4a is a schematic structural diagram of a second communication device disclosed in an embodiment of the present application;
图4b是本申请实施例公开的另一种第二通信设备的结构示意图;4b is a schematic structural diagram of another second communication device disclosed in an embodiment of the present application;
图5a是本申请实施例公开的一种第一通信设备的结构示意图;Fig. 5a is a schematic structural diagram of a first communication device disclosed in an embodiment of the present application;
图5b是本申请实施例公开的另一种第一通信设备的结构示意图。Fig. 5b is a schematic structural diagram of another first communication device disclosed in an embodiment of the present application.
具体实施方式Detailed ways
本申请实施例提供了一种时间同步方法及通信设备和系统,用于提高时间同步的精度。以下分别进行详细说明。The embodiments of the present application provide a time synchronization method, communication equipment and system, which are used to improve the accuracy of time synchronization. Detailed descriptions are given below.
在本申请实施例中,“多个”可以理解为“至少两个”;“多项”可以理解为“至少两项”;“A与B的差值”是指A-B,即A减去B,或者,是指B-A,即B减去A。In the embodiments of the present application, "multiple" can be understood as "at least two"; "multiple" can be understood as "at least two"; "the difference between A and B" refers to AB, that is, A minus B , Or, refers to BA, that is, B minus A.
本申请实施例的技术方案还可以应用于各种通信系统,例如:全球移动通讯(Global System of Mobile communication,GSM)系统、码分多址(Code Division Multiple Access,CDMA)系统、宽带码分多址(Wideband Code Division Multiple Access,WCDMA)系统、基于正交频分复用(orthogonal frequency division multiplexing,OFDM)技术的通信系统、通用分组无线业务(General Packet Radio Service,GPRS)、长期演进(Long Term Evolution,LTE)系统、LTE频分双工(Frequency Division Duplex,FDD)系统、LTE时分双工(Time Division Duplex,TDD)、通用移动通信系统(Universal Mobile Telecommunication System,UMTS)、无线保真(Wireless Fidelity,WiFi)系统、全球互联微波接入(Worldwide Interoperability for Microwave Access,WiMAX)通信系统、无线局域网(Wireless Local Area Networks,WLAN)系统、公共陆地移动网络(Public Land Mobile Network,PLMN)网络、车到一切(Vehicle to everything,V2X)系统、第五代(5th Generation,5G)系统、未来的第六代(6th Generation,6G)系统或新无线(New Radio,NR)、光传输网络、波分网络等。The technical solutions of the embodiments of this application can also be applied to various communication systems, such as: Global System of Mobile Communication (GSM) system, Code Division Multiple Access (CDMA) system, and broadband code division multiple Address (Wideband Code Division Multiple Access, WCDMA) system, communication system based on orthogonal frequency division multiplexing (OFDM) technology, General Packet Radio Service (GPRS), Long Term Evolution (Long Term) Evolution, LTE) system, LTE Frequency Division Duplex (FDD) system, LTE Time Division Duplex (TDD), Universal Mobile Telecommunication System (UMTS), Wireless Fidelity (Wireless) Fidelity (WiFi) system, Worldwide Interoperability for Microwave Access (WiMAX) communication system, Wireless Local Area Networks (WLAN) system, Public Land Mobile Network (PLMN) network, car To everything (Vehicle to everything, V2X) system, fifth generation (5th Generation, 5G) system, future sixth generation (6th Generation, 6G) system or New Radio (NR), optical transmission network, wavelength division Network, etc.
应理解,本申请实施例的通信方法可以用于对时间同步或时延敏感的应用场景,比如自动或辅助驾驶、增强现实(Augmented Reality,AR)、虚拟现实(Virtual Reality,VR)、触觉互联网、工业控制、智能电网(smart grid)、实时游戏、过程自动化(Process automation)、工业自动化(Factory automation)等场景,本申请实施例对此不作限定。It should be understood that the communication method in the embodiments of the present application can be used in application scenarios that are sensitive to time synchronization or delay, such as automatic or assisted driving, augmented reality (AR), virtual reality (Virtual Reality, VR), and tactile Internet , Industrial control, smart grid (smart grid), real-time games, process automation (Process automation), industrial automation (Factory automation) and other scenarios, which are not limited in the embodiment of the present application.
举例来说,在工业控制场景中,控制器和执行器之间需要保持时间同步。控制器给执行器发送控制信令,指示执行器在确定的时间执行命令。若执行器与控制器对时间的认知不同,即时间不同步,会导致执行器在错误的时间执行命令,导致任务执行失败。比如,控制器告知执行器(比如一个机械臂)在3点开始匀速向左转动,角速度为w,转动时间为t=5s。但实 际上,由于执行器与控制器的时间不同步,执行器认为的3点在控制器看来是3点零1s。于是,执行器在3点零1s才开始转动,转动5s,持续到3点零6s。这个滞后的1s可能导致该执行器与另外的执行器发生冲突,影响工业控制的顺利运作。因此,工业控制中的时间同步显得尤为重要。For example, in an industrial control scenario, it is necessary to maintain time synchronization between the controller and the actuator. The controller sends control signaling to the actuator to instruct the actuator to execute the command at a certain time. If the actuator and the controller have different perceptions of time, that is, the time is not synchronized, the actuator will execute the command at the wrong time and cause the task execution to fail. For example, the controller tells the actuator (such as a mechanical arm) to start rotating to the left at a constant speed at 3 o'clock, the angular velocity is w, and the rotation time is t=5s. But in fact, because the time of the actuator and the controller are not synchronized, the 3 o'clock considered by the actuator is 3 o'clock and 1 second in the eyes of the controller. Therefore, the actuator starts to rotate at 3 o'clock and 1 s, and rotates for 5 s, and continues to 3 o'clock and 6 s. This lag of 1s may cause the actuator to conflict with other actuators and affect the smooth operation of industrial control. Therefore, time synchronization in industrial control is particularly important.
举例来说,在智能电网中,相位测量模块(比如数据传输单元(Data Terminal Unit,DTU))之间需要时间同步。DTU作为UE被部署在环网柜中,用于感知电压,电流的变化等。配电网可以利用DTU来实现配电网的差动保护。相邻的DTU之间通过周期性的交互获知各自对电流的采样值。其中每个DTU对电流的采样时间是固定且相同的(预配置的)。每个DTU比较自身和邻居DTU在同一时刻所采样的电流值。若二者的差值超过一个电流阈值时,就认为二者之间的电路发生故障,则每个DTU都会断开开关,进行电流的隔离保护。这种场景就需要相邻的DTU的时间必须是两两同步的。否则,不同步的DTU会在不同的时间去采样电流,这就会导致正常采样的电流值出现偏差。时间同步误差越大,出现的电流偏差值可能就越大。一旦超过电流阈值,就会产生虚警。在用户用电中,虚警会体现为整个小区或片区的断电,造成用户体验太差;在工业用电中,虚警会体现为厂区或车间的断电,造成不必要的经济损失。因此,智能电网中时间同步的重要性尤为凸显。For example, in a smart grid, phase measurement modules (such as Data Terminal Unit (DTU)) need time synchronization. DTU is deployed in the ring network cabinet as a UE to sense voltage and current changes. The distribution network can use DTU to realize the differential protection of the distribution network. Adjacent DTUs learn their respective sampling values of currents through periodic interaction. The sampling time of each DTU to the current is fixed and the same (pre-configured). Each DTU compares the current values sampled by itself and its neighbor DTU at the same time. If the difference between the two exceeds a current threshold, it is considered that the circuit between the two is faulty, and each DTU will open the switch to perform current isolation protection. In this scenario, the time of adjacent DTUs must be synchronized in pairs. Otherwise, the asynchronous DTU will sample the current at different times, which will cause deviations in the current value normally sampled. The greater the time synchronization error, the greater the current deviation value may appear. Once the current threshold is exceeded, a false alarm will be generated. In user power consumption, false alarms will be reflected in the power failure of the entire community or area, resulting in poor user experience; in industrial power use, false alarms will be reflected in the power failure of the factory or workshop, causing unnecessary economic losses. Therefore, the importance of time synchronization in the smart grid is particularly prominent.
为了更好的理解本申请实施例,下面先对本申请实施例使用的一种应用场景进行描述。在通信网络中要求不同的基站时间同步,且时间同步精度在要求的精度内,1588V2协议用来解决基站之间时间同步问题。请参阅图1,图1是本申请实施例提供的1588V2协议进行时间同步的原理示意图。如图1所示,接收端设备与发送端设备通过携带时间戳的消息进行交互,接收端设备根据时间戳与发送端设备进行时间同步。具体地,发送端设备在t1时刻发送同步消息,并将指示t1时刻的t1时间戳携带在同步消息中;接收端设备在t2时刻接收到同步消息,在接收端设备本地产生指示t2时刻的t2时间戳,并从同步消息中提取t1时间戳;接收端设备在t3时刻发送延迟请求消息,并在接收端设备本地产生指示t3时刻的t3时间戳;发送端设备在t4时刻接收到延迟请求消息,并在发送端设备本地产生指示t4时刻的t4时间戳;发送端设备将t4时间戳携带在延迟响应消息中,发送给接收端设备;接收端设备从延迟响应消息中提取出t4时间戳;接收端设备可以根据获得的时间戳t1、t2、t3和t4计算出接收端设备与发送端设备的时间偏差,并调整接收端设备自身的时间,达到与发送端设备的时间同步。In order to better understand the embodiments of the present application, an application scenario used in the embodiments of the present application will be described below. In the communication network, the time synchronization of different base stations is required, and the time synchronization accuracy is within the required accuracy. The 1588V2 protocol is used to solve the time synchronization problem between the base stations. Please refer to FIG. 1, which is a schematic diagram of the principle of time synchronization performed by the 1588V2 protocol provided by an embodiment of the present application. As shown in Figure 1, the receiving end device and the sending end device interact through a message carrying a timestamp, and the receiving end device performs time synchronization with the sending end device according to the timestamp. Specifically, the sending end device sends a synchronization message at time t1, and carries the t1 timestamp indicating time t1 in the synchronization message; the receiving end device receives the synchronization message at time t2, and locally generates t2 indicating time t2 on the receiving end device. Timestamp, and extract the t1 timestamp from the synchronization message; the receiving device sends a delay request message at t3, and locally generates a t3 timestamp indicating t3 on the receiving device; the sending device receives the delay request message at t4 , And locally generate a t4 timestamp indicating t4 on the sending end device; the sending end device carries the t4 timestamp in the delayed response message and sends it to the receiving end device; the receiving end device extracts the t4 timestamp from the delayed response message; The receiving end device can calculate the time deviation between the receiving end device and the sending end device according to the obtained timestamps t1, t2, t3, and t4, and adjust the time of the receiving end device itself to achieve time synchronization with the sending end device.
假设发送端设备到接收端设备的路径延迟为Delay1,接收端设备到发送端设备的路径延迟为Delay2,接收端设备和发送端设备的时间偏差为N,时间偏差的计算具体为:Assuming that the path delay from the sender device to the receiver device is Delay1, the path delay from the receiver device to the sender device is Delay2, the time offset between the receiver device and the sender device is N, and the calculation of the time offset is specifically:
Figure PCTCN2020111117-appb-000001
Figure PCTCN2020111117-appb-000001
则可得到,时间偏差N=[(t2-t1)-(t4-t3)-(Delay1-Delay2)]/2。Then it can be obtained that the time deviation N=[(t2-t1)-(t4-t3)-(Delay1-Delay2)]/2.
现有1588V2时间同步在计算时间偏差时,假设Delay1=Delay2,发送端设备到接收端设备路径延迟和接收端设备到发送端设备路径延迟相等,即收发链路延迟相等;那么此时时间偏差计算公式进一步表达为:N=[(t2-t1)-(t4-t3)]/2。When calculating the time deviation of the existing 1588V2 time synchronization, suppose Delay1=Delay2, the path delay from the sender device to the receiver device and the path delay from the receiver device to the sender device are equal, that is, the transceiver link delay is equal; then the time deviation calculation is The formula is further expressed as: N=[(t2-t1)-(t4-t3)]/2.
由于收发链路时间戳传输的物理链路、波长往往不同,收发链路延迟相等Delay1=Delay2是难以达成的。如果发送端设备到接收端设备路径延迟和接收端设备到发送端设备路径延迟不相等,即收发链路延迟不相等,Delay1≠Delay2,将会给时间偏差的大小带来同步误差,同步误差M=(Delay1-Delay2)/2。为了实现高精度的时间同步,必须消除或减小收发链路延迟不相等带来的误差。Since the physical link and wavelength of the time stamp transmission of the transceiver link are often different, it is difficult to achieve the same delay of the transceiver link Delay1=Delay2. If the path delay from the sender device to the receiver device and the path delay from the receiver device to the sender device are not equal, that is, the delay of the transceiver link is not equal, Delay1≠Delay2, will bring synchronization error to the size of the time deviation, synchronization error M =(Delay1-Delay2)/2. In order to achieve high-precision time synchronization, it is necessary to eliminate or reduce the error caused by the unequal delay of the transceiver link.
上述时间戳即为指示发送端设备或者接收端设备打戳时自身时钟所处的时刻的信息。时间戳例如是字符串或编码信息。发送端设备和接收端设备可以是需要进行时间同步的端口、模块和网络设备等。同步消息、延迟请求消息和延迟响应消息可以是以报文的形式传递。The above-mentioned time stamp is the information indicating the time at which its own clock is located when the sending end device or the receiving end device stamps. The time stamp is, for example, a character string or encoded information. The sending end device and the receiving end device may be ports, modules, network devices, etc. that need to be time synchronized. Synchronization messages, delayed request messages, and delayed response messages may be delivered in the form of messages.
1588V2报文分为两类:事件报文(EVENT Message)和通用报文(General Message)。事件报文是时间概念报文,进出设备端口时需要打上精确的时间戳,而通用报文则是非时间概念报文,进出设备不会产生时戳。事件报文包含4个:Sync,Delay_Req,Pdelay_Req和Pdelay_Resp;通用报文包含6个:Announce,Follow_Up,Delay_Resp,Pdelay_Resp_Follow_Up,Management和Signalling。1588V2 messages are divided into two categories: event messages (EVENT Message) and general messages (General Message). Event messages are time-concept messages and need to be stamped with accurate time stamps when entering and leaving the device port, while general messages are non-time concept messages, and no time stamp is generated when entering and leaving the device. Event messages include 4: Sync, Delay_Req, Pdelay_Req and Pdelay_Resp; general messages include 6: Announce, Follow_Up, Delay_Resp, Pdelay_Resp_Follow_Up, Management and Signalling.
图2a和图2b示出了本申请实施例公开的一种时间同步的系统和方法。可选地,本申请实施例中的第一通信设备和第二通信设备可以是光网络的中的波分设备、OTN设备或其它波分网络中的节点单元;本申请实施例中的第一通信设备还可以是无线接入网设备或节点(比如基站(Base Station,BS),5G移动通信系统中的基站gNB,演进型基站eNodeB,集中单元(Centralized Unit,CU),分布式单元(Distributed Unit,DU)),第二通信设备还可以是终端设备,用户设备(User Equipment,UE),D2D(Device to Device,D2D)设备,BS,gNB,eNB,CU,DU;第一通信设备可以是上述的发送端设备,第二通信设备可以是上文的接收端设备。Figures 2a and 2b show a time synchronization system and method disclosed in an embodiment of the present application. Optionally, the first communication device and the second communication device in the embodiment of the present application may be a wavelength division device in an optical network, an OTN device, or a node unit in another wavelength division network; the first communication device in the embodiment of the present application The communication device can also be a wireless access network device or node (such as a base station (Base Station, BS), a base station gNB in a 5G mobile communication system, an evolved base station eNodeB, a centralized unit (CU), and a distributed unit (Distributed Unit). Unit, DU)), the second communication device may also be a terminal device, user equipment (User Equipment, UE), D2D (Device to Device, D2D) equipment, BS, gNB, eNB, CU, DU; the first communication device may It is the above-mentioned sending-end device, and the second communication device may be the above-mentioned receiving-end device.
如图2a所示,一种时间同步的系统包括第一通信设备20和第二通信设备21,第一通信设备20和第二通信设备21之间通过单纤双向的光纤连接,第二通信设备21要调整自身的时钟,达到与第一通信设备20的时间同步。第一通信设备20发送的信号均是第一波长的信号,第二通信设备21发送的信号均是第二波长的信号,例如,第一波长信号可以是基于1588协议的波长为1490nm的光信号,第二波长信号可以是基于1588协议的波长为1510nm的光信号;或者第一波长信号还可以是波长为1506nm的光信号,第二波长信号还可以是波长为1514nm的光信号,本申请列举的光信号为常用的光信号,但不限于此。As shown in Figure 2a, a time synchronization system includes a first communication device 20 and a second communication device 21. The first communication device 20 and the second communication device 21 are connected by a single-fiber bidirectional optical fiber, and the second communication device 21 needs to adjust its own clock to achieve synchronization with the time of the first communication device 20. The signals sent by the first communication device 20 are all signals of the first wavelength, and the signals sent by the second communication device 21 are all signals of the second wavelength. For example, the first wavelength signal may be an optical signal with a wavelength of 1490 nm based on the 1588 protocol. The second wavelength signal may be an optical signal with a wavelength of 1510nm based on the 1588 protocol; or the first wavelength signal may also be an optical signal with a wavelength of 1506nm, and the second wavelength signal may also be an optical signal with a wavelength of 1514nm. This application lists The optical signal of is a commonly used optical signal, but it is not limited to this.
如图2b所示,一种时间同步的方法,包括:As shown in Figure 2b, a time synchronization method includes:
步骤S201:第一通信设备向第二通信设备发送第一光信号,同时第一通信设备在发送第一光信号时,在第一通信设备本地打第一时间戳,上述第一光信号携带该第一时间戳,该第一时间戳指示所述第一通信设备发送上述第一光信号的时刻为第一时刻t1,第二通信设备从第一时间戳中提取第一时刻t1;Step S201: The first communication device sends a first optical signal to the second communication device, and at the same time, when the first communication device sends the first optical signal, it places a first time stamp locally on the first communication device, and the first optical signal carries the first optical signal. A first time stamp, where the first time stamp indicates that the time when the first communication device sends the first optical signal is the first time t1, and the second communication device extracts the first time t1 from the first time stamp;
步骤S202:第二通信设备在接收到第一光信号时,在第二通信设备本地打第二时间戳,该第二时间戳指示所述第二通信设备接收到上述第一光信号的时刻为第二时刻t2;Step S202: When the second communication device receives the first optical signal, it puts a second time stamp locally on the second communication device, and the second time stamp indicates that the time when the second communication device receives the first optical signal is The second moment t2;
步骤S203:第二通信设备向第一通信设备发送第二光信号,同时第二通信设备在发送第二光信号时,在第二通信设备本地打第三时间戳,该第三时间戳指示所述第二通信设备发送上述第二光信号的时刻为第三时刻t3;Step S203: The second communication device sends a second optical signal to the first communication device, and at the same time, when the second communication device sends the second optical signal, a third time stamp is printed locally on the second communication device, and the third time stamp indicates The time when the second communication device sends the second optical signal is the third time t3;
步骤S204:第一通信设备在接收到第二光信号时,在第一通信设备本地打第四时间戳,该第四时间戳指示上述第一通信设备接收到第二光信号的时刻为第四时刻t4;Step S204: When the first communication device receives the second optical signal, it places a fourth time stamp locally on the first communication device, and the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time. Time t4;
步骤S205:第一通信设备向第二通信设备发送上述第四时间戳,第二通信设备从第四时间戳中提取第四时刻t4。Step S205: The first communication device sends the fourth time stamp to the second communication device, and the second communication device extracts the fourth time t4 from the fourth time stamp.
在1588V2同步协议中,延迟响应报文即为Delay_Resp报文,每次产生的Delay_Resp报文均用于携带本次产生的第四时间戳,Delay_Resp报文的originTimestamp域可以用于携带第四 时间戳。In the 1588V2 synchronization protocol, the delayed response message is the Delay_Resp message. Each Delay_Resp message generated is used to carry the fourth timestamp generated this time, and the originTimestamp field of the Delay_Resp message can be used to carry the fourth timestamp. .
步骤S206:第二通信设备依据上述的第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4与第一通信设备进行时间同步。具体地,第二通信设备依据下述计算公式确定时间偏差N:Step S206: The second communication device performs time synchronization with the first communication device according to the aforementioned first time t1, second time t2, third time t3, and fourth time t4. Specifically, the second communication device determines the time deviation N according to the following calculation formula:
N=[(t2-t1)-(t4-t3)]/2N=[(t2-t1)-(t4-t3)]/2
第二通信设备依据计算后的时间偏差与第一通信设备进行时间同步。The second communication device performs time synchronization with the first communication device according to the calculated time deviation.
本实施例提供的时间同步的方法和系统的消息传递采用单纤双向的传输配置,由于消息的传递都在同一光纤上进行,那么该时间同步的方法或系统消除或避免了由于收发链路光纤长度的差异导致的收发链路时延的误差,收发链路光纤长度的差异即指第一通信设备发送给第二通信设备的链路所在的光纤长度与第二通信设备发送给第一通信设备的链路所在的光纤长度不同。The message transmission of the time synchronization method and system provided in this embodiment adopts a single-fiber bidirectional transmission configuration. Since the message transmission is carried out on the same optical fiber, the time synchronization method or system eliminates or avoids the transmission and reception link optical fiber The difference in the length of the transceiver link causes the error of the delay of the transceiver link. The difference in the fiber length of the transceiver link refers to the length of the fiber where the link sent by the first communication device to the second communication device is and the length of the fiber sent by the second communication device to the first communication device The fiber length of the link is different.
但尽管如此,由于第一通信设备发送到第二通信设备的消息和第二通信设备发送到第一通信设备的消息各自承载的波长一般不同,那么由于光纤色散产生的差异导致同一光纤不同波长的传输时延是不同的,那么仍然会对收发链路的双向时延带来同步误差。本申请实施例所提及的收发链路指的是第一通信设备到第二通信设备的链路和第二通信设备到第一通信设备的链路。However, because the wavelengths of the messages sent by the first communication device to the second communication device and the messages sent by the second communication device to the first communication device are generally different, the difference in fiber dispersion results in different wavelengths of the same fiber. The transmission delay is different, so it will still bring synchronization error to the two-way delay of the transceiver link. The transceiver link mentioned in the embodiment of the present application refers to the link from the first communication device to the second communication device and the link from the second communication device to the first communication device.
理论上,在已知光纤实际长度、光纤色散曲线、以及收发链路上两个方向的消息传递的波长的条件下,可以根据色散时延的计算方法,对因光纤色散导致的双向时延的非对称性进行补偿,但同时需要额外输入光纤实际长度、光纤色散曲线、以及收发链路上两个方向的消息传递的波长,部署复杂度大大增加,而且存在出错风险。即使是同一光纤类型,光纤色散曲线仍存在一定的差异,而光纤实际的色散曲线目前尚没有比较好的测量方法,如果代入对应光纤类型的标准色散曲线进行补偿,则仍然无法消除色散延时差异导致的收发链路双向延迟的误差。Theoretically, under the condition that the actual length of the fiber, the fiber dispersion curve, and the wavelength of the message transmission in the two directions on the transceiver link are known, the calculation method of the dispersion delay can be used to calculate the two-way delay caused by the fiber dispersion. Asymmetry is compensated, but at the same time, the actual length of the fiber, the fiber dispersion curve, and the wavelength of the message transmission in the two directions on the transceiver link need to be input. The deployment complexity is greatly increased, and there is a risk of error. Even for the same fiber type, the fiber dispersion curve still has a certain difference, and the actual dispersion curve of the fiber has no better measurement method. If the standard dispersion curve of the corresponding fiber type is substituted for compensation, the dispersion delay difference still cannot be eliminated. The error caused by the two-way delay of the transceiver link.
假设第一通信设备到第二通信设备的路径延迟为Delay1,第二通信设备到第一通信设备的路径延迟为Delay2,根据上述实施例可知,同步误差M=(Delay1-Delay2)/2。Assuming that the path delay from the first communication device to the second communication device is Delay1, and the path delay from the second communication device to the first communication device is Delay2, according to the above embodiment, it can be known that the synchronization error M=(Delay1-Delay2)/2.
假设第一通信设备到第二通信设备的消息传递的第一波长为波长λ1、第二通信设备到第一通信设备的消息传递的第二波长为波长λ2,波长对应的折射率分别为n1、n2,光纤的长度为L,光速为c,则收发链路的双向时延的同步误差M0为:Assuming that the first wavelength of the message transfer from the first communication device to the second communication device is wavelength λ1, the second wavelength of the message transfer from the second communication device to the first communication device is wavelength λ2, and the refractive indices corresponding to the wavelengths are n1, respectively n2, the length of the optical fiber is L, and the speed of light is c, the synchronization error M0 of the two-way delay of the transceiver link is:
M0=(Delay1-Delay2)/2=L*(n1-n2)/2cM0=(Delay1-Delay2)/2=L*(n1-n2)/2c
由此可见,收发链路的双向时延的同步误差与光纤链路长度是成正相关的,光纤链路长度越长,收发链路的双向时延的同步误差越大。It can be seen that the synchronization error of the two-way delay of the transceiver link is positively correlated with the length of the optical fiber link. The longer the optical link length, the greater the synchronization error of the two-way delay of the transceiver link.
本申请的术语“第一”、“第二”等是用于区别类似的对象,而不必用于描述特定的顺序或先后次序,应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以本申请未描述的顺序实施。“和/或”,用于描述关联对象的关联关系,表示可以存在三种关系。例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。方法实施例中的具体操作方法也可以应用于装置实施例中。此外,为了更加明显地体现不同实施例中的组件的关系,本申请采用相同的附图编号来表示不同实施例中功能相同或相似的组件。The terms "first" and "second" in this application are used to distinguish similar objects, but not necessarily used to describe a specific sequence or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that The described embodiments can be implemented in a sequence not described in this application. "And/or" is used to describe the association relationship of associated objects, indicating that there can be three types of relationships. For example, A and/or B can mean that: A alone exists, A and B exist at the same time, and B exists alone. The specific operation method in the method embodiment can also be applied to the device embodiment. In addition, in order to more clearly reflect the relationship between the components in the different embodiments, the present application uses the same drawing numbers to represent components with the same or similar functions in the different embodiments.
还需要说明的是,除非特殊说明,一个实施例中针对一些技术特征的具体描述也可以应用于解释其他实施例提及对应的技术特征。It should also be noted that, unless otherwise specified, the specific description of some technical features in one embodiment can also be used to explain the corresponding technical features in other embodiments.
图3a和图3b示出了本申请实施例公开的又一种时间同步的系统和方法。一种时间同步的系统,如图3a所示,包括第一通信设备20和第二通信设备21,第一通信设备20和第二通信设备21之间通过第一光纤22和第二光纤23连接,其中,第一光纤22和第二光纤23的光纤长度尽量保持相同,实际中可允许存在一定的误差。第二通信设备21要调整自身的时钟,达到与第一通信设备20的时间同步。Figures 3a and 3b show yet another time synchronization system and method disclosed in an embodiment of the present application. A time synchronization system, as shown in Figure 3a, includes a first communication device 20 and a second communication device 21. The first communication device 20 and the second communication device 21 are connected by a first optical fiber 22 and a second optical fiber 23 Wherein, the fiber lengths of the first optical fiber 22 and the second optical fiber 23 are kept the same as far as possible, and a certain error may be allowed in practice. The second communication device 21 needs to adjust its own clock to achieve time synchronization with the first communication device 20.
第一通信设备20在第一光纤22上发送的信号均是第一波长的信号,第二通信设备21在第一光纤22上发送的信号均是第二波长的信号,例如,第一波长信号可以是基于1588协议的波长为1490nm的光信号,第二波长信号可以是基于1588协议的波长为1510nm的光信号;或者第一波长信号还可以是波长为1506nm的光信号,第二波长信号还可以是波长为1514nm的光信号。第一通信设备20在第二光纤23上发送的信号均是第二波长的信号,第二通信设备21在第二光纤23上发送的信号均是第一波长的信号。The signals sent by the first communication device 20 on the first optical fiber 22 are all signals of the first wavelength, and the signals sent by the second communication device 21 on the first optical fiber 22 are all signals of the second wavelength, for example, signals of the first wavelength. It may be an optical signal with a wavelength of 1490nm based on the 1588 protocol, and the second wavelength signal may be an optical signal with a wavelength of 1510nm based on the 1588 protocol; or the first wavelength signal may also be an optical signal with a wavelength of 1506nm, and the second wavelength signal may also It can be an optical signal with a wavelength of 1514 nm. The signals sent by the first communication device 20 on the second optical fiber 23 are all signals of the second wavelength, and the signals sent by the second communication device 21 on the second optical fiber 23 are all signals of the first wavelength.
一种时间同步的方法,如图3b所示,包括:A method of time synchronization, as shown in Figure 3b, includes:
步骤S301:第一通信设备20和第二通信设备21在第一光纤22和第二光纤23上进行消息传递;Step S301: the first communication device 20 and the second communication device 21 perform message transfer on the first optical fiber 22 and the second optical fiber 23;
其中,在第一光纤22上,第一通信设备20与第二通信设备21的消息传递过程如下:Wherein, on the first optical fiber 22, the message transfer process between the first communication device 20 and the second communication device 21 is as follows:
第一通信设备20在第一光纤22上向第二通信设备21发送波长为第一波长的第一光信号,第一通信设备20在发送上述第一光信号的同时打第一时间戳,第一光信号携带第一时间戳,该第一时间戳指示第一通信设备20发送上述第一光信号的时刻为第一时刻t1;The first communication device 20 sends a first optical signal with a wavelength of the first wavelength to the second communication device 21 on the first optical fiber 22, and the first communication device 20 sends the first optical signal while marking the first time stamp. An optical signal carries a first time stamp, and the first time stamp indicates that the time at which the first communication device 20 sends the first optical signal is the first time t1;
第二通信设备21接收到第一光信号时,打第二时间戳,该第二时间戳指示第二通信设备21接收到上述第一光信号的时刻为第二时刻t2;When the second communication device 21 receives the first optical signal, a second time stamp is printed, and the second time stamp indicates that the time when the second communication device 21 receives the first optical signal is the second time t2;
第二通信设备21向第一通信设备20在第一光纤22上发送波长为第二波长的第二光信号,第二通信设备21打第三时间戳,该第三时间戳指示第二通信设备21发送上述第二光信号的时刻为第三时刻t3;The second communication device 21 sends a second optical signal with a second wavelength on the first optical fiber 22 to the first communication device 20, and the second communication device 21 stamps a third time stamp, which indicates the second communication device 21 The time when the above-mentioned second optical signal is sent is the third time t3;
第二通信设备21接收第一通信设备20在第一光纤22上发送的第四时间戳,该第四时间戳指示第一通信设备20接收到上述第二光信号的时刻为第四时刻t4。The second communication device 21 receives the fourth time stamp sent by the first communication device 20 on the first optical fiber 22, and the fourth time stamp indicates that the time when the first communication device 20 receives the second optical signal is the fourth time t4.
在第二光纤23上,第一通信设备20与第二通信设备21的消息传递过程如下:On the second optical fiber 23, the message transfer process between the first communication device 20 and the second communication device 21 is as follows:
第二通信设备21接收第一通信设备20在第二光纤23上发送的波长为上述第二波长的第三光信号,该第三光信号携带第五时间戳,该第五时间戳指示第一通信设备20发送第三光信号的时刻为第五时刻t5,第二通信设备21接收到上述第三光信号的时刻为第六时刻t6;The second communication device 21 receives a third optical signal with a wavelength of the above-mentioned second wavelength sent by the first communication device 20 on the second optical fiber 23, and the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first The time when the communication device 20 sends the third optical signal is the fifth time t5, and the time when the second communication device 21 receives the third optical signal is the sixth time t6;
第二通信设备21向第一通信设备20在第二光纤23上发送波长为上述第一波长的第四光信号,第二通信设备21发送上述第四光信号的时刻为第七时刻t7;The second communication device 21 sends the fourth optical signal with the wavelength of the first wavelength to the first communication device 20 on the second optical fiber 23, and the time when the second communication device 21 sends the fourth optical signal is the seventh time t7;
第一通信设备20向第二通信设备21在第二光纤23上发送第八时间戳,该第八时间戳指示第一通信设备20接收到上述第四光信号的时刻为第八时刻t8。The first communication device 20 sends an eighth time stamp on the second optical fiber 23 to the second communication device 21, and the eighth time stamp indicates that the time when the first communication device 20 receives the fourth optical signal is the eighth time t8.
第一通信设备20和第二通信设备21在第一光纤22和第二光纤23上进行的消息传递过程,具体可参照图2b及相关描述,为描述简洁,在此不再赘述。For the message transfer process performed by the first communication device 20 and the second communication device 21 on the first optical fiber 22 and the second optical fiber 23, refer to FIG. 2b and related descriptions for details. For the sake of brevity, the details are not repeated here.
优先地,第一通信设备20和第二通信设备21在第一光纤22和第二光纤23上同时进行消息传递,例如,第一通信设备20在第一光纤22发送第一光信号时,同时在第二光纤23上发送第三光信号,实际中可允许存在一定范围内误差。Preferably, the first communication device 20 and the second communication device 21 perform message transmission on the first optical fiber 22 and the second optical fiber 23 at the same time. For example, the first communication device 20 transmits the first optical signal on the first optical fiber 22 at the same time. The third optical signal is sent on the second optical fiber 23, and an error within a certain range is allowed in practice.
步骤S302:第二通信设备21与第一通信设备20进行时间同步,第二通信设备21调节自身的时间达到与第一通信设备20同步;Step S302: the second communication device 21 performs time synchronization with the first communication device 20, and the second communication device 21 adjusts its own time to be synchronized with the first communication device 20;
具体地,第二通信设备21根据上述第一通信设备20与第二通信设备21在第一光纤22上消息传递中产生的第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,其中,N1的计算公式为:N1=[(t2-t1)-(t4-t3)]/2;Specifically, the second communication device 21 is based on the first time t1, the second time t2, the third time t3, and the fourth time generated during the message transmission between the first communication device 20 and the second communication device 21 on the first optical fiber 22. t4 determines the first deviation N1, where the calculation formula of N1 is: N1=[(t2-t1)-(t4-t3)]/2;
第二通信设备21根据上述第一通信设备20与第二通信设备21在第二光纤23上消息传递中产生的第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,其中,N2的计算公式为:N2=[(t6-t5)-(t8-t7)]/2;The second communication device 21 determines the first communication device 20 and the second communication device 21 at the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 during the message transmission on the second optical fiber 23 described above. Two deviations N2, where the calculation formula of N2 is: N2=[(t6-t5)-(t8-t7)]/2;
第二通信设备21根据上述第一偏差N1和上述第二偏差N2确定第二通信设备21相对所述第一通信设备20的时间偏差N,其中,N的计算公式为:N=(N1+N2)/2;The second communication device 21 determines the time deviation N of the second communication device 21 relative to the first communication device 20 according to the first deviation N1 and the second deviation N2, where the calculation formula of N is: N=(N1+N2 )/2;
第二通信设备21再根据计算得到的时间偏差N与第一通信设备20进行时间同步。The second communication device 21 performs time synchronization with the first communication device 20 according to the calculated time deviation N.
下面对上述得到的时间偏差N的精确度进行说明:The following describes the accuracy of the time deviation N obtained above:
假设上述第一波长为波长λ1、上述第二波长为波长λ2,波长对应的折射率分别为n1、n2,第一光纤22的长度为L1,第二光纤23的长度为L2,光速为c,根据上述实施例可知:Assuming that the first wavelength is wavelength λ1 and the second wavelength is wavelength λ2, the refractive indices corresponding to the wavelengths are n1 and n2, respectively, the length of the first optical fiber 22 is L1, the length of the second optical fiber 23 is L2, and the speed of light is c, According to the above embodiment, it can be seen that:
在第一光纤22上的第二通信设备21与第一通信设备20之间的收发链路双向时延的同步误差M1=L1*(n1-n2)/2c;The synchronization error of the two-way delay of the transceiver link between the second communication device 21 and the first communication device 20 on the first optical fiber 22 is M1=L1*(n1-n2)/2c;
在第二光纤23上第二通信设备21与第二通信设备21与第一通信设备20之间的收发链路双向时延的同步误差M2=L2*(n2-n1)/2cThe synchronization error of the two-way delay of the transceiver link between the second communication device 21 and the second communication device 21 and the first communication device 20 on the second optical fiber 23 is M2=L2*(n2-n1)/2c
假设第二通信设备21与第一通信设备20的真实时间偏差为N0,则Assuming that the real time deviation between the second communication device 21 and the first communication device 20 is N0, then
N1=N0-M1,N2=N0-M2,那么N=(N1+N2)/2=N0-(M1+M2)/2;N1=N0-M1, N2=N0-M2, then N=(N1+N2)/2=N0-(M1+M2)/2;
此时在上述N=(N1+N2)/2计算方法下的相对于真实时间偏差N0的同步误差M为:At this time, the synchronization error M relative to the real time deviation N0 under the above-mentioned N=(N1+N2)/2 calculation method is:
M=(M1+M2)/2=(L1-L2)*(n1-n2)/4cM=(M1+M2)/2=(L1-L2)*(n1-n2)/4c
根据图2b的相关描述,图2a所示的时间同步的系统的同步误差M0=(Delay1-Delay2)/2=L*(n1-n2)/2c;According to the related description of Fig. 2b, the synchronization error of the time synchronization system shown in Fig. 2a is M0=(Delay1-Delay2)/2=L*(n1-n2)/2c;
则M与M0的比值:M/M0=(L1-L2)/2L;Then the ratio of M to M0: M/M0=(L1-L2)/2L;
由此可见,当(L1-L2)远小于2*L时,即光纤1、光纤2的长度差值远小于单根光纤长度的两倍时,M/M0趋近于0;根据上述第一光纤22和第二光纤23的光纤长度尽量保持相同,实际中可允许存在一定的误差,即(L1-L2)远小于2*L,也就是说基于图3a和图3b实施例计算得到的第二通信设备与第一通信设备之间的时间偏差值对应的同步误差远小于图2a和图2b中的时间同步系统的同步误差,因此时间偏差N无限逼近于真实时间偏差N0。因此本实施例提供的时间同步方法和系统可以不需要进行光纤色散延时差补偿,无需额外输入光纤长度、光纤色散曲线,就可以实现高精度时间同步。It can be seen that when (L1-L2) is much smaller than 2*L, that is, when the length difference between fiber 1 and fiber 2 is much less than twice the length of a single fiber, M/M0 approaches 0; The fiber lengths of the optical fiber 22 and the second optical fiber 23 should be kept the same as far as possible. In practice, a certain error is allowed, that is, (L1-L2) is much smaller than 2*L, that is to say, the first calculated based on the embodiment of Figure 3a and Figure 3b The synchronization error corresponding to the time deviation value between the second communication device and the first communication device is much smaller than the synchronization error of the time synchronization system in FIGS. 2a and 2b, so the time deviation N is infinitely close to the real time deviation N0. Therefore, the time synchronization method and system provided in this embodiment can achieve high-precision time synchronization without the need to perform fiber dispersion delay difference compensation, and without additional input of fiber length and fiber dispersion curve.
步骤S303-步骤306为可选步骤,为上述方案的可能的扩展实施。Step S303-Step 306 are optional steps, which are possible extended implementations of the above solution.
步骤S303:第二通信设备21确定第一通信设备20和第二通信设备21之间在第一光纤22上的双向时延的近似同步误差;Step S303: The second communication device 21 determines the approximate synchronization error of the two-way time delay between the first communication device 20 and the second communication device 21 on the first optical fiber 22;
第二通信设备21根据上述时间偏差N和上述第一偏差N1确定第一通信设备20和第二通信设备21之间在第一光纤22上的双向时延的近似同步误差S1,该近似同步误差S1为上述第一偏差N1与上述时间偏差N的差值,即S1=N1-N。The second communication device 21 determines the approximate synchronization error S1 of the two-way time delay between the first communication device 20 and the second communication device 21 on the first optical fiber 22 according to the above-mentioned time deviation N and the above-mentioned first deviation N1, the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N, that is, S1=N1-N.
根据上述步骤,时间偏差N无限逼近于真实时间偏差N0,所以,这里取(N1-N)的值作为近似同步误差S1,用近似同步误差S1进行时钟补偿,下面对近似同步误差S2的取法类似。According to the above steps, the time deviation N is infinitely close to the real time deviation N0, so here, the value of (N1-N) is taken as the approximate synchronization error S1, and the approximate synchronization error S1 is used for clock compensation. The following is the approximate synchronization error S2 similar.
步骤S304:第二通信设备21在第一光纤22上进行时间同步,在第二光纤23上进行脉冲测试;Step S304: the second communication device 21 performs time synchronization on the first optical fiber 22, and performs a pulse test on the second optical fiber 23;
第二通信设备21根据第一偏差N1和近似同步误差S1在第一光纤22上与第一通信设备20进行时间同步,第二通信设备将上述计算得到的近似同步误差S1进一步补偿到第一光纤22上第二通信设备21与第一通信设备20的时间同步,此时只通过第一光纤22上消息传递即可实现时间同步;The second communication device 21 performs time synchronization with the first communication device 20 on the first optical fiber 22 according to the first deviation N1 and the approximate synchronization error S1, and the second communication device further compensates the approximate synchronization error S1 calculated above to the first optical fiber. The time of the second communication device 21 on 22 is synchronized with the time of the first communication device 20. At this time, time synchronization can be achieved only through message transmission on the first optical fiber 22;
第一通信设备20第二光纤23上向第二通信设备21发送波长为上述第二波长的第一光脉冲信号进行探测,第二通信设备21在第二光纤上向第一通信设备20发送波长为上述第一波长的第二光脉冲信号进行探测。The first communication device 20 sends the first optical pulse signal with the above-mentioned second wavelength on the second optical fiber 23 to the second communication device 21 for detection, and the second communication device 21 sends the wavelength to the first communication device 20 on the second optical fiber. Detect the second optical pulse signal of the first wavelength mentioned above.
步骤S305:第二通信设备21确定第一通信设备20和第二通信设备21之间在第二光纤23上的双向时延的同步误差;Step S305: The second communication device 21 determines the synchronization error of the two-way time delay between the first communication device 20 and the second communication device 21 on the second optical fiber 23;
第二通信设备21根据上述时间偏差N和第二偏差N2确定第一通信设备20和第二通信设备21之间在第二光纤23上双向时延的近似同步误差S2,该近似同步误差S2为上述第二偏差N2与时间偏差N的差值,即S2=N2-N。The second communication device 21 determines the approximate synchronization error S2 of the two-way time delay between the first communication device 20 and the second communication device 21 on the second optical fiber 23 according to the above-mentioned time deviation N and the second deviation N2, and the approximate synchronization error S2 is The difference between the second deviation N2 and the time deviation N is S2=N2-N.
步骤S306:第二通信设备在第二光纤上进行时间同步,在第一光纤上进行脉冲测试;Step S306: the second communication device performs time synchronization on the second optical fiber, and performs a pulse test on the first optical fiber;
第二通信设备21根据上述第二偏差N2和上述近似同步误差S2在第二光纤23上与第一通信设备20进行时间同步,第二通信设备将上述计算得到的近似同步误差S2进一步补偿到第二光纤23上第二通信设备21与第一通信设备20的时间同步,此时只通过第二光纤23上消息传递即可实现时间同步;The second communication device 21 performs time synchronization with the first communication device 20 on the second optical fiber 23 according to the second deviation N2 and the approximate synchronization error S2. The second communication device further compensates the approximate synchronization error S2 obtained by the calculation to the first communication device 20. The time of the second communication device 21 and the first communication device 20 on the second optical fiber 23 is synchronized. At this time, time synchronization can be realized only through message transmission on the second optical fiber 23;
第一通信设备20第一光纤22上向第二通信设备21发送波长为上述第一波长的第三光脉冲信号进行探测,第二通信设备21在第一光纤22上向第一通信设备20发送波长为上述第二波长的第四光脉冲信号进行探测。The first communication device 20 sends a third optical pulse signal with a wavelength of the above-mentioned first wavelength to the second communication device 21 on the first optical fiber 22 for detection, and the second communication device 21 sends to the first communication device 20 on the first optical fiber 22 The fourth optical pulse signal whose wavelength is the above-mentioned second wavelength is detected.
上述光脉冲信号可以为OTDR(Optical Time Domain Reflectometer,光时域反射仪)脉冲信号或OFDR(Optical Frequency Domain Reflectometer,光频域反射仪)脉冲信号。The foregoing optical pulse signal may be an OTDR (Optical Time Domain Reflectometer, Optical Time Domain Reflectometer) pulse signal or an OFDR (Optical Frequency Domain Reflectometer, Optical Frequency Domain Reflectometer) pulse signal.
本实施例中,步骤303-步骤306是采用先在第二光纤23上进行脉冲测试,再在第一光纤22上进行脉冲测试,也可以先在第一光纤22上进行脉冲测试,再在第二光纤23上进行脉冲测试,即先执行步骤305-步骤306,再执行步骤303-步骤304。In this embodiment, step 303-step 306 is to first perform a pulse test on the second optical fiber 23, and then perform a pulse test on the first optical fiber 22, or perform a pulse test on the first optical fiber 22 first, and then perform a pulse test on the first optical fiber 22. The pulse test is performed on the second optical fiber 23, that is, step 305 to step 306 are performed first, and then step 303 to step 304 are performed.
本实施例公开的时间同步的方法和系统实现通信设备之间时钟时间偏差值的精确估计,提高通信网络中的时间同步精度,无需色散补偿,同时支持高精度时钟同步与OTDR技术结合应用。The time synchronization method and system disclosed in this embodiment implements accurate estimation of clock time deviation values between communication devices, improves time synchronization accuracy in communication networks, does not require dispersion compensation, and supports the combined application of high-precision clock synchronization and OTDR technology.
基于上述实施例的方法,请参阅图4a,图4a是本申请实施例公开的一种第二通信设备21的结构示意图。如图4a所示,第二通信设备21包括通信单元401和处理单元402,其中:For the method based on the foregoing embodiment, please refer to FIG. 4a. FIG. 4a is a schematic structural diagram of a second communication device 21 disclosed in an embodiment of the present application. As shown in Fig. 4a, the second communication device 21 includes a communication unit 401 and a processing unit 402, wherein:
通信单元401,用于接收第一通信设备20在第一光纤上发送的波长为第一波长的第一光信号,该第一光信号携带第一时间戳,该第一时间戳指示上述第一通信设备发送上述第一光信号的时刻为第一时刻t1,通信单元401接收到第一光信号的时刻为第二时刻t2;The communication unit 401 is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device 20 on a first optical fiber, the first optical signal carries a first time stamp, and the first time stamp indicates the first The time when the communication device sends the first optical signal is the first time t1, and the time when the communication unit 401 receives the first optical signal is the second time t2;
通信单元401,还用于向第一通信设备在第一光纤上发送波长为第二波长第二光信号,通信单元401发送上述第二光信号的时刻为第三时刻t3;The communication unit 401 is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device, and the time when the communication unit 401 sends the second optical signal is the third time t3;
通信单元401,还用于接收第一通信设备在第一光纤上发送的第四时间戳,该第四时间戳指示上述第一通信设备接收到上述第二光信号的时刻为第四时刻t4;The communication unit 401 is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is the fourth time t4;
通信单元401,还用于接收上述第一通信设备在第二光纤上发送的波长为上述第二波长的第三光信号,第三光信号携带第五时间戳,该第五时间戳指示上述第一通信设备发送第三光 信号的时刻为第五时刻t5,通信单元401接收到所述第三光信号的时刻为第六时刻t6;The communication unit 401 is further configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the first optical signal. The time when a communication device sends the third optical signal is the fifth time t5, and the time when the communication unit 401 receives the third optical signal is the sixth time t6;
通信单元401,还用于向上述第一通信设备在第二光纤上发送的波长为上述第一波长的第四光信号,通信单元401发送该第四光信号的时刻为第七时刻t7;The communication unit 401 is further configured to send a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the communication unit 401 sends the fourth optical signal is the seventh time t7;
通信单元401,还用于接收上述第一通信设备在第二光纤上发送的第八时间戳,该第八时间戳指示第一通信设备接收到上述第四光信号的时刻为第八时刻t8;The communication unit 401 is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, where the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
处理单元402,用于根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与上述第一通信设备进行时间同步。The processing unit 402 is configured to compare the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8. A communication device performs time synchronization.
具体地,处理单元402根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与上述第一通信设备进行时间同步,包括:Specifically, the processing unit 402 compares the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8. A communication device performs time synchronization, including:
处理单元402根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;The processing unit 402 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4. The first deviation N1 satisfies the calculation formula: N1=[(t2-t1)-(t4-t3 )]/2;
处理单元402根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The processing unit 402 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8. The first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8-t7 )]/2;
处理单元402根据第一偏差和第二偏差确定第二通信设备21相对第一通信设备20的时间偏差N,时间偏差N满足计算公式:N=(N1+N2)/2;The processing unit 402 determines the time deviation N of the second communication device 21 relative to the first communication device 20 according to the first deviation and the second deviation, and the time deviation N satisfies the calculation formula: N=(N1+N2)/2;
处理单元402根据时间偏差N与第一通信设备20进行时间同步。The processing unit 402 performs time synchronization with the first communication device 20 according to the time deviation N.
可选地,处理单元402还用于根据时间偏差N和第一偏差N1确定第一光纤上双向时延的近似同步误差S1,该近似同步误差S1为第一偏差N1与时间偏差N的差值。Optionally, the processing unit 402 is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N .
进一步地,处理单元402还用于根据第一偏差N1和近似同步误差S1在第一光纤上与第一通信设备进行时间同步;通信单元401还用于在第二光纤上接收波长为上述第二波长的第一光脉冲信号进行探测且在第二光纤上发送波长为上述第一波长的第二光脉冲信号进行探测。Further, the processing unit 402 is also configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; the communication unit 401 is also configured to receive the second optical fiber with a wavelength of the above-mentioned second optical fiber. The first optical pulse signal with the wavelength is detected, and the second optical pulse signal with the wavelength of the first wavelength is sent on the second optical fiber for detection.
可选地,处理单元402还用于根据时间偏差N和第二偏差N2确定第二光纤上双向时延的近似同步误差S2,该近似同步误差S2为第一偏差N2与时间偏差N的差值。Optionally, the processing unit 402 is further configured to determine the approximate synchronization error S2 of the two-way delay on the second optical fiber according to the time deviation N and the second deviation N2, where the approximate synchronization error S2 is the difference between the first deviation N2 and the time deviation N .
进一步地,处理单元402还用于根据第二偏差N2和近似同步误差S2在第二光纤上与第一通信设备进行时间同步;通信单元401还用于在第一光纤上接收波长为上述第一波长的第三光脉冲信号进行探测且在第一光纤上发送波长为上述第二波长的第四光脉冲信号进行探测。Further, the processing unit 402 is further configured to perform time synchronization with the first communication device on the second optical fiber according to the second deviation N2 and the approximate synchronization error S2; the communication unit 401 is also configured to receive the first optical fiber with a wavelength of the above-mentioned first optical fiber. The third optical pulse signal with the wavelength is detected, and the fourth optical pulse signal with the wavelength of the second wavelength is sent on the first optical fiber for detection.
作为一种可能的实现方式,通信单元401接收到上述第一光信号时,第二通信设备21中的打戳模块生成第一时间戳;通信单元401发送上述第二光信号时,第二通信设备21中的打戳模块生成第二时间戳;同理,第六时间戳和第七时间戳也均由上述打戳模块生成。As a possible implementation, when the communication unit 401 receives the above-mentioned first optical signal, the stamping module in the second communication device 21 generates the first time stamp; when the communication unit 401 sends the above-mentioned second optical signal, the second communication The stamping module in the device 21 generates the second time stamp; in the same way, the sixth time stamp and the seventh time stamp are also generated by the above stamping module.
作为一种可能的实现方式,第二通信设备21中的打戳模块生成第二时间戳、第三时间戳、第六时间戳、第六时间戳或第七时间戳后,将第二时间戳、第三时间戳、第六时间戳、第六时间戳或第七时间戳发送给第二通信设备21中的处理器,某一时间戳指示该时间戳对应的时刻,例如第一时间戳指示上述第一时刻,处理器可以将第二时间戳、第三时间戳、第六时间戳或第七时间戳保存在第二通信设备21的存储器中。As a possible implementation manner, after the stamping module in the second communication device 21 generates the second, third, sixth, sixth, or seventh time stamps, the second time stamp is , The third time stamp, the sixth time stamp, the sixth time stamp, or the seventh time stamp are sent to the processor in the second communication device 21, and a certain time stamp indicates the time corresponding to the time stamp, for example, the first time stamp indicates At the aforementioned first time, the processor may store the second time stamp, the third time stamp, the sixth time stamp, or the seventh time stamp in the memory of the second communication device 21.
其中,处理单元402可以用于实现上述第二通信设备21中的处理器和打戳模块的功能。The processing unit 402 may be used to implement the functions of the processor and the stamping module in the second communication device 21 described above.
特别的,通信单元401可以包括至少两个子单元,例如包括第一通信单元和第二通信单元,其中第一通信单元用于处理上述第一光纤上的通信,第二通信单元用于上述第二光纤上的通信。In particular, the communication unit 401 may include at least two sub-units, for example, a first communication unit and a second communication unit. The first communication unit is used to process communications on the first optical fiber, and the second communication unit is used for the second communication. Communication on optical fiber.
需要说明的是,各个单元的实现还可以对应参照图3b所示的时间同步方法实施例的相应描述。It should be noted that the implementation of each unit may also correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
基于上述实施例的方法,请参阅图4b,图4b是本申请实施例公开的另一种第二通信设备21的结构示意图。如图4b所示,该第二通信设备21可以包括处理器411和信道媒介转换模块413,其中:处理器411和信道媒介转换模块413建立通信连接,其中,For the method based on the foregoing embodiment, please refer to FIG. 4b. FIG. 4b is a schematic structural diagram of another second communication device 21 disclosed in an embodiment of the present application. As shown in FIG. 4b, the second communication device 21 may include a processor 411 and a channel medium conversion module 413, where the processor 411 and the channel medium conversion module 413 establish a communication connection, where:
信道媒介转换模块413,用于接收第一通信设备20在第一光纤上发送的波长为第一波长的第一光信号,该第一光信号携带第一时间戳,该第一时间戳指示上述第一通信设备20发送上述第一光信号的时刻为第一时刻t1,信道媒介转换模块413接收到第一光信号的时刻为第二时刻t2;The channel medium conversion module 413 is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device 20 on the first optical fiber, the first optical signal carries a first time stamp, and the first time stamp indicates the foregoing The time when the first communication device 20 sends the first optical signal is the first time t1, and the time when the channel medium conversion module 413 receives the first optical signal is the second time t2;
信道媒介转换模块413,还用于向第一通信设备20在第一光纤上发送波长为第二波长的第二光信号,信道媒介转换模块413发送上述第二光信号的时刻为第三时刻t3;The channel medium conversion module 413 is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device 20, and the time when the channel medium conversion module 413 sends the second optical signal is the third time t3 ;
信道媒介转换模块413,还用于接收第一通信设备20在第一光纤上发送的第四时间戳,该第四时间戳指示第一通信设备20接收到上述第二光信号的时刻为第四时刻t4;The channel medium conversion module 413 is further configured to receive a fourth time stamp sent by the first communication device 20 on the first optical fiber, and the fourth time stamp indicates that the time when the first communication device 20 receives the second optical signal is the fourth Time t4;
信道媒介转换模块413,用于接收上述第一通信设备20在第二光纤上发送的波长为上述第二波长的第三光信号,第三光信号携带第五时间戳,该第五时间戳指示上述第一通信设备发送第三光信号的时刻为第五时刻t5,信道媒介转换模块413接收到所述第三光信号的时刻为第六时刻t6;The channel medium conversion module 413 is configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device 20 on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates The time when the first communication device sends the third optical signal is the fifth time t5, and the time when the channel medium conversion module 413 receives the third optical signal is the sixth time t6;
信道媒介转换模块413,还用于向上述第一通信设备在第二光纤上发送的波长为上述第一波长的第四光信号,信道媒介转换模块413发送该第四光信号的时刻为第七时刻t7;The channel medium conversion module 413 is further configured to send the fourth optical signal with the wavelength of the first wavelength to the first communication device on the second optical fiber, and the time when the channel medium conversion module 413 sends the fourth optical signal is the seventh Time t7;
信道媒介转换模块413,还用于接收上述第一通信设备20在第二光纤上发送的第八时间戳,该第八时间戳指示第一通信设备接收到上述第四光信号的时刻为第八时刻t8;The channel medium conversion module 413 is further configured to receive the eighth time stamp sent by the first communication device 20 on the second optical fiber, and the eighth time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time. Time t8;
处理器411,用于根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与上述第一通信设备20进行时间同步。The processor 411 is configured to compare the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, A communication device 20 performs time synchronization.
具体地,处理器411根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与上述第一通信设备进行时间同步,包括:Specifically, the processor 411 compares the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8 with the aforementioned first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, seventh time t7, and eighth time t8. A communication device performs time synchronization, including:
处理单元402根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;The processing unit 402 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4. The first deviation N1 satisfies the calculation formula: N1=[(t2-t1)-(t4-t3 )]/2;
处理器411根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The processor 411 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8. The first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8-t7 )]/2;
处理器411根据第一偏差和第二偏差确定第二通信设备21相对第一通信设备20的时间偏差N,时间偏差N满足计算公式:N=(N1+N2)/2;The processor 411 determines the time deviation N of the second communication device 21 relative to the first communication device 20 according to the first deviation and the second deviation, and the time deviation N satisfies the calculation formula: N=(N1+N2)/2;
处理器411根据时间偏差N与第一通信设备20进行时间同步。The processor 411 performs time synchronization with the first communication device 20 according to the time deviation N.
可选地,处理器411还用于根据时间偏差N和第一偏差N1确定第一光纤上双向时延的近似同步误差S1,该近似同步误差S1为第一偏差N1与时间偏差N的差值。Optionally, the processor 411 is further configured to determine an approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N .
进一步地,处理器411还用于根据第一偏差N1和近似同步误差S1在第一光纤上与第一通信设备进行时间同步;信道媒介转换模块413还用于在第二光纤上接收波长为上述第二波长的第一光脉冲信号进行探测且在第二光纤上发送波长为上述第一波长的第二光脉冲信号进行探测。Further, the processor 411 is further configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; the channel medium conversion module 413 is also configured to receive the wavelength on the second optical fiber as described above The first optical pulse signal with the second wavelength is detected, and the second optical pulse signal with the wavelength of the first wavelength is sent on the second optical fiber for detection.
作为一种可能的实现方式,第二通信设备21还包括打戳模块412,信道媒介转换模块413接收到上述第一光信号时,打戳模块412生成第一时间戳;信道媒介转换模块413发送所述第二光信号时,打戳模块412生成第二时间戳;信道媒介转换模块413接收到上述第三光信号时,打戳模块412生成第五时间戳;信道媒介转换模块413发送上述第四光信号时,打戳模块412生成第八时间戳。打戳模块412将第二时间戳、第三时间戳、第六时间戳和第七时间戳发送给 处理器411,处理器411可以将第二时间戳、第三时间戳、第六时间戳或第七时间戳保存在第二通信设备21的存储器中。As a possible implementation, the second communication device 21 further includes a stamping module 412. When the channel medium conversion module 413 receives the first optical signal, the stamping module 412 generates a first time stamp; the channel medium conversion module 413 sends When the second optical signal is used, the stamping module 412 generates a second time stamp; when the channel medium conversion module 413 receives the third optical signal, the stamping module 412 generates a fifth time stamp; the channel medium conversion module 413 sends the first In the case of four optical signals, the stamping module 412 generates an eighth time stamp. The stamping module 412 sends the second, third, sixth, and seventh timestamps to the processor 411, and the processor 411 may send the second, third, sixth, or The seventh time stamp is stored in the memory of the second communication device 21.
可选地,信道媒介转换模块413包括光纤收发器或光模块;信道媒介转换模块413可以包括两个光纤收发器,或者两个光模块,或者一个光纤收发器、一个光模块,其中一个光纤收发器或光模块用于处理上述第一光纤上的通信,另外一个光纤收发器或光模块用于处理上述第二光纤上的通信。Optionally, the channel media conversion module 413 includes a fiber optic transceiver or an optical module; the channel media conversion module 413 may include two fiber optic transceivers, or two optical modules, or one fiber transceiver and one optical module, one of which is a fiber transceiver. The optical transceiver or optical module is used to process the communication on the above-mentioned first optical fiber, and the other optical transceiver or optical module is used to process the communication on the above-mentioned second optical fiber.
可选地,信道媒介转换模块413可以是光发射与接收模块,用于发送或者接收光信号或光脉冲信号。信道媒介转换模块413还可以包含接收器和发送器,接收器和发送器可以集成在一个芯片上。Optionally, the channel medium conversion module 413 may be an optical transmitting and receiving module for sending or receiving optical signals or optical pulse signals. The channel medium conversion module 413 may also include a receiver and a transmitter, and the receiver and the transmitter may be integrated on a chip.
可选地,打戳模块412也可以包括两个子模块,其中一个打戳子模块用于处理上述第一光纤上的通信,另外一个打戳子模块用于处理上述第二光纤上的通信。Optionally, the stamping module 412 may also include two sub-modules. One of the stamping sub-modules is used to process the communication on the above-mentioned first optical fiber, and the other stamping sub-module is used to process the communication on the above-mentioned second optical fiber.
打戳模块412例如可以通过现场可编程门阵列实现。The stamping module 412 may be implemented by a field programmable gate array, for example.
其中,各个模块的实现可以对应参照图3b所示的时间同步方法实施例的相应描述。Among them, the implementation of each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
本申请实施例所涉及的处理器可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合。处理器还可以是硬件芯片,可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。The processor involved in the embodiment of the present application may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and an NP. The processor may also be a hardware chip, which may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.
基于上述实施例的方法,请参阅图5a,图5a是本申请实施例公开的一种第一通信设备20的结构示意图。如图5a所示,第一通信设备20包括通信单元501和处理单元502,其中:For the method based on the foregoing embodiment, please refer to FIG. 5a. FIG. 5a is a schematic structural diagram of a first communication device 20 disclosed in an embodiment of the present application. As shown in Fig. 5a, the first communication device 20 includes a communication unit 501 and a processing unit 502, wherein:
通信单元501,用于向第二通信设备21在第一光纤上发送波长为第一波长的第一光信号,第一光信号携带第一时间戳,该第一时间戳指示通信单元501发送第一光信号的时刻为第一时刻t1,第二通信设备21接收到上述第一光信号的时刻为第二时刻t2;The communication unit 501 is configured to send a first optical signal with a first wavelength on the first optical fiber to the second communication device 21, the first optical signal carries a first time stamp, and the first time stamp instructs the communication unit 501 to send the first optical signal The time of an optical signal is the first time t1, and the time when the second communication device 21 receives the first optical signal is the second time t2;
通信单元501,还用于接收第二通信设备21在上述第一光纤上发送的波长为第二波长的第二光信号,第二通信设备21发送第二光信号的时刻为第三时刻t3;The communication unit 501 is further configured to receive a second optical signal with a second wavelength sent by the second communication device 21 on the above-mentioned first optical fiber, and the time when the second communication device 21 sends the second optical signal is the third time t3;
通信单元501,还用于向第二通信设备21在第一光纤上发送第四时间戳,所述第四时间戳指示通信单元501接收到第二光信号的时刻为第四时刻t4;The communication unit 501 is further configured to send a fourth time stamp on the first optical fiber to the second communication device 21, where the fourth time stamp indicates that the time when the communication unit 501 receives the second optical signal is the fourth time t4;
通信单元501,还用于向第二通信设备21在第二光纤上发送波长为所述第二波长的第三光信号,第三光信号携带第五时间戳,该第五时间戳指示通信单元501发送第三光信号的时刻为第五时刻t5,第二通信设备接收到第三光信号的时刻为第六时刻t6;The communication unit 501 is further configured to send a third optical signal with a wavelength of the second wavelength on the second optical fiber to the second communication device 21, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates the communication unit 501 The time when the third optical signal is sent is the fifth time t5, and the time when the second communication device receives the third optical signal is the sixth time t6;
通信单元501,还用于接收第二通信设备在上述第二光纤上发送的第四光信号,第二通信设备发送上述第四光信号的时刻为第七时刻t7;The communication unit 501 is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
通信单元501,还用于向上述第二通信设备21在上述第二光纤上发送第八时间戳,以使得第二通信设备21能够根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备20进行时间同步,第八时间戳指示第一通信设备20接收到上述第四光信号的时刻为第八时刻t8;The communication unit 501 is further configured to send an eighth time stamp on the second optical fiber to the second communication device 21, so that the second communication device 21 can be based on the first time t1, the second time t2, and the third time t3. , The fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device 20, and the eighth time stamp indicates that the first communication device 20 receives the fourth The time of the optical signal is the eighth time t8;
处理单元502,用于与通信单元501进行通信。The processing unit 502 is configured to communicate with the communication unit 501.
具体地,第二通信设备21根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与上述第一通信设备进行时间同步,包括:Specifically, the second communication device 21 compares the relationship between the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 according to the foregoing first time t1, second time t2, third time t3, fourth time t4, fifth time t5, sixth time t6, and The above-mentioned first communication device performing time synchronization includes:
第二通信设备21根据第一时刻t1、第二时刻t2、第三时刻t3和第四时刻t4确定第一偏差N1,第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;The second communication device 21 determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4. The first deviation N1 satisfies the calculation formula: N1=[(t2-t1)-(t4 -t3)]/2;
第二通信设备21根据第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8确定第二偏差N2,第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The second communication device 21 determines the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8. The first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8 -t7)]/2;
第二通信设备21根据第一偏差N1和第二偏差N2确定第二通信设备21相对所述第一通信设备20的时间偏差N,时间偏差N满足计算公式:N=(N1+N2)/2;The second communication device 21 determines the time deviation N of the second communication device 21 relative to the first communication device 20 according to the first deviation N1 and the second deviation N2, and the time deviation N satisfies the calculation formula: N=(N1+N2)/2 ;
第二通信设备21根据时间偏差N与第一通信设备20进行时间同步。The second communication device 21 performs time synchronization with the first communication device 20 according to the time deviation N.
可选地,第二通信设备21还用于根据时间偏差N和第一偏差N1确定第一光纤上双向时延的近似同步误差S1,该近似同步误差S1为第一偏差N1与时间偏差N的差值。Optionally, the second communication device 21 is further configured to determine the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, and the approximate synchronization error S1 is the difference between the first deviation N1 and the time deviation N Difference.
进一步地,第二通信设备21还用于根据第一偏差N1和近似同步误差S1在第一光纤上与第一通信设备进行时间同步;通信单元501还用于在第二光纤上发送波长为上述第二波长的第一光脉冲信号进行探测且在第二光纤上接收波长为上述第一波长的第二光脉冲信号进行探测。Further, the second communication device 21 is also used to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1; the communication unit 501 is also used to transmit on the second optical fiber with a wavelength of the above The first optical pulse signal with the second wavelength is detected and the second optical pulse signal with the wavelength of the first wavelength is received on the second optical fiber for detection.
作为一种可能的实现方式,通信单元501发送上述第一光信号时,第一通信设备20中的打戳模块生成第一时间戳,通信单元501接收到上述第二光信号时,第一通信设备20中的打戳模块生成第四时间戳;同理,第五时间戳和第八时间戳也均由第一通信设备20中的打戳模块生成。上述打戳模块将第一时间戳、第四时间戳、第五时间戳或第八时间戳发送给第一通信设备20中的处理器,处理器可以将第一时间戳、第四时间戳、第五时间戳或第八时间戳保存在第一通信设备20的存储器中。As a possible implementation, when the communication unit 501 sends the above-mentioned first optical signal, the stamping module in the first communication device 20 generates a first time stamp, and when the communication unit 501 receives the above-mentioned second optical signal, the first communication The stamping module in the device 20 generates the fourth time stamp; in the same way, the fifth and eighth time stamps are also generated by the stamping module in the first communication device 20. The above-mentioned stamping module sends the first time stamp, the fourth time stamp, the fifth time stamp or the eighth time stamp to the processor in the first communication device 20, and the processor can send the first time stamp, the fourth time stamp, the The fifth time stamp or the eighth time stamp is stored in the memory of the first communication device 20.
作为一种可能的实现方式,通信单元501向第二通信设备21发送第一时间戳,包括:As a possible implementation manner, the communication unit 501 sends the first time stamp to the second communication device 21, including:
处理单元502在接收到打戳模块发送的第一时间戳后,经第一通信设备20中的信道媒介转换模块向第二通信设备21发送同步消息,同步消息携带第一时间戳,该同步消息可以是上述第一光信号。After receiving the first time stamp sent by the stamping module, the processing unit 502 sends a synchronization message to the second communication device 21 via the channel medium conversion module in the first communication device 20. The synchronization message carries the first time stamp. It may be the above-mentioned first optical signal.
作为一种可能的实现方式,第一通信设备20向第二通信设备21发送第四时间戳,包括:第一通信设备20中的处理器在接收到打戳模块发送的第四时间戳后,经第一通信设备20中的信道媒介转换模块向第二通信设备21发送延时响应消息,延时响应消息携带第四时间戳。As a possible implementation manner, the first communication device 20 sending the fourth time stamp to the second communication device 21 includes: after the processor in the first communication device 20 receives the fourth time stamp sent by the stamping module, The delay response message is sent to the second communication device 21 via the channel medium conversion module in the first communication device 20, and the delay response message carries the fourth time stamp.
其中,通信单元501可以用于实现第一通信设备20中的信道媒介转换模块的功能,处理单元502可以用于实现第一通信设备20中的处理器和打戳模块的功能。The communication unit 501 may be used to implement the function of the channel media conversion module in the first communication device 20, and the processing unit 502 may be used to implement the functions of the processor and the stamping module in the first communication device 20.
需要说明的是,各个单元的实现还可以对应参照图3b所示的时间同步方法实施例的相应描述。It should be noted that the implementation of each unit may also correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
基于上述方法和系统实施例,请参阅图5b,图5b是本申请实施例公开的又一种第一通信设备20的结构示意图,如图5b所示,该第一通信设备20可以包括处理器511和信道媒介转换模块513,其中:处理器511和信道媒介转换模块513建立通信连接,其中:Based on the foregoing method and system embodiments, please refer to FIG. 5b. FIG. 5b is a schematic structural diagram of another first communication device 20 disclosed in an embodiment of the present application. As shown in FIG. 5b, the first communication device 20 may include a processor 511 and the channel media conversion module 513, wherein: the processor 511 and the channel media conversion module 513 establish a communication connection, wherein:
信道媒介转换模块513,用于向第二通信设备21在第一光纤上发送波长为第一波长的第一光信号,第一光信号携带第一时间戳,该第一时间戳指示通信单元501发送第一光信号的时刻为第一时刻t1,第二通信设备21接收到上述第一光信号的时刻为第二时刻t2;The channel medium conversion module 513 is configured to send a first optical signal with a first wavelength on the first optical fiber to the second communication device 21, the first optical signal carries a first time stamp, and the first time stamp indicates the communication unit 501 The time when the first optical signal is sent is the first time t1, and the time when the second communication device 21 receives the first optical signal is the second time t2;
信道媒介转换模块513,还用于接收第二通信设备21在上述第一光纤上发送的波长为第二波长的第二光信号,第二通信设备21发送第二光信号的时刻为第三时刻t3;The channel medium conversion module 513 is also used to receive the second optical signal with the second wavelength sent by the second communication device 21 on the first optical fiber, and the time when the second communication device 21 sends the second optical signal is the third time t3;
信道媒介转换模块513,还用于向第二通信设备21在第一光纤上发送第四时间戳,所述第四时间戳指示通信单元501接收到第二光信号的时刻为第四时刻t4;The channel medium conversion module 513 is further configured to send a fourth time stamp on the first optical fiber to the second communication device 21, where the fourth time stamp indicates that the time when the communication unit 501 receives the second optical signal is the fourth time t4;
信道媒介转换模块513,还用于向第二通信设备21在第二光纤上发送波长为所述第二波长的第三光信号,第三光信号携带第五时间戳,该第五时间戳指示通信单元501发送第三光信号的时刻为第五时刻t5,第二通信设备接收到第三光信号的时刻为第六时刻t6;The channel medium conversion module 513 is further configured to send a third optical signal with a wavelength of the second wavelength to the second communication device 21 on the second optical fiber. The third optical signal carries a fifth time stamp, and the fifth time stamp indicates The time when the communication unit 501 sends the third optical signal is the fifth time t5, and the time when the second communication device receives the third optical signal is the sixth time t6;
信道媒介转换模块513,还用于接收第二通信设备在上述第二光纤上发送的第四光信号,第二通信设备发送上述第四光信号的时刻为第七时刻t7;The channel medium conversion module 513 is further configured to receive the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
信道媒介转换模块513,还用于向上述第二通信设备21在上述第二光纤上发送第八时间戳,以使得第二通信设备能够根据上述第一时刻t1、第二时刻t2、第三时刻t3、第四时刻t4、第五时刻t5、第六时刻t6、第七时刻t7和第八时刻t8与第一通信设备20进行时间同步,第八时间戳指示第一通信设备20接收到上述第四光信号的时刻为第八时刻t8;The channel media conversion module 513 is further configured to send an eighth time stamp on the second optical fiber to the second communication device 21, so that the second communication device can perform according to the first time t1, the second time t2, and the third time. t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device 20. The eighth time stamp indicates that the first communication device 20 receives the first communication device 20. The time of the four-light signal is the eighth time t8;
处理器511,用于与信道媒介转换模块513进行通信。The processor 511 is configured to communicate with the channel medium conversion module 513.
作为一种可能的实现方式,第一通信设备20还包括打戳模块512,信道媒介转换模块513发送上述第一光信号时,打戳模块512生成第一时间戳,信道媒介转换模块513接收到上述第二光信号时,打戳模块512生成第四时间戳;同理,第五时间戳和第八时间戳也均由打戳模块512生成。打戳模块512将第一时间戳、第四时间戳、第五时间戳或第八时间戳发送给处理器511,处理器511可以将第一时间戳、第四时间戳、第五时间戳或第八时间戳保存在第一通信设备20的存储器中。As a possible implementation, the first communication device 20 further includes a stamping module 512. When the channel medium conversion module 513 sends the above-mentioned first optical signal, the stamping module 512 generates the first time stamp, and the channel medium conversion module 513 receives For the above-mentioned second optical signal, the stamping module 512 generates a fourth time stamp; similarly, the fifth time stamp and the eighth time stamp are also generated by the stamping module 512. The stamping module 512 sends the first, fourth, fifth, or eighth timestamp to the processor 511, and the processor 511 may send the first, fourth, fifth, or The eighth time stamp is stored in the memory of the first communication device 20.
可选地,信道媒介转换模块513包括光纤收发器或光模块;信道媒介转换模块513可以包括两个光纤收发器,或者两个光模块,或者一个光纤收发器、一个光模块,其中一个光纤收发器或光模块用于处理上述第一光纤上的通信,另外一个光纤收发器或光模块用于处理上述第二光纤上的通信。Optionally, the channel media conversion module 513 includes a fiber optic transceiver or an optical module; the channel media conversion module 513 may include two fiber optic transceivers, or two optical modules, or one fiber transceiver and one optical module, one of which is a fiber transceiver. The optical transceiver or optical module is used to process the communication on the above-mentioned first optical fiber, and the other optical transceiver or optical module is used to process the communication on the above-mentioned second optical fiber.
可选地,信道媒介转换模块513可以是光发射与接收模块,用于发送或者接收光信号或光脉冲信号。信道媒介转换模块413还可以包含接收器和发送器,接收器和发送器可以集成在一个芯片上。Optionally, the channel medium conversion module 513 may be an optical transmitting and receiving module for sending or receiving optical signals or optical pulse signals. The channel medium conversion module 413 may also include a receiver and a transmitter, and the receiver and the transmitter may be integrated on a chip.
可选地,打戳模块512也可以包括两个子模块,其中一个打戳子模块用于处理上述第一光纤上的通信,另外一个打戳子模块用于处理上述第二光纤上的通信。Optionally, the stamping module 512 may also include two sub-modules. One of the stamping sub-modules is used to process the communication on the above-mentioned first optical fiber, and the other stamping sub-module is used to process the communication on the above-mentioned second optical fiber.
打戳模块512例如可以通过现场可编程门阵列实现。The stamping module 512 may be implemented by a field programmable gate array, for example.
其中,各个模块的实现可以对应参照图3b所示的时间同步方法实施例的相应描述。Among them, the implementation of each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
基于上述实施例,本申请实施例再公开了一种通信系统,如图3a所示,该通信系统包括第一通信设备20和第二通信设备21,第一通信设备20为图5a或图5b所描述的实施例公开的第一通信设备20,第二通信设备21为上述图4a或图4b所描述的实施例公开的第二通信设备21,该通信系统还可以包括第一光纤和第二光纤。Based on the above-mentioned embodiment, the embodiment of the present application further discloses a communication system. As shown in FIG. 3a, the communication system includes a first communication device 20 and a second communication device 21. The first communication device 20 is shown in FIG. 5a or FIG. 5b. The first communication device 20 disclosed in the described embodiment, and the second communication device 21 is the second communication device 21 disclosed in the embodiment described in FIG. 4a or FIG. 4b. The communication system may also include a first optical fiber and a second optical fiber. optical fiber.
其中,各个模块的实现可以对应参照图3b所示的时间同步方法实施例的相应描述。Among them, the implementation of each module may correspond to the corresponding description of the time synchronization method embodiment shown in FIG. 3b.
本申请中的各个实施例之间相同相似的部分互相参见即可,尤其,对于图4a-图5b实施例而言,由于基于图1-图3b对应的实施例,所以描述的比较简单,相关之处参见图1-图3b对应实施例的部分说明即可。The same and similar parts in the various embodiments of the present application can be referred to each other. In particular, for the embodiment of FIG. 4a-FIG. 5b, since it is based on the embodiment corresponding to FIG. 1 to FIG. 3b, the description is relatively simple and relevant. For details, please refer to the part of the description of the corresponding embodiment in Figs.
本申请实施例提供了一种计算机可读存储介质,包括计算机可读指令,当计算机读取并执行所述计算机可读指令时,使得计算机执行上述处理器所执行的方法。The embodiment of the present application provides a computer-readable storage medium, including computer-readable instructions. When the computer reads and executes the computer-readable instructions, the computer executes the method executed by the above-mentioned processor.
本申请实施例还提供了一种包含指令的计算机程序产品,当计算机程序产品在计算机上运行时,使得计算机执行上述处理器所执行的方法。The embodiment of the present application also provides a computer program product containing instructions, which when the computer program product runs on a computer, causes the computer to execute the method executed by the above-mentioned processor.
显然,本领域的技术人员应该明白,上述本申请的各模块或各步骤可以用通用的计算装置来实现,它们可以集中在单个的计算装置上,或者分布在多个计算装置所组成的网络上,可选地,它们可以用计算装置可执行的程序代码来实现,从而,可以将它们存储在存储介质(ROM/RAM、磁碟、光盘)中由计算装置来执行,并且在某些情况下,可以以不同于此处的顺序执行所示出或描述的步骤,或者将它们分别制作成各个集成电路模块,或者将它们中的多个模块或步骤制作成单个集成电路模块来实现。所以,本申请不限制于任何特定的硬件和软件结合。Obviously, those skilled in the art should understand that the above-mentioned modules or steps of this application can be implemented by a general computing device, and they can be concentrated on a single computing device or distributed on a network composed of multiple computing devices. Optionally, they can be implemented with program codes executable by the computing device, so that they can be stored in a storage medium (ROM/RAM, magnetic disk, optical disk) and executed by the computing device, and in some cases The steps shown or described can be executed in a different order from here, or they can be made into individual integrated circuit modules, or multiple modules or steps of them can be made into a single integrated circuit module to achieve. Therefore, this application is not limited to any specific combination of hardware and software.
最后应说明的是:以上所述仅为本申请的具体实施方式,本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。Finally, it should be noted that the above are only specific implementations of this application, and the scope of protection of this application is not limited to this. Any person skilled in the art can easily think of changes within the technical scope disclosed in this application. Or replacement should be covered within the scope of protection of this application.

Claims (17)

  1. 一种时间同步的方法,其特征在于,所述方法包括:A method for time synchronization, characterized in that the method includes:
    第二通信设备接收第一通信设备在第一光纤上发送的波长为第一波长的第一光信号,所述第一光信号携带第一时间戳,所述第一时间戳指示所述第一通信设备发送所述第一光信号的时刻为第一时刻t1;The second communication device receives the first optical signal with the first wavelength sent by the first communication device on the first optical fiber, where the first optical signal carries a first time stamp, and the first time stamp indicates the first optical signal. The time when the communication device sends the first optical signal is the first time t1;
    所述第二通信设备生成第二时间戳,所述第二时间戳指示所述第二通信设备接收到所述第一光信号的时刻为第二时刻t2;Generating a second time stamp by the second communication device, where the second time stamp indicates that the time when the second communication device receives the first optical signal is a second time t2;
    所述第二通信设备向所述第一通信设备在所述第一光纤上发送波长为第二波长的第二光信号,所述第二通信设备生成第三时间戳,所述第三时间戳指示所述第二通信设备发送所述第二光信号的时刻为第三时刻t3;The second communication device sends a second optical signal with a second wavelength on the first optical fiber to the first communication device, the second communication device generates a third time stamp, and the third time stamp Instruct the second communication device to send the second optical signal at the third time t3;
    所述第二通信设备接收所述第一通信设备在所述第一光纤上发送的第四时间戳,所述第四时间戳指示所述第一通信设备接收到所述第二光信号的时刻为第四时刻t4;The second communication device receives a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates the moment when the first communication device receives the second optical signal Is the fourth time t4;
    第二通信设备接收所述第一通信设备在第二光纤上发送的波长为所述第二波长的第三光信号,所述第三光信号携带第五时间戳,所述第五时间戳指示所述第一通信设备发送第三光信号的时刻为第五时刻t5;The second communication device receives a third optical signal with a wavelength of the second wavelength sent by the first communication device on the second optical fiber, the third optical signal carries a fifth time stamp, and the fifth time stamp indicates The time when the first communication device sends the third optical signal is the fifth time t5;
    所述第二通信设备生成第六时间戳,所述第六时间戳指示所述第二通信设备接收到所述第三光信号的时刻为第六时刻t6;Generating a sixth time stamp by the second communication device, where the sixth time stamp indicates that the time when the second communication device receives the third optical signal is the sixth time t6;
    所述第二通信设备向所述第一通信设备在所述第二光纤上发送波长为所述第一波长的第四光信号,所述第二通信设备生成第七时间戳,所述第七时间戳指示所述第二通信设备发送所述第四光信号的时刻为第七时刻t7;The second communication device sends a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, the second communication device generates a seventh time stamp, and the seventh The time stamp indicates that the time when the second communication device sends the fourth optical signal is the seventh time t7;
    所述第二通信设备接收所述第一通信设备在所述第二光纤上发送的第八时间戳,所述第八时间戳指示所述第一通信设备接收到所述第四光信号的时刻为第八时刻t8;The second communication device receives an eighth timestamp sent by the first communication device on the second optical fiber, where the eighth timestamp indicates the moment when the first communication device receives the fourth optical signal Is the eighth time t8;
    所述第二通信设备根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8与所述第一通信设备进行时间同步。The second communication device according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, and the The seventh time t7 and the eighth time t8 are time synchronized with the first communication device.
  2. 如权利要求1所述的方法,其特征在于,所述第二通信设备根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8与所述第一通信设备进行时间同步,包括:The method according to claim 1, wherein the second communication device is based on the first time t1, the second time t2, the third time t3, the fourth time t4, and the Performing time synchronization with the first communication device at the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 includes:
    所述第二通信设备根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3和所述第四时刻t4确定第一偏差N1;The second communication device determines the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
    所述第二通信设备根据所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8确定第二偏差N2;The second communication device determines a second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
    所述第二通信设备根据所述第一偏差和所述第二偏差确定所述第二通信设备相对所述第一通信设备的时间偏差N;Determining, by the second communication device, a time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation;
    所述第二通信设备根据所述时间偏差N与所述第一通信设备进行时间同步。The second communication device performs time synchronization with the first communication device according to the time deviation N.
  3. 如权利要求2所述的方法,其特征在于,The method of claim 2, wherein:
    所述第二通信设备根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3和所述第四时刻t4确定第一偏差N1,包括:The second communication device determining the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4 includes:
    所述第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;The first deviation N1 satisfies the calculation formula: N1=[(t2-t1)-(t4-t3)]/2;
    所述第二通信设备根据所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8确定第二偏差N2,包括:The second communication device determining the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 includes:
    所述第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8-t7)]/2;
    所述第二通信设备根据所述第一偏差和所述第二偏差确定所述第二通信设备相对所述第一通信设备的时间偏差N,包括:The second communication device determining the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation includes:
    所述时间偏差N满足计算公式:N=(N1+N2)/2。The time deviation N satisfies the calculation formula: N=(N1+N2)/2.
  4. 如权利要求2或3任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2 or 3, wherein the method further comprises:
    所述第二通信设备根据所述时间偏差N和所述第一偏差N1确定所述第一光纤上双向时延的近似同步误差S1,所述近似同步误差S1为所述第一偏差N1与所述时间偏差N的差值。The second communication device determines the approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, and the approximate synchronization error S1 is the difference between the first deviation N1 and the total time delay. The difference of the time deviation N.
  5. 如权利要求2或3任意一项所述的方法,其特征在于,所述方法还包括:The method according to any one of claims 2 or 3, wherein the method further comprises:
    所述第二通信设备根据所述时间偏差N和所述第二偏差N2确定所述第二光纤上双向时延的近似同步误差S2,所述近似同步误差S2为所述第二偏差N2与所述时间偏差N的差值。The second communication device determines the approximate synchronization error S2 of the two-way delay on the second optical fiber according to the time deviation N and the second deviation N2, where the approximate synchronization error S2 is the difference between the second deviation N2 and the second deviation N2. The difference of the time deviation N.
  6. 如权利要求4所述的方法,其特征在于,所述方法还包括:The method of claim 4, wherein the method further comprises:
    所述第二通信设备根据所述第一偏差N1和所述近似同步误差S1在所述第一光纤上与所述第一通信设备进行时间同步;The second communication device performs time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1;
    所述第二通信设备在所述第二光纤上接收波长为所述第二波长的第一光脉冲信号进行探测,所述第二通信设备在所述第二光纤上发送波长为所述第一波长的第二光脉冲信号进行探测。The second communication device receives a first optical pulse signal with a wavelength of the second wavelength on the second optical fiber for detection, and the second communication device transmits on the second optical fiber a wavelength of the first optical pulse signal. The second optical pulse signal of the wavelength is detected.
  7. 如权利要求5所述的方法,其特征在于,所述方法还包括:The method of claim 5, wherein the method further comprises:
    所述第二通信设备根据所述第二偏差N2和所述近似同步误差S2在所述第二光纤上与所述第一通信设备进行时间同步;The second communication device performs time synchronization with the first communication device on the second optical fiber according to the second deviation N2 and the approximate synchronization error S2;
    所述第二通信设备在所述第一光纤上接收波长为所述第一波长的第三光脉冲信号进行探测,所述第二通信设备在所述第一光纤上发送波长为所述第二波长的第四光脉冲信号进行探测。The second communication device receives a third optical pulse signal with a wavelength of the first wavelength on the first optical fiber for detection, and the second communication device transmits a third optical pulse signal with a wavelength of the second wavelength on the first optical fiber. The wavelength of the fourth optical pulse signal is detected.
  8. 一种时间同步的方法,其特征在于,包括:A time synchronization method, characterized in that it includes:
    第一通信设备向第二通信设备在第一光纤上发送波长为第一波长的第一光信号,所述第一光信号携带第一时间戳,所述第一时间戳指示所述第一通信设备发送所述第一光信号的时刻为第一时刻t1,所述第二通信设备接收到所述第一光信号的时刻为第二时刻t2;The first communication device sends a first optical signal with a wavelength of a first wavelength on a first optical fiber to a second communication device, the first optical signal carries a first time stamp, and the first time stamp indicates the first communication The time when the device sends the first optical signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
    所述第一通信设备接收所述第二通信设备在所述第一光纤上发送的波长为第二波长的第二光信号,所述第二通信设备发送所述第二光信号的时刻为第三时刻t3;The first communication device receives the second optical signal with the second wavelength sent by the second communication device on the first optical fiber, and the time when the second communication device sends the second optical signal is the first Three time t3;
    所述第一通信设备向所述第二通信设备在所述第一光纤上发送第四时间戳,所述第四时间戳指示所述第一通信设备接收到第二光信号的时刻为第四时刻t4;The first communication device sends a fourth time stamp on the first optical fiber to the second communication device, where the fourth time stamp indicates that the time when the first communication device receives the second optical signal is fourth Time t4;
    所述第一通信设备向所述第二通信设备在第二光纤上发送波长为所述第二波长的第三光信号,所述第三光信号携带第五时间戳,所述第五时间戳指示所述第一通信设备发送所述第三光信号的时刻为第五时刻t5,所述第二通信设备接收到所述第三光信号的时刻为第六时刻t6;The first communication device sends a third optical signal with a wavelength of the second wavelength on a second optical fiber to the second communication device, the third optical signal carries a fifth time stamp, and the fifth time stamp Instruct the first communication device to send the third optical signal at the fifth time t5, and the second communication device to receive the third optical signal at the sixth time t6;
    所述第一通信设备接收所述第二通信设备在所述第二光纤上发送的第四光信号,所述第二通信设备发送所述第四光信号的时刻为第七时刻t7,第八时间戳指示所述第一通信设备接收到所述第四光信号的时刻为第八时刻t8;The first communication device receives the fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7, the eighth The time stamp indicates that the time when the first communication device receives the fourth optical signal is the eighth time t8;
    所述第一通信设备向所述第二通信设备在所述第二光纤上发送所述第八时间戳,以使得第二通信设备根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8与所述第一通信设备进行时间同步。The first communication device sends the eighth time stamp on the second optical fiber to the second communication device, so that the second communication device sends the eighth time stamp according to the first time t1, the second time t2, and the second time t2. The third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 are time synchronized with the first communication device .
  9. 一种时间同步的通信设备,其特征在于,包括处理器和信道媒介转换模块,所述处理器和所述信道媒介转换模块建立通信连接,A time-synchronized communication device, characterized by comprising a processor and a channel medium conversion module, the processor and the channel medium conversion module establish a communication connection,
    所述信道媒介转换模块,用于接收所述第一通信设备在第一光纤上发送的波长为第一波长的第一光信号,所述第一光信号携带第一时间戳,所述第一时间戳指示所述第一通信设备发送所述第一光信号的时刻为第一时刻t1,所述信道媒介转换模块接收到所述第一光信号的时刻为第二时刻t2;The channel medium conversion module is configured to receive a first optical signal with a wavelength of a first wavelength sent by the first communication device on a first optical fiber, the first optical signal carries a first time stamp, and the first optical signal The time stamp indicates that the time when the first communication device sends the first optical signal is the first time t1, and the time when the channel medium conversion module receives the first optical signal is the second time t2;
    所述信道媒介转换模块,还用于向所述第一通信设备在所述第一光纤上发送波长为第二波长的第二光信号,所述信道媒介转换模块发送所述第二光信号的时刻为第三时刻t3;The channel medium conversion module is further configured to send a second optical signal with a second wavelength on the first optical fiber to the first communication device, and the channel medium conversion module sends the second optical signal to the first optical fiber. Time is the third time t3;
    所述信道媒介转换模块,还用于接收所述第一通信设备在所述第一光纤上发送的第四时间戳,所述第四时间戳指示所述第一通信设备接收到所述第二光信号的时刻为第四时刻t4;The channel medium conversion module is further configured to receive a fourth time stamp sent by the first communication device on the first optical fiber, where the fourth time stamp indicates that the first communication device receives the second The time of the optical signal is the fourth time t4;
    所述信道媒介转换模块,还用于接收所述第一通信设备在第二光纤上发送的波长为所述第二波长的第三光信号,所述第三光信号携带第五时间戳,所述第五时间戳指示所述第一通信设备发送所述第三光信号的时刻为第五时刻t5,所述信道媒介转换模块接收到所述第三光信号的时刻为第六时刻t6;The channel medium conversion module is further configured to receive a third optical signal with a wavelength of the second wavelength sent by the first communication device on a second optical fiber, and the third optical signal carries a fifth time stamp, so The fifth time stamp indicates that the time when the first communication device sends the third optical signal is the fifth time t5, and the time when the channel medium conversion module receives the third optical signal is the sixth time t6;
    所述信道媒介转换模块,还用于向所述第一通信设备在所述第二光纤上发送的波长为所述第一波长的第四光信号,所述信道媒介转换模块发送所述第四光信号的时刻为第七时刻t7;The channel medium conversion module is further configured to send a fourth optical signal with a wavelength of the first wavelength to the first communication device on the second optical fiber, and the channel medium conversion module sends the fourth optical signal. The time of the optical signal is the seventh time t7;
    所述信道媒介转换模块,还用于接收所述第一通信设备在所述第二光纤上发送的第八时间戳,该第八时间戳指示所述第一通信设备接收到所述第四光信号的时刻为第八时刻t8;The channel medium conversion module is further configured to receive an eighth time stamp sent by the first communication device on the second optical fiber, and the eighth time stamp indicates that the first communication device received the fourth light The time of the signal is the eighth time t8;
    所述处理器,用于根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和第八时刻t8与所述第一通信设备进行时间同步。The processor is configured to, according to the first time t1, the second time t2, the third time t3, the fourth time t4, the fifth time t5, and the sixth time t6, The seventh time t7 and the eighth time t8 are time synchronized with the first communication device.
  10. 如权利要求9所述的通信设备,其特征在于,所述处理器根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和第八时刻t8与所述第一通信设备进行时间同步,包括:The communication device according to claim 9, wherein the processor is based on the first time t1, the second time t2, the third time t3, the fourth time t4, and the first time t2. The fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 to synchronize time with the first communication device include:
    所述处理器根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3和所述第四时刻t4确定第一偏差N1;Determining, by the processor, a first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4;
    所述处理器根据所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8确定第二偏差N2;Determining, by the processor, a second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8;
    所述处理器根据所述第一偏差和所述第二偏差确定所述第二通信设备相对所述第一通信设备的时间偏差N;Determining, by the processor, a time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation;
    所述处理器根据所述时间偏差N与所述第一通信设备进行时间同步。The processor performs time synchronization with the first communication device according to the time deviation N.
  11. 如权利要求10所述的通信设备,其特征在于,The communication device according to claim 10, wherein:
    所述处理器根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3和所述第四时刻t4确定第一偏差N1,包括:The processor determining the first deviation N1 according to the first time t1, the second time t2, the third time t3, and the fourth time t4 includes:
    所述第一偏差N1满足计算公式:N1=[(t2-t1)-(t4-t3)]/2;The first deviation N1 satisfies the calculation formula: N1=[(t2-t1)-(t4-t3)]/2;
    所述处理器根据所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和所述第八时刻t8 确定第二偏差N2,包括:The processor determining the second deviation N2 according to the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 includes:
    所述第一偏差N2满足计算公式:N2=[(t6-t5)-(t8-t7)]/2;The first deviation N2 satisfies the calculation formula: N2=[(t6-t5)-(t8-t7)]/2;
    所述处理器根据所述第一偏差和所述第二偏差确定所述第二通信设备相对所述第一通信设备的时间偏差N,包括:The processor determining the time deviation N of the second communication device relative to the first communication device according to the first deviation and the second deviation includes:
    所述时间偏差N满足计算公式:N=(N1+N2)/2。The time deviation N satisfies the calculation formula: N=(N1+N2)/2.
  12. 如权利要求10或11任意一项所述的通信设备,其特征在于,The communication device according to any one of claims 10 or 11, wherein:
    所述处理器还用于根据所述时间偏差N和所述第一偏差N1确定所述第一光纤上双向时延的近似同步误差S1,所述近似同步误差S1为所述第一偏差N1与所述时间偏差N的差值。The processor is further configured to determine an approximate synchronization error S1 of the two-way delay on the first optical fiber according to the time deviation N and the first deviation N1, where the approximate synchronization error S1 is the first deviation N1 and the first deviation N1. The difference of the time deviation N.
  13. 如权利要求12所述的通信设备,其特征在于,The communication device according to claim 12, wherein:
    所述处理器还用于根据所述第一偏差N1和所述近似同步误差S1在所述第一光纤上与所述第一通信设备进行时间同步;The processor is further configured to perform time synchronization with the first communication device on the first optical fiber according to the first deviation N1 and the approximate synchronization error S1;
    所述信道媒介转换模块还用于在所述第二光纤上接收波长为所述第二波长的第一光脉冲信号进行探测且在所述第二光纤上发送波长为所述第一波长的第二光脉冲信号进行探测。The channel medium conversion module is further configured to receive a first optical pulse signal with a wavelength of the second wavelength on the second optical fiber for detection, and send a first optical pulse signal with a wavelength of the first wavelength on the second optical fiber Two light pulse signals are detected.
  14. 如权利要求9所述的通信设备,其特征在于,所述第二通信设备还包括打戳模块,所述信道媒介转换模块接收到所述第一光信号时,所述打戳模块生成第一时间戳;所述信道媒介转换模块发送所述第二光信号时,所述打戳模块生成第二时间戳;所述信道媒介转换模块接收到所述第三光信号时,所述打戳模块生成第五时间戳;所述信道媒介转换模块发送所述第四光信号时,所述打戳模块生成第八时间戳。The communication device according to claim 9, wherein the second communication device further comprises a stamping module, and when the channel medium conversion module receives the first optical signal, the stamping module generates a first Time stamp; when the channel medium conversion module sends the second optical signal, the stamping module generates a second time stamp; when the channel medium conversion module receives the third optical signal, the stamping module A fifth time stamp is generated; when the channel medium conversion module sends the fourth optical signal, the stamping module generates an eighth time stamp.
  15. 如权利要求10至13任意一项所述的通信设备,其特征在于,所述信道媒介转换模块包括光发射与接收模块。The communication device according to any one of claims 10 to 13, wherein the channel medium conversion module includes an optical transmitting and receiving module.
  16. 一种时间同步的通信设备,其特征在于,包括处理器和信道媒介转换模块,所述处理器和所述信道媒介转换模块建立通信连接,A time-synchronized communication device, characterized by comprising a processor and a channel medium conversion module, the processor and the channel medium conversion module establish a communication connection,
    所述信道媒介转换模块,用于向第二通信设备在第一光纤上发送波长为第一波长的第一光信号,所述第一光信号携带第一时间戳,所述第一时间戳指示所述信道媒介转换模块发送所述第一光信号的时刻为第一时刻t1,所述第二通信设备接收到所述第一光信号的时刻为第二时刻t2;The channel medium conversion module is configured to send a first optical signal with a wavelength of a first wavelength to a second communication device on a first optical fiber, the first optical signal carries a first time stamp, and the first time stamp indicates The time when the channel medium conversion module sends the first optical signal is the first time t1, and the time when the second communication device receives the first optical signal is the second time t2;
    所述信道媒介转换模块,还用于接收所述第二通信设备在所述第一光纤上发送的波长为第二波长的第二光信号,所述第二通信设备发送所述第二光信号的时刻为第三时刻t3;The channel medium conversion module is further configured to receive a second optical signal with a second wavelength sent by the second communication device on the first optical fiber, and the second communication device sends the second optical signal Is the third time t3;
    所述信道媒介转换模块,还用于向所述第二通信设备在所述第一光纤上发送第四时间戳,所述第四时间戳指示所述信道媒介转换模块接收到第二光信号的时刻为第四时刻t4;The channel medium conversion module is further configured to send a fourth time stamp on the first optical fiber to the second communication device, the fourth time stamp indicating that the channel medium conversion module receives the second optical signal Time is the fourth time t4;
    所述信道媒介转换模块,还用于向所述第二通信设备在第二光纤上发送波长为所述第二波长的第三光信号,所述第三光信号携带第五时间戳,所述第五时间戳指示所述信道媒介转换模块发送所述第三光信号的时刻为第五时刻t5,所述第二通信设备接收到所述第三光信号的时刻为第六时刻t6;The channel medium conversion module is further configured to send a third optical signal with a wavelength of the second wavelength to the second communication device on a second optical fiber, the third optical signal carries a fifth time stamp, and the The fifth time stamp indicates that the time when the channel medium conversion module sends the third optical signal is the fifth time t5, and the time when the second communication device receives the third optical signal is the sixth time t6;
    所述信道媒介转换模块,还用于接收所述第二通信设备在所述第二光纤上发送的第四光信号,所述第二通信设备发送所述第四光信号的时刻为第七时刻t7;The channel medium conversion module is further configured to receive a fourth optical signal sent by the second communication device on the second optical fiber, and the time when the second communication device sends the fourth optical signal is the seventh time t7;
    所述信道媒介转换模块,还用于向所述第二通信设备在所述第二光纤上发送第八时间戳,以使得第二通信设备能够根据所述第一时刻t1、所述第二时刻t2、所述第三时刻t3、所述第四时刻t4、所述第五时刻t5、所述第六时刻t6、所述第七时刻t7和第八时刻t8与所述第一通 信设备进行时间同步,所述第八时间戳指示所述信道媒介转换模块接收到所述第四光信号的时刻为所述第八时刻t8;The channel medium conversion module is further configured to send an eighth time stamp on the second optical fiber to the second communication device, so that the second communication device can be based on the first time t1 and the second time t2, the third time t3, the fourth time t4, the fifth time t5, the sixth time t6, the seventh time t7, and the eighth time t8 and the first communication device Synchronously, the eighth time stamp indicates that the time when the channel medium conversion module receives the fourth optical signal is the eighth time t8;
    所述处理器,用于与所述信道媒介转换模块进行通信。The processor is configured to communicate with the channel medium conversion module.
  17. 一种时间同步的系统,其特征在于,所述系统包括权利要求9-15中任意一项所述的通信设备和权利要求16所述的通信设备。A time synchronization system, characterized in that the system comprises the communication device according to any one of claims 9-15 and the communication device according to claim 16.
PCT/CN2020/111117 2019-10-31 2020-08-25 Time synchronization method, communication device, and system WO2021082674A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201911053055.8 2019-10-31
CN201911053055.8A CN112751639B (en) 2019-10-31 2019-10-31 Time synchronization method, communication equipment and system

Publications (1)

Publication Number Publication Date
WO2021082674A1 true WO2021082674A1 (en) 2021-05-06

Family

ID=75644576

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/111117 WO2021082674A1 (en) 2019-10-31 2020-08-25 Time synchronization method, communication device, and system

Country Status (2)

Country Link
CN (1) CN112751639B (en)
WO (1) WO2021082674A1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472482A (en) * 2021-06-20 2021-10-01 许继集团有限公司 Framing method and system for protecting sampling value data frame applied to 5G network data communication
CN114070445A (en) * 2021-11-09 2022-02-18 中国科学院近代物理研究所 Distributed power supply timing calibrator and synchronous triggering method

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113687590B (en) * 2021-08-10 2023-03-10 青岛小鸟看看科技有限公司 Time synchronization method and system for head and handle in VR system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103155450A (en) * 2010-10-13 2013-06-12 瑞典爱立信有限公司 Determining asymmetries in a communication network
CN105187275A (en) * 2015-08-28 2015-12-23 四川泰富地面北斗科技股份有限公司 Method and device for measuring optical fiber transmission link asymmetric time delay
CN105933085A (en) * 2016-04-27 2016-09-07 西南民族大学 Asymmetric fiber link transmission delay measuring method
US20170150464A1 (en) * 2015-11-20 2017-05-25 Fujitsu Limited Communication apparatus, time synchronizing method, and non-transitory computer-readable storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2006115536A2 (en) * 2005-04-22 2006-11-02 Nortel Networks Limited Method and apparatus for providing integrated symmetric and asymmetric network capacity on an optical network
CN101795167B (en) * 2010-01-27 2013-04-17 中国人民解放军理工大学 High-precision time-delay precompensation optical fiber timing method
US9473261B1 (en) * 2013-08-29 2016-10-18 Microsemi Storage Solutions (U.S.), Inc. System and method to achieve datapath latency symmetry through an OTN wrapper

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103155450A (en) * 2010-10-13 2013-06-12 瑞典爱立信有限公司 Determining asymmetries in a communication network
CN105187275A (en) * 2015-08-28 2015-12-23 四川泰富地面北斗科技股份有限公司 Method and device for measuring optical fiber transmission link asymmetric time delay
US20170150464A1 (en) * 2015-11-20 2017-05-25 Fujitsu Limited Communication apparatus, time synchronizing method, and non-transitory computer-readable storage medium
CN105933085A (en) * 2016-04-27 2016-09-07 西南民族大学 Asymmetric fiber link transmission delay measuring method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
HUAWEI, HISILICON: "Discussion on over-the-air time synchronization for URLLC", 3GPP DRAFT; R1-1711432, vol. RAN WG1, 17 June 2017 (2017-06-17), Qingdao, China, pages 1 - 3, XP051305583 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113472482A (en) * 2021-06-20 2021-10-01 许继集团有限公司 Framing method and system for protecting sampling value data frame applied to 5G network data communication
CN113472482B (en) * 2021-06-20 2023-11-10 许继集团有限公司 Sampling value data frame protection method and system applied to 5G network data communication
CN114070445A (en) * 2021-11-09 2022-02-18 中国科学院近代物理研究所 Distributed power supply timing calibrator and synchronous triggering method

Also Published As

Publication number Publication date
CN112751639A (en) 2021-05-04
CN112751639B (en) 2022-04-22

Similar Documents

Publication Publication Date Title
WO2021082674A1 (en) Time synchronization method, communication device, and system
US10999834B2 (en) Method and apparatus for generating and maintaining an accurate network map in a communications network
US11470568B2 (en) Synchronizing TSN master clocks in wireless networks
EP3016306B1 (en) Method and apparatus for providing in-vehicle network time synchronization using redundant grandmaster
US9906320B2 (en) Industrial network apparatus and data communication method
EP2528254B1 (en) Method and device for time synchronization
US9876596B2 (en) Method and device for detecting fault in synchronization link
US9900120B2 (en) Clock synchronization method and apparatus
US20120275501A1 (en) Pluggable synchronization clocks, networks, systems and methods related thereto
EP3261275B1 (en) Method for clock synchronization of an industrial internet field broadband bus
EP2706686B1 (en) Method, terminal and system for measuring asymmetric delay of transmission link
WO2015117501A1 (en) Time synchronization method, programmable logic device, single board and network element
US20160080100A1 (en) Method for precision time protocol synchronization network and apparatus
EP2597791B1 (en) Method and device for compensating for time path
CN112838903B (en) Clock synchronization method, equipment and storage medium
WO2015010250A1 (en) Clock recovery in a packet based network
WO2015125439A1 (en) Communication system, wireless communication apparatus, and wireless communication method
CN104243079A (en) Microsecond clock synchronization method for real-time Ethernet
EP2717532B1 (en) High-speed link self-negotiation method and single board
CN107959537B (en) State synchronization method and device
US20230103012A1 (en) Method for optimising the time synchronisation between network devices connected via a communications network
KR20230125982A (en) Real-time time synchronization method between EtherCAT communication nodes
JP2018088644A (en) Time synchronization method and time synchronization system between wirelessly-connected terminals
JP7116706B2 (en) Communication control device and communication control method
KR20150016735A (en) Network synchronization system using centralized control plane

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

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20881421

Country of ref document: EP

Kind code of ref document: A1