WO2020001504A1 - Synchronization method and apparatus - Google Patents

Synchronization method and apparatus Download PDF

Info

Publication number
WO2020001504A1
WO2020001504A1 PCT/CN2019/093123 CN2019093123W WO2020001504A1 WO 2020001504 A1 WO2020001504 A1 WO 2020001504A1 CN 2019093123 W CN2019093123 W CN 2019093123W WO 2020001504 A1 WO2020001504 A1 WO 2020001504A1
Authority
WO
WIPO (PCT)
Prior art keywords
message
time stamp
stamp information
information
time
Prior art date
Application number
PCT/CN2019/093123
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
Priority claimed from CN201811168721.8A external-priority patent/CN110649983B/en
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to EP19825041.7A priority Critical patent/EP3817250A4/en
Priority to CA3104762A priority patent/CA3104762A1/en
Publication of WO2020001504A1 publication Critical patent/WO2020001504A1/en
Priority to US17/132,150 priority patent/US11469843B2/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

Definitions

  • the present application relates to the field of communication technologies, and in particular, to a synchronization method and device.
  • the IEEE 802.1AS protocol defines a master clock selection and negotiation algorithm, path delay measurement and compensation, and a clock frequency matching and adjustment mechanism.
  • Communication equipment exchanges standard Ethernet messages, synchronizes the time of each node of the network to a common master clock, and defines a generalized precise clock synchronization system.
  • the 802.1AS protocol defines synchronization across the network by hop-by-hop synchronization, that is, starting from the master clock node (hereinafter referred to as the master) to send 802.1AS synchronization packets to neighboring nodes (hereinafter referred to as the slave), and each slave refers to the master
  • the slave exchanges 802.1AS synchronization packets with neighboring nodes as its master, and calculates the time offset (Offset) and / or frequency deviation between the master and slave clocks to complete the clock synchronization.
  • the 802.1AS time synchronization mechanism is as follows: the master and the slave send 802.1AS messages to each other, and the time offset Offset is calculated based on the time when the two parties send and receive messages.
  • the master sends a message to the slave and the slave sends a message to the master
  • the transmission delay must be considered when calculating the time offset Offset.
  • the 802.1AS time synchronization is based on the same delay in sending and receiving packets, that is, the same transmission delay can achieve accurate time synchronization. Now in the fixed network, because the adjacent two nodes are wired directly, the transmission delay does not exceed us, so the accuracy of the 802.1AS protocol in the fixed network can reach us level, which meets the requirements.
  • the 802.1AS frequency synchronization mechanism is as follows: the master sends 802.1AS packets to the slave at two different time points, and the slave calculates the frequency deviation through the master's two sending times and two receiving times.
  • the principle of 802.1AS frequency synchronization is that the two packets have the same time delay during transmission to achieve accurate frequency synchronization. Similarly, it can meet the demand in the fixed network.
  • a time-sensitive network is an Ethernet network in an industrial plant.
  • TSN uses the 802.1AS protocol as its protocol specification for clock synchronization.
  • the mobile network needs to be connected to the TSN.
  • the mobile network is used as a transmission path to provide communication services for the industrial factory. This requires that the mobile network also support the 802.1AS protocol.
  • two adjacent nodes in the TSN such as a terminal device and a user plane network element
  • multi-hop devices such as access devices
  • the present application provides a synchronization method and device, which are used to realize the time accuracy requirement of an industrial factory in a scenario where a mobile network is connected to an Ethernet network (for example, TSN).
  • an Ethernet network for example, TSN
  • this application provides a synchronization method, which includes:
  • the first device sends a first message to the access device.
  • the first message carries the first time stamp information and determines the second time stamp information.
  • the first time stamp information is when the first device sends the first message.
  • the time in the Ethernet network the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device receives the second message from the access device, and the second message carries the third Timestamp information and fourth timestamp information, the third timestamp information is the time in the mobile network when the second device receives the third message sent by the access device to the second device based on the first message, and the fourth timestamp
  • the information is the time in the mobile network when the second device sends the fourth message to the access device; the second message is sent by the access device to the first device based on the fourth message; after that, the first device determines the fifth time The timestamp information and the sixth time stamp information.
  • the fifth time stamp information is the time in the Ethernet network when the first device receives the second message
  • the sixth time stamp information is the mobile network when the first device receives the second message.
  • a device determines the seventh time stamp information according to the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the sixth time stamp information; the first device passes the seventh time stamp information through the connection
  • the incoming device is forwarded to the second device, where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the first device determines the seventh time stamp information by using the time stamp information of the message sent and received in the mobile network, so that the second device calculates the first device according to the seventh time stamp information and the time of sending and receiving messages in the Ethernet network.
  • the time deviation from the second device is then synchronized.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the first device determines the seventh timestamp information according to the second timestamp information, the third timestamp information, the fourth timestamp information, the sixth timestamp information, and the sixth timestamp information.
  • the specific method may be The first device determines the round-trip transmission delay difference between the first device and the second device according to the second time stamp information, the third time stamp information, the fourth time stamp information, and the sixth time stamp information, and then calculates the Sum of the time corresponding to the five timestamp information and the round-trip transmission delay difference value to obtain seventh timestamp information.
  • the first device can accurately obtain the seventh time stamp information, so that the second device can calculate the time between the first device and the second device according to the seventh time stamp information and the time of sending and receiving packets in the Ethernet network. Deviation, and then time synchronization.
  • the first device records the second time stamp information locally after determining the second time stamp information, so that the first device subsequently calculates a round-trip transmission delay difference between the first device and the second device. . In this way, the subsequent first device can obtain the seventh timestamp information by using the recorded second timestamp information.
  • the first device after the first device receives the second message from the access device, it extracts the third time stamp information and the fourth time stamp information carried in the first protocol field included in the second message.
  • the first device may subsequently determine the seventh timestamp information by using the third timestamp information and the fourth timestamp information.
  • the first protocol field may be an existing protocol field or a protocol field newly added in an existing protocol stack framework.
  • the first protocol field when the first protocol field is an existing protocol field, when the first device is a user plane network element, the first protocol field may be a general packet radio service GPRS tunneling protocol GTP field; when the first device is a terminal device, The first protocol field may be a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • the first protocol field may be a NEW field.
  • the access device may carry the third time stamp information and the fourth time stamp information through the protocol field in the message, so as to send the third time stamp information and the fourth time stamp information to the first device.
  • the first device After the first device receives the second message from the access device, it extracts the third time stamp information and the fourth time stamp information carried in the first protocol field included in the second message.
  • the first device After the first device receives the second message from the access device, it extracts the third time stamp information and the fourth time stamp information carried in the first protocol field included in the second message.
  • Case 1 The first device extracts the third time stamp information and the fourth time stamp information in the GTP field.
  • the first device is a user plane network element.
  • Case 2 The first device extracts the third time stamp information and the fourth time stamp information in the SDAP field or the PDCP field.
  • the first device is a terminal device.
  • Case 3 The first device extracts the third time stamp information and the fourth time stamp information in the NEW field.
  • the first device is a terminal device or a user plane network element.
  • the first device can accurately obtain the third time stamp information and the fourth time stamp information.
  • the present application also provides a synchronization method, which includes:
  • the access device After the access device receives the first message from the first device, it sends a third message to the second device based on the first message.
  • the first message carries the first time stamp information, and the first time stamp information is the first device.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a second message to the first device.
  • the specific method may be: when the access device detects that the second protocol field included in the fourth message carries the third time stamp information and the first time In the case of four timestamp information, the third timestamp information and the fourth timestamp information are encapsulated into the first protocol field included in the fourth message, a second message is generated, and the second message is sent to the first device.
  • the access device can successfully send the third time stamp information and the fourth time stamp information to the first device, so that the first device determines the seventh time stamp information.
  • the access device before the access device encapsulates the third time stamp information and the fourth time stamp information into the first protocol field included in the fourth message, the access device extracts the second protocol field included in the fourth message. Carry third time stamp information and fourth time stamp information.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field, and the first protocol field is a general packet radio service GPRS tunneling protocol GTP field;
  • the second protocol field is a GTP field, and the first protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the second device receives the third message from the access device, and the third message carries the first time stamp information, and the first time stamp information is the time in the Ethernet network when the first device sends the first message; the third message It is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and The second device is a user plane network element. Then, the second device determines the third time stamp information and the eighth time stamp information.
  • the third time stamp information is the time in the mobile network when the second device receives the third message.
  • the eight timestamp information is the time in the Ethernet network when the second device receives the third message; the second device sends a fourth message to the access device, and the fourth message carries the third timestamp information and the fourth timestamp Information, the fourth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device; then the second device determines the ninth timestamp information, and the ninth timestamp information is the second device to access Device sends fourth report The time in the text-time Ethernet network; finally, the second device receives the seventh time stamp information from the access device, and determines the first time stamp information based on the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Time deviation between a device and a second device, and time synchronization is performed according to the time deviation.
  • the second device calculates a time deviation between the first device and the second device according to the seventh time stamp information and the time of sending and receiving packets in the Ethernet network, and then performs time synchronization.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the second device determines the time in the Ethernet network when the first device receives the second packet according to the seventh timestamp information, and the second packet is the access device sends the first packet to the first device based on the fourth packet. Sent. In this way, the second device can perform time synchronization according to the seventh time stamp information.
  • the fourth message carries the third timestamp information and the fourth timestamp information.
  • the second device carries the third timestamp information and the fourth timestamp information in the fourth message. In the second agreement field. In this way, the second device can successfully transmit the third time stamp information and the fourth time stamp information to the access device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network element, the second protocol field is general Packet Radio Service GPRS Tunneling Protocol GTP field.
  • the present application further provides a synchronization method, which includes:
  • the first device sends a first message to the access device, and the first message carries the first time stamp information and the second time stamp information, and the first time stamp information is in the Ethernet network when the first device sends the first message.
  • Time the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device receives the second message from the access device, and determines the third time stamp information and the fourth time stamp Information, the third time stamp information is the time in the Ethernet network when the first device receives the second message, and the fourth time stamp information is the time in the mobile network when the first device receives the second message; finally,
  • the first device sends the third time stamp information and the fourth time stamp information to the access device, and the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information are used for time synchronization;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the first device sends timestamp information of the message sent and received in the mobile network to the second device, so that the second device sends and receives the time stamp of the message in the mobile network and the timestamp of the message in the Ethernet network.
  • Information to calculate the time deviation between the first device and the second device, and then perform time synchronization Since the influence of the transmission delay between the first device and the second device can be avoided, it is possible to realize the docking scenario between the mobile network and the Ethernet network, and meet the time accuracy requirements of industrial plants.
  • the first message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the first message.
  • the first device can successfully transmit the second time stamp information to the access device, so that the access device subsequently transmits the second time stamp information to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol In the SDAP field or the data aggregation protocol PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the access device After the access device receives the first message from the first device, it sends a third message to the second device based on the first message; the first message carries the first time stamp information and the second time stamp information, and the first time The time stamp information is the time in the Ethernet network when the first device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message; the third message carries the first time stamp information And the second timestamp information; the access device receives a fourth message from the second device and sends a second message to the first device based on the fourth message; the access device receives the third timestamp information from the first device and Fourth timestamp information, the third timestamp information is the time in the Ethernet network when the first device receives the second message, and the fourth timestamp information is the time in the mobile network when the first device receives the second message Time; the access device sends the third time stamp information and the fourth time stamp information to the second device, the first time stamp information, the second time stamp information, the third
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a third packet to the second device based on the first packet.
  • the specific method may be: when the access device detects that the first protocol field included in the first packet includes the second packet, In the time stamp information, the access device encapsulates the second time stamp information into a second protocol field included in the first message, generates a third message, and sends the third message to the second device.
  • the access device can successfully send the second time stamp information to the second device, so that the second device performs clock synchronization.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the second protocol field is a Service Data Protocol SDAP field Or data aggregation protocol PDCP field
  • the first protocol field is an SDAP field or a PDCP field
  • the second protocol field is a GTP field.
  • the present application further provides a synchronization method, which includes:
  • the second device receives a third message from the access device, and the third message carries the first timestamp information and the second timestamp information, and the first timestamp information is in the Ethernet network when the first device sends the first message.
  • Time; the second time stamp information is the time in the mobile network when the first device sends the first message; the third message is sent based on the first message after the access device receives the first message from the first device;
  • the second device determines the fifth time stamp information and the sixth time stamp information.
  • the fifth time stamp information is the time in the Ethernet network when the second device receives the third packet
  • the sixth time stamp information is the second device received the Three messages are the time in the mobile network
  • the second device sends a fourth message to the access device, and determines the seventh time stamp information and the eighth time stamp information
  • the seventh time stamp information is the second device to the access device
  • the eighth time stamp information is the time in the mobile network when the second device sends the fourth message to the access device
  • the second device receives the third time stamp information from the access device
  • fourth timestamp Information the third timestamp information is the time in the Ethernet network when the first device receives the second message
  • the fourth timestamp information is the time in the mobile network when the first device receives the second message
  • the second The message is sent by the access device to the first device based on the fourth message
  • the second device is based on the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth timestamp
  • the information, the fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the second device calculates a time deviation between the first device and the second device by using time stamp information of the message transmitted and received in the mobile network and time stamp information of the message transmitted and received in the Ethernet network, and then performs time synchronization.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the second device is based on the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time.
  • the stamp information and the seventh timestamp information determine the time deviation between the first device and the second device.
  • the specific method may be: the second device according to the second timestamp information, the sixth timestamp information, the eighth timestamp information, and the first
  • the four timestamp information determines a round-trip transmission delay difference between the first device and the second device; the second device uses the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and
  • the round-trip transmission delay difference determines a time offset between the first device and the second device.
  • the second device can determine a time deviation between the first device and the second device by determining a round-trip transmission delay difference between the first device and the second device.
  • the second device determines the first device and the second device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and the round-trip transmission delay difference value.
  • the specific method may be: the second device determines the ninth time stamp information, and the ninth time stamp information is a sum of a time corresponding to the third time stamp information and a round-trip transmission delay difference; and then the second device A timestamp information, a fifth timestamp information, a seventh timestamp information and a ninth timestamp information determine the time deviation between the first device and the second device.
  • the second device can accurately determine a time offset between the first device and the second device, so that the second device performs time synchronization according to the time offset.
  • the second device extracts the second time stamp information carried in the second protocol field included in the third message.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field when the second protocol field is an existing protocol field, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is When the user plane network element is used, the second protocol field is the GTP field of the general packet radio service GPRS tunneling protocol.
  • the present application further provides a synchronization method, which includes:
  • the first device sends a first message to the access device, and the first message carries the first time stamp information and the second time stamp information, and the first time stamp information is in the Ethernet network when the first device sends the first message.
  • Time the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device sends a second message to the access device, and the second message carries the third time stamp information and Fourth timestamp information, the third timestamp information is the time in the Ethernet network when the first device sends the second message, and the fourth timestamp information is the time in the mobile network when the first device sends the second message;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the first device sends a message to the second device, so that the mobile device and the Ethernet clock message receive and send time when the second device transmits the message initiated by the first device, and calculates the time between the first device and the second device.
  • Frequency deviation, and then frequency synchronization Since the influence of the transmission delay between the first device and the second device can be avoided, it is possible to realize the docking scenario of the mobile network and the Ethernet network, and meet the clock accuracy requirements of industrial factories.
  • the first message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the first message.
  • the first device can successfully transmit the second time stamp information to the access device, so that the access device subsequently transmits the second time stamp information to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
  • the second message carries the fourth timestamp information.
  • the first device may carry the fourth timestamp information in a second protocol field included in the second message.
  • the first device can successfully transmit the fourth timestamp information to the access device, so that the access device can subsequently transmit the information to the second device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the second protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the access device receives the first message from the first device, and sends a third message to the second device based on the first message; the first message carries the first time stamp information and the second time stamp information, and the first time stamp The information is the time in the Ethernet network when the first device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message; the third message carries the first time stamp information and The second time stamp information; then, the access device receives the second message from the first device, and sends a fourth message to the second device based on the second message, and the second message carries the third time stamp information and the first time message.
  • the third timestamp information is the time in the Ethernet network when the first device sends the second message
  • the fourth timestamp information is the time in the mobile network when the first device sends the second message
  • the fourth report The text carries third time stamp information and fourth time stamp information; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element .
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a third packet to the second device based on the first packet.
  • the specific method may be: when the access device detects that the first protocol field included in the first packet includes the second packet, In timestamp information, the access device encapsulates the second timestamp information into a third protocol field included in the first message, generates a third message, and sends the third message to the second device.
  • the access device can successfully send the second time stamp information to the second device, so that the second device performs clock synchronization.
  • the access device before the access device encapsulates the second time stamp information into a third protocol field included in the first packet, the access device extracts the second packet included in the first protocol field included in the first packet. Timestamp information.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the third protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field is a general packet radio service GPRS tunneling protocol GTP field
  • the third protocol field is a service data protocol SDAP field Or data aggregation protocol PDCP field
  • the first protocol field is an SDAP field or a PDCP field
  • the third protocol field is a GTP field.
  • the access device sends a fourth message to the second device based on the second message.
  • the specific method may be: when the access device detects that the second protocol field included in the second message includes a fourth message, In timestamp information, the access device encapsulates the fourth timestamp information into the fourth protocol field of the second message, generates a fourth message, and sends the fourth message to the second device.
  • the access device can successfully send the fourth time stamp information to the second device, so that the second device performs clock synchronization.
  • the access device before the access device encapsulates the fourth time stamp information into a fourth protocol field included in the second packet, the access device extracts the second packet included in the second protocol field included in the second packet. Timestamp information.
  • the fourth protocol field may be an existing protocol field, or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a general packet radio service GPRS tunneling protocol GTP field
  • the fourth protocol field is a service data protocol SDAP field Or data aggregation protocol PDCP field
  • the second protocol field is an SDAP field or a PDCP field
  • the fourth protocol field is a GTP field.
  • the present application further provides a synchronization method, which includes:
  • the second device receives a third message from the access device, and the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is when the first device sends the first message to the access device.
  • the second device determines the fifth time stamp information and the sixth time stamp information.
  • the fifth time stamp information is the time in the Ethernet network when the second device receives the third packet
  • the sixth time stamp information is the second device received the Three messages are the time in the mobile network;
  • the second device receives the fourth message from the access device, and the fourth message carries the third time stamp information and the fourth time stamp information, and the third time stamp information is the first device
  • the time in the Ethernet network when sending the second message to the access device, and the fourth time stamp information is the time in the mobile network when the first device sends the second message to the access device;
  • the fourth message is the access device Sent to the second device based on the second message;
  • the second device determines the seventh time stamp information and the eighth time stamp information, and the seventh time stamp information is the time in the Ethernet network when the second device receives the fourth message
  • the eighth timestamp information is the time in the mobile network when the second device receives the fourth message; according to the first timestamp information, the second timestamp information
  • the second device uses the message transmission and reception time in the mobile network and the Ethernet network to transmit the message initiated by the first device, calculates the frequency deviation between the first device and the second device, and then performs frequency synchronization.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the clock accuracy requirements of industrial plants.
  • the second device is based on the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time.
  • the stamp information and the eighth timestamp information determine the frequency deviation between the first device and the second device.
  • the specific method may be as follows: the second device determines the first and second timestamp information corresponding to the second time stamp information. A difference, and a second difference that determines the time corresponding to the eighth time stamp information and the time corresponding to the fourth time stamp information; the second device according to the first time stamp information, the third time stamp information, and the fifth time stamp information.
  • the seventh time stamp information, the first difference value and the second difference value determine a frequency deviation between the first device and the second device.
  • the second device can accurately determine the frequency deviation between the first device and the second device.
  • the second device determines the first device and the first device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the first difference value, and the second difference value.
  • the frequency deviation between the two devices, the specific method can be:
  • the second device determines a magnitude relationship between the first difference and the second difference
  • the second device determines that the frequency deviation is a quotient of the first value and the second value
  • the first value is a time corresponding to the third time stamp information and the first time stamp
  • the second value is a value obtained by adding the third value to the difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp information.
  • the third value is the fourth value and the third value. The product of five values.
  • the fourth value is the value obtained by subtracting the second difference from the first difference.
  • the fifth value is the difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp. The value obtained by the difference between the time corresponding to the eight timestamp information and the time corresponding to the sixth timestamp;
  • the second device determines that the frequency deviation is a quotient of the first value and a sixth value
  • the sixth value is a time corresponding to the seventh time stamp information and a fifth time stamp
  • the second device can perform frequency synchronization by accurately determining a frequency deviation between the first device and the second device.
  • the present application further provides a synchronization method, which includes:
  • the first device After the first device determines the first timestamp information, it sends a first message to the access device, and the first message carries the first timestamp information; the first timestamp information is the time corresponding to the second timestamp information and the third time The difference in time corresponding to the timestamp information, the second timestamp information is the master clock information in the Ethernet network, and the third timestamp information is the master clock information in the mobile network; wherein the first device is a user plane network element and the first The two devices are terminal devices, or the first device is a terminal device and the second device is a user plane network element.
  • the first device determines a difference between the master clock information in the mobile network and the Ethernet network, and sends it to the second device, so that the second device directly completes clock synchronization through the difference in the master clock information.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the first message carries the first timestamp information.
  • the first device may carry the first timestamp information in a first protocol field included in the first message.
  • the first device can successfully transmit the first time stamp information to the access device, so that the access device can subsequently transmit the information to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
  • the first device receives a second message from the access device, and the second message is used to notify the first device that time synchronization has been completed.
  • the first device can end the transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization is completed, thereby saving resource consumption.
  • the present application further provides a synchronization method, which includes:
  • the access device receives the first message from the first device and sends a third message to the second device based on the first message.
  • the first message carries the first time stamp information, and the first time stamp information is the second time.
  • the difference between the time corresponding to the timestamp information and the time corresponding to the third time stamp information, the second time stamp information is the master clock information in the Ethernet network, and the third time stamp information is the master clock information in the mobile network; the third message
  • the first timestamp information is carried therein, where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a third packet to the second device based on the first packet.
  • the specific method may be: when the access device detects that the first protocol field included in the first packet includes the first packet, In timestamp information, the access device encapsulates the first timestamp information into a second protocol field included in the first message, generates a third message, and sends the third message to the second device.
  • the access device can successfully send the first time stamp information to the second device, so that the second device performs clock synchronization.
  • the access device before the access device encapsulates the first time stamp information into the second protocol field included in the first packet, the access device extracts the second packet included in the first protocol field included in the first packet. Timestamp information.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the second protocol field is a Service Data Protocol SDAP field Or data aggregation protocol PDCP field
  • the first protocol field is an SDAP field or a PDCP field
  • the second protocol field is a GTP field.
  • the access device receives the second message from the second device, and forwards the second message to the first device, and the second message is used to notify the first device that time synchronization has been completed.
  • the first device can end transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization has been completed, thereby saving resource consumption.
  • the present application further provides a synchronization method, which includes:
  • the second device receives a third message from the access device, and the third message carries the first time stamp information, and the first time stamp information is a difference between the time corresponding to the second time stamp information and the time corresponding to the third time stamp information.
  • the second time stamp information is the master clock information in the Ethernet network
  • the third time stamp information is the master clock information in the mobile network
  • the third message is the first message sent by the access device based on the first message Sent by the first device to the access device; wherein the first device is a user plane network element and the second device is a terminal device; or, the first device is a terminal device and the second device is a user plane network element
  • the two devices determine the fourth time stamp information, and use the time corresponding to the fourth time stamp information and the difference corresponding to the first time stamp information to complete the time synchronization; the fourth time stamp information is when the second device receives the third message Moments in mobile networks.
  • the second device directly completes clock synchronization through the difference between the master clock information.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the second device extracts the first time stamp information carried in the second protocol field included in the third message.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network element, the second protocol field is general Packet Radio Service GPRS Tunneling Protocol GTP field.
  • the second device sends a second message to the access device, and the second message is used to notify the first device that time synchronization has been completed.
  • the subsequent access device forwards the second message to the first device, so that the first device can end the transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization is completed, This can save resource consumption.
  • the present application further provides a first device having the functions of implementing the first device in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect described above.
  • the functions can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect,
  • these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect,
  • the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect,
  • the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect,
  • the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the
  • the structure of the first device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the first device. Corresponding functions in the above-mentioned first, fourth, seventh or tenth methods.
  • the memory is coupled to the processor and stores program instructions and data necessary for the first device.
  • the present application further provides an access device that has the functions of implementing the access device in the second, fifth, eighth, or eleventh method examples.
  • the functions can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the access device includes a sending unit and a receiving unit, and these units may perform corresponding functions in the method examples of the second aspect, the fifth aspect, the eighth aspect, or the eleventh aspect described above. For details, see The detailed description in the method example will not be repeated here.
  • the structure of the access device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the access device. Corresponding functions in the above-mentioned second, fifth, eighth or eleventh methods.
  • the memory is coupled to the processor and stores program instructions and data necessary for accessing the device.
  • the present application further provides a second device, which has the function of implementing the second device in the third, sixth, ninth, or twelfth method examples.
  • the functions can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may perform corresponding functions in the method examples of the third aspect, the sixth aspect, the ninth aspect, or the twelfth aspect described above.
  • these units may perform corresponding functions in the method examples of the third aspect, the sixth aspect, the ninth aspect, or the twelfth aspect described above.
  • the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may perform corresponding functions in the method examples of the third aspect, the sixth aspect, the ninth aspect, or the twelfth aspect described above.
  • the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may perform corresponding functions in the method examples of the third aspect, the sixth aspect, the ninth aspect, or the twelfth aspect described above.
  • the structure of the second device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the second device. Corresponding functions in the methods of the third, sixth, ninth or twelfth aspects.
  • the memory is coupled to the processor and stores program instructions and data necessary for the second device.
  • the present application further provides a communication system, and the communication system may include the first device, the access device, and the second device mentioned in the above design.
  • the present application also provides a computer storage medium.
  • the computer storage medium stores computer-executable instructions.
  • the computer-executable instructions When the computer-executable instructions are called by a computer, the computer executes any one of the foregoing methods.
  • the present application also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute any one of the methods described above.
  • the present application further provides a chip, which is connected to the memory, and is configured to read and execute program instructions stored in the memory to implement any of the foregoing methods.
  • the present application further provides a synchronization method, which includes:
  • the first device determines the first time stamp information, and sends the first message to the second device through the access device.
  • the first time stamp information is that the first device receives the first time stamp information.
  • One message is the time in the mobile network; then, after receiving the second message from the third device, the first device sends a third message to the access device based on the second message, and the third message carries the first time After stamping the information; after receiving the fourth message from the access device, the first device sends a fourth message to the third device, and determines the second time stamp information, the second time stamp information is the first device to the third device The moment in the mobile network when the fourth message is sent; after receiving the fifth message from the third device, the first device determines the third time stamp information, and sends a sixth message to the access device based on the fifth message.
  • the six messages carry the second time stamp information, and the third time stamp information is the time in the mobile network when the first device receives the fifth message; finally, after receiving the seventh message from the third device, the first device sends the The access device sends an eighth message; a seventh message Carry fourth time stamp information, the fourth time stamp information is the time in the Ethernet network when the third device sends the fifth message to the first device, and the eighth message carries the third time stamp information and the fourth time stamp information;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the third message carries the first timestamp information, which may be: the first device carries the first timestamp information in a first protocol field included in the third message. In this way, the first time stamp information can be successfully transmitted to the access device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is an SDAP field or a PDCP field; or when the first device is a user plane network element, the first protocol field is a GTP field.
  • the sixth message carries the second timestamp information, which may be: the first device carries the second timestamp information in a second protocol field included in the sixth message. In this way, the second time stamp information can be successfully transmitted to the access device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
  • the third timestamp information is carried in the eighth message, which may be: the first device carries the third timestamp information in a third protocol field included in the eighth message. In this way, the third time stamp information can be successfully transmitted to the access device.
  • the third protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the third protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the third protocol field is a GTP field.
  • the present application further provides a synchronization method, which includes:
  • the access device After receiving the first message from the first device, the access device forwards the first message to the second device; after receiving the third message from the first device, the access device sends a ninth to the second device based on the third message.
  • the third message carries the first time stamp information
  • the ninth message carries the first time stamp information
  • the first time stamp information is in the mobile network when the first device receives the first message from the third device.
  • the access device after receiving the fourth message from the second device, the access device sends a fourth message to the first device; after receiving the sixth message from the first device, the access device sends the fourth message to the second device based on the sixth message.
  • the device sends a tenth message; the sixth message is sent by the first device to the access device based on the fifth message after receiving the fifth message from the third device; the sixth message carries the second time stamp information, The second time stamp information is the time in the mobile network when the first device sends the fourth message to the third device after receiving the fourth message from the access device; the tenth message carries the second time stamp information; access The device receives the eighth message from the first device, and sends the eighth message to the second device based on the eighth message.
  • the eighth message carries the third time stamp information and the fourth time stamp information, and the third time stamp information is the time in the mobile network when the first device receives the fifth message from the third device
  • the fourth timestamp information is the time in the Ethernet network when the third device sends the fifth message to the first device;
  • the eleventh message carries the third timestamp information and the fourth timestamp information; wherein the first device Is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a ninth message to the second device based on the third message, which may specifically be: when the access device detects that the first protocol field included in the third message carries the first time When stamping the information, the first time stamp information is encapsulated into the fourth protocol field of the third message, a ninth message is generated, and the ninth message is sent to the second device. In this way, the access device can transmit the first time stamp information to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the fourth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
  • the first protocol field is an SDAP field or a PDCP field
  • the fourth protocol field is a GTP field
  • the first device is a user plane network element
  • the first The protocol field is a GTP field
  • the fourth protocol field is an SDAP field or a PDCP field.
  • the access device sends the tenth message to the second device based on the sixth message, which may be: when the access device detects that the second protocol field included in the sixth message carries a second timestamp For information, the second time stamp information is encapsulated into the fifth protocol field of the sixth message, a tenth message is generated, and the tenth message is sent to the second device. In this way, the access device can transmit the second time stamp information to the second device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the fifth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is an SDAP field or a PDCP field
  • the fifth protocol field is a GTP field
  • the second The protocol field is a GTP field
  • the fifth protocol field is an SDAP field or a PDCP field.
  • the access device sends an eleventh message to the second device based on the eighth message, which may be: when the access device detects that the third protocol field included in the eighth message carries a third time When stamping the information, the third time stamp information is encapsulated into the sixth protocol field of the eighth message, an eleventh message is generated, and the eleventh message is sent to the second device. In this way, the access device can transmit the third time stamp information to the second device.
  • the third protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the sixth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the third protocol field is an SDAP field or a PDCP field
  • the sixth protocol field is a GTP field
  • the third The protocol field is a GTP field
  • the sixth protocol field is an SDAP field or a PDCP field.
  • the present application also provides a synchronization method, which includes:
  • the second device After receiving the first message from the access device, the second device sends the first message to the fourth device and determines the fifth time stamp information.
  • the fifth time stamp information is the second device sending the first message to the fourth device.
  • the message is the time in the mobile network; then, after the second device receives the ninth message from the access device, it sends a twelfth message to the fourth device based on the ninth message; the ninth message carries the first time
  • the time stamp information the first time stamp information is the time in the mobile network when the first device receives the first message from the third device; the second device receives the fourth message from the fourth device, determines the sixth time stamp information, and
  • the fourth message is sent to the access device, and the sixth time stamp information is the time in the mobile network when the second device receives the fourth message; the second device receives the tenth message from the access device; the tenth message Carry the second time stamp information, the second time stamp information is the time in the mobile network when the first device sends the fourth message to the third device
  • the third time stamp information is the time in the mobile network when the first device receives the fifth message from the third device
  • the fourth time stamp information is the third time information.
  • the stamp information, the sixth timestamp information, and the seventh timestamp information determine the eighth timestamp information; the second device sends the eighth timestamp information to the fourth device, so that the fourth device performs time based on the eighth timestamp information Synchronize.
  • the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the second device after the second device receives the ninth message from the access device, it extracts the first time stamp information carried in the fourth protocol field included in the ninth message. In this way, the second device may subsequently determine the eighth time stamp information by using the first time stamp information.
  • the fourth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the fourth protocol field is a GTP field; or when the second device is a terminal device, the fourth protocol field is an SDAP field or a PDCP field.
  • the second device after the second device receives the tenth message from the access device, it extracts the second time stamp information carried in the fifth protocol field included in the tenth message. In this way, the second device may subsequently determine the eighth timestamp information by using the second timestamp information.
  • the fifth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the fifth protocol field is a GTP field; or when the second device is a terminal device, the fifth protocol field is an SDAP field or a PDCP field.
  • the second device after receiving the eleventh message from the access device, extracts the third time stamp information carried in the sixth protocol field included in the eleventh message. In this way, the second device can subsequently determine the eighth time stamp information by using the third time stamp information.
  • the sixth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the sixth protocol field is a GTP field; or when the second device is a terminal device, the sixth protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the first device sends a first message to the access device, and determines first time stamp information and second time stamp information; the first time stamp information is a time in the Ethernet network when the first device sends the first message, The second time stamp information is the time in the mobile network when the first device sends the first message; the first device sends a second message to the access device, and the second message carries the first time stamp information and the second time stamp Information; then, the first device receives the third message from the access device and determines the third time stamp information, the third time stamp information is the time in the Ethernet network when the first device receives the third message; the first device Send a fourth message to the access device and determine the fourth time stamp information; the fourth time stamp information is the time in the Ethernet network when the first device sends the fourth message, and the fourth message carries the third time stamp information ; Finally, the first device sends a fifth message to the access device, and the fifth message carries the fourth time stamp information; wherein the first device is a user plane network element and the second device is a terminal device
  • the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the second message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the second message. In this way, the first device can successfully transmit the second time stamp information to the access device.
  • the first protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
  • the first protocol field is an SDAP field or a PDCP field; or when the first device is a user plane network element, the first protocol field is a GTP field.
  • the present application also provides a synchronization method, which includes:
  • the access device After receiving the first message from the first device, the access device forwards the first message to the second device; after receiving the second message from the first device, the access device sends a sixth message to the second device based on the second message.
  • the second message carries the first time stamp information and the second time stamp information
  • the first time stamp information is the time in the Ethernet network when the first device sends the first message to the access device
  • the second time stamp The information is the time in the mobile network when the first device sends the first message to the access device
  • the sixth message carries the first and second timestamp information
  • the access device receives the third message from the second device After the text, the third message is forwarded to the first device; after receiving the fourth message from the first device, the access device forwards the fourth message to the second device, and the fourth message carries the third time stamp information.
  • the three timestamp information is the time in the Ethernet network when the first device receives the third message sent by the access device; after receiving the fifth message from the first device, the access device forwards the fifth message to the second device.
  • the fifth message carries the fourth time stamp information, the fourth time The stamp information is the time in the Ethernet network when the first device sends the fourth message to the access device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the The second device is a user plane network element.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a sixth message to the second device based on the second message, which may be: when the access device detects that the first protocol field included in the second message carries a second timestamp For information, the second time stamp information is encapsulated into the second protocol field of the second message, a sixth message is generated, and the sixth message is sent to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field is an SDAP field or a PDCP field
  • the second protocol field is a GTP field
  • the first The protocol field is a GTP field
  • the second protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the second device receives the first message from the access device and determines the fifth time stamp information and the sixth time stamp information.
  • the fifth time stamp information is the time in the Ethernet network when the second device receives the first message.
  • the six timestamp information is the time in the mobile network when the second device receives the first message; the second device receives the sixth message from the access device, and the sixth message carries the first timestamp information and the second timestamp Information; the first time stamp information is the time in the Ethernet network when the first device sends the first message to the access device, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device.
  • the second device sends a third message to the access device, and determines the seventh time stamp information
  • the seventh time stamp information is the time in the Ethernet network when the second device sends the third message
  • the second device slave access The device receives the fourth message and determines the eighth time stamp information.
  • the eighth time stamp information is the time in the Ethernet network when the second device receives the fourth message.
  • the fourth message carries the third time stamp information. Three timestamp information is After the incoming device receives the third message from the second device and forwards the third message to the first device, the time in the Ethernet network when the first device receives the third message; the second device receives the fifth message from the access device.
  • the fifth message carries fourth timestamp information
  • the fourth timestamp information is the time in the Ethernet network when the first device sends the fourth message to the access device; according to the first timestamp information, The second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, the sixth timestamp information, the seventh timestamp information, and the eighth timestamp information determine whether the first device and the second device Time, and time synchronization is performed according to the time deviation; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the second device is based on the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time.
  • the stamp information and the eighth timestamp information determine the time deviation between the first device and the second device, which may specifically be: the second device according to the second timestamp information, the third timestamp information, the sixth timestamp information, the seventh The timestamp information and the eighth timestamp information determine the ninth timestamp information; the second device deletes the fourth timestamp information, and determines according to the ninth timestamp information that the first device sends the fourth message to the access device in the Ethernet network. Time; the second device determines the first device and the second device according to the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, the eighth timestamp information, and the ninth timestamp information Time deviation between.
  • the second device can accurately determine the time deviation between the first device and the second device.
  • the second device after the second device receives the sixth message from the access device, it extracts the second time stamp information carried in the second protocol field included in the sixth message.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is a GTP field; or when the second device is a terminal device, the second protocol field is an SDAP field or a PDCP field.
  • the present application also provides a synchronization method, which includes:
  • the first device After receiving the first message from the third device, the first device sends the first message to the second device through the access device, and determines the first time stamp information.
  • the first time stamp information is A message is the time in the mobile network; then, after receiving the second message from the access device, the first device sends a third message to the third device; the second message carries the second time stamp information and the third Timestamp information, the second timestamp information is the time in the mobile network when the second device receives the first message and sends the first message to the fourth device; the third timestamp information is the second device from the fourth device The time in the mobile network when the fifth message is received; the first device determines the fourth time stamp information, the fourth time stamp information is the time in the mobile network when the first device sends the third message; after that, the first device The third device receives the sixth message, and the sixth message carries fifth time stamp information, and the fifth time stamp information is a time in the Ethernet network when the third device receives the third message sent by the first device; finally, First device according
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the first device determines the sixth timestamp information according to the first timestamp information, the second timestamp information, the fourth timestamp information, and the fifth timestamp information, which may specifically be The first device determines a round-trip transmission delay difference between the first device and the second device according to the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information; the first device calculates Sum of the time corresponding to the fifth timestamp information and the round-trip transmission delay difference value to obtain sixth timestamp information.
  • the first device can accurately determine the sixth time stamp information, so that the fourth device can calculate the time deviation between the third device and the fourth device according to the sixth time stamp information and the time of sending and receiving packets in the Ethernet network. , And then time synchronization.
  • the first device after receiving the second message from the access device, extracts the second time stamp information and the third time stamp information carried in the first protocol field included in the second message. In this way, the first device can transmit the second time stamp information and the third time stamp information to the access device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is a GTP field; or when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the access device After the access device receives the first message from the first device, it sends the first message to the second device; then, the access device receives the fourth message from the second device, and the fourth message carries the second time The timestamp information and the third time stamp information; the second time stamp information is the time in the mobile network when the first device sends the first message to the fourth device after receiving the first message; the fourth message is the second device After receiving the fifth message from the fourth device, it is sent to the access device based on the fifth message; the third time stamp information is the time in the mobile network when the second device receives the fifth message; after that, access The device sends a second message to the first device, and the second message carries the second time stamp information and the third time stamp information.
  • the access device receives the sixth time stamp information from the first device, and sends the sixth time stamp information to the second device.
  • Send sixth timestamp information where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends the second message to the first device, which may be: when the access device detects that the second protocol field included in the fourth message carries the second time stamp information and the third time When stamping the information, the second time stamp information and the third time stamp information are encapsulated into a first protocol field included in the fourth message, a second message is generated, and a second message is sent to the first device. In this way, the access device can transmit the second time stamp information and the third time stamp information to the second device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
  • the second protocol field is an SDAP field or a PDCP field
  • the first protocol field is a GTP field
  • the second The protocol field is a GTP field
  • the first protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the second device After the second device receives the first message from the access device, it sends the first message to the fourth device, and determines the second time stamp information.
  • the second time stamp information moves when the second device sends the first message. The time in the network; then, the second device receives the fifth message from the fourth device and determines the third time stamp information, the third time stamp information is the time in the mobile network when the second device receives the fifth message; After that, the second device sends a fourth message to the access device, and the fourth message carries the second time stamp information and the third time stamp information; finally, the second device receives the sixth time stamp information from the access device, and Send sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
  • the fourth message carries the second time stamp information and the third time stamp information, which may be: the second device carrying the second time stamp information and the third time stamp information in the fourth message includes In the second agreement field. In this way, the second device can transmit the second time stamp information and the third time stamp information to the access device.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
  • the present application further provides a synchronization method, which includes:
  • the first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is a time in the mobile network when the first device receives the first message; then, the first device A second message is sent to the access device based on the first message, and the second message carries the first timestamp information; after that, the first device sends a third message to the third device after receiving the third message from the access device Message, and determine the second time stamp information, the second time stamp information is the time in the mobile network when the first device sends the third message; finally, the first device receives the fourth message from the third device, the fourth message
  • the text carries third time stamp information, and the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; the first device combines the second time stamp information and the third time stamp The information is sent to the access device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second
  • the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the second message carries the first timestamp information, which may be: the first device carries the first timestamp information in a first protocol field included in the second message. In this way, the first device can successfully transmit the first time stamp information to the access device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the first protocol field is a GTP field; or when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field.
  • the present application further provides a synchronization method, which includes:
  • the access device receives a second message from the first device, the second message carries the first time stamp information, and the second message is the first device sends the first message to the access device after receiving the first message from the third device
  • the first time stamp information sent is the time in the mobile network when the first device receives the first message; then, the access device sends a fifth message to the second device based on the second message.
  • the access device Carry the first time stamp information; after that, the access device sends the third message to the first device after receiving the third message from the second device; finally, the access device receives the second time stamp information and the first time information from the first device Three timestamp information, and sends a second timestamp information and a third timestamp information to the second device, the second timestamp information is when the first device receives the third message and moves to the third device when sending the third message
  • the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; wherein the first device is a user plane network element and the second device is a terminal device, Or, the first device is a terminal device And the second device is a user plane network element.
  • the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
  • the access device sends a fifth message to the second device based on the second message, which may specifically be: when the access device detects that the first protocol field included in the second message includes the first time
  • the access device encapsulates the first time stamp information into a second protocol field included in the second message, generates a fifth message, and sends the fifth message to the second device. In this way, the access device can successfully transmit the first time stamp information to the second device.
  • the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
  • the second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
  • the first protocol field is a GTP field
  • the second protocol field is an SDAP field or a PDCP field
  • the first protocol field is an SDAP field or a PDCP field
  • the second protocol field is a GTP field
  • the present application further provides a synchronization method, which includes:
  • the second device receives a fifth message from the access device, and the fifth message carries the first time stamp information; the first time stamp information is in the mobile network when the first device receives the first message from the third device.
  • the second device sends a sixth message to the fourth device and determines the fourth time stamp information, the fourth time stamp information is the time in the mobile network when the second device sends the sixth message; then, the second device Receiving the third message from the fourth device, determining the fifth time stamp information, and sending the third message to the access device;
  • the fifth time stamp information is the time in the mobile network when the second device receives the third message;
  • the second device receives the second time stamp information and the third time stamp information from the access device;
  • the second time stamp information is that after the access device receives the third message and sends the third message to the first device,
  • the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first
  • the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the second device determines the sixth timestamp information according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information, which may specifically be The second device determines a round-trip transmission delay difference between the first device and the second device according to the first time stamp information, the second time stamp information, the fourth time stamp information, and the fifth time stamp information; the second device calculates Sum of the time corresponding to the third timestamp information and the round-trip transmission delay difference value to obtain sixth timestamp information.
  • the second device can accurately determine the sixth time stamp information, so that the fourth device can calculate the time deviation between the third device and the fourth device according to the sixth time stamp information and the time of sending and receiving packets in the Ethernet network. , And then time synchronization.
  • the second device after the second device receives the fifth message from the access device, it extracts the first time stamp information carried in the second protocol field included in the fifth message. In this way, the second device may subsequently determine the sixth time stamp information by using the first time stamp information.
  • the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
  • the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
  • the present application further provides a first device having the first method in an example of a method for implementing the twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect.
  • the function of a device can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform the foregoing twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect
  • a sending unit a processing unit
  • a receiving unit a receiving unit
  • these units may perform the foregoing twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect
  • the structure of the first device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the first device.
  • the memory is coupled to the processor and stores program instructions and data necessary for the first device.
  • the present application further provides an access device having the access method in the method instance for implementing the foregoing twenty-first aspect, twenty-fourth aspect, twenty-seventh aspect, or thirtieth aspect.
  • an access device having the access method in the method instance for implementing the foregoing twenty-first aspect, twenty-fourth aspect, twenty-seventh aspect, or thirtieth aspect.
  • the functions can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the access device includes a sending unit and a receiving unit, and these units can execute the method examples in the twenty-first aspect, the twenty-fourth aspect, the twenty-seventh aspect, or the thirtieth aspect described above.
  • these units can execute the method examples in the twenty-first aspect, the twenty-fourth aspect, the twenty-seventh aspect, or the thirtieth aspect described above.
  • the corresponding functions see the detailed descriptions in the method examples for details.
  • the structure of the access device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the access device. Corresponding functions in the above-mentioned methods of the twenty-first aspect, the twenty-fourth aspect, the twenty-seventh aspect, or the thirtieth aspect.
  • the memory is coupled to the processor and stores program instructions and data necessary for accessing the device.
  • the present application further provides a second device having the first method of implementing the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect of the method example.
  • Function of the second device can be realized by hardware, and the corresponding software can also be implemented by hardware.
  • the hardware or software includes one or more modules corresponding to the above functions.
  • the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may implement the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect.
  • these units may implement the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect.
  • the structure of the second device includes a transceiver, a processor, and a memory.
  • the transceiver is used to send and receive data and communicate with other devices in the communication system.
  • the processor is configured to support the execution of the second device.
  • the memory is coupled to the processor and stores program instructions and data necessary for the second device.
  • the present application also provides a computer storage medium.
  • the computer storage medium stores computer-executable instructions.
  • the computer-executable instructions are called by a computer, the computer executes the foregoing twentieth aspect to the third aspect. Any one of the eleven aspects.
  • the present application also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute any one of the methods in the twentieth to thirty-first aspects.
  • the present application also provides a chip, which is connected to the memory and is used to read and execute program instructions stored in the memory to implement any one of the foregoing twentieth to thirty-first aspects. method.
  • FIG. 1 is an architecture diagram of a communication system provided by the present application
  • FIG. 2 is a working schematic diagram of a communication system provided by the present application.
  • FIG. 3 is a flowchart of a synchronization method provided by the present application.
  • FIG. 4 is a schematic diagram of sending and receiving messages in a synchronization process provided by the present application.
  • 5 is a schematic diagram of a protocol stack framework
  • FIG. 6 is a schematic diagram of another protocol stack framework provided by the present application.
  • FIG. 9 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application.
  • FIG. 10 is a flowchart of another synchronization method provided by the present application.
  • FIG. 11 is a schematic structural diagram of a first device provided by this application.
  • FIG. 12 is a schematic structural diagram of an access device provided by this application.
  • FIG. 13 is a schematic structural diagram of a second device provided by the present application.
  • FIG. 14 is a schematic structural diagram of another first device provided by the present application.
  • 15 is a schematic structural diagram of another first device provided by the present application.
  • 16 is a schematic structural diagram of another second device provided by the present application.
  • FIG. 17 is a schematic structural diagram of another first device provided by the present application.
  • FIG. 19 is a structural diagram of an access device provided by the present application.
  • 21 is a flowchart of another synchronization method provided by the present application.
  • FIG. 22 is a schematic diagram of sending and receiving messages in another synchronization process provided by this application.
  • FIG. 23 is a working schematic diagram of another communication system provided by the present application.
  • FIG. 25 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application.
  • FIG. 26 is a flowchart of another synchronization method provided by the present application.
  • FIG. 27 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application.
  • FIG. 28 is a flowchart of another synchronization method provided by the present application.
  • FIG. 29 is a schematic diagram of sending and receiving messages during another synchronization process provided in this application.
  • Embodiments of the present application provide a synchronization method and device, which are used to implement a docking scenario between a mobile network and an Ethernet network (for example, TSN) to meet the time accuracy requirements of an industrial plant.
  • the methods and devices described in this application are based on the same inventive concept. Since the principles of the methods and devices for solving problems are similar, the implementation of the devices and methods can be referred to each other, and duplicated details will not be repeated.
  • Terminal equipment also known as user equipment (UE), mobile station (MS), mobile terminal (MT), etc.
  • UE user equipment
  • MS mobile station
  • MT mobile terminal
  • the terminal device may be a sensor, a servo motor, a mobile robot, or the like.
  • the user plane network element can be used to forward user plane data of the terminal device.
  • the main functions are packet routing and forwarding, and mobility anchors.
  • the user plane network element can also be used as an uplink classifier to support routing service flows to the data network, or as a branch point to support multi-homed packet data unit (PDU) sessions.
  • the user plane network element may be a user plane function (UPF) network element.
  • UPF user plane function
  • the first device and the second device are a master clock node and a node requiring clock synchronization, respectively.
  • the clock of the second device needs to be synchronized to the clock of the first device.
  • the first device and the second device are adjacent devices in an Ethernet network; there is at least one hop of other devices between the first device and the second device in a mobile network, for example, connecting Into the device, etc.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access network device is a node in a wireless access network, and may also be called a base station, and may also be called a radio access network (RAN) node (or device).
  • RAN radio access network
  • some examples of access network equipment are: gNB, transmission receiving point (TRP), evolved Node B (eNB), radio network controller (RNC), node B (Node B, NB), base station controller (BSC), base transceiver station (BTS), home base station (e.g., home NodeB, or home NodeB, HNB), baseband unit (base band unit (BBU), or wireless fidelity (Wifi) access point (AP).
  • TRP transmission receiving point
  • eNB evolved Node B
  • RNC radio network controller
  • Node B, NB node B
  • BSC base station controller
  • BTS base transceiver station
  • home base station e.g., home NodeB, or home NodeB, HNB
  • BBU baseband unit
  • Wifi wireless fidelity
  • FIG. 1 illustrates an architecture of a possible communication system to which the synchronization method provided in the embodiment of the present application is applicable.
  • the communication system is divided into an Ethernet network and a mobile network.
  • the Ethernet network is an Ethernet network in an industrial network
  • the mobile network is applied to an industrial network and interfaces with the Ethernet network.
  • the Ethernet network in FIG. 1 is shown by a TSN network
  • the mobile network is shown by a fifth generation mobile communication technology (5G) network.
  • 5G fifth generation mobile communication technology
  • the TSN network includes a programmable logic controller (PLC), other control equipment, and terminal equipment.
  • PLC programmable logic controller
  • the PLC may be a master clock device in the TSN network.
  • the servo motor 1 shown in FIG. 1 is the other control device, and the sensor 1 is a terminal device in the TSN network.
  • the 5G network may include a user plane network element, an access device, a terminal device, and the like.
  • the user plane network element is shown as UPF in FIG. 1;
  • the access device is shown as a radio access network (RAN) node (or device);
  • the sensor 2 the servo motor 2, and the mobile robot Both are examples of terminal devices.
  • RAN radio access network
  • the TSN network shown in FIG. 1 is only an example of an Ethernet network
  • the 5G network is only an example of a mobile network, and cannot be used as a limitation of the communication system of this application.
  • the Ethernet network may also have various other examples.
  • the mobile network may also have various other examples, which are not listed here one by one.
  • FIG. 2 shows a working schematic diagram of a communication system to which a synchronization method provided in an embodiment of the present application is applicable.
  • the message in FIG. 2 may be an Ethernet message, an Ethernet data packet, or the like, and the message may be transmitted as a data packet during a PDU session in a mobile network.
  • the master clock device in the Ethernet network is a PLC, and the PLC determines the master clock in the Ethernet network.
  • FIG. 2 shows that the master clock in the Ethernet synchronization domain is T1.
  • UE and UPF are considered as two adjacent nodes.
  • the UE needs to perform clock synchronization according to the master clock information of the UPF.
  • the main clock device can be a building integrated timing supply system (building integrated timing supply, BITS) or time server, global positioning system (GPS), Beidou, etc., which is determined by the main clock device.
  • BITS building integrated timing supply
  • GPS global positioning system
  • FIG. 2 shows that the master clock in the synchronization domain of the mobile network is T2.
  • the current clock synchronization in the mobile network has been implemented, so the clock synchronization in the Ethernet network can be performed according to the clock synchronization in the mobile network.
  • FIG. 2 only shows the case where the UPF is used as the master clock node and the UE needs to perform clock synchronization.
  • the positions of the UE and the UPF may be interchanged, that is, the UE may serve as the master clock node, and the UPF needs to perform clock synchronization.
  • the UE in FIG. 2 is only an example of a terminal device, and the UE may also be replaced with another terminal device (for example, the mobile robot and the sensor 2 in FIG. 1); the UPF is only used as a type of user plane network element.
  • the UPF may also be replaced by other user plane network elements, which is not limited in this application.
  • a synchronization method provided in the embodiment of the present application is applicable to the communication system shown in FIG. 1 and FIG. 2.
  • the first device in FIG. 3 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF.
  • the specific process of the method includes:
  • Step 301 The first device sends a first message to the access device.
  • the first message carries first time stamp information, and determines second time stamp information.
  • the first time stamp information is the first time stamp information.
  • the time in the Ethernet network when the device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message.
  • the first device before the first device sends the first packet to an access device, the first device receives a data packet from an Ethernet network (for example, TSN), so When the first device recognizes that the format information of the data packet is 0x88f7, it determines that the data packet is an 802.1AS synchronization data packet. Then, the first device sends the first message to the access device, and a clock synchronization process is initiated at this time.
  • an Ethernet network for example, TSN
  • FIG. 4 shows a schematic diagram of message transmission and reception during synchronization between the first device and the second device.
  • the solid line in FIG. 4 indicates the transmission of the message in the Ethernet network
  • the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dotted line in FIG. 4 indicate the same message Transmission.
  • the time corresponding to the first time stamp information in step 301 is recorded as t1 in FIG. 4, and the second time stamp information is recorded as t1 ′ in FIG. 4.
  • the second time stamp information is recorded locally, so that the first device subsequently calculates a round-trip between the first device and the second device. Transmission delay difference.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
  • Step 302 The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information.
  • the access device may specifically forward the first packet to the second device, and the third packet is the first packet. A message.
  • Step 303 The second device determines third time stamp information and eighth time stamp information.
  • the third time stamp information is a time in the mobile network when the second device receives the third message.
  • the eighth time stamp information is a time in the Ethernet network when the second device receives the third message.
  • the time corresponding to the third time stamp information is recorded as t2 '
  • the eighth time stamp information is recorded as t2.
  • Step 304 The second device sends a fourth message to the access device.
  • the fourth message carries the third time stamp information and the fourth time stamp information.
  • the fourth time stamp information is The time in the mobile network when the second device sends the fourth message to the access device.
  • the time corresponding to the fourth time stamp information is denoted as t3 '.
  • a flag may be carried in the fourth message, and the flag is used to indicate that the fourth message carries time stamp information indicating a time in the mobile network.
  • the fourth packet carries the third timestamp information and the fourth timestamp information
  • a specific implementation method may be: the second device sends the third timestamp information
  • the timestamp information and the fourth timestamp information are carried in a second protocol field included in the fourth message.
  • the second protocol field may be an existing protocol field in the fourth message in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework Newly added protocol field in the fourth message.
  • the fourth packet further carries a flag
  • the flag may also be carried in the second protocol field.
  • FIG. 5 shows a schematic diagram of an existing protocol stack framework, which indicates field examples (that is, message format examples) of packets in different positions (that is, different devices) in the protocol stack framework.
  • the second protocol field may have the following two situations:
  • the second protocol field may be a service data protocol (SDAP) field or a data convergence protocol (PDCP) field.
  • SDAP service data protocol
  • PDCP data convergence protocol
  • the second device encapsulates the third timestamp information and the fourth timestamp information in a message protocol field SDAP field or a PDCP field corresponding to the terminal device as shown in FIG. 5, Then, the fourth packet obtained after the encapsulation is sent to the access device.
  • SDAP service data protocol
  • PDCP data convergence protocol
  • the second protocol field may also be any other field in the message protocol field corresponding to the terminal device shown in FIG.
  • the two protocol fields are other protocol fields, they will not be repeated one by one here.
  • the second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • the second device adds a new protocol field NEW field to the message protocol field corresponding to the terminal device shown in FIG. 5, for example, as described in the protocol stack architecture shown in FIG.
  • the message protocol field corresponding to the terminal device is shown; then the third timestamp information and the fourth timestamp information are encapsulated in a NEW field, and the encapsulated fourth message is sent to the access device .
  • the NEW field is only used as an example.
  • the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
  • the second protocol field may have the following two situations:
  • the second protocol field is a general packet radio service tunneling protocol (General Packet Radio Service, GPRS) tunneling protocol (GTP) field.
  • GPRS General Packet Radio Service
  • GTP tunneling protocol
  • the second device encapsulates the third time stamp information and the fourth time stamp information in a message protocol field GTP field corresponding to the user plane network element shown in FIG. 5, and then The fourth packet obtained after the encapsulation is sent to the access device.
  • the second protocol field may also be any other field in the message protocol field corresponding to the user plane network element shown in FIG. 5, which is not limited in this application for comparison.
  • the protocol fields are other fields, they are not repeated here one by one.
  • the second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • the second device adds a new protocol field, the NEW field, to the message protocol field corresponding to the user plane network element shown in FIG. 5, for example, in the protocol stack architecture shown in FIG.
  • the third timestamp information and the fourth timestamp information are encapsulated in a NEW field, and the encapsulated fourth message is sent to all Mentioned access equipment.
  • the NEW field is only used as an example.
  • the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
  • Step 305 The second device determines ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device.
  • the time corresponding to the ninth time stamp information is denoted as t3.
  • Step 306 The access device sends a second message to the first device, and the second message carries the third time stamp information and the fourth time stamp information.
  • the access device sends a second message to the first device.
  • the specific method may be: when the access device detects that the second protocol field included in the fourth message carries a third message, When the timestamp information and the fourth timestamp information, the third timestamp information and the fourth timestamp information are encapsulated into a first protocol field included in the fourth message, and the second message is generated And sending the second message to the first device.
  • the first protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the actual conditions of the first protocol field may be divided into multiple types according to the actual conditions of the first device and the second device, and the actual conditions of the two protocol fields are different.
  • the first protocol field may have the following two situations:
  • the first protocol field may be a GTP field.
  • the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in an SDAP field or a PDCP field in the received fourth message, the access device The access device extracts the third timestamp information and the fourth timestamp information from the SDAP field or the PDCP field, and then encapsulates them in a message protocol field GTP corresponding to the access device as shown in FIG. 5 In the field, the second message is generated.
  • the GTP field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may also be any other field in the packet protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison.
  • the first protocol When the fields are other protocol fields, they are not repeated here one by one.
  • the first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in an SDAP field or a PDCP field in the received fourth message, The access device extracts the third timestamp information and the fourth timestamp information from an SDAP field or a PDCP field, and then the access device corresponds to the access device shown in FIG. 5
  • a new protocol field, the NEW field is added to the message protocol field, for example, shown in the message protocol field corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then the third time stamp information and the The fourth timestamp information is encapsulated in a NEW field to obtain the second message.
  • the NEW field of the second message includes the third timestamp information and the fourth timestamp information.
  • the first protocol field may have the following two situations:
  • the first protocol field may be a GTP field.
  • the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from the NEW field, and then encapsulating them in a message protocol field GTP field corresponding to the access device as shown in FIG. 5 to generate the In the second message, the GTP field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may also be any other field in the packet protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison.
  • the first protocol When the fields are other protocol fields, they are not repeated here one by one.
  • the first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth message, the access device The incoming device extracts the third timestamp information and the fourth timestamp information from the NEW field, and then the access device adds a message protocol field corresponding to the access device shown in FIG. 5 A new protocol field, the NEW field, for example, shown in the protocol field of the message corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then encapsulating the third time stamp information and the fourth time stamp information In the NEW field, the second message is obtained. At this time, the NEW field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may have the following two situations:
  • the first protocol field may be an SDAP field or a PDCP field.
  • the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a received GTP field in the fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from a GTP field, and then encapsulating them in a message protocol field SDAP field or a PDCP field corresponding to the access device as shown in FIG. 5, Generate the second message, and at this time, the SDAP field or the PDCP field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG.
  • the first protocol field is other protocol fields, details are not repeated here.
  • the first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in the received GTP field in the fourth message, the access device The incoming device extracts the third timestamp information and the fourth timestamp information from the GTP field, and then the access device adds a message protocol field corresponding to the access device shown in FIG. 5 A new protocol field, the NEW field, for example, shown in the protocol field of the message corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then encapsulating the third time stamp information and the fourth time stamp information In the NEW field, the second message is obtained. At this time, the NEW field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may have the following two situations:
  • the first protocol field may be an SDAP field or a PDCP field.
  • the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from the NEW field, and then encapsulating them in a message protocol field SDAP field or a PDCP field corresponding to the access device as shown in FIG. 5, Generate the second message, and at this time, the SDAP field or the PDCP field of the second message includes the third time stamp information and the fourth time stamp information.
  • the first protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison.
  • the first protocol field is other protocol fields, details are not repeated here.
  • the access device may detect the first When the second protocol field in the four packets includes the flag, the foregoing process is performed.
  • the access device simultaneously extracts the flag from the second protocol field, and encapsulates the flag in the first protocol field.
  • the first device extracts the third time stamp information and the third time stamp information carried in the first protocol field included in the second message.
  • the fourth time stamp information For example, according to the various situations of the first protocol field described above, it can be divided into the following three cases:
  • Case g1 The first device extracts the third time stamp information and the fourth time stamp information in a GTP field.
  • the first device is a user plane network element
  • a message protocol field corresponding to the first device is a field corresponding to the user plane network element shown in FIG. 5.
  • Case g2 The first device extracts the third time stamp information and the fourth time stamp information in an SDAP field or a PDCP field.
  • the first device is a terminal device, and a message protocol field corresponding to the first device is a field corresponding to the terminal device shown in FIG. 5.
  • Case g3 The first device extracts the third time stamp information and the fourth time stamp information in a NEW field.
  • the first device is a terminal device or a user plane network element.
  • a message protocol field corresponding to the first device is a field corresponding to the terminal device shown in FIG. 6; when the first device is a user plane network element, all The message protocol field corresponding to the first device is a field corresponding to the user plane network element shown in FIG. 6.
  • the access device when the access device detects that the second protocol field is a NEW field, the NEW field encapsulates the third time stamp information and the fourth time stamp information. When the access device does not process the fourth message, it may directly forward the fourth message to the first device. At this time, the fourth message is the second message. Text. In this way, after the first device receives the second packet, the first device can directly extract the third time stamp information and the first time stamp information in the second protocol field (that is, the NEW field). Four timestamp information.
  • the message protocol field corresponding to the first device is a field corresponding to the user plane network element or the terminal device shown in FIG. 6. In this process, a message protocol field corresponding to the access device is a field corresponding to the access device shown in FIG. 5.
  • Step 307 The first device determines fifth time stamp information and sixth time stamp information.
  • the fifth time stamp information is a time in the Ethernet network when the first device receives the second packet.
  • the sixth time stamp information is a time in the mobile network when the first device receives the second message.
  • the time corresponding to the fifth time stamp information is recorded as t4; the time corresponding to the sixth time stamp information is recorded as t4 '.
  • Step 308 The first device determines a first time stamp according to the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the sixth time stamp information. Seven timestamp information.
  • the specific method may be: the first device according to the second time stamp information (t1 ') and the third time stamp information (t2 '), the fourth timestamp information (t3'), and the sixth timestamp information (t4 ') determine a round-trip transmission delay difference between the first device and the second device; The first device calculates a sum of a time (t4) corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the seventh time stamp information.
  • the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formulas 1 and 2:
  • offset1 is the time difference between the first device and the second device in the mobile network; delay1 is the transmission delay from the first device to the second device; delay2 is the second A transmission delay of the device to the first device.
  • time corresponding to the seventh timestamp information is t4 + t2'-t1'-t4 '+ t3'.
  • Step 309 The first device sends the seventh time stamp information to the access device.
  • the first device sends the fifth timestamp information to the access device, so that the access device sends the fifth time stamp information to the second device.
  • the first device sends the seventh time stamp information to the second device by using the existing method for sending the fifth time stamp information. It can also be understood that instead of the fifth timestamp information, the seventh timestamp information is sent to the second device. In this way, when the second device receives the seventh timestamp information, it will send The seventh timestamp information is treated as the fifth timestamp information in the prior art.
  • Step 310 The access device sends the seventh timestamp information to the second device.
  • Step 311 The second device according to the first time stamp information (t1), the eighth time stamp information (t2), the ninth time stamp information (t3), and the seventh time stamp information ( t4 + t2'-t1'-t4 '+ t3') determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
  • the second device may determine, according to the seventh timestamp information, when the first device thinks that the first device receives the second packet.
  • the time in the Ethernet network uses the seventh timestamp information as the fifth timestamp information.
  • time offset offset2 between the first device and the second device may meet the following formula 3:
  • packets involved in this embodiment are all 802.1AS protocol packets.
  • the timestamp information corresponding to the time in the mobile network mentioned above when carried in any one of the GTP field, SDAP field, and NEW field in the message, it may be in the corresponding protocol.
  • N bytes are reserved in the field for timestamp information.
  • N is a positive integer, for example, N is 10.
  • M bytes are reserved in the protocol field for a flag, where M is a positive integer, for example, M is 1.
  • the first device determines the seventh time stamp information by using the time stamp information of the message transmitted and received in the mobile network, so that the second device is based on the seventh time stamp information and the Ethernet network.
  • the time of sending and receiving packets is used to calculate the time deviation between the first device and the second device, and then perform time synchronization.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2.
  • the first device in FIG. 7 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF.
  • the specific process of the method may include:
  • Step 701 The first device sends a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device.
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message.
  • the trigger condition for the clock synchronization process initiated by the first device is the same as the principle described in step 301 in the embodiment shown in FIG.
  • the schematic diagram of message transmission and reception during synchronization between the first device and the second device shown in FIG. 4 can also be referred to in this embodiment.
  • the time corresponding to the first time stamp information in step 401 is recorded as t1 in FIG. 4
  • the second time stamp information is recorded as t1 'in FIG.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
  • a flag may be carried in the first message, and the flag is used to indicate that the first message carries time stamp information indicating a time in a mobile network.
  • the first packet carries the second timestamp information
  • a specific implementation method may be: the first device carries the second timestamp information in the first
  • a message is included in a first protocol field.
  • the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message.
  • the flag may also be carried in the first protocol field.
  • the first protocol field may have the following two situations:
  • the first protocol field may be an SDAP field or a PDCP field.
  • the first device encapsulates the second time stamp information in a message protocol field SDAP field or a PDCP field corresponding to the terminal device as shown in FIG. 5, and then encapsulates the first obtained A message is sent to the access device.
  • the first protocol field may also be any other field in the message protocol field corresponding to the terminal device shown in FIG. 5, which is not limited in this application comparison.
  • one protocol field is another protocol field, details are not repeated here.
  • the first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • the first device adds a new protocol field, the NEW field, to the message protocol field corresponding to the terminal device shown in FIG. 5, for example, as described in the protocol stack architecture shown in FIG.
  • the message protocol field corresponding to the terminal device is shown; then the second time stamp information is encapsulated in a NEW field, and the first message obtained after the encapsulation is sent to the access device.
  • the NEW field is only used as an example.
  • the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
  • the first protocol field may have the following two situations:
  • the first protocol field is a GTP field.
  • the first device encapsulates the second time stamp information in a message protocol field GTP field corresponding to the user plane network element shown in FIG. 5, and then encapsulates the first message obtained by the encapsulation. Sending to the access device.
  • the first protocol field may also be any other field in the message protocol field corresponding to the user plane network element shown in FIG.
  • the protocol fields are other fields, they are not repeated here one by one.
  • the first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • the first device adds a new protocol field, the NEW field, to the message protocol field corresponding to the user plane network element shown in FIG. 5, for example, in the protocol stack architecture shown in FIG.
  • the message protocol field corresponding to the user plane network element is shown; then the second time stamp information is encapsulated in a NEW field, and the first message obtained after the encapsulation is sent to the access device.
  • the NEW field is only used as an example.
  • the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
  • Step 702 The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information and the second time stamp information.
  • the access device sends the third message to the second device based on the first message
  • a specific method may be: when the access device detects all the When the first protocol field included in the first packet includes the second time stamp information, the access device encapsulates the second time stamp information into the second protocol field included in the first packet. To generate the third message, and send the third message to the second device. At this time, the second protocol field of the third message carries the second time stamp information.
  • the second protocol field may be an existing protocol field or a newly added field in an existing protocol stack framework.
  • the actual situation of the second protocol field may be divided into multiple types according to the actual situation of the first device and the second device and the actual situation of the first protocol field.
  • the second protocol field may have the following two situations:
  • the second protocol field may be a GTP field.
  • the access device detects that the second time stamp information is encapsulated in an SDAP field or a PDCP field in the received first packet, the access device adds the second time stamp information.
  • the timestamp information is extracted from the SDAP field or the PDCP field, and then encapsulated in the message protocol field GTP field corresponding to the access device as shown in FIG. 5 to generate the third message.
  • the GTP field of the three messages includes the second time stamp information.
  • the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG.
  • the fields are other protocol fields, they are not repeated here one by one.
  • the second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the second time stamp information is encapsulated in the SDAP field or the PDCP field in the received first packet, the access device changes the The second timestamp information is extracted from the SDAP field or the PDCP field, and then the access device adds a new protocol field, the NEW field, to the message protocol field corresponding to the access device shown in FIG. 5, for example, as shown in FIG.
  • the protocol protocol field shown in FIG. 6 indicates the message protocol field corresponding to the access device; then the second timestamp information is encapsulated in a NEW field to obtain the third message.
  • the NEW field of the three messages contains the second time stamp information.
  • the second protocol field may have the following two situations:
  • the second protocol field may be a GTP field.
  • the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device adds the second time stamp information Extracted from the NEW field, and then encapsulated in the GTP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message.
  • the GTP field of the third message The second time stamp information is included.
  • the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison.
  • the second protocol When the fields are other protocol fields, they are not repeated here one by one.
  • the second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device sets the second time The stamp information is extracted from the NEW field, and then the access device adds a new protocol field, the NEW field, to the message protocol field corresponding to the access device shown in FIG. 5, such as the protocol stack shown in FIG. The message protocol field corresponding to the access device in the architecture is shown; then the second timestamp information is encapsulated in a NEW field to obtain the third message, and at this time, the NEW field of the third message The second time stamp information is included.
  • the second protocol field may have the following two situations:
  • the second protocol field may be an SDAP field or a PDCP field.
  • the access device detects that the second time stamp information is encapsulated in a received GTP field in the first packet, the access device adds the second time stamp information Extracted from the GTP field, and then encapsulated in the SDAP field or the PDCP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message.
  • the third message The SDAP field or the PDCP field of the second time stamp information.
  • the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG.
  • the second protocol field is another protocol field, details are not repeated here.
  • the second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field).
  • a NEW field For example, in this case, when the access device detects that the second time stamp information is encapsulated in the received GTP field in the first packet, the access device sets the second time The stamp information is extracted from the GTP field, and then the access device adds a new protocol field NEW field to the message protocol field corresponding to the access device shown in FIG. 5, such as the protocol stack shown in FIG. The message protocol field corresponding to the access device in the architecture is shown; then the second timestamp information is encapsulated in a NEW field to obtain the third message, and at this time, the NEW field of the third message The second time stamp information is included.
  • the second protocol field may have the following two situations:
  • the second protocol field may be an SDAP field or a PDCP field.
  • the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device adds the second time stamp information Extracted from the NEW field, and then encapsulated in the SDAP field or PDCP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message.
  • the third message The SDAP field or the PDCP field of the second time stamp information.
  • the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison.
  • the second protocol field is another protocol field, details are not repeated here.
  • Case m2 The same as the above case k2, which can be referred to each other, and will not be described again here.
  • the access device may detect the When the flag is included in the first protocol field in the message, the foregoing process is performed.
  • the access device may simultaneously extract the flag from the first protocol field, and encapsulate the flag in the second protocol field.
  • the second device extracts the second time stamp information carried in the second protocol field included in the third message.
  • the second protocol field it can be divided into the following three cases:
  • Case n1 The second device extracts the second time stamp information in a GTP field.
  • the second device is a user plane network element
  • the message protocol field corresponding to the second device is a field corresponding to the user plane network element shown in FIG. 5.
  • Case n2 The second device extracts the second time stamp information in an SDAP field or a PDCP field.
  • the second device is a terminal device, and a message protocol field corresponding to the second device is a field corresponding to the terminal device shown in FIG. 5.
  • Case n3 The second device extracts the second time stamp information in a NEW field.
  • the second device is a terminal device or a user plane network element.
  • a message protocol field corresponding to the second device is a field corresponding to the terminal device shown in FIG. 6; when the second device is a user plane network element, all The message protocol field corresponding to the second device is a field corresponding to the user plane network element shown in FIG. 6.
  • the access device when the access device detects that the first protocol field is a NEW field, that is, when the second time stamp information is encapsulated in a NEW field, the access device may The first message is not processed, and the first message is directly forwarded to the second device. At this time, the first message is the third message. In this way, after the second device receives the third message, the second device can directly extract the second time stamp information in the first protocol field (ie, the NEW field).
  • the message protocol field corresponding to the second device is a field corresponding to the user plane network element or the terminal device shown in FIG. 6.
  • a message protocol field corresponding to the access device is a field corresponding to the access device shown in FIG. 5.
  • Step 703 The second device determines fifth time stamp information and sixth time stamp information.
  • the fifth time stamp information is a time in the Ethernet network when the second device receives the third packet.
  • the sixth time stamp information is a time in the mobile network when the second device receives the third message.
  • the time corresponding to the fifth time stamp information may be t2 in FIG. 4, and the time corresponding to the sixth time stamp information may be t2 'in FIG.
  • Step 704 The second device sends a fourth message to the access device.
  • the fourth message may not carry any time stamp information, and is only used as a message for identifying a message receiving and sending time in the synchronization process.
  • the time stamp information in the following step 705 is obtained based on the fourth message.
  • Step 705 The second device determines seventh timestamp information and eighth timestamp information.
  • the seventh timestamp information is described when the second device sends the fourth message to the access device.
  • the time in the Ethernet network, and the eighth time stamp information is the time in the mobile network when the second device sends the fourth message to the access device.
  • the time corresponding to the seventh timestamp information may be t3 in FIG. 4, and the time corresponding to the eighth timestamp information may be t3 'in FIG.
  • Step 706 The access device sends a second message to the first device based on the fourth message.
  • the access device may specifically forward the fourth packet to the first device, and the fourth packet is the second packet. Message.
  • Step 707 After receiving the second message, the first device determines third time stamp information and fourth time stamp information.
  • the third time stamp information is the second message received by the first device.
  • the time in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device received the second message.
  • the time corresponding to the third time stamp information may be t4 in FIG. 4, and the time corresponding to the fourth time stamp information may be t4 'in FIG.
  • Step 708 The first device sends the third time stamp information and the fourth time stamp information to the access device.
  • the specific method may be: the first device sends a fifth message to the access device, and the fifth message carries the third time stamp information And the fourth timestamp information.
  • the fifth message carries the fourth timestamp information
  • the processing principle of the fifth message by the first device is the same as that carried in the first message in step 701.
  • the condition of the second timestamp and the processing principle of the first packet by the first device are the same, and can be referred to each other, and details are not described in detail here.
  • Step 709 The access device sends the third time stamp information and the fourth time stamp information to the second device.
  • the specific method for the access device to perform step 709 may be: the access device sends a sixth message to the second device based on the fifth message, and the sixth message carries The third time stamp information and the fourth time stamp information.
  • the sixth message carries the fourth time stamp information, and the principle that the access device processes the fifth message to generate the sixth message is the same as that described in step 702.
  • the third message carries the second timestamp information, and the principle that the access device generates the third message by processing the first message is the same, and you can refer to each other. More details.
  • Step 710 The second device according to the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth timestamp information, the third timestamp information, The fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
  • the specific method may be: the second device according to the second time stamp information (t1 ') and the sixth time stamp information (t2 '), the eighth timestamp information (t3'), and the fourth timestamp information (t4 ') determine a round-trip transmission delay difference between the first device and the second device; The second device according to the first time stamp information (t1), the third time stamp information (t4), the fifth time stamp information (t2), the seventh time stamp information (t3), and The round-trip transmission delay difference value determines a time deviation between the first device and the second device.
  • the second device is based on the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and the The round-trip transmission delay difference determines the time deviation between the first device and the second device.
  • the specific method may be: the second device determines ninth time stamp information, and the ninth time stamp information is A sum of a time corresponding to the third timestamp information and the round-trip transmission delay difference; the second device according to the first timestamp information, the fifth timestamp information, and the seventh timestamp information And the ninth time stamp information determines a time offset between the first device and the second device.
  • the time corresponding to the ninth time stamp information is t4 + t2'-t1'-t4 '+ t3'.
  • the time deviation between the first device and the second device may still conform to Formula 3 in the embodiment shown in FIG. 3, which is not described in detail here.
  • packets involved in this embodiment are all 802.1AS protocol packets.
  • the timestamp information corresponding to the time in the mobile network mentioned above when carried in any one of the GTP field, SDAP field, and NEW field in the message, it may be in the corresponding protocol.
  • N bytes are reserved in the field for timestamp information.
  • N is a positive integer, for example, N is 10.
  • M bytes are reserved in the protocol field for a flag, where M is a positive integer, for example, M is 1.
  • the second device calculates a time offset between the first device and the second device by using time stamp information of a message sent and received in a mobile network and time stamp information of a message sent and received in an Ethernet network. Furthermore, time synchronization is performed. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2.
  • the first device in FIG. 8 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF.
  • the specific process of the method may include:
  • Step 801 The first device sends a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device.
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message.
  • the first device before the first device sends the first packet to an access device, the first device receives a data packet from an Ethernet network (for example, TSN), so After the first device recognizes that the data packet is an 802.1AS frequency synchronization data packet, the first device sends the first message to the access device, and then initiates a clock synchronization process (here, the frequency Synchronization process).
  • an Ethernet network for example, TSN
  • the first device sends the first message to the access device, and then initiates a clock synchronization process (here, the frequency Synchronization process).
  • FIG. 9 shows a schematic diagram of message transmission and reception during the frequency synchronization between the first device and the second device.
  • the solid line in FIG. 9 indicates the transmission of the message in the Ethernet network
  • the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dashed line in the same direction in FIG. 9 indicate the same message. Transmission.
  • the time corresponding to the first time stamp information in step 801 is recorded as t5 in FIG. 9, and the second time stamp information is recorded as t5 'in FIG. 9.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
  • a flag may be carried in the first message, and the flag is used to indicate that the first message carries time stamp information indicating a time in a mobile network.
  • the first packet carries the second timestamp information
  • a specific implementation method may be: the first device carries the second timestamp information in the first
  • a message is included in a first protocol field.
  • the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message.
  • the flag may also be carried in the first protocol field.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the related description in step 701 and repeat refer to the related description in step 701 and repeat. The details are not repeated here.
  • Step 802 The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information and the second time stamp information.
  • the access device sends a third packet to the second device based on the first packet.
  • the specific method may be: when the access device detects the first packet When the first protocol field included in the text includes the second time stamp information, the access device encapsulates the second time stamp information into a third protocol field included in the first message, and generates the second time stamp information. A third message, and sending the third message to the second device.
  • the first protocol field is the same as the first protocol field in step 801, and similarly, reference may be made to the related description in step 701.
  • the third protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending a third message to the second device based on the first message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first message.
  • the device sends the third packet with the same principle.
  • the third protocol field may be the same as the second protocol field in step 702, and may be referred to each other, and details are not described herein again.
  • Step 803 The second device determines fifth timestamp information and sixth timestamp information.
  • the fifth timestamp information is a time in the Ethernet network when the second device receives the third packet.
  • the sixth time stamp information is a time in the mobile network when the second device receives the third message.
  • the time corresponding to the fifth time stamp information may be t6 in FIG. 9, and the time corresponding to the sixth time stamp information may be t6 'in FIG.
  • Step 804 The first device sends a second message to the access device.
  • the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is the first time stamp information.
  • the time in the Ethernet network when the device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message.
  • the time corresponding to the third time stamp information may be t8 in FIG. 9, and the time corresponding to the fourth time stamp information may be t8 'in FIG.
  • the fourth message carries the fourth timestamp information
  • a specific implementation method may be: the first device carries the fourth timestamp information in a first message included in the second message.
  • Second agreement field may be: the first device carries the fourth timestamp information in a first message included in the second message.
  • the second protocol field may be an existing protocol field in the second message in the current protocol stack framework; the second protocol field may also be the second protocol field in the current protocol stack framework Newly added protocol field in the message.
  • the flag may also be carried in the second protocol field.
  • the second protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • Step 805 The access device sends a fourth message to the second device based on the second message, and the fourth message carries the third time stamp information and the fourth time stamp information. .
  • the specific method for the access device to send a fourth message to the second device based on the second message may be: when the access device detects the second message When the included second protocol field includes the fourth timestamp information, the access device encapsulates the fourth timestamp information into a fourth protocol field of the second message to generate the fourth A message, and sending the fourth message to the second device.
  • the second protocol field is the same as the second protocol field in step 804, and similarly, reference may be made to the description of the first protocol field in step 701.
  • the fourth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending a fourth packet to the second device based on the second packet is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first packet.
  • the device sends the third packet with the same principle.
  • the fourth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • Step 806 The second device determines seventh timestamp information and eighth timestamp information.
  • the seventh timestamp information is a time in the Ethernet network when the second device receives the fourth packet.
  • the eighth time stamp information is a time in the mobile network when the second device receives the fourth message.
  • the time corresponding to the seventh time stamp information may be t7 in FIG. 9, and the time corresponding to the eighth time stamp information may be t7 'in FIG.
  • Step 807 The second device according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, and perform frequency synchronization according to the frequency deviation.
  • the second device is based on the first timestamp information (t5), the second timestamp information (t5 '), the third timestamp information (t8), The fourth timestamp information (t8 '), the fifth timestamp information (t6), the sixth timestamp information (t6'), the seventh timestamp information (t7), and the eighth
  • the timestamp information (t7 ') determines a frequency deviation between the first device and the second device
  • a specific method may be: the second device determines that a time corresponding to the sixth timestamp information is different from the first time A first difference between the times corresponding to the two timestamp information, and a second difference between the times corresponding to the eighth timestamp information and the times corresponding to the fourth timestamp information; and the second device according to the First time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the first difference value and the second difference value determine the first device and A frequency deviation between the second devices.
  • the first time stamp information for example, the
  • the second device is based on the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and the The first difference and the second difference determine a frequency deviation between the first device and the second device, and a specific method may be:
  • the second device determines that the frequency deviation is a quotient of the first value and a second value
  • the first value is A difference between the time corresponding to the third time stamp information and the time corresponding to the first time stamp information
  • the second value is a time value corresponding to the seventh time stamp information and the fifth time stamp information
  • the fifth value is a difference between a time corresponding to the seventh timestamp information and a time corresponding to the fifth timestamp divided by a time corresponding to the eighth timestamp information and the sixth The value obtained by the difference between the times corresponding to the timestamps;
  • the second device determines that the frequency deviation is a quotient of the first value and a sixth value, and the sixth value A value obtained by subtracting a seventh value from a difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp information, where the seventh value is the difference between the eighth value and the fifth value
  • the product value, the eighth value is a value obtained by subtracting the first difference value from the second difference value.
  • this scenario can be regarded as a message in the second process of frequency synchronization (that is, the second message and the fourth message).
  • (Text) Arrived at the second device early, so the second device needs to wait until the time difference within the mobile network is equal, and then perform the frequency deviation calculation.
  • the first value may be recorded as t8-t5
  • the third value may be recorded as [(t6'-t5 ')-(t7'-t8')] * [(t7-t6) / (t7 ' -t6 ')]
  • the second value can be written as t7-t6 + [(t6'-t5')-(t7'-t8 ')] * [(t7-t6) / (t7'-t6')] .
  • the frequency deviation ratio may meet the following formula four:
  • this scenario can be regarded as a message in the second process of frequency synchronization (that is, the second message and the fourth message).
  • Text The second device arrives late, so the second device needs to perform a frequency deviation calculation at a time when the delay difference within the mobile network is equal, that is, the corresponding operation described above is performed.
  • the first value may be recorded as t8-t5
  • the seventh value may be recorded as [(t7'-t8 ')-(t6'-t5')] * [(t7-t6) / (t7 ' -t6 ')]
  • the sixth value can be recorded as t7-t6-[(t7'-t8')-(t6'-t5 ')] * [(t7-t6) / (t7'-t6') ].
  • the frequency deviation ratio may conform to the following formula 5:
  • the absolute delay difference between the two frequency-synchronized message sending and receiving is equal (that is, the time difference within the mobile network). Equal delay).
  • the frequency deviation may be calculated according to the above formula 4, or may be calculated according to the above formula 5. Because when the first difference is equal to the second difference, the difference between the two is zero, so the frequency deviation can be directly calculated by the following formula six:
  • the second device uses the mobile network and Ethernet clock message transmission and reception time to transmit the message initiated by the first device, calculates the frequency deviation between the first device and the second device, and then performs the frequency. Synchronize. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the clock accuracy requirements of industrial plants.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2.
  • the first device in FIG. 10 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF.
  • the specific process of the method may include:
  • Step 1001 The first device determines first time stamp information, where the first time stamp information is a difference between a time corresponding to the second time stamp information and a time corresponding to the third time stamp information, and the second time stamp information is Master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network.
  • the first device recognizes a data packet from an Ethernet network (for example, TSN), and the first device recognizes that the format information of the data packet is 0x88f7, It is determined that the data packet is an 802.1AS synchronization data packet. Then, the first device executes step 1001, and a clock synchronization process is initiated at this time.
  • an Ethernet network for example, TSN
  • the time corresponding to the second time stamp information may be recorded as T2
  • the time corresponding to the third time stamp information may be recorded as T1
  • the first time stamp information is recorded as T1-T2.
  • the first device has two layers of chips, one of which recognizes the time of the mobile network, and the other layer of chips recognizes the time of the Ethernet network, and the first device determines the first
  • time stamp information the master clock information in the mobile network and the Ethernet network can be identified through the two-layer chip, and the difference between the two can be determined.
  • Step 1002 The first device sends a first message to the access device, and the first message carries the first time stamp information.
  • the first time stamp information may be carried by synchronization request (sync request) signaling.
  • the first message carries the first time stamp information
  • a specific implementation manner may be that the first device carries the first time stamp information in the first time stamp.
  • a message is included in a first protocol field.
  • the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the related description in step 701 and repeat refer to the related description in step 701 and repeat. The details are not repeated here.
  • Step 1003 The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information.
  • the access device sends a third message to the second device based on the first message.
  • the specific method may be: when the access device detects the first protocol included in the first message, When the first time stamp information is included in the field, the access device encapsulates the first time stamp information into a second protocol field included in the first message, generates the third message, and Sending the third message to the second device.
  • the first protocol field is the same as the first protocol field in step 1001, and similarly, reference may be made to the related description in step 701.
  • the second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending a third message to the second device based on the first message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first message.
  • the device sends the third packet with the same principle.
  • the second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • the second device extracts the first time stamp information carried in a second protocol field included in the third message .
  • the first time stamp information carried in a second protocol field included in the third message .
  • Step 1004 The second device determines fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the second device receives the third message.
  • the time corresponding to the fourth timestamp information may be recorded as T2 '.
  • Step 1005 The second device uses the time corresponding to the fourth timestamp information to add the difference corresponding to the first timestamp information to complete time synchronization.
  • the specific process in which the second device executes step 1005 may be T2 '+ T1-T2, that is, time synchronization is completed.
  • Step 1006 The second device sends a second message to the access device, where the second message is used to notify the first device that time synchronization is complete.
  • Step 1007 The access device sends the second message to the first device.
  • the above steps 1006 and 1007 are optional steps, which are shown by dashed lines in FIG. 10.
  • the first device may end the transmission of the message after the third message in the existing synchronization process by recognizing that time synchronization has been completed, thereby saving resource consumption.
  • the first device determines the difference between the master clock information in the mobile network and the Ethernet network, and sends the difference to the second device, so that the second device directly uses the difference in the master clock information.
  • Complete clock synchronization In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method.
  • FIG. 11 shows the structure of the first device.
  • the first device includes: a sending unit 1101, a processing unit 1102, and a receiving unit 1103, where:
  • the sending unit 1101 is configured to send a first message to the access device, where the first message carries first time stamp information, and the first time stamp information is the first device sending the first message Time in the Ethernet network;
  • a processing unit 1102 configured to determine second time stamp information, where the second time stamp information is a time in a mobile network when the first device sends the first message;
  • a receiving unit 1103 is configured to receive a second message from the access device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is received by the second device.
  • the fourth time stamp information is the time when the second device sends the message to the second device. The moment in the mobile network when the access device sends a fourth message; the second message is sent by the access device to the first device based on the fourth message;
  • the processing unit 1102 is further configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is in the Ethernet network when the first device receives the second packet. Time, the sixth time stamp information is the time in the mobile network when the first device receives the second message;
  • the processing unit 1102 is further configured to determine according to the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, and the sixth timestamp information. Seventh time stamp information;
  • the sending unit 1101 is further configured to forward the seventh timestamp information to the second device through the access device;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the processing unit 1102 in accordance with the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and When the sixth time stamp information determines the seventh time stamp information, it is specifically used to:
  • the processing unit 1102 is further configured to extract the first protocol included in the second packet after the receiving unit 1103 receives the second packet from the access device.
  • the third timestamp information and the fourth timestamp information carried in the fields.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device
  • the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method.
  • the access device includes a receiving unit 1201 and a sending unit 1202, where:
  • the receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first timestamp information, and the first timestamp information is the first message sent by the first device. Time in the Ethernet network;
  • a sending unit 1202 configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information;
  • the receiving unit 1201 is further configured to receive a fourth message from the second device, where the fourth message carries third time stamp information and fourth time stamp information, and the third time stamp information is The time in the mobile network when the second device receives the third message, and the fourth time stamp information is the time when the second device sends the fourth message to the access device.
  • the sending unit 1202 is further configured to send a second message to the first device, where the second message carries the third time stamp information and the fourth time stamp information;
  • the receiving unit 1201 is further configured to receive seventh timestamp information from the first device;
  • the sending unit 1202 is further configured to send the seventh timestamp information to the second device;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device further includes a processing unit, configured to detect when the second protocol field included in the fourth packet carries third time stamp information and fourth time stamp information. , Encapsulate the third timestamp information and the fourth timestamp information into a first protocol field included in the fourth message to generate the second message; the sending unit 1202 is sending the When the first device sends the second message, it is specifically configured to: when the processing unit detects that the second protocol field included in the fourth message carries third time stamp information and fourth time stamp information, The third timestamp information and the fourth timestamp information are encapsulated into a first protocol field included in the fourth message, and after the second message is generated, the first device sends the first time stamp to the first device. Two messages.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field
  • the first protocol field is general GTP field of packet radio service GPRS tunneling protocol
  • the second protocol field is a GTP field
  • the first protocol field is an SDAP field or a PDCP field.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method.
  • the second device includes a receiving unit 1301, a processing unit 1302, and a sending unit 1303, where:
  • the receiving unit 1301 is configured to receive a third message from the access device, where the third message carries first time stamp information, and the first time stamp information is in an Ethernet network when the first device sends the first message. Time; the third message is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane A network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element;
  • the processing unit 1302 is configured to determine third time stamp information and eighth time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the third message, so The eighth time stamp information is a time in the Ethernet network when the second device receives the third message;
  • a sending unit 1303 is configured to send a fourth message to the access device, where the fourth message carries the third time stamp information and the fourth time stamp information, and the fourth time stamp information is the The time in the mobile network when the second device sends the fourth message to the access device;
  • the processing unit 1302 is further configured to determine ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device. ;
  • the receiving unit 1301 is further configured to receive seventh timestamp information from the access device;
  • the processing unit 1302 is further configured to determine the first device and the first device according to the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Time deviation between the second devices, and time synchronization is performed according to the time deviation.
  • the processing unit 1302 is further configured to determine, according to the seventh timestamp information, a time in the Ethernet network when the first device receives a second packet, so that The second message is sent by the access device to the first device based on the fourth message.
  • the sending unit 1303 when the fourth message carries the third time stamp information and the fourth time stamp information, the sending unit 1303 is specifically configured to:
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field;
  • the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method.
  • the first device includes: a sending unit 1401 and a receiving unit 1402, where:
  • the sending unit 1401 is configured to send a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message
  • the receiving unit 1402 is configured to receive a second message from the access device, and determine third time stamp information and fourth time stamp information, where the third time stamp information is the first device receiving the first time stamp.
  • the time when the two messages are in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device receives the second message;
  • the sending unit 1401 is further configured to send the third time stamp information and the fourth time stamp information to the access device.
  • the first time stamp information, the second time stamp information, the The third time stamp information and the fourth time stamp information are used for time synchronization;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the sending unit 1401 when the first message carries the second time stamp information, the sending unit 1401 is specifically configured to carry the second time stamp information in the first message.
  • a message is included in a first protocol field.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device
  • the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method. See also FIG. 12.
  • the access device includes: a receiving unit 1201 and a sending unit 1202, where:
  • a receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message
  • a sending unit 1202 configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information and the second time stamp information;
  • the receiving unit 1201 is further configured to receive a fourth message from the second device, and send a second message to the first device based on the fourth message;
  • the receiving unit 1201 is further configured to receive third time stamp information and fourth time stamp information from the first device, where the third time stamp information is when the first device receives the second message.
  • the time in the Ethernet network, the fourth time stamp information is the time in the mobile network when the first device received the second message;
  • the sending unit 1202 is further configured to send the third timestamp information and the fourth timestamp information to the second device.
  • the first timestamp information, the second timestamp information, all The third time stamp information and the fourth time stamp information are used for time synchronization;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device further includes a processing unit, configured to detect that the first protocol field included in the first packet includes the second time stamp information, and The access device encapsulates the second timestamp information into a second protocol field included in the first message, and generates the third message.
  • the sending unit 1202 based on the first message direction, When the second device sends the third message, the second device is specifically configured to: when the processing unit detects that the second protocol time stamp information is included in a first protocol field included in the first message, The access device encapsulates the second time stamp information into a second protocol field included in the first message, and generates the third message, and then sends the third message to the second device. .
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • the first protocol field is an SDAP field or A PDCP field
  • the second protocol field is a GTP field.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method.
  • the second device includes a receiving unit 1301, a processing unit 1302, and a sending unit 1303, where:
  • the receiving unit 1301 is configured to receive a third message from the access device, where the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is sent by the first device to the first device.
  • the message is the time in the Ethernet network;
  • the second time stamp information is the time in the mobile network when the first device sends the first message;
  • the third message is the time when the access device is The first device sends the first message based on the first message after receiving the first message; wherein the first device is a user plane network element and the second device is a terminal device; or A device is a terminal device and the second device is a user plane network element;
  • the processing unit 1302 is configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is a time in the Ethernet network when the second device receives the third packet, so that The sixth time stamp information is a time in the mobile network when the second device receives the third message;
  • a sending unit 1303 is configured to send a fourth message to the access device, and determine seventh time stamp information and eighth time stamp information, where the seventh time stamp information is the second device accessing the access device.
  • the time in the Ethernet network when the device sends the fourth message, and the eighth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device time;
  • the receiving unit 1301 is further configured to receive third timestamp information and fourth timestamp information from the access device, where the third timestamp information is at the time when the first device receives the second message.
  • the time in the Ethernet network, the fourth time stamp information is the time in the mobile network when the first device received the second message; the second message is the access device Sent to the first device based on the fourth message;
  • the processing unit 1302 is further configured to: according to the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, the third time stamp information, The fourth timestamp information, the fifth timestamp information, and the seventh timestamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation .
  • the processing unit 1302 in accordance with the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, When the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, Specifically used for:
  • the processing unit 1302 in accordance with the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and When the round-trip transmission delay difference determines a time deviation between the first device and the second device, it is specifically used to:
  • the ninth time stamp information is a sum of a time corresponding to the third time stamp information and the round-trip transmission delay difference value
  • the processing unit 1302 is further configured to: after the receiving unit 1301 receives a third message from the access device, extract a second protocol field included in the third message The second timestamp information carried in.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network
  • the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method.
  • the first device includes: a sending unit 1501 and a processing unit 1502, where:
  • the sending unit 1501 is configured to send a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message
  • the sending unit 1501 is further configured to send a second message to the access device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is the first time stamp information.
  • the time in the Ethernet network when a device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the sending unit 1501 when the first message carries the second time stamp information, is specifically configured to carry the second time stamp information in the first message.
  • a message is included in a first protocol field.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device
  • the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • the sending unit 1501 when the fourth message carries the fourth timestamp information, the sending unit 1501 is specifically configured to carry the fourth timestamp information on the second
  • the message includes a second protocol field.
  • the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method. See also FIG. 12.
  • the access device includes: a receiving unit 1201 and a sending unit 1202, where:
  • a receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device
  • the first message is the time in the Ethernet network
  • the second time stamp information is the time in the mobile network when the first device sends the first message
  • a sending unit 1202 configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information and the second time stamp information;
  • the receiving unit 1201 is further configured to receive a second message from the first device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is The time in the Ethernet network when the first device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message;
  • the sending unit 1202 is further configured to send a fourth message to the second device based on the second message, where the fourth message carries the third time stamp information and the fourth time stamp information;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device further includes a processing unit, configured to detect that the first protocol field included in the first packet includes the second time stamp information, and The access device encapsulates the second timestamp information into a third protocol field included in the first message, and generates the third message.
  • the sending unit 1202 based on the first message direction, When the second device sends the third message, the second device is specifically configured to: when the processing unit detects that the second protocol timestamp information is included in the first protocol field included in the first message, the access device Encapsulate the second time stamp information into a third protocol field included in the first message, and generate the third message, and then send the third message to the second device.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the third protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field
  • the first protocol field is an SDAP field or A PDCP field
  • the third protocol field is a GTP field.
  • the access device further includes a processing unit, configured to detect that the second protocol field included in the second packet includes the fourth time stamp information, and The access device encapsulates the fourth timestamp information into a fourth protocol field of the second message to generate the fourth message; and the sending unit 1202, based on the second message, sends the
  • the second device is specifically configured to: when the processing unit detects that the fourth time stamp information is included in a second protocol field included in the second message, the access device sends The fourth time stamp information is encapsulated into a fourth protocol field of the second message, and after the fourth message is generated, the fourth message is sent to the second device.
  • the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the fourth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field
  • the second protocol field is an SDAP field or A PDCP field
  • the fourth protocol field is a GTP field.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method.
  • the second device includes a receiving unit 1601 and a processing unit 1602, where:
  • the receiving unit 1601 is configured to receive a third message from the access device, where the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is sent by the first device to The time in the Ethernet network when the access device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device;
  • the third message is sent by the access device to the second device based on the first message; wherein the first device is a user plane network element and the second device is a terminal device Or, the first device is a terminal device and the second device is a user plane network element;
  • the processing unit 1602 is configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is a time in the Ethernet network when the second device receives the third packet, and the first The six timestamp information is the time in the mobile network when the second device receives the third message;
  • the receiving unit 1601 is configured to receive a fourth message from the access device, where the fourth message carries third timestamp information and fourth timestamp information, and the third timestamp information is sent by the first device to The time in the Ethernet network when the access device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message to the access device; The fourth message is sent by the access device to the second device based on the second message;
  • the processing unit 1602 is further configured to determine seventh time stamp information and eighth time stamp information, where the seventh time stamp information is a time in the Ethernet network when the second device receives the fourth packet, The eighth time stamp information is a time in the mobile network when the second device receives the fourth message;
  • the processing unit 1602 is further configured to: according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, and perform frequency synchronization according to the frequency deviation .
  • the processing unit 1602 in accordance with the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, When the fifth time stamp information, the sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, Specifically used for:
  • the processing unit 1602 in accordance with the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information,
  • the method is specifically configured to:
  • the frequency deviation is a quotient of the first value and a second value
  • the first value is a time instant corresponding to the third time stamp information and A difference between the times corresponding to the first timestamp information
  • the second value is obtained by adding a third value to the difference between the times corresponding to the seventh timestamp information and the times corresponding to the fifth timestamp information
  • the third value is a product of a fourth value and a fifth value
  • the fourth value is a value obtained by subtracting the second difference from the first difference
  • the fifth value is A difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp divided by the difference between the time corresponding to the eighth time stamp information and the time corresponding to the sixth timestamp value;
  • the frequency deviation is a quotient of the first value and a sixth value
  • the sixth value is a value corresponding to the seventh time stamp information.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided in the embodiment shown in FIG. 10 .
  • the first device includes a processing unit 1701 and a sending unit 1702, where:
  • the processing unit 1701 is configured to determine first time stamp information, where the first time stamp information is a difference between a time corresponding to the second time stamp information and a time corresponding to the third time stamp information, and the second time stamp information is Master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network;
  • a sending unit 1702 configured to send a first message to the access device, where the first message carries the first time stamp information
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the sending unit 1702 when the first message carries the first timestamp information, the sending unit 1702 is specifically configured to carry the first timestamp information in the first message.
  • the message includes the first protocol field.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device
  • the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  • the first device further includes a receiving unit, configured to receive a second message from the access device, and the second message is used to notify the first device of time synchronization. completed.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided by the embodiment shown in FIG. 10 . See also FIG. 12.
  • the access device includes: a receiving unit 1201 and a sending unit 1202, where:
  • the receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information, and the first time stamp information is a time corresponding to the second time stamp information and a third time.
  • a time difference corresponding to the stamp information, the second time stamp information is master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network;
  • a sending unit 1202 configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information;
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device further includes a processing unit, configured to detect that, when the first protocol field included in the first packet includes the first time stamp information, the The access device encapsulates the first timestamp information into a second protocol field included in the first message, and generates the third message.
  • the sending unit 1202 based on the first message direction, When the second device sends the third message, it is specifically configured to: when the processing unit detects that the first time stamp information is included in the first protocol field included in the first message, the access device Encapsulate the first time stamp information into a second protocol field included in the first message, and generate the third message, and then send the third message to the second device.
  • the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field
  • the first protocol field is an SDAP field or A PDCP field
  • the second protocol field is a GTP field.
  • the receiving unit 1201 is further configured to receive a second message from the second device, and the sending unit 1202 is further configured to forward the second message to the first device.
  • the second message is used to notify the first device that time synchronization is completed.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided by the embodiment shown in FIG. 10 .
  • the second device includes a receiving unit 1601 and a processing unit 1602, where:
  • the receiving unit 1601 is configured to receive a third message from the access device, where the third message carries first time stamp information, and the first time stamp information is a time corresponding to the second time stamp information and a third time.
  • a time difference corresponding to the stamp information, the second time stamp information is master clock information in an Ethernet network, the third time stamp information is master clock information in a mobile network, and the third message is the Sent by the access device based on a first message sent by the first device to the access device; wherein the first device is a user plane network element and the second device is a terminal Device, or the first device is a terminal device and the second device is a user plane network element;
  • a processing unit 1602 configured to determine fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the second device receives the third message;
  • the processing unit 1602 is further configured to use the time corresponding to the fourth timestamp information to add a difference corresponding to the first timestamp information to complete time synchronization.
  • the processing unit 1602 is further configured to: after the receiving unit 1601 receives a third message from the access device, extract a second message included in the third message The first time stamp information carried in the protocol field.
  • the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network
  • the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  • the second device further includes a sending unit, configured to send a second message to the access device, and the second message is used to notify the first device of time synchronization. completed.
  • the division of the units in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner.
  • the functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium.
  • the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in each embodiment of the present application.
  • the aforementioned storage media include: U disks, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks, and other media that can store program codes .
  • an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a central processing unit (CPU), a network processor (NP), a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof.
  • the PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
  • CPLD complex programmable logic device
  • FPGA field-programmable gate array
  • GAL generic array logic
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 3.
  • an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 3.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
  • the memory 2003 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 3.
  • an embodiment of the present application further provides a first device, where the first device is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 7.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 7. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
  • an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 and is used to implement the synchronization method shown in FIG. 7.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 7. For details, refer to related descriptions in the embodiment shown in FIG. 7, and details are not described herein again.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 7.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 7. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
  • the memory 2003 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
  • an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 8.
  • an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 8.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
  • the memory 2003 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 8.
  • an embodiment of the present application further provides a first device, where the first device is applied to the communication system shown in FIG. 1 or FIG. 2 and is used to implement the synchronization method shown in FIG.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 10.
  • an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 10.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 10.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 10.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
  • the memory 2003 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 10.
  • the embodiment of the present application also provides another synchronization method, which is also applicable to the communication system shown in FIG. 1 and FIG. 2.
  • the first device in FIG. 21 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF.
  • the specific process of the method includes:
  • Step 2101 The first device sends a first message to the access device, and determines first time stamp information and second time stamp information; the first time stamp information is the first device sending the first message Time in the Ethernet network, the second time stamp information is the time in the mobile network when the first device sends the first message.
  • the trigger condition for the clock synchronization process initiated by the first device is the same as the principle described in step 301 in the embodiment shown in FIG.
  • FIG. 22 shows a schematic diagram of sending and receiving messages during synchronization between the first device and the second device.
  • the solid line in FIG. 22 indicates the transmission of the message in the Ethernet network
  • the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dotted line in FIG. 22 indicate the same message Transmission.
  • the time corresponding to the first time stamp information in step 2101 is recorded as t9 in FIG. 22, and the time corresponding to the second time stamp information is recorded as t9 'in FIG.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
  • Step 2102 The access device forwards the first message to a second device.
  • Step 2103 The second device determines fifth time stamp information and sixth time stamp information.
  • the fifth time stamp information is a time in the Ethernet network when the second device receives the first packet.
  • the sixth time stamp information is a time in the mobile network when the second device receives the first message.
  • the time corresponding to the fifth time stamp information is denoted as t10
  • the time corresponding to the sixth time stamp information is denoted as t10 '.
  • Step 2104 The first device sends a second message to the access device, and the second message carries the first time stamp information and the second time stamp information.
  • a flag may be carried in the second message, and the flag is used to indicate that the second message carries time stamp information indicating a time in the mobile network.
  • the second message carrying the second timestamp information may be specifically implemented as follows: the first device carries the second timestamp information in the second message.
  • the message includes the first protocol field.
  • the first protocol field may be an existing protocol field in the second message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the second message.
  • the flag may also be carried in the first protocol field.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • Step 2105 The access device sends a sixth message to the second device based on the second message, and the sixth message carries the first time stamp information and the second time stamp information. .
  • the specific method for the access device to send a sixth message to the second device based on the second message may be: when the access device detects the second message When the first protocol field included in the message carries the second time stamp information, encapsulating the second time stamp information into the second protocol field of the second message to generate the sixth message, And sending the sixth message to the second device. At this time, the second protocol field of the sixth message carries the second time stamp information.
  • the first protocol field is the same as the first protocol field in step 2104, and similarly, reference may be made to the related description in step 701.
  • the second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending a sixth message to the second device based on the second message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the first device.
  • the principle that the second device sends the third packet is the same.
  • the second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • the second device extracts the second timestamp carried in a second protocol field included in the sixth message.
  • the second device extracts the second timestamp carried in a second protocol field included in the sixth message.
  • information For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
  • Step 2106 The second device sends a third message to the access device, and determines seventh time stamp information, where the seventh time stamp information is Ethernet when the second device sends the third message. Moments in the network.
  • the time corresponding to the seventh timestamp information is recorded as t11.
  • Step 2107 The access device forwards the third message to the first device.
  • Step 2108 The first device determines third time stamp information, where the third time stamp information is a time in the Ethernet network when the first device receives the third message.
  • the time corresponding to the third time stamp information is recorded as t12.
  • Step 2109 The first device sends a fourth message to the access device, and determines fourth timestamp information; the fourth timestamp information is Ethernet when the first device sends the fourth message. At the time in the network, the fourth message carries the third time stamp information.
  • the time corresponding to the fourth time stamp information is denoted as t13.
  • Step 2110 The access device forwards the fourth message to the second device.
  • Step 2111 The second device determines eighth time stamp information, where the eighth time stamp information is a time in the Ethernet network when the second device receives the fourth message.
  • the time corresponding to the eighth time stamp information is denoted as t14.
  • Step 2112 The first device sends a fifth message to the access device, and the fifth message carries the fourth time stamp information.
  • Step 2113 The access device forwards the fifth message to the second device.
  • Step 2114 The second device according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
  • the specific method when the second device executes step 2114 may be:
  • the second device according to the second time stamp information (t9 '), the third time stamp information (t12), the sixth time stamp information (t10'), and the seventh time stamp information (t11 ) And the eighth timestamp information (t14) determine the ninth timestamp information;
  • the second device according to the first time stamp information (t9), the third time stamp information (t12), the fifth time stamp information (t10), the seventh time stamp information (t11), The eighth time stamp information (t14) and the ninth time stamp information determine a time offset between the first device and the second device.
  • the time offset offset3 between the master and slaver may meet the following formula 7:
  • t is the time in the Ethernet network when the first device sends the fourth message to the access device, and t is t13 in the existing fixed network.
  • the clock synchronization between the first device and the second device that has been implemented inside the mobile network may be used to calculate the relationship between the first device and the second device in the mobile network and Ethernet network docking scenario.
  • the time deviation can be calculated, for example, by the following formulas 8 and 9:
  • formula 8 represents the time relationship in the Ethernet network
  • offset4 is the time deviation between the first device and the second device in the Ethernet network
  • formula 9 represents the time relationship in the mobile network
  • offset5 is the time relationship in the mobile network A time deviation between the first device and the second device
  • delay3 is a transmission delay from the first device to the second device.
  • t t12-t11 + t14-2 (t10'-t9 ')
  • the t obtained at this time is the ninth time stamp information, that is, the time corresponding to the ninth time stamp information is: t12-t11 + t14-2 (t10'-t9 ').
  • the second device treats the ninth time stamp information as the fourth time stamp information (t13) in the prior art.
  • the second device can obtain the time offset between the first device and the second device, which can meet the following formula X:
  • the above formula 10 can be regarded as obtained by the second device replacing the t with the ninth timestamp information in the above formula 2, that is, the second device uses the ninth timestamp information as cash. Some t13 can be obtained.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • FIG. 23 is a working schematic diagram of another communication system to which the synchronization method according to the embodiment of the present application is applicable.
  • the message in FIG. 23 may be the same as the message in the diagram shown in FIG. 2.
  • the master clock device in the Ethernet network is a PLC, and the PLC determines the master clock in the Ethernet network.
  • FIG. 23 shows that the master clock in the Ethernet synchronization domain is T1.
  • the UE and the UPF are regarded as two adjacent nodes, and the UE and the UPF are devices in a master and slave transmission path.
  • the slave needs to perform clock synchronization according to the master clock information of the master.
  • the master clock device may refer to the related description in FIG. 2.
  • the master clock device determines the master clock in the mobile network.
  • FIG. 23 shows that the master clock in the mobile network synchronization domain is T2.
  • the current clock synchronization in the mobile network has been implemented, so the clock synchronization in the Ethernet network can be performed according to the clock synchronization in the mobile network.
  • the UE in FIG. 23 is only an example of a terminal device, and the UE may also be replaced with another terminal device (for example, the mobile robot and the sensor 2 in FIG. 1); the UPF is only used as a type of user plane network element.
  • the UPF may also be replaced by other user plane network elements, which is not limited in this application.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23.
  • the first device in FIG. 24 is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver.
  • the specific process of the method includes:
  • Step 2401 the first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is in the mobile network when the first device receives the first message. time.
  • FIG. 25 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
  • the time corresponding to the first time stamp information is recorded as t16 in FIG. 25.
  • the clock synchronization process is initiated by a third device, and the trigger condition of the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
  • Step 2402 The first device sends the first message to an access device.
  • Step 2403 The access device forwards the first message to a second device.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • Step 2404 The second device sends the first message to a fourth device, and determines fifth time stamp information, where the fifth time stamp information is that the second device sends the fourth device to the fourth device.
  • the first message is the time in the mobile network.
  • the time corresponding to the fifth time stamp information may be recorded as t17 in FIG. 25.
  • the fourth device determines the time in the Ethernet network when the first message sent by the second device is received, for example, t18 shown in FIG. 25.
  • Step 2405 The first device receives a second packet from the third device.
  • the second message carries the time when the third device sends the first message, for example, t15 shown in FIG. 25.
  • Step 2406 The first device sends a third message to the access device based on the second message, and the third message carries the first time stamp information.
  • the third packet also carries t15.
  • a flag may be carried in the third message, and the flag is used to indicate that the third message carries time stamp information indicating a time in the mobile network.
  • the third packet carries the first timestamp information
  • a specific implementation manner may be: the first device carries the first timestamp information in the first
  • the three messages include the first protocol field.
  • the first protocol field may be an existing protocol field in the third message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the third message.
  • the flag may also be carried in the first protocol field.
  • the third message may be generated by the first device encapsulating the first time stamp information into a first protocol field of the second message.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • Step 2407 The access device sends a ninth message to the second device based on the third message; the ninth message carries first time stamp information.
  • the ninth message also carries t15.
  • the access device sends a ninth message to the second device based on the third message
  • a specific method may be: when the access device detects the first When the first protocol field included in the three messages carries the first time stamp information, the first time stamp information is encapsulated into a fourth protocol field of the third message to generate the ninth message And sending the ninth message to the second device. At this time, the fourth protocol field of the ninth message carries the first time stamp information.
  • the first protocol field is the same as the first protocol field in step 2406, and similarly, reference may be made to the related description in step 701.
  • the fourth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending the ninth message to the second device based on the third message is the same as that of the access device in step 702 in the embodiment shown in FIG.
  • the principle that the second device sends the third packet is the same.
  • the fourth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • the second device extracts the first time stamp information carried in a fourth protocol field included in the ninth message.
  • the second device extracts the first time stamp information carried in a fourth protocol field included in the ninth message.
  • Step 2408 The second device sends a twelfth message to the fourth device based on the ninth message.
  • the specific method may be: the second device adds the first timestamp in the fourth protocol field in the ninth message. The information is deleted, and the twelfth message is generated. At this time, the twelfth message only carries t15.
  • Step 2409 The second device receives a fourth message from the fourth device, and determines sixth time stamp information.
  • the sixth time stamp information is when the second device receives the fourth message. Moments in mobile networks.
  • the fourth device records the time in the Ethernet network when the fourth packet is sent, for example, t19 in FIG. 25.
  • the time corresponding to the sixth time stamp information is recorded as t20 in FIG. 25.
  • Step 2410 The second device sends the fourth message to the access device.
  • Step 2411 The access device sends the fourth message to the first device.
  • Step 2412 The first device sends the fourth message to the third device, and determines second time stamp information, where the second time stamp information is sent by the first device to the third device.
  • the fourth message is a time in a mobile network.
  • the time corresponding to the second time stamp information is recorded as t21 in FIG. 25.
  • the third device records the time in the Ethernet network when the fourth message is received, such as t22 shown in FIG. 25.
  • Step 2413 The first device receives a fifth message from the third device, and determines third time stamp information.
  • the third time stamp information is when the first device receives the fifth message. Moments in mobile networks.
  • the third device records a time in the Ethernet network when the fifth message is sent, for example, t23 in FIG. 25.
  • the time corresponding to the third time stamp information may be recorded as t24 in FIG. 25.
  • Step 2414 The first device sends a sixth message to the access device based on the fifth message, and the sixth message carries the second time stamp information.
  • the sixth packet also carries t22.
  • a flag may be carried in the sixth message, and the flag is used to indicate that the sixth message carries time stamp information indicating a time in a mobile network.
  • the sixth message carries the second timestamp information in a specific implementation manner: the first device carries the second timestamp information in the sixth message.
  • the message includes a second protocol field.
  • the second protocol field may be an existing protocol field in the sixth packet in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework Newly added protocol field in the sixth message.
  • the flag may also be carried in the second protocol field.
  • the sixth message may be generated when the first device encapsulates the second time stamp information into a second protocol field of the fifth message.
  • the second protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • Step 2415 The access device sends a tenth message to the second device based on the sixth message; the tenth message carries the second time stamp information.
  • the tenth message also carries t22.
  • the access device sends a tenth packet to the second device based on the sixth packet.
  • the specific method may be: when the access device detects the first packet, When the second protocol field included in the six messages carries the second time stamp information, the second time stamp information is encapsulated into a fifth protocol field of the sixth message to generate the tenth message And sending the tenth message to the second device. At this time, the fifth protocol field of the tenth message carries the second time stamp information.
  • the second protocol field is the same as the second protocol field in step 2414, and similarly, reference may be made to the related description in step 701.
  • the fifth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending the tenth packet to the second device based on the sixth packet is the same as that of the access device in step 702 in the embodiment shown in FIG. 7 based on the first packet.
  • the principle that the second device sends the third packet is the same.
  • the fifth protocol field may be the same as the second protocol field in step 702, and may be referred to each other, and details are not described herein again.
  • the second device extracts the second time stamp information carried in a fifth protocol field included in the tenth message.
  • the second device extracts the second time stamp information carried in a fifth protocol field included in the tenth message.
  • Step 2416 The second device sends a thirteenth message to the fourth device, and determines seventh timestamp information; the seventh timestamp information is sent by the second device to the fourth device. The time in the mobile network at the time of the thirteenth message is described.
  • the thirteenth message is generated after the second device deletes the second time stamp information in a fifth protocol field in the tenth message. At this time, the thirteenth message carries t22.
  • the time corresponding to the seventh timestamp information may be recorded as t25 in FIG. 25.
  • the fourth device records the time in the Ethernet network when the thirteenth message is received, for example, t26 in FIG. 25.
  • Step 2417 The first device receives a seventh message from the third device, and the seventh message carries fourth timestamp information, and the fourth timestamp information is sent from the third device to the third device. The time in the Ethernet network when the first device sends the fifth message.
  • the time corresponding to the fourth timestamp information is t23 in FIG. 25.
  • Step 2418 The first device sends an eighth message to the access device, and the eighth message carries the third time stamp information and the fourth time stamp information.
  • a flag may be carried in the eighth message, and the flag is used to indicate that the eighth message carries time stamp information indicating a time in a mobile network.
  • the third timestamp information carries the third timestamp information
  • a specific method may be: the first device carries the third timestamp information in the eighth message
  • the message includes the third protocol field.
  • the third protocol field may be an existing protocol field in the eighth message in the current protocol stack framework; the third protocol field may also be described in the current protocol stack framework Newly added protocol field in the eighth message.
  • the eighth message also carries a flag
  • the flag may also be carried in the third protocol field.
  • the eighth message may be generated by the first device encapsulating the third time stamp information into a third protocol field of the seventh message.
  • the third protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the third protocol field see the first protocol field in step 701. Relevant descriptions are not repeated here.
  • Step 2419 The access device sends an eleventh message to the second device based on the eighth message; the eleventh message carries the third time stamp information and the fourth time Poke information.
  • the access device sends an eleventh message to the second device based on the eighth message.
  • the specific method may be: when the access device detects the When the third protocol field included in the eighth message carries the third time stamp information, the third time stamp information is encapsulated into the sixth protocol field of the eighth message to generate the eleventh message A message, and sending the eleventh message to the second device. At this time, the sixth protocol field of the eleventh message carries the second time stamp information.
  • the third protocol field is the same as the third protocol field in step 2418, and similarly, reference may be made to the related description in step 701.
  • the sixth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending an eleventh message to the second device based on the eighth message is the same as that of the access device in step 702 in the embodiment shown in FIG.
  • the principle for sending the third packet to the second device is the same.
  • the sixth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • the second device extracts the third time carried in a sixth protocol field included in the eleventh message. Poke information. For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
  • Step 2420 The second device according to the first time stamp information (t16), the second time stamp information (t21), the third time stamp information (t24), the fourth time stamp information, The fifth timestamp information (t17), the sixth timestamp information (t20), and the seventh timestamp information (t25) determine the eighth timestamp information.
  • the time offset offset7 between the master and slaver may meet the following formula 11:
  • t ' is the time in the Ethernet network when the third device sends the fifth message to the access device, and t is t23 in the existing fixed network.
  • the time relationship in the Ethernet network can exist in the following formulas 14 to 14:
  • t18-t15 offset8 + delay4 + ⁇ t1 + ⁇ t2 Equation 12;
  • t26-t23 offset8 + delay6 + ⁇ t1 + ⁇ t2 Equation 14;
  • offset8 is the time difference between the third device and the fourth device in the Ethernet network
  • delay4 is the transmission delay from the first device to the second device
  • delay5 is the delay from the second device to The transmission delay of the first device
  • delay6 is the transmission delay of the first device to the second device
  • ⁇ t1 is the transmission time between the third device and the first device (or the Transmission time between the second device and the fourth device)
  • ⁇ t2 is the transmission time between the second device and the fourth device (or between the third device and the first device) Transmission time).
  • the time relationship in the mobile network can exist in formula 15 to formula 17:
  • offset9 is a time deviation between the first device and the second device in the mobile network.
  • t ' 2 (t16-t17) + t23 + t21-t20 + t25-t24
  • t' is the eighth time stamp information, that is, the eighth time stamp information corresponds The time is 2 (t16-t17) + t23 + t21-t20 + t25-t24.
  • Step 2421 The second device sends the eighth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth timestamp information.
  • the second device sends t23 to the fourth device.
  • the second device sends the eighth timestamp information to the fourth device by using the existing method of sending t23. It can also be understood that instead of t23, the eighth timestamp information is sent to the fourth device. In this way, when the fourth device receives the eighth timestamp information, the fourth device Information is treated as t23 in the prior art.
  • the fourth device after the fourth device receives the eighth timestamp new information, the fourth device is t16-t17) + t23 + t21-t20 + t25-t24) to obtain the time deviation between the third device and the fourth device, which can meet the following formula 18:
  • the above formula 18 can be regarded as obtained by the fourth device substituting the eighth timestamp information into the above formula eleven and replacing t ′, that is, the fourth device substitutes the eighth timestamp
  • the information is obtained as the existing t23 processing.
  • the fourth device may perform time synchronization according to offset10.
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23.
  • the first device is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver.
  • the specific process of the method includes:
  • Step 2601 The first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is in a mobile network when the first device receives the first message. time.
  • FIG. 27 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
  • the time corresponding to the first time stamp information may be t28 shown in FIG. 27.
  • the first message carries the time in the Ethernet network when the third device sends the first message, for example, t27 shown in FIG. 27.
  • the clock synchronization process is initiated by a third device, and the trigger condition of the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
  • Step 2602 The first device sends the first message to the access device.
  • Step 2603 The access device sends the first message to a second device.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • Step 2604 The second device sends the first message to a fourth device, and determines second time stamp information, where the second time stamp information moves when the second device sends the first message. Moments in the network.
  • the time corresponding to the second time stamp information may be t29 in FIG. 27.
  • the fourth device After receiving the first message, the fourth device records a time in the Ethernet network when the first message is received, for example, t30 in FIG. 27.
  • Step 2605 The second device receives a fifth message from the fourth device, and determines third time stamp information.
  • the third time stamp information is when the second device receives the fifth message. The moment in the mobile network.
  • the time corresponding to the third time stamp information may be recorded as t32 in FIG. 27.
  • the fourth device may record a time in the Ethernet network when the fifth message is sent, for example, t31 shown in FIG. 27.
  • Step 2606 The second device sends a fourth message to the access device, where the fourth message carries the second time stamp information and the third time stamp information.
  • a flag may be carried in the fourth message, and the flag is used to indicate that the fourth message carries time stamp information indicating a time in the mobile network.
  • the fourth message carries the second timestamp information and the third timestamp information
  • a specific method may be: the second device sends the second time
  • the stamp information and the third time stamp information are carried in a second protocol field included in the fourth message.
  • the second protocol field may be an existing protocol field in the fourth message in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework. Newly added protocol field in the fourth message.
  • the flag may also be carried in the second protocol field.
  • the fourth message may be a second message in which the second device encapsulates the second time stamp information and the third time stamp information into the fifth message. Generated in the agreement field.
  • the second protocol field may be the same as the second protocol field in step 304 in the embodiment shown in FIG. 3.
  • the second protocol field refers to the second protocol field in step 304. Relevant descriptions are not repeated here.
  • Step 2607 The access device sends a second message to the first device, where the second message carries the second time stamp information and the third time stamp information.
  • a specific method may be: when the access device detects that the fourth message includes When the second protocol field carries the second time stamp information and the third time stamp information, the second time stamp information and the third time stamp information are encapsulated into a first protocol field included in the fourth message. To generate the second message, and send the second message to the first device.
  • the second protocol field is the same as the second protocol field in step 2606, and reference may also be made to the related description in step 304.
  • the first protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending the second message to the first device is the same as the principle of the access device sending the second message to the first device in step 306 in the embodiment shown in FIG. 3, See related principles in step 306.
  • the first protocol field may be the same as the first protocol field in step 306 and may be referred to each other, and details are not repeatedly described herein.
  • the first device after receiving the second message from the access device, extracts the second time stamp information carried in a first protocol field included in the second message. And the third timestamp information.
  • the first device extracts the second time stamp information carried in a first protocol field included in the second message.
  • the third timestamp information For example, for specific methods, reference may be made to the situations g1, g2, and g3 in step 306, and details are not repeatedly described herein.
  • Step 2608 The first device sends a third message to the third device.
  • the specific method may be: the first device sends the second timestamp in the first protocol field in the second packet. Information and the third time stamp information are deleted, the third message is generated and the third message is sent.
  • the third device may record a time in the Ethernet network when the third message is received, for example, t34 in FIG. 27.
  • Step 2609 The first device determines fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the first device sends the third message.
  • the time corresponding to the fourth time stamp information may be recorded as t33 in FIG. 27.
  • Step 2610 The first device receives a sixth message from the third device.
  • the sixth message carries fifth time stamp information, and the fifth time stamp information is received by the third device.
  • the time in the Ethernet network when the third message sent by the first device is described.
  • the time corresponding to the fifth time stamp information is t34 in FIG. 27.
  • Step 2611 the first device determines a first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information. Six timestamp information.
  • the specific method for the first device to perform step 2611 may be: the first device according to the first time stamp information (t28), the second time stamp information (t29) ), The third time stamp information (t32) and the fourth time stamp information (t33) determine a round-trip transmission delay difference between the first device and the second device; and then the first The device calculates the sum of the time (t34) corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  • the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formula 19 and formula 20:
  • offset10 is the time difference between the first device and the second device in the mobile network; delay7 is the transmission delay from the first device to the second device; delay8 is the second A transmission delay of the device to the first device.
  • time corresponding to the sixth timestamp information is t34 + t29-t28-t33 + t32.
  • Step 2612 the first device sends the sixth time stamp information to the access device.
  • the first device sends the fifth timestamp information to the access device, so that the access device sends the second time stamp information to the second device, and then transmits the information to the first device.
  • the first device transmits the sixth time stamp information to the fourth device by using an existing method of sending the fifth time stamp information. It can also be understood that the sixth timestamp information is sent to the fourth device instead of the fifth timestamp information. In this way, when the fourth device receives the sixth timestamp information, it will send The sixth timestamp information is treated as the fifth timestamp information in the prior art.
  • the first device may replace the fifth time stamp information in the sixth packet with the sixth time Stamp the information, generate a seventh message, and send the seventh message to the access device, the seventh message carries the sixth time stamp information, and finally the seventh message is sent To the fourth device.
  • Step 2613 The access device sends the sixth time stamp information to the second device.
  • Step 2614 The second device sends the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
  • the fourth device may determine the third device and the fourth device according to t27, t30, t31, and the sixth time stamp information (t34 + t29-t28-t33 + t32). Time deviation between the two, and time synchronization is performed according to the time deviation.
  • the fourth device may determine, according to the sixth timestamp information, when the third device considers that the third device receives the third packet.
  • the time in the Ethernet network uses the sixth time stamp information as the fifth time stamp information.
  • time offset offset11 between the third device and the fourth device may meet the following formula twenty-one:
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • the embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23.
  • the first device in FIG. 28 is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver.
  • the specific process of the method includes:
  • Step 2801 The first device receives the first message from the third device, and determines the first time stamp information, where the first time stamp information is in the mobile network when the first device receives the first message. time.
  • the triggering condition for the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
  • FIG. 29 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
  • the first time stamp information may be recorded as t36 in FIG. 29.
  • the first message carries a time in the Ethernet network when the third device sends the first message, for example, t35 shown in FIG. 29.
  • Step 2802 The first device sends a second message to the access device based on the first message, and the second message carries the first time stamp information.
  • the second message carries the first timestamp information
  • a specific method may be: the first device carries the first timestamp information in the second
  • the message includes the first protocol field.
  • the first protocol field may be an existing protocol field in the second message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the second message.
  • the flag may also be carried in the first protocol field.
  • the second message may be generated when the first device encapsulates the first time stamp information into a third protocol field of the first message.
  • the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7.
  • the second message further carries t35.
  • Step 2803 The access device sends a fifth message to the second device based on the second message, and the fifth message carries the first time stamp information.
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • the access device sends the fifth message to the second device based on the second message, and a specific method may be: when the access device detects all the When the first protocol field included in the second message includes the first time stamp information, the access device encapsulates the first time stamp information into a second protocol field included in the second message. To generate the fifth message, and send the fifth message to the second device. At this time, the second protocol field of the fifth message carries the first time stamp information.
  • the first protocol field is the same as the first protocol field in step 2802, and similarly, reference may be made to the related description in step 701.
  • the second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework.
  • the execution principle of the access device sending a fifth packet to the second device based on the second packet is the same as that in step 702 in the embodiment shown in FIG. 7 based on the first packet.
  • the principle that the second device sends the third packet is the same.
  • the second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
  • the second device extracts the first time stamp information carried in a second protocol field included in the fifth message.
  • the second device extracts the first time stamp information carried in a second protocol field included in the fifth message.
  • the fifth message also carries t35.
  • Step 2804 The second device sends a sixth message to the fourth device, and determines fourth timestamp information, where the fourth timestamp information is the movement when the second device sends the sixth message. Moments in the network.
  • the fourth time stamp information may be recorded as t37 in FIG. 29.
  • the sixth message may be generated after the second device deletes the first time stamp information in a second protocol field in the fifth message. At this time, the sixth message carries t35.
  • the fourth device records the time in the Ethernet network when the sixth packet is received, for example, t38 in FIG. 29.
  • Step 2805 The second device receives a third message from the fourth device, and determines fifth timestamp information; the fifth timestamp information is when the second device receives the third message. The moment in the mobile network.
  • the fifth time stamp information may be recorded as t40 in FIG. 29.
  • the fourth device records the time in the Ethernet network when the third message is sent, for example, t39 in FIG. 29.
  • Step 2806 The second device sends the third message to the access device.
  • Step 2807 The access device sends the third message to the first device.
  • Step 2808 The first device sends the third message to the third device, and determines second time stamp information, where the second time stamp information is the first device sending the third message. The moment in the mobile network.
  • the time corresponding to the second time stamp information may be recorded as t41 in FIG. 29.
  • the third device records the time in the Ethernet network when the third message is received, such as t42 shown in FIG. 29.
  • Step 2809 The first device receives a fourth message from the third device.
  • the fourth message carries third time stamp information, and the third time stamp information is received by the third device.
  • the third message sent by the first device is a time in an Ethernet network.
  • the time corresponding to the fourth timestamp information is t42.
  • Step 2810 The first device sends the second time stamp information and the third time stamp information to the access device.
  • Step 2811 The access device sends the second time stamp information and the third time stamp information to the second device.
  • Step 2812 the second device determines a first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information. Six timestamp information.
  • the specific method for the second device to perform step 2812 may be: the second device according to the first time stamp information (t36), the second time stamp information (t41 ), The fourth timestamp information (t37) and the fifth timestamp information (t40) determine a round-trip transmission delay difference between the first device and the second device; the second device Calculate the sum of the time corresponding to the third time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  • the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formula 22 and formula 23:
  • t37-t36 delay9 + offset12 formula twenty-two;
  • t41-t40 delay10-offset12 formula twenty-three;
  • offset12 is the time difference between the first device and the second device in the mobile network; delay9 is the transmission delay from the first device to the second device; delay10 is the second A transmission delay of the device to the first device.
  • time corresponding to the sixth timestamp information is t42 + t37-t36-t41 + t40.
  • Step 2813 The second device sends the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
  • the second device sends the fourth time stamp information to the fourth device.
  • the second device sends the sixth time stamp information to the fourth device by using the existing method for sending the fourth time stamp information.
  • the sixth timestamp information is sent to the fourth device instead of the fourth timestamp information. In this way, when the fourth device receives the sixth timestamp information, it will send The sixth timestamp information is treated as the fourth timestamp information in the prior art.
  • the fourth device may determine the third device and the fourth device according to t35, t38, t39, and the sixth time stamp information (t42 + t37-t36-t41 + t40). Time deviation between the two, and time synchronization is performed according to the time deviation.
  • the fourth device may determine, according to the sixth timestamp information, the time in the Ethernet network when the third device considers that the third device receives the third packet, and The sixth time stamp information is used as the fourth time stamp information.
  • time offset offset13 between the third device and the fourth device may meet the following formula twenty-four:
  • the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method.
  • a first device For the structure of the first device, reference may also be made to FIG. 11.
  • the first device may include a receiving unit 1103, a processing unit 1102, and a sending unit 1101. among them:
  • the receiving unit 1103 is configured to receive a first message from a third device; the processing unit 1102 is configured to determine first time stamp information, where the first time stamp information is moved when the first device receives the first message The time in the network; the sending unit 1101 is configured to send the first message to the second device through the access device; the receiving unit 1103 is further configured to receive the second message from the third device; the sending unit 1101 is further configured to send a third packet to the access device based on the second packet, and the third packet carries the first time stamp information; the receiving unit 1103 is further configured to receive the first packet from the access device.
  • the device receives a fourth message; the sending unit 1101 is further configured to send the fourth message to the third device; the processing unit 1102 is further configured to determine second time stamp information, and the second time stamp The information is the time in the mobile network when the first device sends the fourth message to the third device; the receiving unit 1103 is further configured to receive a fifth message from the third device; the processing The unit 1102 is further configured to determine third time stamp information.
  • the time stamp information is the time in the mobile network when the first device receives the fifth message; the sending unit 1101 is further configured to send a sixth message to the access device based on the fifth message.
  • the sixth message carries the second timestamp information; the receiving unit 1103 is further configured to receive a seventh message from the third device; the seventh message carries fourth timestamp information The fourth timestamp information is the time in the Ethernet network when the third device sends the fifth message to the first device; the sending unit 1101 is further configured to send the first time to the access device.
  • Eight messages; the eighth message carries the third timestamp information and the fourth timestamp information; wherein the first device is a user plane network element and the second device is a terminal device, Alternatively, the first device is a terminal device and the second device is a user plane network element.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method.
  • the access device may include a receiving unit 1201 and a sending unit 1202. among them:
  • the receiving unit 1201 is configured to receive a first message from the first device; the sending unit 1202 is configured to forward the first message to a second device; the receiving unit 1201 is further configured to receive a first message from the first device Three messages; the third message carries first time stamp information, and the first time stamp information is a time in the mobile network when the first device receives the first message from the third device; The sending unit 1202 is further configured to send a ninth message to the second device based on the third message; the ninth message carries first time stamp information; and the receiving unit 1201 is further configured to receive The second device receives a fourth message; the sending unit 1202 is further configured to send the fourth message to the first device; the receiving unit 1201 is further configured to receive a first message from the first device Six messages; the sixth message is sent by the first device to the access device based on the fifth message after receiving the fifth message from the third device; the sixth message The text carries second time stamp information, and the second time stamp information is that the first device The time in the mobile network when the incoming device receive
  • the two devices send an eleventh message; the eleventh message carries the third time stamp information and the fourth time stamp information; wherein the first device is a user plane network element and the first
  • the two devices are terminal devices, or the first device is a terminal device and the second device is User plane network elements.
  • the access device may further include a processing unit for detecting time stamp information in a protocol field in the message.
  • a processing unit for detecting time stamp information in a protocol field in the message For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 21 above. , Will not repeat them here.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method.
  • the second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
  • the receiving unit 1301 is configured to receive a first message from an access device; the sending unit 1303 is configured to send the first message to a fourth device; the processing unit 1302 is configured to determine fifth time stamp information, and the fifth time stamp The information is the time in the mobile network when the second device sends the first message to the fourth device; the receiving unit 1301 is further configured to receive a ninth message from the access device; the first The nine messages carry first time stamp information, where the first time stamp information is a time in the mobile network when the first device receives the first message from a third device; the sending unit 1303 also uses Sending a twelfth message to the fourth device based on the ninth message; the receiving unit 1301 is further configured to receive a fourth message from the fourth device; the processing unit 1302 is further configured to determine Sixth time stamp information, where the sixth time stamp information is a time in the mobile network when the second device receives the fourth message; and the sending unit 1303 is further configured to send all information to the access device.
  • the fourth message; the receiving unit 1301 is further configured to send The incoming device receives the tenth message; the tenth message carries second timestamp information, and the second timestamp information is obtained after the access device sends the fourth message to the first device.
  • the time in the mobile network when the first device sends the fourth message to the third device; the sending unit 1303 is further configured to send the thirteenth message to the fourth device; the processing unit 1302, For determining seventh time stamp information; the seventh time stamp information is a time in the mobile network when the second device sends the thirteenth message to the fourth device; the receiving unit 1301 also uses Receiving an eleventh message from the access device, the eleventh message carries third time stamp information and fourth time stamp information, and the third time stamp information is obtained from the first device The time in the mobile network when the third device receives the fifth message, and the fourth time stamp information is the time in the Ethernet network when the third device sends the fifth message to the first device.
  • the processing unit 1302 is further configured to use the first time stamp information
  • the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time stamp information determine a first time stamp information.
  • Eight timestamp information; the sending unit 1303 is further configured to send the eighth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth timestamp information; wherein,
  • the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method.
  • the first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
  • the sending unit 1101 is configured to send a first message to an access device; the processing unit 1102 is configured to determine first time stamp information and second time stamp information; and the first time stamp information is sent by the first device to the first device.
  • the first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message; the sending unit 1101 is further configured to send the message to the receiver.
  • the incoming device sends a second message, where the second message carries the first timestamp information and the second timestamp information;
  • the receiving unit 1103 is configured to receive a third message from the access device;
  • the processing unit 1102 is further configured to determine third time stamp information, where the third time stamp information is a time in the Ethernet network when the first device receives the third packet;
  • the sending unit 1101 is further configured to: Sending a fourth message to the access device, where the fourth message carries the third timestamp information; the processing unit 1102 is further configured to determine fourth timestamp information; the fourth timestamp information When sending the fourth message for the first device
  • the sending unit 1101 is further configured to send a fifth message to the access device, where the fifth message carries the fourth time stamp information; wherein the first device is A user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method.
  • the access device may include a receiving unit 1201 and a sending unit 1202. among them:
  • the receiving unit 1201 is configured to receive the first message from the first device; the sending unit 1202 is configured to forward the first message to the second device; the receiving unit 1201 is further configured to receive the first message from the first device After two messages; the second message carries first time stamp information and second time stamp information, and the first time stamp information is that the first device sends the first message to the access device The time in the Ethernet network at the time, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device; the sending unit 1202 is further configured to The second message sends a sixth message to the second device; the sixth message carries the first time stamp information and the second time stamp information; and the receiving unit 1201 is further configured to: Receiving a third message from the second device; the sending unit 1202 is further configured to forward the third message to the first device; the receiving unit 1201 is further configured to receive a third message from the first device Four messages, the fourth message carries third time stamp information, and the third time The time stamp information is the time in the Ethernet network when
  • the access device may further include a processing unit for detecting time stamp information in a protocol field in the message.
  • a processing unit for detecting time stamp information in a protocol field in the message For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 24 above. , Will not repeat them here.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method.
  • the second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
  • the receiving unit 1301 is configured to receive a first message from an access device; the processing unit 1302 is configured to determine fifth time stamp information and sixth time stamp information, where the fifth time stamp information is received by the second device.
  • the first message is the time in the Ethernet network, and the sixth time stamp information is the time in the mobile network when the second device receives the first message;
  • the receiving unit 1301 is further configured to receive The access device receives a sixth message, where the sixth message carries the first timestamp information and the second timestamp information; the first timestamp information is the first device to the access device The time in the Ethernet network when the first message is sent, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device;
  • the sending unit 1303 Configured to send a third message to the access device;
  • the processing unit 1302 is further configured to determine seventh timestamp information, where the seventh timestamp information is when the second device sends the third message The time in the Ethernet network; the receiving unit 1301 also uses Receiving
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method.
  • the first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
  • the receiving unit 1103 is configured to receive a first message from a third device; the sending unit 1101 is configured to send the first message to a second device through an access device; and the processing unit 1102 is configured to determine first time stamp information.
  • the first time stamp information is a time in the mobile network when the first device receives the first message; the receiving unit 1103 is further configured to receive a second message from the access device; the second The message carries the second time stamp information and the third time stamp information, and the second time stamp information is that the second device sends the first message to the fourth device after receiving the first message
  • the third time stamp information is the time in the mobile network when the second device receives the fifth message from the fourth device;
  • the sending unit 1101 is further configured to send The third device sends a third message; the processing unit 1102 is further configured to determine fourth timestamp information, where the fourth timestamp information is the movement when the first device sends the third message Time in the network; the receiving unit 1103 is further configured to The third device receive
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method.
  • the access device may include a receiving unit 1201 and a sending unit 1202. among them:
  • the receiving unit 1201 is configured to receive a first message from the first device; the sending unit 1202 is configured to send the first message to a second device; and the receiving unit 1201 is further configured to receive from the second device A fourth message, where the fourth message carries second timestamp information and third timestamp information; the second timestamp information is sent to the first device after the second device receives the first message; The moment in the mobile network when the four devices send the first message; the fourth message is based on the fifth message after the second device receives the fifth message from the fourth device
  • the third time stamp information is the time in the mobile network when the second device receives the fifth message; the sending unit 1202 is further configured to send The first device sends a second message, and the second message carries the second timestamp information and the third timestamp information; the receiving unit 1201 is further configured to receive a first message from the first device.
  • the sending unit 1202 is further configured to send the first time stamp to the second device. Timestamp information; wherein, the first device is a user plane network element and the second device is a terminal device or said first device is a terminal device and the second device is a user plane network element.
  • the access device may further include a processing unit for detecting timestamp information in a protocol field in the message.
  • a processing unit for detecting timestamp information in a protocol field in the message For specific operations, refer to the specific operations of the access device in the embodiment shown in FIG. 26 above. , Will not repeat them here.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method.
  • the second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
  • the receiving unit 1301 is configured to receive a first message from an access device; the sending unit 1303 is configured to send the first message to a fourth device; and the processing unit 1302 is configured to determine second time stamp information and the second time The stamp information is the time in the mobile network when the second device sends the first message; the receiving unit 1301 is further configured to receive a fifth message from the fourth device; and the processing unit 1302 is further configured to Determining third time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the fifth message; and the sending unit 1303 is further configured to send an access message to the access device.
  • the device sends a fourth message, where the fourth message carries the second timestamp information and the third timestamp information; the receiving unit 1301 is further configured to receive a sixth timestamp from the access device Information; the sending unit 1303 is further configured to send the sixth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth timestamp information; wherein the first The device is a user plane network element and the second device The terminal device, or, the first device is a terminal device and the second device is a user plane network element.
  • this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method.
  • the first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
  • the receiving unit 1103 is configured to receive a first message from a third device; the processing unit 1102 is configured to determine first time stamp information, where the first time stamp information is moved when the first device receives the first message Time in the network; the sending unit 1101 is configured to send a second message to the access device based on the first message, and the second message carries the first time stamp information; the receiving unit 1103 also uses Receiving a third message from the access device; the sending unit 1101 is further configured to send the third message to the third device; the processing unit 1102 is configured to determine second time stamp information, so The second time stamp information is a time in the mobile network when the first device sends the third message; the receiving unit 1103 is further configured to receive a fourth message from the third device, and the The fourth message carries third time stamp information, and the third time stamp information is a time in the Ethernet network when the third device receives the third message sent by the first device; the The sending unit 1101 is further configured to combine the second timestamp information with all Third time stamp information is sent to the access device
  • this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method.
  • the access device may include a receiving unit 1201 and a sending unit 1202. among them:
  • the receiving unit 1201 is configured to receive a second message from the first device, where the second message carries first time stamp information, and the second message is the first message received by the first device from the third device. Sent to the access device after a message, the first time stamp information is the time in the mobile network when the first device receives the first message; the sending unit 1202 is configured to The second message sends a fifth message to the second device, and the fifth message carries the first time stamp information;
  • the receiving unit 1201 is further configured to receive a third message from the second device; the sending unit 1202 is further configured to send the third message to the first device; the receiving unit 1201 is further configured to: Receiving second time stamp information and third time stamp information from the first device, where the second time stamp information is that the first device sends the first time stamp to the third device after receiving the third message; The time in the mobile network during three messages; the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; the sending The unit 1202 is further configured to send the second time stamp information and the third time stamp information to the second device; wherein the first device is a user plane network element and the second device is a terminal device, Alternatively, the first device is a terminal device and the second device is a user plane network element.
  • the access device may further include a processing unit for detecting time stamp information in a protocol field in the packet.
  • a processing unit for detecting time stamp information in a protocol field in the packet For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 28 above. , Will not repeat them here.
  • this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method.
  • the second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
  • the receiving unit 1301 is configured to receive a fifth message from the access device, where the fifth message carries first timestamp information; the first timestamp information is the first message received by the first device from the third device Time in a mobile network; a sending unit 1303 is configured to send a sixth message to a fourth device; a processing unit 1302 is configured to determine fourth time stamp information, where the fourth time stamp information is sent by the second device The sixth message is the time in the mobile network; the receiving unit 1301 is further configured to receive a third message from the fourth device; the processing unit 1302 is further configured to determine fifth time stamp information; the The fifth time stamp information is a time in the mobile network when the second device receives the third message; the sending unit 1303 is further configured to send the third message to the access device; The receiving unit 1301 is further configured to receive second timestamp information and third timestamp information from the access device; the second timestamp information is the third message received by the access device and sent to the access device.
  • the processing unit 1302 is further configured to determine the first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information;
  • the sending unit 1303 is further configured to send the sixth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth timestamp information; wherein, The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  • an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 21, and details are not described herein again.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
  • an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 21, and details are not described herein again.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
  • the memory 2003 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
  • an embodiment of the present application further provides a first device.
  • the first device is applied to a communication system as shown in FIG. 1 or FIG. 23, and may be used to implement FIG. 24, FIG. 26, or FIG. 28. Synchronization method shown.
  • the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
  • the processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 1802 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other.
  • the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804;
  • the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1801 is configured to communicate and interact with other devices.
  • the processor 1802 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to related descriptions in the embodiments shown in FIG. 24, FIG. 26, or FIG. 28, respectively. More details.
  • the memory 1803 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory.
  • the processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 24, FIG. 26, or FIG. 28.
  • an embodiment of the present application further provides an access device, which is applied to a communication system as shown in FIG. 1 or FIG. 2 and is used to implement the communication device shown in FIG. The synchronization method shown below.
  • the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
  • the processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP.
  • the processor 1902 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other.
  • the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904;
  • the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 1901 is configured to communicate and interact with other devices.
  • the processor 1902 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to the related description in the embodiments shown in FIG. 24, FIG. 26, or FIG. 28, respectively. More details.
  • the memory 1903 is used to store programs and the like.
  • the program may include program code, where the program code includes a computer operation instruction.
  • the memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory.
  • the processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28.
  • an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2, and is used to implement the device shown in FIG. 24, FIG. 26, or FIG. 28.
  • the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
  • the processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on.
  • the processor 2002 may further include a hardware chip.
  • the aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof.
  • the PLD may be a CPLD, an FPGA, a GAL, or any combination thereof.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other.
  • the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004;
  • the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc.
  • PCI Peripheral Component Interconnect
  • EISA Extended Industry, Standard Architecture
  • the bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
  • the transceiver 2001 is configured to perform communication interaction with other devices.
  • the processor 2002 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to related descriptions in the embodiments shown in FIG. 24, FIG. 26, or FIG. To repeat.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Synchronisation In Digital Transmission Systems (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

Disclosed are a synchronization method and apparatus used for meeting, in a mobile network and Ethernet connection scenario, time precision requirements of an industrial plant. In the method, a first device determines seventh time stamp information according to time stamp information of sending and receiving packets in a mobile network, so that the second device calculates a time deviation between the first device and the second device according to the seventh time stamp information and time for sending and receiving packets in the Ethernet, so as to carry out time synchronization. In the method, since the impact caused by transmission time delay between the first device and the second device can be avoided, in the mobile network and Ethernet connection scenario, the time precision requirements of the industrial plant can be met.

Description

一种同步方法及装置Synchronization method and device
本申请要求在2018年06月26日提交中国专利局、申请号为201810672083.7、发明名称为《一种同步方法及装置》和在2018年10月08日提交中国专利局、申请号为201811168721.8、发明名称为《一种同步方法及装置》的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application requires that the Chinese Patent Office be filed on June 26, 2018 with the application number 201810672083.7, the invention name be `` A Synchronization Method and Device '' and the Chinese Patent Office on October 08, 2018 with the application number 201811168721.8, the invention The priority of a Chinese patent application entitled "A Synchronization Method and Apparatus" is incorporated herein by reference in its entirety.
技术领域Technical field
本申请涉及通信技术领域,尤其涉及一种同步方法及装置。The present application relates to the field of communication technologies, and in particular, to a synchronization method and device.
背景技术Background technique
IEEE 802.1AS协议通过定义主时钟选择与协商算法、路径延迟测算与补偿、以及时钟频率匹配与调节的机制。通信设备交换标准的以太网消息,将网络各个节点的时间都同步到一个共同的主时钟,定义了广义的精确时钟同步系统。具体的,802.1AS协议定义通过逐跳同步的方式实现全网同步,即从主时钟节点(以下称master)开始向相邻节点(以下称slaver)发送802.1AS同步报文,每个slaver参照master进行时钟同步后,该slaver以自身为master的身份向相邻节点交互802.1AS同步报文,计算出主从时钟间的时间偏差(Offset)和/或频率偏差,以使完成时钟同步。The IEEE 802.1AS protocol defines a master clock selection and negotiation algorithm, path delay measurement and compensation, and a clock frequency matching and adjustment mechanism. Communication equipment exchanges standard Ethernet messages, synchronizes the time of each node of the network to a common master clock, and defines a generalized precise clock synchronization system. Specifically, the 802.1AS protocol defines synchronization across the network by hop-by-hop synchronization, that is, starting from the master clock node (hereinafter referred to as the master) to send 802.1AS synchronization packets to neighboring nodes (hereinafter referred to as the slave), and each slave refers to the master After clock synchronization, the slave exchanges 802.1AS synchronization packets with neighboring nodes as its master, and calculates the time offset (Offset) and / or frequency deviation between the master and slave clocks to complete the clock synchronization.
具体的,802.1AS时间同步机制为:master和slaver之间互发802.1AS报文,通过双方收发报文的时间去计算时间偏差Offset。但是在master向slaver发送报文,以及slaver向master发送报文时,均存在传输时延且未知,在计算时间偏差Offset时要考虑传输时延。而802.1AS时间同步建立收发报文时延相同的基础上,即传输时延相同,才能达到精准时间同步。现在固网中由于相邻两个节点之间有线直连,传输时延不超过us,因此固网中的802.1AS协议的精度能够达到us级,符合需求。Specifically, the 802.1AS time synchronization mechanism is as follows: the master and the slave send 802.1AS messages to each other, and the time offset Offset is calculated based on the time when the two parties send and receive messages. However, when the master sends a message to the slave and the slave sends a message to the master, there is a transmission delay and the transmission delay is unknown. The transmission delay must be considered when calculating the time offset Offset. The 802.1AS time synchronization is based on the same delay in sending and receiving packets, that is, the same transmission delay can achieve accurate time synchronization. Now in the fixed network, because the adjacent two nodes are wired directly, the transmission delay does not exceed us, so the accuracy of the 802.1AS protocol in the fixed network can reach us level, which meets the requirements.
802.1AS频率同步机制为:master在不同两个时间点分别向slaver发送802.1AS报文,slaver通过master的两次发送时间和两次接收时间去计算频率偏差。同理,802.1AS频率同步原理是两次报文在传输时的时延相同,才能达到精准频率同步。同样的,在固网中能满足需求。The 802.1AS frequency synchronization mechanism is as follows: the master sends 802.1AS packets to the slave at two different time points, and the slave calculates the frequency deviation through the master's two sending times and two receiving times. In the same way, the principle of 802.1AS frequency synchronization is that the two packets have the same time delay during transmission to achieve accurate frequency synchronization. Similarly, it can meet the demand in the fixed network.
目前,IEEE 802.1AS协议应用比较广泛。例如,时延敏感网络(time sensitive network,TSN)是工业工厂中的以太网络,为了满足工业工厂中高精度的时钟同步需求,TSN采用了802.1AS协议作为其达成时钟同步的协议规范。但是,在实际的工业工厂场景中,需要移动网络与TSN对接,移动网络作为传输路径的一段,为工业工厂提供通信服务,这就需要移动网络也可以支持802.1AS协议。但是在TSN中相邻的两个节点(例如终端设备和用户面网元)进行时钟同步时,在报文传输过程中会经过移动网络中的多跳设备(例如接入设备等),因此,报文在该相邻连个节点之间传输时的同向传输时延和往返传输时延均可能不相同,因此,802.1AS同步机制无法满足,进而无法满足工业工厂的时间精度需求。At present, the IEEE 802.1AS protocol is widely used. For example, a time-sensitive network (TSN) is an Ethernet network in an industrial plant. In order to meet the high-precision clock synchronization requirements in an industrial plant, TSN uses the 802.1AS protocol as its protocol specification for clock synchronization. However, in the actual industrial factory scenario, the mobile network needs to be connected to the TSN. The mobile network is used as a transmission path to provide communication services for the industrial factory. This requires that the mobile network also support the 802.1AS protocol. However, when two adjacent nodes in the TSN (such as a terminal device and a user plane network element) perform clock synchronization, during the message transmission process, they will pass through multi-hop devices (such as access devices) in the mobile network. Therefore, Both the same-direction transmission delay and the round-trip transmission delay when packets are transmitted between the adjacent nodes may be different. Therefore, the 802.1AS synchronization mechanism cannot meet the requirements of the time accuracy of industrial plants.
发明内容Summary of the invention
本申请提供一种同步方法及装置,用以实现在移动网络与以太网络(例如,TSN)对 接场景中,满足工业工厂的时间精度需求。The present application provides a synchronization method and device, which are used to realize the time accuracy requirement of an industrial factory in a scenario where a mobile network is connected to an Ethernet network (for example, TSN).
第一方面,本申请提供了一种同步方法,该方法包括:In a first aspect, this application provides a synchronization method, which includes:
首先,第一设备向接入设备发送第一报文,第一报文中携带第一时间戳信息,并确定第二时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;然后,第一设备从接入设备接收第二报文,第二报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第二设备接收到接入设备基于第一报文向第二设备发送的第三报文时移动网络中的时刻,第四时间戳信息为第二设备向接入设备发送第四报文时移动网络中的时刻;第二报文为接入设备基于第四报文向第一设备发送的;之后,第一设备确定第五时间戳信息和第六时间戳信息,第五时间戳信息为第一设备接收到第二报文时以太网络中的时刻,第六时间戳信息为第一设备接收到第二报文时移动网络中的时刻;最后,第一设备根据第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息和第六时间戳信息确定第七时间戳信息;第一设备将第七时间戳信息通过接入设备转发给第二设备;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, the first device sends a first message to the access device. The first message carries the first time stamp information and determines the second time stamp information. The first time stamp information is when the first device sends the first message. The time in the Ethernet network, the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device receives the second message from the access device, and the second message carries the third Timestamp information and fourth timestamp information, the third timestamp information is the time in the mobile network when the second device receives the third message sent by the access device to the second device based on the first message, and the fourth timestamp The information is the time in the mobile network when the second device sends the fourth message to the access device; the second message is sent by the access device to the first device based on the fourth message; after that, the first device determines the fifth time The timestamp information and the sixth time stamp information. The fifth time stamp information is the time in the Ethernet network when the first device receives the second message, and the sixth time stamp information is the mobile network when the first device receives the second message. Moment; finally, A device determines the seventh time stamp information according to the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the sixth time stamp information; the first device passes the seventh time stamp information through the connection The incoming device is forwarded to the second device, where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第一设备通过移动网络中收发报文的时间戳信息确定第七时间戳信息,以使第二设备根据第七时间戳信息和以太网络中收发报文的时间来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。With the above method, the first device determines the seventh time stamp information by using the time stamp information of the message sent and received in the mobile network, so that the second device calculates the first device according to the seventh time stamp information and the time of sending and receiving messages in the Ethernet network. The time deviation from the second device is then synchronized. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第一设备根据第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息和第六时间戳信息确定第七时间戳信息,具体方法可以为:第一设备根据第二时间戳信息、第三时间戳信息、第四时间戳信息和第六时间戳信息确定第一设备与第二设备之间的往返传输时延差值之后,计算第五时间戳信息对应的时刻与往返传输时延差值的和,得到第七时间戳信息。In a possible design, the first device determines the seventh timestamp information according to the second timestamp information, the third timestamp information, the fourth timestamp information, the sixth timestamp information, and the sixth timestamp information. The specific method may be The first device determines the round-trip transmission delay difference between the first device and the second device according to the second time stamp information, the third time stamp information, the fourth time stamp information, and the sixth time stamp information, and then calculates the Sum of the time corresponding to the five timestamp information and the round-trip transmission delay difference value to obtain seventh timestamp information.
通过上述方法,第一设备可以准确地得到第七时间戳信息,以使第二设备根据第七时间戳信息和以太网络中收发报文的时间来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。Through the above method, the first device can accurately obtain the seventh time stamp information, so that the second device can calculate the time between the first device and the second device according to the seventh time stamp information and the time of sending and receiving packets in the Ethernet network. Deviation, and then time synchronization.
在一个可能的设计中,第一设备确定第二时间戳信息之后将第二时间戳信息记录在本地,以使第一设备后续计算第一设备和第二设备之间的往返传输时延差值。这样后续第一设备可以通过记录的第二时间戳信息得到第七时间戳信息。In a possible design, the first device records the second time stamp information locally after determining the second time stamp information, so that the first device subsequently calculates a round-trip transmission delay difference between the first device and the second device. . In this way, the subsequent first device can obtain the seventh timestamp information by using the recorded second timestamp information.
在一个可能的设计中,第一设备从接入设备接收第二报文之后,提取第二报文包括的第一协议字段中携带的第三时间戳信息和第四时间戳信息。In a possible design, after the first device receives the second message from the access device, it extracts the third time stamp information and the fourth time stamp information carried in the first protocol field included in the second message.
通过上述方法,第一设备后续可以通过第三时间戳信息和第四时间戳信息确定第七时间戳信息。With the above method, the first device may subsequently determine the seventh timestamp information by using the third timestamp information and the fourth timestamp information.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段。例如,第一协议字段为现有的协议字段时,当第一设备为用户面网元时,第一协议字段可以为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第一协议字段可以为服务数据协议SDAP字段或数据汇聚协议PDCP字段。又例如,当第一协议字段为新增加的协议字段时,第一协议字段可以是NEW字段。In a possible design, the first protocol field may be an existing protocol field or a protocol field newly added in an existing protocol stack framework. For example, when the first protocol field is an existing protocol field, when the first device is a user plane network element, the first protocol field may be a general packet radio service GPRS tunneling protocol GTP field; when the first device is a terminal device, The first protocol field may be a service data protocol SDAP field or a data aggregation protocol PDCP field. As another example, when the first protocol field is a newly added protocol field, the first protocol field may be a NEW field.
通过上述方法,接入设备可以通过报文中的上述协议字段携带第三时间戳信息和第四 时间戳信息,以将第三时间戳信息和第四时间戳信息发送给第一设备。Through the above method, the access device may carry the third time stamp information and the fourth time stamp information through the protocol field in the message, so as to send the third time stamp information and the fourth time stamp information to the first device.
在一个可能的设计中,第一设备从接入设备接收第二报文之后,提取第二报文包括的第一协议字段中携带的第三时间戳信息和第四时间戳信息,具体可以有以下三种情况:In a possible design, after the first device receives the second message from the access device, it extracts the third time stamp information and the fourth time stamp information carried in the first protocol field included in the second message. The following three situations:
情况1:第一设备提取GTP字段中的第三时间戳信息和第四时间戳信息。此情况中,第一设备为用户面网元。Case 1: The first device extracts the third time stamp information and the fourth time stamp information in the GTP field. In this case, the first device is a user plane network element.
情况2:第一设备提取SDAP字段或PDCP字段中的第三时间戳信息和第四时间戳信息。此情况中,第一设备为终端设备。Case 2: The first device extracts the third time stamp information and the fourth time stamp information in the SDAP field or the PDCP field. In this case, the first device is a terminal device.
情况3:第一设备提取NEW字段中的第三时间戳信息和第四时间戳信息。此情况中,第一设备为终端设备或者用户面网元。Case 3: The first device extracts the third time stamp information and the fourth time stamp information in the NEW field. In this case, the first device is a terminal device or a user plane network element.
通过上述方法,第一设备可以准确地获取第三时间戳信息和第四时间戳信息。Through the above method, the first device can accurately obtain the third time stamp information and the fourth time stamp information.
第二方面,本申请还提供了一种同步方法,该方法包括:In a second aspect, the present application also provides a synchronization method, which includes:
接入设备从第一设备接收第一报文后,基于第一报文向第二设备发送第三报文,第一报文中携带第一时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;第三报文中携带第一时间戳信息;接入设备从第二设备接收第四报文后,向第一设备发送第二报文;第四报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第二设备接收到第三报文时移动网络中的时刻,第四时间戳信息为第二设备向接入设备发送第四报文时移动网络中的时刻;第二报文中携带第三时间戳信息和第四时间戳信息;接入设备从第一设备接收第七时间戳信息,并向第二设备发送第七时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。After the access device receives the first message from the first device, it sends a third message to the second device based on the first message. The first message carries the first time stamp information, and the first time stamp information is the first device. The time in the Ethernet network when sending the first message; the third message carries the first time stamp information; the access device sends the second message to the first device after receiving the fourth message from the second device; the fourth The message carries the third timestamp information and the fourth timestamp information, the third timestamp information is the time in the mobile network when the second device receives the third message, and the fourth timestamp information is the access from the second device to the The moment in the mobile network when the device sends the fourth message; the second message carries the third and fourth timestamp information; the access device receives the seventh timestamp information from the first device and sends it to the second device Send seventh timestamp information; where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备向第一设备发送第二报文,具体方法可以为:接入设备当检测到第四报文包括的第二协议字段中携带第三时间戳信息和第四时间戳信息时,将第三时间戳信息和第四时间戳信息封装到第四报文包括的第一协议字段中,生成第二报文,并向第一设备发送第二报文。In a possible design, the access device sends a second message to the first device. The specific method may be: when the access device detects that the second protocol field included in the fourth message carries the third time stamp information and the first time In the case of four timestamp information, the third timestamp information and the fourth timestamp information are encapsulated into the first protocol field included in the fourth message, a second message is generated, and the second message is sent to the first device.
通过上述方法,接入设备可以将第三时间戳信息和第四时间戳信息成功发送至第一设备,以使第一设备确定第七时间戳信息。Through the above method, the access device can successfully send the third time stamp information and the fourth time stamp information to the first device, so that the first device determines the seventh time stamp information.
在一个可能的设计中,接入设备在将第三时间戳信息和第四时间戳信息封装到第四报文包括的第一协议字段中之前,提取第四报文包括的第二协议字段中携带第三时间戳信息和第四时间戳信息。In a possible design, before the access device encapsulates the third time stamp information and the fourth time stamp information into the first protocol field included in the fourth message, the access device extracts the second protocol field included in the fourth message. Carry third time stamp information and fourth time stamp information.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第二协议字段为GTP字段,第一协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a user plane network element, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field, and the first protocol field is a general packet radio service GPRS tunneling protocol GTP field; When the first device is a terminal device, the second protocol field is a GTP field, and the first protocol field is an SDAP field or a PDCP field.
第三方面,本申请还提供了一种同步方法,该方法包括:In a third aspect, the present application further provides a synchronization method, which includes:
第二设备从接入设备接收第三报文,第三报文中携带第一时间戳信息,第一时间戳信 息为第一设备发送第一报文时以太网络中的时刻;第三报文是接入设备从第一设备接收到第一报文之后基于第一报文发送的;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元;然后,第二设备确定第三时间戳信息和第八时间戳信息,第三时间戳信息为第二设备接收到第三报文时移动网络中的时刻,第八时间戳信息为第二设备接收到第三报文时以太网络中的时刻;第二设备向接入设备发送第四报文,第四报文中携带第三时间戳信息和第四时间戳信息,第四时间戳信息为第二设备向接入设备发送第四报文时移动网络中的时刻;然后第二设备确定第九时间戳信息,第九时间戳信息为第二设备向接入设备发送第四报文时以太网络中的时刻;最后第二设备从接入设备接收第七时间戳信息,并根据第一时间戳信息、第八时间戳信息、第九时间戳信息和第七时间戳信息确定第一设备和第二设备之间的时间偏差,并根据时间偏差进行时间同步。The second device receives the third message from the access device, and the third message carries the first time stamp information, and the first time stamp information is the time in the Ethernet network when the first device sends the first message; the third message It is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and The second device is a user plane network element. Then, the second device determines the third time stamp information and the eighth time stamp information. The third time stamp information is the time in the mobile network when the second device receives the third message. The eight timestamp information is the time in the Ethernet network when the second device receives the third message; the second device sends a fourth message to the access device, and the fourth message carries the third timestamp information and the fourth timestamp Information, the fourth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device; then the second device determines the ninth timestamp information, and the ninth timestamp information is the second device to access Device sends fourth report The time in the text-time Ethernet network; finally, the second device receives the seventh time stamp information from the access device, and determines the first time stamp information based on the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Time deviation between a device and a second device, and time synchronization is performed according to the time deviation.
通过上述方法,第二设备根据第七时间戳信息和以太网络中收发报文的时间来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。Through the above method, the second device calculates a time deviation between the first device and the second device according to the seventh time stamp information and the time of sending and receiving packets in the Ethernet network, and then performs time synchronization. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第二设备根据第七时间戳信息确定第一设备接收到第二报文时以太网络中的时刻,第二报文为接入设备基于第四报文向第一设备发送的。这样,第二设备可以根据第七时间戳信息进行时间同步。In a possible design, the second device determines the time in the Ethernet network when the first device receives the second packet according to the seventh timestamp information, and the second packet is the access device sends the first packet to the first device based on the fourth packet. Sent. In this way, the second device can perform time synchronization according to the seventh time stamp information.
在一个可能的设计中,第四报文中携带第三时间戳信息和第四时间戳信息,具体为:第二设备将第三时间戳信息和第四时间戳信息携带在第四报文包括的第二协议字段中。这样第二设备可以成功地将第三时间戳信息和第四时间戳信息传输至接入设备。In a possible design, the fourth message carries the third timestamp information and the fourth timestamp information. Specifically, the second device carries the third timestamp information and the fourth timestamp information in the fourth message. In the second agreement field. In this way, the second device can successfully transmit the third time stamp information and the fourth time stamp information to the access device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为终端设备时,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第二设备为用户面网元时,第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。In a possible design, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network element, the second protocol field is general Packet Radio Service GPRS Tunneling Protocol GTP field.
第四方面,本申请还提供了一种同步方法,该方法包括:In a fourth aspect, the present application further provides a synchronization method, which includes:
第一设备向接入设备发送第一报文,第一报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;然后,第一设备从接入设备接收第二报文,并确定第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备接收到第二报文时在以太网络中的时刻,第四时间戳信息为第一设备接收到第二报文时在移动网络中的时刻;最后,第一设备将第三时间戳信息和第四时间戳信息发送给接入设备,第一时间戳信息、第二时间戳信息、第三时间戳信息和第四时间戳信息用于时间同步;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The first device sends a first message to the access device, and the first message carries the first time stamp information and the second time stamp information, and the first time stamp information is in the Ethernet network when the first device sends the first message. Time, the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device receives the second message from the access device, and determines the third time stamp information and the fourth time stamp Information, the third time stamp information is the time in the Ethernet network when the first device receives the second message, and the fourth time stamp information is the time in the mobile network when the first device receives the second message; finally, The first device sends the third time stamp information and the fourth time stamp information to the access device, and the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information are used for time synchronization; The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第一设备将移动网络中收发报文的时间戳信息发送给第二设备,以使第二设备通过移动网络中收发报文的时间戳信息以及以太网络中收发报文的时间戳信息来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足 工业工厂的时间精度需求。Through the above method, the first device sends timestamp information of the message sent and received in the mobile network to the second device, so that the second device sends and receives the time stamp of the message in the mobile network and the timestamp of the message in the Ethernet network. Information to calculate the time deviation between the first device and the second device, and then perform time synchronization. Since the influence of the transmission delay between the first device and the second device can be avoided, it is possible to realize the docking scenario between the mobile network and the Ethernet network, and meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第一报文中携带第二时间戳信息,具体可以为:第一设备将第二时间戳信息携带在第一报文包括的第一协议字段中。In a possible design, the first message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the first message.
通过上述方法,第一设备可以成功将第二时间戳信息传输至接入设备,以使接入设备后续传输给第二设备。With the above method, the first device can successfully transmit the second time stamp information to the access device, so that the access device subsequently transmits the second time stamp information to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。In a possible design, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol In the SDAP field or the data aggregation protocol PDCP field.
第五方面,本申请还提供了一种同步方法,该方法包括:In a fifth aspect, the present application further provides a synchronization method, which includes:
接入设备从第一设备接收第一报文后,基于第一报文向第二设备发送第三报文;第一报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;第三报文中携带第一时间戳信息和第二时间戳信息;接入设备从第二设备接收第四报文,并基于第四报文向第一设备发送第二报文;接入设备从第一设备接收第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备接收到第二报文时在以太网络中的时刻,第四时间戳信息为第一设备接收到第二报文时在移动网络中的时刻;接入设备将第三时间戳信息和第四时间戳信息发送给第二设备,第一时间戳信息、第二时间戳信息、第三时间戳信息和第四时间戳信息用于时间同步;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。After the access device receives the first message from the first device, it sends a third message to the second device based on the first message; the first message carries the first time stamp information and the second time stamp information, and the first time The time stamp information is the time in the Ethernet network when the first device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message; the third message carries the first time stamp information And the second timestamp information; the access device receives a fourth message from the second device and sends a second message to the first device based on the fourth message; the access device receives the third timestamp information from the first device and Fourth timestamp information, the third timestamp information is the time in the Ethernet network when the first device receives the second message, and the fourth timestamp information is the time in the mobile network when the first device receives the second message Time; the access device sends the third time stamp information and the fourth time stamp information to the second device, the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information are used for time synchronization ; Where the first device is User plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第一报文向第二设备发送第三报文,具体方法可以为:接入设备当检测到第一报文包括的第一协议字段中包括第二时间戳信息时,接入设备将第二时间戳信息封装到第一报文包括的第二协议字段中,生成第三报文,并向第二设备发送第三报文。In a possible design, the access device sends a third packet to the second device based on the first packet. The specific method may be: when the access device detects that the first protocol field included in the first packet includes the second packet, In the time stamp information, the access device encapsulates the second time stamp information into a second protocol field included in the first message, generates a third message, and sends the third message to the second device.
通过上述方法,接入设备可以将第二时间戳信息成功发送至第二设备,以使第二设备进行时钟同步。Through the above method, the access device can successfully send the second time stamp information to the second device, so that the second device performs clock synchronization.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元,第二设备为终端设备时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第一设备为终端设备,第二设备为用户面网元时,第一协议字段为SDAP字段或PDCP字段,第二协议字段为GTP字段。In a possible design, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and the second protocol field is a Service Data Protocol SDAP field Or data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or a PDCP field, and the second protocol field is a GTP field.
第六方面,本申请还提供了一种同步方法,该方法包括:In a sixth aspect, the present application further provides a synchronization method, which includes:
第二设备从接入设备接收第三报文,第三报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;第三报文是接入设备从第一设备接收到第一报 文之后基于第一报文发送的;第二设备确定第五时间戳信息和第六时间戳信息,第五时间戳信息为第二设备接收到第三报文时以太网络中的时刻,第六时间戳信息为第二设备接收到第三报文时移动网络中的时刻;第二设备向接入设备发送第四报文,并确定第七时间戳信息和第八时间戳信息,第七时间戳信息为第二设备向接入设备发送第四报文时以太网络中的时刻,第八时间戳信息为第二设备向接入设备发送第四报文时移动网络中的时刻;第二设备从接入设备接收第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备接收到第二报文时在以太网络中的时刻,第四时间戳信息为第一设备接收到第二报文时在移动网络中的时刻;第二报文为接入设备基于第四报文向第一设备发送的;第二设备根据第一时间戳信息、第二时间戳信息、第六时间戳信息、第八时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息和第七时间戳信息确定第一设备和第二设备之间的时间偏差,并根据时间偏差进行时间同步。其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The second device receives a third message from the access device, and the third message carries the first timestamp information and the second timestamp information, and the first timestamp information is in the Ethernet network when the first device sends the first message. Time; the second time stamp information is the time in the mobile network when the first device sends the first message; the third message is sent based on the first message after the access device receives the first message from the first device; The second device determines the fifth time stamp information and the sixth time stamp information. The fifth time stamp information is the time in the Ethernet network when the second device receives the third packet, and the sixth time stamp information is the second device received the Three messages are the time in the mobile network; the second device sends a fourth message to the access device, and determines the seventh time stamp information and the eighth time stamp information, and the seventh time stamp information is the second device to the access device The time in the Ethernet network when the fourth message is sent, and the eighth time stamp information is the time in the mobile network when the second device sends the fourth message to the access device; the second device receives the third time stamp information from the access device And fourth timestamp Information, the third timestamp information is the time in the Ethernet network when the first device receives the second message, and the fourth timestamp information is the time in the mobile network when the first device receives the second message; the second The message is sent by the access device to the first device based on the fourth message; the second device is based on the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth timestamp information, and the third timestamp. The information, the fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation. The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第二设备通过移动网络中收发报文的时间戳信息以及以太网络中收发报文的时间戳信息来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By the above method, the second device calculates a time deviation between the first device and the second device by using time stamp information of the message transmitted and received in the mobile network and time stamp information of the message transmitted and received in the Ethernet network, and then performs time synchronization. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第二设备根据第一时间戳信息、第二时间戳信息、第六时间戳信息、第八时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息和第七时间戳信息确定第一设备和第二设备之间的时间偏差,具体方法可以为:第二设备根据第二时间戳信息、第六时间戳信息、第八时间戳信息和第四时间戳信息确定第一设备与第二设备之间的往返传输时延差值;第二设备根据第一时间戳信息、第三时间戳信息、第五时间戳信息、第七时间戳信息和往返传输时延差值确定第一设备和第二设备之间的时间偏差。In a possible design, the second device is based on the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time. The stamp information and the seventh timestamp information determine the time deviation between the first device and the second device. The specific method may be: the second device according to the second timestamp information, the sixth timestamp information, the eighth timestamp information, and the first The four timestamp information determines a round-trip transmission delay difference between the first device and the second device; the second device uses the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and The round-trip transmission delay difference determines a time offset between the first device and the second device.
通过上述方法,第二设备可以通过确定第一设备与第二设备之间的往返传输时延差值来确定第一设备和第二设备之间的时间偏差。Through the above method, the second device can determine a time deviation between the first device and the second device by determining a round-trip transmission delay difference between the first device and the second device.
在一个可能的设计中,第二设备根据第一时间戳信息、第三时间戳信息、第五时间戳信息、第七时间戳信息和往返传输时延差值确定第一设备和第二设备之间的时间偏差,具体方法可以为:第二设备确定第九时间戳信息,第九时间戳信息为第三时间戳信息对应的时刻与往返传输时延差值的和;然后第二设备根据第一时间戳信息、第五时间戳信息、第七时间戳信息和第九时间戳信息确定第一设备和第二设备之间的时间偏差。In a possible design, the second device determines the first device and the second device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and the round-trip transmission delay difference value. The specific method may be: the second device determines the ninth time stamp information, and the ninth time stamp information is a sum of a time corresponding to the third time stamp information and a round-trip transmission delay difference; and then the second device A timestamp information, a fifth timestamp information, a seventh timestamp information and a ninth timestamp information determine the time deviation between the first device and the second device.
通过上述方法,第二设备可以准确地确定第一设备和第二设备之间的时间偏差,以使第二设备根据时间偏差进行时间同步。Through the above method, the second device can accurately determine a time offset between the first device and the second device, so that the second device performs time synchronization according to the time offset.
在一个可能的设计中,第二设备从接入设备接收第三报文之后,第二设备提取第三报文包括的第二协议字段中携带的第二时间戳信息。In a possible design, after the second device receives the third message from the access device, the second device extracts the second time stamp information carried in the second protocol field included in the third message.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,第二协议字段为现有的协议字段时,当第二设备为终端设备时,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第二设备为用户面网元时,第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。In a possible design, when the second protocol field is an existing protocol field, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is When the user plane network element is used, the second protocol field is the GTP field of the general packet radio service GPRS tunneling protocol.
第七方面,本申请还提供了一种同步方法,该方法包括:In a seventh aspect, the present application further provides a synchronization method, which includes:
第一设备向接入设备发送第一报文,第一报文中携带第一时间戳信息和第二时间戳信 息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;然后,第一设备向接入设备发送第二报文,第二报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备发送第二报文时以太网络中的时刻,第四时间戳信息为第一设备发送第二报文时移动网络中的时刻;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The first device sends a first message to the access device, and the first message carries the first time stamp information and the second time stamp information, and the first time stamp information is in the Ethernet network when the first device sends the first message. Time, the second time stamp information is the time in the mobile network when the first device sends the first message; then, the first device sends a second message to the access device, and the second message carries the third time stamp information and Fourth timestamp information, the third timestamp information is the time in the Ethernet network when the first device sends the second message, and the fourth timestamp information is the time in the mobile network when the first device sends the second message; The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第一设备向第二设备发送报文,以使第二设备通过第一设备发起的报文传输时移动网络和以太网络钟报文收发时间,计算第一设备和第二设备之间频率偏差,进而进行频率同步。由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时钟精度需求。By the above method, the first device sends a message to the second device, so that the mobile device and the Ethernet clock message receive and send time when the second device transmits the message initiated by the first device, and calculates the time between the first device and the second device. Frequency deviation, and then frequency synchronization. Since the influence of the transmission delay between the first device and the second device can be avoided, it is possible to realize the docking scenario of the mobile network and the Ethernet network, and meet the clock accuracy requirements of industrial factories.
在一个可能的设计中,第一报文中携带第二时间戳信息,具体可以为:第一设备将第二时间戳信息携带在第一报文包括的第一协议字段中。In a possible design, the first message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the first message.
通过上述方法,第一设备可以成功将第二时间戳信息传输至接入设备,以使接入设备后续传输给第二设备。With the above method, the first device can successfully transmit the second time stamp information to the access device, so that the access device subsequently transmits the second time stamp information to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In a possible design, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
在一个可能的设计中,第二报文中携带第四时间戳信息,具体可以为:第一设备将第四时间戳信息携带在第二报文包括的第二协议字段中。In a possible design, the second message carries the fourth timestamp information. Specifically, the first device may carry the fourth timestamp information in a second protocol field included in the second message.
通过上述方法,第一设备可以成功将第四时间戳信息传输至接入设备,以使接入设备后续传输给第二设备。Through the above method, the first device can successfully transmit the fourth timestamp information to the access device, so that the access device can subsequently transmit the information to the second device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第二协议字段为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In a possible design, when the first device is a user plane network element, the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the second protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
第八方面,本申请还提供了一种同步方法,该方法包括:In an eighth aspect, the present application further provides a synchronization method, which includes:
接入设备从第一设备接收第一报文,基于第一报文向第二设备发送第三报文;第一报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;第三报文中携带第一时间戳信息和第二时间戳信息;然后,接入设备从第一设备接收第二报文,并基于第二报文向第二设备发送第四报文,第二报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备发送第二报文时以太网络中的时刻,第四时间戳信息为第一设备发送第二报文时移动网络中的时刻;第四报文中携带第三时间戳信息和第四时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The access device receives the first message from the first device, and sends a third message to the second device based on the first message; the first message carries the first time stamp information and the second time stamp information, and the first time stamp The information is the time in the Ethernet network when the first device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message; the third message carries the first time stamp information and The second time stamp information; then, the access device receives the second message from the first device, and sends a fourth message to the second device based on the second message, and the second message carries the third time stamp information and the first time message. Four timestamp information, the third timestamp information is the time in the Ethernet network when the first device sends the second message, and the fourth timestamp information is the time in the mobile network when the first device sends the second message; the fourth report The text carries third time stamp information and fourth time stamp information; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element .
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第一报文向第二设备发送第三报文,具体方法可以为:接入设备当检测到第一报文包括的第一协议字段中包括第二时间戳信息时,接入设备将第二时间戳信息封装到第一报文包括的第三协议字段中,生成第三报文,并向第二设备发送第三报文。In a possible design, the access device sends a third packet to the second device based on the first packet. The specific method may be: when the access device detects that the first protocol field included in the first packet includes the second packet, In timestamp information, the access device encapsulates the second timestamp information into a third protocol field included in the first message, generates a third message, and sends the third message to the second device.
通过上述方法,接入设备可以将第二时间戳信息成功发送至第二设备,以使第二设备进行时钟同步。Through the above method, the access device can successfully send the second time stamp information to the second device, so that the second device performs clock synchronization.
在一个可能的设计中,接入设备将第二时间戳信息封装到第一报文包括的第三协议字段中之前,接入设备提取第一报文包括的第一协议字段中包括的第二时间戳信息。In a possible design, before the access device encapsulates the second time stamp information into a third protocol field included in the first packet, the access device extracts the second packet included in the first protocol field included in the first packet. Timestamp information.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第三协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The third protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元且第二设备为终端设备时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,第三协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第一设备为终端设备且第二设备为用户面网元时,第一协议字段为SDAP字段或PDCP字段,第三协议字段为GTP字段。In a possible design, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field, and the third protocol field is a service data protocol SDAP field Or data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or a PDCP field, and the third protocol field is a GTP field.
在一个可能的设计中,接入设备基于第二报文向第二设备发送第四报文,具体方法可以为:接入设备当检测到第二报文包括的第二协议字段中包括第四时间戳信息时,接入设备将第四时间戳信息封装到第二报文的第四协议字段中,生成第四报文,并向第二设备发送第四报文。In a possible design, the access device sends a fourth message to the second device based on the second message. The specific method may be: when the access device detects that the second protocol field included in the second message includes a fourth message, In timestamp information, the access device encapsulates the fourth timestamp information into the fourth protocol field of the second message, generates a fourth message, and sends the fourth message to the second device.
通过上述方法,接入设备可以将第四时间戳信息成功发送至第二设备,以使第二设备进行时钟同步。Through the above method, the access device can successfully send the fourth time stamp information to the second device, so that the second device performs clock synchronization.
在一个可能的设计中,接入设备将第四时间戳信息封装到第二报文包括的第四协议字段中之前,接入设备提取第二报文包括的第二协议字段中包括的第二时间戳信息。In a possible design, before the access device encapsulates the fourth time stamp information into a fourth protocol field included in the second packet, the access device extracts the second packet included in the second protocol field included in the second packet. Timestamp information.
在一个可能的设计中,第四协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the fourth protocol field may be an existing protocol field, or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元且第二设备为终端设备时,第二协议字段为通用分组无线服务GPRS隧道协议GTP字段,第四协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第一设备为终端设备且第二设备为用户面网元时,第二协议字段为SDAP字段或PDCP字段,第四协议字段为GTP字段。In a possible design, when the first device is a user plane network element and the second device is a terminal device, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field, and the fourth protocol field is a service data protocol SDAP field Or data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the second protocol field is an SDAP field or a PDCP field, and the fourth protocol field is a GTP field.
第九方面,本申请还提供了一种同步方法,该方法包括:In a ninth aspect, the present application further provides a synchronization method, which includes:
第二设备从接入设备接收第三报文,第三报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备向接入设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备向接入设备发送第一报文时移动网络中的时刻;其中第三报文为接入设备基于第一报文向第二设备发送的;The second device receives a third message from the access device, and the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is when the first device sends the first message to the access device. The time in the Ethernet network, the second time stamp information is the time in the mobile network when the first device sends the first message to the access device; the third message is the time that the access device sends to the second device based on the first message of;
第二设备确定第五时间戳信息和第六时间戳信息,第五时间戳信息为第二设备接收到第三报文时以太网络中的时刻,第六时间戳信息为第二设备接收到第三报文时移动网络中的时刻;第二设备从接入设备接收第四报文,第四报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备向接入设备发送第二报文时以太网络中的时刻,第四时间戳信息为第一设备向接入设备发送第二报文时移动网络中的时刻;其中第四报文为接 入设备基于第二报文向第二设备发送的;第二设备确定第七时间戳信息和第八时间戳信息,第七时间戳信息为第二设备接收到第四报文时以太网络中的时刻,第八时间戳信息为第二设备接收到第四报文时移动网络中的时刻;第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息、第六时间戳信息、第七时间戳信息和第八时间戳信息确定第一设备和第二设备之间的频率偏差,并根据频率偏差进行频率同步。其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The second device determines the fifth time stamp information and the sixth time stamp information. The fifth time stamp information is the time in the Ethernet network when the second device receives the third packet, and the sixth time stamp information is the second device received the Three messages are the time in the mobile network; the second device receives the fourth message from the access device, and the fourth message carries the third time stamp information and the fourth time stamp information, and the third time stamp information is the first device The time in the Ethernet network when sending the second message to the access device, and the fourth time stamp information is the time in the mobile network when the first device sends the second message to the access device; the fourth message is the access device Sent to the second device based on the second message; the second device determines the seventh time stamp information and the eighth time stamp information, and the seventh time stamp information is the time in the Ethernet network when the second device receives the fourth message, The eighth timestamp information is the time in the mobile network when the second device receives the fourth message; according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, Fifth time The stamp information, the sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, and perform frequency synchronization according to the frequency deviation. The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第二设备通过第一设备发起的报文传输时移动网络和以太网络中报文收发时间,计算第一设备和第二设备之间频率偏差,进而进行频率同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时钟精度需求。By the above method, the second device uses the message transmission and reception time in the mobile network and the Ethernet network to transmit the message initiated by the first device, calculates the frequency deviation between the first device and the second device, and then performs frequency synchronization. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the clock accuracy requirements of industrial plants.
在一个可能的设计中,第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息、第六时间戳信息、第七时间戳信息和第八时间戳信息确定第一设备和第二设备之间的频率偏差,具体方法可以为:第二设备确定第六时间戳信息对应的时刻与第二时间戳信息对应的时刻的第一差值,以及确定第八时间戳信息对应的时刻与第四时间戳信息对应的时刻的第二差值;第二设备根据第一时间戳信息、第三时间戳信息、第五时间戳信息、第七时间戳信息、第一差值和第二差值确定第一设备和第二设备之间的频率偏差。In a possible design, the second device is based on the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time. The stamp information and the eighth timestamp information determine the frequency deviation between the first device and the second device. The specific method may be as follows: the second device determines the first and second timestamp information corresponding to the second time stamp information. A difference, and a second difference that determines the time corresponding to the eighth time stamp information and the time corresponding to the fourth time stamp information; the second device according to the first time stamp information, the third time stamp information, and the fifth time stamp information The seventh time stamp information, the first difference value and the second difference value determine a frequency deviation between the first device and the second device.
通过上述方法,第二设备可以通过准确地确定第一设备和第二设备之间的频率偏差。Through the above method, the second device can accurately determine the frequency deviation between the first device and the second device.
在一个可能的设计中,第二设备根据第一时间戳信息、第三时间戳信息、第五时间戳信息、第七时间戳信息、第一差值和第二差值确定第一设备和第二设备之间的频率偏差,具体方法可以为:In a possible design, the second device determines the first device and the first device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the first difference value, and the second difference value. The frequency deviation between the two devices, the specific method can be:
第二设备判断第一差值与第二差值的大小关系;The second device determines a magnitude relationship between the first difference and the second difference;
当第二设备判定第二差值小于第一差值时,第二设备确定频率偏差为第一值与第二值的商,第一值为第三时间戳信息对应的时刻与第一时间戳信息对应的时刻的差值,第二值为第七时间戳信息对应的时刻与第五时间戳信息对应的时刻的差值加上第三值所得的值,第三值为第四值与第五值的乘积值,第四值为第一差值减去第二差值所得的值,第五值为第七时间戳信息对应的时刻与第五时间戳对应的时刻的差值除以第八时间戳信息对应的时刻与第六时间戳对应的时刻的差值所得的值;When the second device determines that the second difference is smaller than the first difference, the second device determines that the frequency deviation is a quotient of the first value and the second value, and the first value is a time corresponding to the third time stamp information and the first time stamp The difference between the times corresponding to the information. The second value is a value obtained by adding the third value to the difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp information. The third value is the fourth value and the third value. The product of five values. The fourth value is the value obtained by subtracting the second difference from the first difference. The fifth value is the difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp. The value obtained by the difference between the time corresponding to the eight timestamp information and the time corresponding to the sixth timestamp;
当第二设备判定第二差值大于第一差值时,第二设备确定频率偏差为第一值与第六值的商,第六值为第七时间戳信息对应的时刻与第五时间戳信息对应的时刻的差值减去第七值所得的值,第七值为第八值与第五值的乘积值,第八值为第二差值减去第一差值所得的值。When the second device determines that the second difference is greater than the first difference, the second device determines that the frequency deviation is a quotient of the first value and a sixth value, and the sixth value is a time corresponding to the seventh time stamp information and a fifth time stamp The value obtained by subtracting the seventh value from the difference at the time corresponding to the information, the seventh value is the product of the eighth value and the fifth value, and the eighth value is the value obtained by subtracting the first difference from the second difference.
通过上述方法,第二设备可以通过准确地确定第一设备和第二设备之间的频率偏差,以进行频率同步。Through the above method, the second device can perform frequency synchronization by accurately determining a frequency deviation between the first device and the second device.
第十方面,本申请还提供了一种同步方法,该方法包括:In a tenth aspect, the present application further provides a synchronization method, which includes:
第一设备确定第一时间戳信息后,向接入设备发送第一报文,第一报文中携带第一时间戳信息;第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,第二时间戳信息为以太网络中的主时钟信息,第三时间戳信息为移动网络中的主时 钟信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。After the first device determines the first timestamp information, it sends a first message to the access device, and the first message carries the first timestamp information; the first timestamp information is the time corresponding to the second timestamp information and the third time The difference in time corresponding to the timestamp information, the second timestamp information is the master clock information in the Ethernet network, and the third timestamp information is the master clock information in the mobile network; wherein the first device is a user plane network element and the first The two devices are terminal devices, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,第一设备确定移动网络和以太网络中的主时钟信息之间的差值,并发送给第二设备,以使第二设备通过主时钟信息的差值直接完成时钟同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。Through the above method, the first device determines a difference between the master clock information in the mobile network and the Ethernet network, and sends it to the second device, so that the second device directly completes clock synchronization through the difference in the master clock information. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第一报文中携带第一时间戳信息,具体可以为:第一设备将第一时间戳信息携带在第一报文包括的第一协议字段中。In a possible design, the first message carries the first timestamp information. Specifically, the first device may carry the first timestamp information in a first protocol field included in the first message.
通过上述方法,第一设备可以成功将第一时间戳信息传输至接入设备,以使接入设备后续传输给第二设备。Through the above method, the first device can successfully transmit the first time stamp information to the access device, so that the access device can subsequently transmit the information to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当第一设备为终端设备时,第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In a possible design, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device, the first protocol field is a service data protocol SDAP field or data aggregation protocol PDCP field.
在一个可能的设计中,第一设备从接入设备接收第二报文,第二报文用于通知第一设备时间同步已完成。In a possible design, the first device receives a second message from the access device, and the second message is used to notify the first device that time synchronization has been completed.
通过上述方法,第一设备可以通过识别到时间同步已完成而结束现有的同步流程中第三报文之后的报文的传输,从而可以节省资源消耗。Through the above method, the first device can end the transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization is completed, thereby saving resource consumption.
第十一方面,本申请还提供了一种同步方法,该方法包括:In an eleventh aspect, the present application further provides a synchronization method, which includes:
接入设备从第一设备接收第一报文,并基于第一报文向第二设备发送第三报文,第一报文中携带第一时间戳信息,第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,第二时间戳信息为以太网络中的主时钟信息,第三时间戳信息为移动网络中的主时钟信息;第三报文中携带第一时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The access device receives the first message from the first device and sends a third message to the second device based on the first message. The first message carries the first time stamp information, and the first time stamp information is the second time. The difference between the time corresponding to the timestamp information and the time corresponding to the third time stamp information, the second time stamp information is the master clock information in the Ethernet network, and the third time stamp information is the master clock information in the mobile network; the third message The first timestamp information is carried therein, where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第一报文向第二设备发送第三报文,具体方法可以为:接入设备当检测到第一报文包括的第一协议字段中包括第一时间戳信息时,接入设备将第一时间戳信息封装到第一报文包括的第二协议字段中,生成第三报文,并向第二设备发送第三报文。In a possible design, the access device sends a third packet to the second device based on the first packet. The specific method may be: when the access device detects that the first protocol field included in the first packet includes the first packet, In timestamp information, the access device encapsulates the first timestamp information into a second protocol field included in the first message, generates a third message, and sends the third message to the second device.
通过上述方法,接入设备可以将第一时间戳信息成功发送至第二设备,以使第二设备进行时钟同步。Through the above method, the access device can successfully send the first time stamp information to the second device, so that the second device performs clock synchronization.
在一个可能的设计中,接入设备将第一时间戳信息封装到第一报文包括的第二协议字段中之前,接入设备提取第一报文包括的第一协议字段中包括的第二时间戳信息。In a possible design, before the access device encapsulates the first time stamp information into the second protocol field included in the first packet, the access device extracts the second packet included in the first protocol field included in the first packet. Timestamp information.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元且第二设备为终端设备时,第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,第二协议字段为服务数据协议SDAP 字段或数据汇聚协议PDCP字段;当第一设备为终端设备且第二设备为用户面网元时,第一协议字段为SDAP字段或PDCP字段,第二协议字段为GTP字段。In a possible design, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and the second protocol field is a Service Data Protocol SDAP field Or data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or a PDCP field, and the second protocol field is a GTP field.
在一个可能的设计中,接入设备从第二设备接收第二报文,并将第二报文转发给第一设备,第二报文用于通知第一设备时间同步已完成。In a possible design, the access device receives the second message from the second device, and forwards the second message to the first device, and the second message is used to notify the first device that time synchronization has been completed.
通过上述方法,可以使第一设备可以通过识别到时间同步已完成而结束现有的同步流程中第三报文之后的报文的传输,从而可以节省资源消耗。By using the above method, the first device can end transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization has been completed, thereby saving resource consumption.
第十二方面,本申请还提供了一种同步方法,该方法包括:In a twelfth aspect, the present application further provides a synchronization method, which includes:
第二设备从接入设备接收第三报文,第三报文中携带第一时间戳信息,第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,第二时间戳信息为以太网络中的主时钟信息,第三时间戳信息为移动网络中的主时钟信息;第三报文为接入设备基于第一报文发送的,第一报文为第一设备向接入设备发送的;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元;然后,第二设备确定第四时间戳信息,并用第四时间戳信息对应的时刻加上第一时间戳信息对应的差值,完成时间同步;第四时间戳信息为第二设备接收到第三报文时移动网络中的时刻。The second device receives a third message from the access device, and the third message carries the first time stamp information, and the first time stamp information is a difference between the time corresponding to the second time stamp information and the time corresponding to the third time stamp information. Value, the second time stamp information is the master clock information in the Ethernet network, the third time stamp information is the master clock information in the mobile network; the third message is the first message sent by the access device based on the first message Sent by the first device to the access device; wherein the first device is a user plane network element and the second device is a terminal device; or, the first device is a terminal device and the second device is a user plane network element; The two devices determine the fourth time stamp information, and use the time corresponding to the fourth time stamp information and the difference corresponding to the first time stamp information to complete the time synchronization; the fourth time stamp information is when the second device receives the third message Moments in mobile networks.
通过上述方法,第二设备通过主时钟信息的差值直接完成时钟同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。Through the above method, the second device directly completes clock synchronization through the difference between the master clock information. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第二设备从接入设备接收第三报文之后,第二设备提取第三报文包括的第二协议字段中携带的第一时间戳信息。In a possible design, after the second device receives the third message from the access device, the second device extracts the first time stamp information carried in the second protocol field included in the third message.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为终端设备时,第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当第二设备为用户面网元时,第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。In a possible design, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network element, the second protocol field is general Packet Radio Service GPRS Tunneling Protocol GTP field.
在一个可能的设计中,第二设备向接入设备发送第二报文,第二报文用于通知第一设备时间同步已完成。In a possible design, the second device sends a second message to the access device, and the second message is used to notify the first device that time synchronization has been completed.
通过上述方法,后续接入设备向第一设备转发第二报文,可以使第一设备可以通过识别到时间同步已完成而结束现有的同步流程中第三报文之后的报文的传输,从而可以节省资源消耗。Through the above method, the subsequent access device forwards the second message to the first device, so that the first device can end the transmission of the message after the third message in the existing synchronization process by recognizing that the time synchronization is completed, This can save resource consumption.
第十三方面,本申请还提供了一种第一设备,该第一设备具有实现上述第一方面、第四方面、第七方面或第十方面方法实例中第一设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。In a thirteenth aspect, the present application further provides a first device having the functions of implementing the first device in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect described above. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第一设备的结构中包括发送单元、处理单元和接收单元,这些单元可以执行上述第一方面、第四方面、第七方面或第十方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform corresponding functions in the method examples of the first aspect, the fourth aspect, the seventh aspect, or the tenth aspect, For details, refer to the detailed description in the method example, which is not described here.
在一个可能的设计中,第一设备的结构中包括收发器、处理器和存储器,收发器用于收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持第一设备执行上述第一方面、第四方面、第七方面或第十方面方法中相应的功能。存储器与处理器耦 合,其保存第一设备必要的程序指令和数据。In a possible design, the structure of the first device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the first device. Corresponding functions in the above-mentioned first, fourth, seventh or tenth methods. The memory is coupled to the processor and stores program instructions and data necessary for the first device.
第十四方面,本申请还提供了一种接入设备,该接入设备具有实现上述第二方面、第五方面、第八方面或第十一方面方法实例中接入设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。In a fourteenth aspect, the present application further provides an access device that has the functions of implementing the access device in the second, fifth, eighth, or eleventh method examples. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,接入设备的结构中包括发送单元和接收单元,这些单元可以执行上述第二方面、第五方面、第八方面或第十一方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the access device includes a sending unit and a receiving unit, and these units may perform corresponding functions in the method examples of the second aspect, the fifth aspect, the eighth aspect, or the eleventh aspect described above. For details, see The detailed description in the method example will not be repeated here.
在一个可能的设计中,接入设备的结构中包括收发器、处理器和存储器,收发器用于收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持接入设备执行上述第二方面、第五方面、第八方面或第十一方面方法中相应的功能。存储器与处理器耦合,其保存接入设备必要的程序指令和数据。In a possible design, the structure of the access device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the access device. Corresponding functions in the above-mentioned second, fifth, eighth or eleventh methods. The memory is coupled to the processor and stores program instructions and data necessary for accessing the device.
第十五方面,本申请还提供了一种第二设备,该第二设备具有实现上述第三方面、第六方面、第九方面或第十二方面方法实例中第二设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。In a fifteenth aspect, the present application further provides a second device, which has the function of implementing the second device in the third, sixth, ninth, or twelfth method examples. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第二设备的结构中包括接收单元、处理单元和发送单元,这些单元可以执行上述第三方面、第六方面、第九方面或第十二方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may perform corresponding functions in the method examples of the third aspect, the sixth aspect, the ninth aspect, or the twelfth aspect described above. For details, refer to the detailed description in the method example, which will not be repeated here.
在一个可能的设计中,第二设备的结构中包括收发器、处理器和存储器,收发器用于收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持第二设备执行上述第三方面、第六方面、第九方面或第十二方面方法中相应的功能。存储器与处理器耦合,其保存第二设备必要的程序指令和数据。In a possible design, the structure of the second device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the second device. Corresponding functions in the methods of the third, sixth, ninth or twelfth aspects. The memory is coupled to the processor and stores program instructions and data necessary for the second device.
第十六方面,本申请还提供了一种通信系统,通信系统可以包括上述设计中提及的第一设备、接入设备、第二设备等。In a sixteenth aspect, the present application further provides a communication system, and the communication system may include the first device, the access device, and the second device mentioned in the above design.
第十七方面,本申请还提供了一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令在被计算机调用时用于使计算机执行上述任一种方法。In a seventeenth aspect, the present application also provides a computer storage medium. The computer storage medium stores computer-executable instructions. When the computer-executable instructions are called by a computer, the computer executes any one of the foregoing methods.
第十八方面,本申请还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述任一种方法。In an eighteenth aspect, the present application also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute any one of the methods described above.
第十九方面,本申请还提供了一种芯片,芯片与存储器相连,用于读取并执行存储器中存储的程序指令,以实现上述任一种方法。In a nineteenth aspect, the present application further provides a chip, which is connected to the memory, and is configured to read and execute program instructions stored in the memory to implement any of the foregoing methods.
第二十方面,本申请还提供了一种同步方法,该方法包括:In a twentieth aspect, the present application further provides a synchronization method, which includes:
首先,第一设备从第三设备接收第一报文后,确定第一时间戳信息,并通过接入设备向第二设备发送第一报文,第一时间戳信息为第一设备接收到第一报文时移动网络中的时刻;然后,第一设备从第三设备接收第二报文后,基于第二报文向接入设备发送第三报文,第三报文中携带第一时间戳信息;之后,第一设备从接入设备接收第四报文后,向第三设备发送第四报文,并确定第二时间戳信息,第二时间戳信息为第一设备向第三设备发送第四报文时移动网络中的时刻;第一设备从第三设备接收第五报文后,确定第三时间戳信息,并基于第五报文向接入设备发送第六报文,第六报文中携带第二时间戳信息,第三时间戳信息为第一设备接收到第五报文时移动网络中的时刻;最后,第一设备从第三设备接收第七报文后,向接入设备发送第八报文;第七报文中携带第四时间戳信息,第四时间戳信息 为第三设备向第一设备发送第五报文时以太网络中的时刻,第八报文中携带第三时间戳信息和第四时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, after the first device receives the first message from the third device, the first device determines the first time stamp information, and sends the first message to the second device through the access device. The first time stamp information is that the first device receives the first time stamp information. One message is the time in the mobile network; then, after receiving the second message from the third device, the first device sends a third message to the access device based on the second message, and the third message carries the first time After stamping the information; after receiving the fourth message from the access device, the first device sends a fourth message to the third device, and determines the second time stamp information, the second time stamp information is the first device to the third device The moment in the mobile network when the fourth message is sent; after receiving the fifth message from the third device, the first device determines the third time stamp information, and sends a sixth message to the access device based on the fifth message. The six messages carry the second time stamp information, and the third time stamp information is the time in the mobile network when the first device receives the fifth message; finally, after receiving the seventh message from the third device, the first device sends the The access device sends an eighth message; a seventh message Carry fourth time stamp information, the fourth time stamp information is the time in the Ethernet network when the third device sends the fifth message to the first device, and the eighth message carries the third time stamp information and the fourth time stamp information; The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By using the above method, the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第三报文中携带第一时间戳信息,可以为:第一设备将第一时间戳信息携带在第三报文包括的第一协议字段中。这样可以成功地将第一时间戳信息传输至接入设备。In a possible design, the third message carries the first timestamp information, which may be: the first device carries the first timestamp information in a first protocol field included in the third message. In this way, the first time stamp information can be successfully transmitted to the access device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段;或者,当第一设备为用户面网元时,第一协议字段为GTP字段。In a possible design, when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field; or when the first device is a user plane network element, the first protocol field is a GTP field.
在一个可能的设计中,第六报文中携带第二时间戳信息,可以为:第一设备将第二时间戳信息携带在第六报文包括的第二协议字段中。这样可以成功地将第二时间戳信息传输至接入设备。In a possible design, the sixth message carries the second timestamp information, which may be: the first device carries the second timestamp information in a second protocol field included in the sixth message. In this way, the second time stamp information can be successfully transmitted to the access device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第二协议字段为SDAP字段或PDCP字段;或者,当第二设备为用户面网元时,第二协议字段为GTP字段。In a possible design, when the first device is a terminal device, the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
在一个可能的设计中,第八报文中携带第三时间戳信息,可以为:第一设备将第三时间戳信息携带在第八报文包括的第三协议字段中。这样可以成功地将第三时间戳信息传输至接入设备。In a possible design, the third timestamp information is carried in the eighth message, which may be: the first device carries the third timestamp information in a third protocol field included in the eighth message. In this way, the third time stamp information can be successfully transmitted to the access device.
在一个可能的设计中,第三协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the third protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第三协议字段为SDAP字段或PDCP字段;或者,当第二设备为用户面网元时,第三协议字段为GTP字段。In a possible design, when the first device is a terminal device, the third protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the third protocol field is a GTP field.
第二十一方面,本申请还提供了一种同步方法,该方法包括:In a twenty-first aspect, the present application further provides a synchronization method, which includes:
接入设备从第一设备接收第一报文后,向第二设备转发第一报文;接入设备从第一设备接收第三报文后,基于第三报文向第二设备发送第九报文;第三报文中携带第一时间戳信息,第九报文中携带第一时间戳信息,第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;接入设备从第二设备接收到第四报文后,向第一设备发送第四报文;接入设备从第一设备接收第六报文后,基于第六报文向第二设备发送第十报文;第六报文为第一设备从第三设备接收到第五报文后基于第五报文向接入设备发送的;第六报文中携带第二时间戳信息,第二时间戳信息为第一设备从接入设备接收到第四报文后向第三设备发送第四报文时移动网络中的时刻;第十报文中携带第二时间戳信息;接入设备从第一设备接收第八报文,并基于第八报文向第二设备发送第十一报文;第八报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备从第三设备接收到第五报文时移动网络中的时刻,第四时间戳信息为第三设备向第一设备发送第五报文时以太网络中的时刻;第十一报文中携带第三时间戳信息和第四时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。After receiving the first message from the first device, the access device forwards the first message to the second device; after receiving the third message from the first device, the access device sends a ninth to the second device based on the third message. Message; the third message carries the first time stamp information, the ninth message carries the first time stamp information, and the first time stamp information is in the mobile network when the first device receives the first message from the third device At the moment; after receiving the fourth message from the second device, the access device sends a fourth message to the first device; after receiving the sixth message from the first device, the access device sends the fourth message to the second device based on the sixth message. The device sends a tenth message; the sixth message is sent by the first device to the access device based on the fifth message after receiving the fifth message from the third device; the sixth message carries the second time stamp information, The second time stamp information is the time in the mobile network when the first device sends the fourth message to the third device after receiving the fourth message from the access device; the tenth message carries the second time stamp information; access The device receives the eighth message from the first device, and sends the eighth message to the second device based on the eighth message. Send the eleventh message; the eighth message carries the third time stamp information and the fourth time stamp information, and the third time stamp information is the time in the mobile network when the first device receives the fifth message from the third device The fourth timestamp information is the time in the Ethernet network when the third device sends the fifth message to the first device; the eleventh message carries the third timestamp information and the fourth timestamp information; wherein the first device Is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第三报文向第二设备发送第九报文,具体可以为:接入设备当检测到第三报文包括的第一协议字段中携带第一时间戳信息时,将第一时间戳信息封装到第三报文的第四协议字段中,生成第九报文,并向第二设备发送第九报文。这样接入设备可以将第一时间戳信息传输至第二设备。In a possible design, the access device sends a ninth message to the second device based on the third message, which may specifically be: when the access device detects that the first protocol field included in the third message carries the first time When stamping the information, the first time stamp information is encapsulated into the fourth protocol field of the third message, a ninth message is generated, and the ninth message is sent to the second device. In this way, the access device can transmit the first time stamp information to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第四协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The fourth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段,第四协议字段为GTP字段;或者,当第一设备为用户面网元时,第一协议字段为GTP字段,第四协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field, and the fourth protocol field is a GTP field; or, when the first device is a user plane network element, the first The protocol field is a GTP field, and the fourth protocol field is an SDAP field or a PDCP field.
在一个可能的设计中,接入设备基于第六报文向第二设备发送第十报文,可以为:接入设备当检测到第六报文包括的第二协议字段中携带第二时间戳信息时,将第二时间戳信息封装到第六报文的第五协议字段中,生成第十报文,并向第二设备发送第十报文。这样接入设备可以将第二时间戳信息传输至第二设备。In a possible design, the access device sends the tenth message to the second device based on the sixth message, which may be: when the access device detects that the second protocol field included in the sixth message carries a second timestamp For information, the second time stamp information is encapsulated into the fifth protocol field of the sixth message, a tenth message is generated, and the tenth message is sent to the second device. In this way, the access device can transmit the second time stamp information to the second device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第五协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework. The fifth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第二协议字段为SDAP字段或PDCP字段,第五协议字段为GTP字段;或者,当第一设备为用户面网元时,第二协议字段为GTP字段,第五协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a terminal device, the second protocol field is an SDAP field or a PDCP field, and the fifth protocol field is a GTP field; or, when the first device is a user plane network element, the second The protocol field is a GTP field, and the fifth protocol field is an SDAP field or a PDCP field.
在一个可能的设计中,接入设备基于第八报文向第二设备发送第十一报文,可以为:接入设备当检测到第八报文包括的第三协议字段中携带第三时间戳信息时,将第三时间戳信息封装到第八报文的第六协议字段中,生成第十一报文,并向第二设备发送第十一报文。这样接入设备可以将第三时间戳信息传输至第二设备。In a possible design, the access device sends an eleventh message to the second device based on the eighth message, which may be: when the access device detects that the third protocol field included in the eighth message carries a third time When stamping the information, the third time stamp information is encapsulated into the sixth protocol field of the eighth message, an eleventh message is generated, and the eleventh message is sent to the second device. In this way, the access device can transmit the third time stamp information to the second device.
在一个可能的设计中,第三协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第六协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the third protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework. The sixth protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第三协议字段为SDAP字段或PDCP字段,第六协议字段为GTP字段;或者,当第一设备为用户面网元时,第三协议字段为GTP字段,第六协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a terminal device, the third protocol field is an SDAP field or a PDCP field, and the sixth protocol field is a GTP field; or when the first device is a user plane network element, the third The protocol field is a GTP field, and the sixth protocol field is an SDAP field or a PDCP field.
第二十二方面,本申请还提供了一种同步方法,该方法包括:In a twenty-second aspect, the present application also provides a synchronization method, which includes:
首先,第二设备从接入设备接收第一报文后,向第四设备发送第一报文,并确定第五时间戳信息,第五时间戳信息为第二设备向第四设备发送第一报文时移动网络中的时刻;然后,第二设备从接入设备接收第九报文后,基于第九报文向第四设备发送第十二报文;第九报文中携带第一时间戳信息,第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;第二设备从第四设备接收第四报文,确定第六时间戳信息,并向接入设备发送第四报文,第六时间戳信息为第二设备接收到第四报文时移动网络中的时刻;第二设备从接入设备接收第十报文;第十报文中携带第二时间戳信息,第二时间戳信息为 接入设备将第四报文发送给第一设备后,第一设备向第三设备发送第四报文时移动网络中的时刻;第二设备向第四设备发送第十三报文,并确定第七时间戳信息;第七时间戳信息为第二设备向第四设备发送第十三报文时移动网络中的时刻;第二设备从接入设备接收第十一报文,第十一报文中携带第三时间戳信息和第四时间戳信息,第三时间戳信息为第一设备从第三设备接收到第五报文时移动网络中的时刻,第四时间戳信息为第三设备向第一设备发送第五报文时以太网络中的时刻;最后,第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息、第六时间戳信息和第七时间戳信息,确定第八时间戳信息;第二设备将第八时间戳信息发送给第四设备,以使第四设备基于第八时间戳信息进行时间同步。First, after receiving the first message from the access device, the second device sends the first message to the fourth device and determines the fifth time stamp information. The fifth time stamp information is the second device sending the first message to the fourth device. The message is the time in the mobile network; then, after the second device receives the ninth message from the access device, it sends a twelfth message to the fourth device based on the ninth message; the ninth message carries the first time The time stamp information, the first time stamp information is the time in the mobile network when the first device receives the first message from the third device; the second device receives the fourth message from the fourth device, determines the sixth time stamp information, and The fourth message is sent to the access device, and the sixth time stamp information is the time in the mobile network when the second device receives the fourth message; the second device receives the tenth message from the access device; the tenth message Carry the second time stamp information, the second time stamp information is the time in the mobile network when the first device sends the fourth message to the third device after the access device sends the fourth message to the first device; the second device Send a thirteenth message to the fourth device, and confirm The seventh time stamp information; the seventh time stamp information is the time in the mobile network when the second device sends the thirteenth message to the fourth device; the second device receives the eleventh message from the access device, the eleventh The message carries the third time stamp information and the fourth time stamp information. The third time stamp information is the time in the mobile network when the first device receives the fifth message from the third device, and the fourth time stamp information is the third time information. The time in the Ethernet network when the device sends the fifth message to the first device; finally, the second device according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time The stamp information, the sixth timestamp information, and the seventh timestamp information determine the eighth timestamp information; the second device sends the eighth timestamp information to the fourth device, so that the fourth device performs time based on the eighth timestamp information Synchronize.
通过上述方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By using the above method, the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第二设备从接入设备接收第九报文之后,提取第九报文包括的第四协议字段中携带的第一时间戳信息。这样第二设备后续可以通过第一时间戳信息确定第八时间戳信息。In a possible design, after the second device receives the ninth message from the access device, it extracts the first time stamp information carried in the fourth protocol field included in the ninth message. In this way, the second device may subsequently determine the eighth time stamp information by using the first time stamp information.
在一个可能的设计中,第四协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如,NEW字段)。In a possible design, the fourth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为用户面网元时,第四协议字段为GTP字段;或者,当第二设备为终端设备时,第四协议字段为SDAP字段或PDCP字段。In a possible design, when the second device is a user plane network element, the fourth protocol field is a GTP field; or when the second device is a terminal device, the fourth protocol field is an SDAP field or a PDCP field.
在一个可能的设计中,第二设备从接入设备接收第十报文之后,提取第十报文包括的第五协议字段中携带的第二时间戳信息。这样第二设备后续可以通过第二时间戳信息确定第八时间戳信息。In a possible design, after the second device receives the tenth message from the access device, it extracts the second time stamp information carried in the fifth protocol field included in the tenth message. In this way, the second device may subsequently determine the eighth timestamp information by using the second timestamp information.
在一个可能的设计中,第五协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如,NEW字段)。In a possible design, the fifth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为用户面网元时,第五协议字段为GTP字段;或者,当第二设备为终端设备时,第五协议字段为SDAP字段或PDCP字段。In a possible design, when the second device is a user plane network element, the fifth protocol field is a GTP field; or when the second device is a terminal device, the fifth protocol field is an SDAP field or a PDCP field.
在一个可能的设计中,第二设备从接入设备接收第十一报文之后提取第十一报文包括的第六协议字段中携带的第三时间戳信息。这样第二设备后续可以通过第三时间戳信息确定第八时间戳信息。In a possible design, after receiving the eleventh message from the access device, the second device extracts the third time stamp information carried in the sixth protocol field included in the eleventh message. In this way, the second device can subsequently determine the eighth time stamp information by using the third time stamp information.
在一个可能的设计中,第六协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如,NEW字段)。In a possible design, the sixth protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为用户面网元时,第六协议字段为GTP字段;或者,当第二设备为终端设备时,第六协议字段为SDAP字段或PDCP字段。In a possible design, when the second device is a user plane network element, the sixth protocol field is a GTP field; or when the second device is a terminal device, the sixth protocol field is an SDAP field or a PDCP field.
第二十三方面,本申请还提供了一种同步方法,该方法包括:In a twenty-third aspect, the present application further provides a synchronization method, which includes:
首先,第一设备向接入设备发送第一报文,并确定第一时间戳信息和第二时间戳信息;第一时间戳信息为第一设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备发送第一报文时移动网络中的时刻;第一设备向接入设备发送第二报文,第二报文中携带第一时间戳信息和第二时间戳信息;然后,第一设备从接入设备接收第三报文,并确定第三时间戳信息,第三时间戳信息为第一设备接收到第三报文时以太网络中的时刻;第一设备向接入设备发送第四报文,并确定第四时间戳信息;第四时间戳信息为第一设备发送 第四报文时以太网络中的时刻,第四报文中携带第三时间戳信息;最后,第一设备向接入设备发送第五报文,第五报文中携带第四时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, the first device sends a first message to the access device, and determines first time stamp information and second time stamp information; the first time stamp information is a time in the Ethernet network when the first device sends the first message, The second time stamp information is the time in the mobile network when the first device sends the first message; the first device sends a second message to the access device, and the second message carries the first time stamp information and the second time stamp Information; then, the first device receives the third message from the access device and determines the third time stamp information, the third time stamp information is the time in the Ethernet network when the first device receives the third message; the first device Send a fourth message to the access device and determine the fourth time stamp information; the fourth time stamp information is the time in the Ethernet network when the first device sends the fourth message, and the fourth message carries the third time stamp information ; Finally, the first device sends a fifth message to the access device, and the fifth message carries the fourth time stamp information; wherein the first device is a user plane network element and the second device is a terminal device; or The device is an end device and The second device is a user plane network element.
通过上述方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By using the above method, the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第二报文中携带第二时间戳信息,具体可以为:第一设备将第二时间戳信息携带在第二报文包括的第一协议字段中。这样第一设备可以成功将第二时间戳信息传输至接入设备。In a possible design, the second message carries the second timestamp information, which may specifically be: the first device carries the second timestamp information in a first protocol field included in the second message. In this way, the first device can successfully transmit the second time stamp information to the access device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如,NEW字段)。In a possible design, the first protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段;或者,当第一设备为用户面网元时,第一协议字段为GTP字段。In a possible design, when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field; or when the first device is a user plane network element, the first protocol field is a GTP field.
第二十四方面,本申请还提供了一种同步方法,该方法包括:In a twenty-fourth aspect, the present application also provides a synchronization method, which includes:
接入设备从第一设备接收第一报文后,向第二设备转发第一报文;接入设备从第一设备接收第二报文后,基于第二报文向第二设备发送第六报文;第二报文中携带第一时间戳信息和第二时间戳信息,第一时间戳信息为第一设备向接入设备发送第一报文时以太网络中的时刻,第二时间戳信息为第一设备向接入设备发送第一报文时移动网络中的时刻;第六报文中携带第一时间戳信息和第二时间戳信息;接入设备从第二设备接收第三报文后,向第一设备转发第三报文;接入设备从第一设备接收第四报文后,向第二设备转发第四报文,第四报文中携带第三时间戳信息,第三时间戳信息为第一设备接收到接入设备发送的第三报文时以太网络中的时刻;接入设备从第一设备接收到第五报文后,向第二设备转发第五报文,第五报文中携带第四时间戳信息,第四时间戳信息为第一设备向接入设备发送第四报文时以太网络中的时刻;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。After receiving the first message from the first device, the access device forwards the first message to the second device; after receiving the second message from the first device, the access device sends a sixth message to the second device based on the second message. Message; the second message carries the first time stamp information and the second time stamp information, the first time stamp information is the time in the Ethernet network when the first device sends the first message to the access device, and the second time stamp The information is the time in the mobile network when the first device sends the first message to the access device; the sixth message carries the first and second timestamp information; the access device receives the third message from the second device After the text, the third message is forwarded to the first device; after receiving the fourth message from the first device, the access device forwards the fourth message to the second device, and the fourth message carries the third time stamp information. The three timestamp information is the time in the Ethernet network when the first device receives the third message sent by the access device; after receiving the fifth message from the first device, the access device forwards the fifth message to the second device. , The fifth message carries the fourth time stamp information, the fourth time The stamp information is the time in the Ethernet network when the first device sends the fourth message to the access device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the The second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第二报文向第二设备发送第六报文,可以为:接入设备当检测到第二报文包括的第一协议字段中携带第二时间戳信息时,将第二时间戳信息封装到第二报文的第二协议字段中,生成第六报文,并向第二设备发送第六报文。In a possible design, the access device sends a sixth message to the second device based on the second message, which may be: when the access device detects that the first protocol field included in the second message carries a second timestamp For information, the second time stamp information is encapsulated into the second protocol field of the second message, a sixth message is generated, and the sixth message is sent to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段,第二协议字段为GTP字段;或者,当第一设备为用户面网元时,第一协议字段为GTP字段,第二协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field, and the second protocol field is a GTP field; or, when the first device is a user plane network element, the first The protocol field is a GTP field, and the second protocol field is an SDAP field or a PDCP field.
第二十五方面,本申请还提供了一种同步方法,该方法包括:In a twenty-fifth aspect, the present application further provides a synchronization method, which includes:
第二设备从接入设备接收第一报文,并确定第五时间戳信息和第六时间戳信息,第五时间戳信息为第二设备接收到第一报文时以太网络中的时刻,第六时间戳信息为第二设备接收到第一报文时移动网络中的时刻;第二设备从接入设备接收第六报文,第六报文中携带第一时间戳信息和第二时间戳信息;第一时间戳信息为第一设备向接入设备发送第一报 文时以太网络中的时刻,第二时间戳信息为第一设备向接入设备发送第一报文时移动网络中的时刻;第二设备向接入设备发送第三报文,并确定第七时间戳信息,第七时间戳信息为第二设备发送第三报文时以太网络中的时刻;第二设备从接入设备接收第四报文,并确定第八时间戳信息,第八时间戳信息为第二设备接收到第四报文时以太网络中的时刻;第四报文中携带第三时间戳信息,第三时间戳信息为接入设备从第二设备接收第三报文后,向第一设备转发第三报文后,第一设备接收到第三报文时以太网络中的时刻;第二设备从接入设备接收第五报文,第五报文中携带第四时间戳信息,第四时间戳信息为第一设备向接入设备发送第四报文时以太网络中的时刻;第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息、第六时间戳信息、第七时间戳信息、第八时间戳信息确定第一设备和第二设备之间的时间偏差,并根据时间偏差进行时间同步;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。The second device receives the first message from the access device and determines the fifth time stamp information and the sixth time stamp information. The fifth time stamp information is the time in the Ethernet network when the second device receives the first message. The six timestamp information is the time in the mobile network when the second device receives the first message; the second device receives the sixth message from the access device, and the sixth message carries the first timestamp information and the second timestamp Information; the first time stamp information is the time in the Ethernet network when the first device sends the first message to the access device, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device. Time; the second device sends a third message to the access device, and determines the seventh time stamp information, the seventh time stamp information is the time in the Ethernet network when the second device sends the third message; the second device slave access The device receives the fourth message and determines the eighth time stamp information. The eighth time stamp information is the time in the Ethernet network when the second device receives the fourth message. The fourth message carries the third time stamp information. Three timestamp information is After the incoming device receives the third message from the second device and forwards the third message to the first device, the time in the Ethernet network when the first device receives the third message; the second device receives the fifth message from the access device. Message, the fifth message carries fourth timestamp information, and the fourth timestamp information is the time in the Ethernet network when the first device sends the fourth message to the access device; according to the first timestamp information, The second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, the sixth timestamp information, the seventh timestamp information, and the eighth timestamp information determine whether the first device and the second device Time, and time synchronization is performed according to the time deviation; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息、第五时间戳信息、第六时间戳信息、第七时间戳信息、第八时间戳信息确定第一设备和第二设备之间的时间偏差,具体可以为:第二设备根据第二时间戳信息、第三时间戳信息、第六时间戳信息、第七时间戳信息和第八时间戳信息确定第九时间戳信息;第二设备删除第四时间戳信息,并根据第九时间戳信息确定第一设备向接入设备发送第四报文时以太网络中的时刻;第二设备根据第一时间戳信息、第三时间戳信息、第五时间戳信息、第七时间戳信息、第八时间戳信息和第九时间戳信息确定第一设备和第二设备之间的时间偏差。In a possible design, the second device is based on the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time. The stamp information and the eighth timestamp information determine the time deviation between the first device and the second device, which may specifically be: the second device according to the second timestamp information, the third timestamp information, the sixth timestamp information, the seventh The timestamp information and the eighth timestamp information determine the ninth timestamp information; the second device deletes the fourth timestamp information, and determines according to the ninth timestamp information that the first device sends the fourth message to the access device in the Ethernet network. Time; the second device determines the first device and the second device according to the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, the eighth timestamp information, and the ninth timestamp information Time deviation between.
通过上述方法,第二设备可以准确确定第一设备和第二设备之间的时间偏差。Through the above method, the second device can accurately determine the time deviation between the first device and the second device.
在一个可能的设计中,第二设备从接入设备接收第六报文之后,提取第六报文包括的第二协议字段中携带的第二时间戳信息。In a possible design, after the second device receives the sixth message from the access device, it extracts the second time stamp information carried in the second protocol field included in the sixth message.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为用户面网元时,第二协议字段为GTP字段;或者,当第二设备为终端设备时,第二协议字段为SDAP字段或PDCP字段。In a possible design, when the second device is a user plane network element, the second protocol field is a GTP field; or when the second device is a terminal device, the second protocol field is an SDAP field or a PDCP field.
第二十六方面,本申请还提供了一种同步方法,该方法包括:In a twenty-sixth aspect, the present application also provides a synchronization method, which includes:
首先,第一设备从第三设备接收第一报文后,通过接入设备向第二设备发送第一报文,并确定第一时间戳信息,第一时间戳信息为第一设备接收到第一报文时移动网络中的时刻;然后,第一设备从接入设备接收第二报文后,向第三设备发送第三报文;第二报文中携带第二时间戳信息和第三时间戳信息,第二时间戳信息为第二设备接收到第一报文后,向第四设备发送第一报文时移动网络中的时刻;第三时间戳信息为第二设备从第四设备接收到第五报文时移动网络中的时刻;第一设备确定第四时间戳信息,第四时间戳信息为第一设备发送第三报文时移动网络中的时刻;之后,第一设备从第三设备接收第六报文,第六报文中携带第五时间戳信息,第五时间戳信息为第三设备接收到第一设备发送的第三报文时以太网络中的时刻;最后,第一设备根据第一时间戳信息、第二时间戳信息、第三时间戳 信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息,并将第六时间戳信息通过接入设备转发给第二设备;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, after receiving the first message from the third device, the first device sends the first message to the second device through the access device, and determines the first time stamp information. The first time stamp information is A message is the time in the mobile network; then, after receiving the second message from the access device, the first device sends a third message to the third device; the second message carries the second time stamp information and the third Timestamp information, the second timestamp information is the time in the mobile network when the second device receives the first message and sends the first message to the fourth device; the third timestamp information is the second device from the fourth device The time in the mobile network when the fifth message is received; the first device determines the fourth time stamp information, the fourth time stamp information is the time in the mobile network when the first device sends the third message; after that, the first device The third device receives the sixth message, and the sixth message carries fifth time stamp information, and the fifth time stamp information is a time in the Ethernet network when the third device receives the third message sent by the first device; finally, First device according to the first time Determining the sixth timestamp information by the stamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information, and forwarding the sixth timestamp information to the second device through the access device; The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
在一个可能的设计中,第一设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息,具体可以为:第一设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息和第四时间戳信息确定第一设备与第二设备之间的往返传输时延差值;第一设备计算第五时间戳信息对应的时刻与往返传输时延差值的和,得到第六时间戳信息。In a possible design, the first device determines the sixth timestamp information according to the first timestamp information, the second timestamp information, the fourth timestamp information, and the fifth timestamp information, which may specifically be The first device determines a round-trip transmission delay difference between the first device and the second device according to the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information; the first device calculates Sum of the time corresponding to the fifth timestamp information and the round-trip transmission delay difference value to obtain sixth timestamp information.
通过上述方法,第一设备可以准确确定第六时间戳信息,以使第四设备根据第六时间戳信息和以太网络中收发报文的时间来计算第三设备和第四设备之间的时间偏差,进而进行时间同步。Through the above method, the first device can accurately determine the sixth time stamp information, so that the fourth device can calculate the time deviation between the third device and the fourth device according to the sixth time stamp information and the time of sending and receiving packets in the Ethernet network. , And then time synchronization.
在一个可能的设计中,第一设备从接入设备接收第二报文之后提取第二报文包括的第一协议字段中携带的第二时间戳信息和第三时间戳信息。这样第一设备可以将第二时间戳信息和第三时间戳信息传输至接入设备。In a possible design, after receiving the second message from the access device, the first device extracts the second time stamp information and the third time stamp information carried in the first protocol field included in the second message. In this way, the first device can transmit the second time stamp information and the third time stamp information to the access device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第一协议字段为GTP字段;或者,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a user plane network element, the first protocol field is a GTP field; or when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field.
第二十七方面,本申请还提供了一种同步方法,该方法包括:In a twenty-seventh aspect, the present application further provides a synchronization method, which includes:
首先,接入设备从第一设备接收第一报文后,向第二设备发送第一报文;然后,接入设备从第二设备接收第四报文,第四报文中携带第二时间戳信息和第三时间戳信息;第二时间戳信息为第二设备接收到第一报文后,向第四设备发送第一报文时移动网络中的时刻;第四报文是第二设备从第四设备接收到第五报文后,基于第五报文向接入设备发送的;第三时间戳信息为第二设备接收到第五报文时移动网络中的时刻;之后,接入设备向第一设备发送第二报文,第二报文中携带第二时间戳信息和第三时间戳信息;最后,接入设备从第一设备接收第六时间戳信息,并向第二设备发送第六时间戳信息;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, after the access device receives the first message from the first device, it sends the first message to the second device; then, the access device receives the fourth message from the second device, and the fourth message carries the second time The timestamp information and the third time stamp information; the second time stamp information is the time in the mobile network when the first device sends the first message to the fourth device after receiving the first message; the fourth message is the second device After receiving the fifth message from the fourth device, it is sent to the access device based on the fifth message; the third time stamp information is the time in the mobile network when the second device receives the fifth message; after that, access The device sends a second message to the first device, and the second message carries the second time stamp information and the third time stamp information. Finally, the access device receives the sixth time stamp information from the first device, and sends the sixth time stamp information to the second device. Send sixth timestamp information; where the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备向第一设备发送第二报文,可以为:接入设备当检测到第四报文包括的第二协议字段中携带第二时间戳信息和第三时间戳信息时,将第二时间戳信息和第三时间戳信息封装到第四报文包括的第一协议字段中,生成第二报文,并向第一设备发送第二报文。这样接入设备可以将第二时间戳信息和第三时间戳信息传输至第二设备。In a possible design, the access device sends the second message to the first device, which may be: when the access device detects that the second protocol field included in the fourth message carries the second time stamp information and the third time When stamping the information, the second time stamp information and the third time stamp information are encapsulated into a first protocol field included in the fourth message, a second message is generated, and a second message is sent to the first device. In this way, the access device can transmit the second time stamp information and the third time stamp information to the second device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第一协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework. The first protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第二协议字段为SDAP字段或 PDCP字段,第一协议字段为GTP字段;或者,当第一设备为终端设备时,第二协议字段为GTP字段,第一协议字段为SDAP字段或PDCP字段。In a possible design, when the first device is a user plane network element, the second protocol field is an SDAP field or a PDCP field, and the first protocol field is a GTP field; or, when the first device is a terminal device, the second The protocol field is a GTP field, and the first protocol field is an SDAP field or a PDCP field.
第二十八方面,本申请还提供了一种同步方法,该方法包括:In a twenty-eighth aspect, the present application further provides a synchronization method, which includes:
首先,第二设备从接入设备接收第一报文后,向第四设备发送第一报文,并确定第二时间戳信息,第二时间戳信息为第二设备发送第一报文时移动网络中的时刻;然后,第二设备从第四设备接收第五报文,并确定第三时间戳信息,第三时间戳信息为第二设备接收到第五报文时移动网络中的时刻;之后,第二设备向接入设备发送第四报文,第四报文中携带第二时间戳信息和第三时间戳信息;最后,第二设备从接入设备接收第六时间戳信息,并向第四设备发送第六时间戳信息,以使第四设备基于第六时间戳信息进行时间同步。First, after the second device receives the first message from the access device, it sends the first message to the fourth device, and determines the second time stamp information. The second time stamp information moves when the second device sends the first message. The time in the network; then, the second device receives the fifth message from the fourth device and determines the third time stamp information, the third time stamp information is the time in the mobile network when the second device receives the fifth message; After that, the second device sends a fourth message to the access device, and the fourth message carries the second time stamp information and the third time stamp information; finally, the second device receives the sixth time stamp information from the access device, and Send sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
在一个可能的设计中,第四报文中携带第二时间戳信息和第三时间戳信息,可以为:第二设备将第二时间戳信息和第三时间戳信息携带在第四报文包括的第二协议字段中。这样第二设备可以将第二时间戳信息和第三时间戳信息传输至接入设备。In a possible design, the fourth message carries the second time stamp information and the third time stamp information, which may be: the second device carrying the second time stamp information and the third time stamp information in the fourth message includes In the second agreement field. In this way, the second device can transmit the second time stamp information and the third time stamp information to the access device.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第二设备为终端设备时,第二协议字段为SDAP字段或PDCP字段;或者,当第二设备为用户面网元时,第二协议字段为GTP字段。In a possible design, when the second device is a terminal device, the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
第二十九方面,本申请还提供了一种同步方法,该方法包括:In a twenty-ninth aspect, the present application further provides a synchronization method, which includes:
首先,第一设备从第三设备接收第一报文,并确定第一时间戳信息,第一时间戳信息为第一设备接收到第一报文时移动网络中的时刻;然后,第一设备基于第一报文向接入设备发送第二报文,第二报文中携带第一时间戳信息;之后,第一设备从接入设备接收第三报文后,向第三设备发送第三报文,并确定第二时间戳信息,第二时间戳信息为第一设备发送第三报文时移动网络中的时刻;最后,第一设备从第三设备接收第四报文,第四报文中携带第三时间戳信息,第三时间戳信息为第三设备接收到第一设备发送的第三报文时以太网络中的时刻;第一设备将第二时间戳信息和第三时间戳信息发送给接入设备;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, the first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is a time in the mobile network when the first device receives the first message; then, the first device A second message is sent to the access device based on the first message, and the second message carries the first timestamp information; after that, the first device sends a third message to the third device after receiving the third message from the access device Message, and determine the second time stamp information, the second time stamp information is the time in the mobile network when the first device sends the third message; finally, the first device receives the fourth message from the third device, the fourth message The text carries third time stamp information, and the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; the first device combines the second time stamp information and the third time stamp The information is sent to the access device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By using the above method, the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第二报文中携带第一时间戳信息,可以为:第一设备将第一时间戳信息携带在第二报文包括的第一协议字段中。这样第一设备可以成功将第一时间戳信息传输至接入设备。In a possible design, the second message carries the first timestamp information, which may be: the first device carries the first timestamp information in a first protocol field included in the second message. In this way, the first device can successfully transmit the first time stamp information to the access device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元时,第一协议字段为GTP字段;或者,当第一设备为终端设备时,第一协议字段为SDAP字段或PDCP字段中。In a possible design, when the first device is a user plane network element, the first protocol field is a GTP field; or when the first device is a terminal device, the first protocol field is an SDAP field or a PDCP field.
第三十方面,本申请还提供了一种同步方法,该方法包括:In a thirtieth aspect, the present application further provides a synchronization method, which includes:
首先,接入设备从第一设备接收第二报文,第二报文中携带第一时间戳信息,第二报文是第一设备从第三设备接收到第一报文后向接入设备发送的,第一时间戳信息为第一设备接收到第一报文时移动网络中的时刻;然后,接入设备基于第二报文向第二设备发送第 五报文,第五报文中携带第一时间戳信息;之后,接入设备从第二设备接收第三报文后,向第一设备发送第三报文;最后,接入设备从第一设备接收第二时间戳信息和第三时间戳信息,并向第二设备发送第二时间戳信息和第三时间戳信息,第二时间戳信息为第一设备接收到第三报文后向第三设备发送第三报文时移动网络中的时刻;第三时间戳信息为第三设备接收到第一设备发送的第三报文时以太网络中的时刻;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, the access device receives a second message from the first device, the second message carries the first time stamp information, and the second message is the first device sends the first message to the access device after receiving the first message from the third device The first time stamp information sent is the time in the mobile network when the first device receives the first message; then, the access device sends a fifth message to the second device based on the second message. Carry the first time stamp information; after that, the access device sends the third message to the first device after receiving the third message from the second device; finally, the access device receives the second time stamp information and the first time information from the first device Three timestamp information, and sends a second timestamp information and a third timestamp information to the second device, the second timestamp information is when the first device receives the third message and moves to the third device when sending the third message The time in the network; the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; wherein the first device is a user plane network element and the second device is a terminal device, Or, the first device is a terminal device And the second device is a user plane network element.
通过上述方法,接入设备为第一设备和第二设备传输进行时钟同步所需的时间戳信息,以使完成时钟同步。By the above method, the access device transmits the time stamp information required for clock synchronization for the first device and the second device, so that the clock synchronization is completed.
在一个可能的设计中,接入设备基于第二报文向第二设备发送第五报文,具体可以为:接入设备当检测到第二报文包括的第一协议字段中包括第一时间戳信息时,接入设备将第一时间戳信息封装到第二报文包括的第二协议字段中,生成第五报文,并向第二设备发送第五报文。这样接入设备可以成功将第一时间戳信息传输至第二设备。In a possible design, the access device sends a fifth message to the second device based on the second message, which may specifically be: when the access device detects that the first protocol field included in the second message includes the first time When stamping the information, the access device encapsulates the first time stamp information into a second protocol field included in the second message, generates a fifth message, and sends the fifth message to the second device. In this way, the access device can successfully transmit the first time stamp information to the second device.
在一个可能的设计中,第一协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。第二协议字段也可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如NEW字段)。In a possible design, the first protocol field may be an existing protocol field, or may be a newly added protocol field (for example, a NEW field) in an existing protocol stack framework. The second protocol field may also be an existing protocol field, or may be a protocol field (for example, a NEW field) newly added in the existing protocol stack framework.
在一个可能的设计中,当第一设备为用户面网元,第二设备为终端设备时,第一协议字段为GTP字段,第二协议字段为SDAP字段或PDCP字段;或者,当第一设备为终端设备,第二设备为用户面网元时,第一协议字段为SDAP字段或PDCP字段,第二协议字段为GTP字段。In a possible design, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a GTP field, and the second protocol field is an SDAP field or a PDCP field; or, when the first device is a When the second device is a user plane network element, the first protocol field is an SDAP field or a PDCP field, and the second protocol field is a GTP field.
第三十一方面,本申请还提供了一种同步方法,该方法包括:In a thirty-first aspect, the present application further provides a synchronization method, which includes:
首先,第二设备从接入设备接收第五报文,第五报文中携带第一时间戳信息;第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;第二设备向第四设备发送第六报文,并确定第四时间戳信息,第四时间戳信息为第二设备发送第六报文时移动网络中的时刻;然后,第二设备从第四设备接收第三报文,确定第五时间戳信息,并向接入设备发送第三报文;第五时间戳信息为第二设备接收到第三报文时移动网络中的时刻;之后,第二设备从接入设备接收第二时间戳信息和第三时间戳信息;第二时间戳信息为接入设备接收到第三报文并向第一设备发送第三报文后,第一设备向第三设备发送第三报文时移动网络中的时刻;第三时间戳信息为第三设备接收到第一设备发送的第三报文时以太网络中的时刻;最后,第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息,并第六时间戳信息发送给第四设备,以使第四设备基于第六时间戳信息进行时间同步;其中,第一设备为用户面网元且第二设备为终端设备,或者,第一设备为终端设备且第二设备为用户面网元。First, the second device receives a fifth message from the access device, and the fifth message carries the first time stamp information; the first time stamp information is in the mobile network when the first device receives the first message from the third device. The second device sends a sixth message to the fourth device and determines the fourth time stamp information, the fourth time stamp information is the time in the mobile network when the second device sends the sixth message; then, the second device Receiving the third message from the fourth device, determining the fifth time stamp information, and sending the third message to the access device; the fifth time stamp information is the time in the mobile network when the second device receives the third message; After that, the second device receives the second time stamp information and the third time stamp information from the access device; the second time stamp information is that after the access device receives the third message and sends the third message to the first device, The time in the mobile network when a device sends a third message to a third device; the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; finally, the second device According to the first timestamp letter , The second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information determine the sixth timestamp information, and send the sixth timestamp information to the fourth device, so that the fourth device is based on the first Six timestamp information is time synchronized; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
通过上述方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By using the above method, the influence of transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
在一个可能的设计中,第二设备根据第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息,具体可以为:第二设备根据第一时间戳信息、第二时间戳信息、第四时间戳信息和第五时间戳信息确定第一设备与第二设备之间的往返传输时延差值;第二设备计算第三时间戳信息对应的时刻与往返传输时延差值的和,得到第六时间戳信息。In a possible design, the second device determines the sixth timestamp information according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information, which may specifically be The second device determines a round-trip transmission delay difference between the first device and the second device according to the first time stamp information, the second time stamp information, the fourth time stamp information, and the fifth time stamp information; the second device calculates Sum of the time corresponding to the third timestamp information and the round-trip transmission delay difference value to obtain sixth timestamp information.
通过上述方法,第二设备可以准确确定第六时间戳信息,以使第四设备根据第六时间 戳信息和以太网络中收发报文的时间来计算第三设备和第四设备之间的时间偏差,进而进行时间同步。Through the above method, the second device can accurately determine the sixth time stamp information, so that the fourth device can calculate the time deviation between the third device and the fourth device according to the sixth time stamp information and the time of sending and receiving packets in the Ethernet network. , And then time synchronization.
在一个可能的设计中,第二设备从接入设备接收第五报文之后,提取第五报文包括的第二协议字段中携带的第一时间戳信息。这样,第二设备后续可以通过第一时间戳信息确定第六时间戳信息。In a possible design, after the second device receives the fifth message from the access device, it extracts the first time stamp information carried in the second protocol field included in the fifth message. In this way, the second device may subsequently determine the sixth time stamp information by using the first time stamp information.
在一个可能的设计中,第二协议字段可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的协议字段(例如,NEW字段)。In a possible design, the second protocol field may be an existing protocol field or a protocol field (for example, a NEW field) newly added in an existing protocol stack framework.
在一个可能的设计中,当第二设备为终端设备时,第二协议字段为SDAP字段或PDCP字段;或者,当第二设备为用户面网元时,第二协议字段为GTP字段。In a possible design, when the second device is a terminal device, the second protocol field is an SDAP field or a PDCP field; or when the second device is a user plane network element, the second protocol field is a GTP field.
第三十二方面,本申请还提供了一种第一设备,该第一设备具有实现上述第二十方面、第二十三方面、第二十六方面或第二十九方面方法实例中第一设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。According to a thirty-second aspect, the present application further provides a first device having the first method in an example of a method for implementing the twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect. The function of a device. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第一设备的结构中包括发送单元、处理单元和接收单元,这些单元可以执行上述第二十方面、第二十三方面、第二十六方面或第二十九方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the first device includes a sending unit, a processing unit, and a receiving unit, and these units may perform the foregoing twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect For the corresponding functions in the method example, see the detailed description in the method example for details.
在一个可能的设计中,第一设备的结构中包括收发器、处理器和存储器,收发器用于收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持第一设备执行上述第二十方面、第二十三方面、第二十六方面或第二十九方面方法中相应的功能。存储器与处理器耦合,其保存第一设备必要的程序指令和数据。In a possible design, the structure of the first device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the first device. Corresponding functions in the above-mentioned methods of the twentieth aspect, the twenty-third aspect, the twenty-sixth aspect, or the twenty-ninth aspect. The memory is coupled to the processor and stores program instructions and data necessary for the first device.
第三十三方面,本申请还提供了一种接入设备,该接入设备具有实现上述第二十一方面、第二十四方面、第二十七方面或第三十方面方法实例中接入设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。According to a thirty-third aspect, the present application further provides an access device having the access method in the method instance for implementing the foregoing twenty-first aspect, twenty-fourth aspect, twenty-seventh aspect, or thirtieth aspect. Into the capabilities of the device. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,接入设备的结构中包括发送单元和接收单元,这些单元可以执行上述第二十一方面、第二十四方面、第二十七方面或第三十方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the access device includes a sending unit and a receiving unit, and these units can execute the method examples in the twenty-first aspect, the twenty-fourth aspect, the twenty-seventh aspect, or the thirtieth aspect described above. For the corresponding functions, see the detailed descriptions in the method examples for details.
在一个可能的设计中,接入设备的结构中包括收发器、处理器和存储器,收发器用于收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持接入设备执行上述第二十一方面、第二十四方面、第二十七方面或第三十方面方法中相应的功能。存储器与处理器耦合,其保存接入设备必要的程序指令和数据。In a possible design, the structure of the access device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the access device. Corresponding functions in the above-mentioned methods of the twenty-first aspect, the twenty-fourth aspect, the twenty-seventh aspect, or the thirtieth aspect. The memory is coupled to the processor and stores program instructions and data necessary for accessing the device.
第三十四方面,本申请还提供了一种第二设备,该第二设备具有实现上述第二十二方面、第二十五方面、第二十八方面或三十一方面方法实例中第二设备的功能。功能可以通过硬件实现,也可以通过硬件执行相应的软件实现。硬件或软件包括一个或多个与上述功能相对应的模块。According to a thirty-fourth aspect, the present application further provides a second device having the first method of implementing the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect of the method example. Function of the second device. The functions can be realized by hardware, and the corresponding software can also be implemented by hardware. The hardware or software includes one or more modules corresponding to the above functions.
在一个可能的设计中,第二设备的结构中包括接收单元、处理单元和发送单元,这些单元可以执行上述第二十二方面、第二十五方面、第二十八方面或三十一方面方法示例中的相应功能,具体参见方法示例中的详细描述,此处不做赘述。In a possible design, the structure of the second device includes a receiving unit, a processing unit, and a sending unit, and these units may implement the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect. For the corresponding functions in the method example, see the detailed description in the method example for details.
在一个可能的设计中,第二设备的结构中包括收发器、处理器和存储器,收发器用于 收发数据,以及与通信系统中的其他设备进行通信交互,处理器被配置为支持第二设备执行上述第二十二方面、第二十五方面、第二十八方面或三十一方面方法中相应的功能。存储器与处理器耦合,其保存第二设备必要的程序指令和数据。In a possible design, the structure of the second device includes a transceiver, a processor, and a memory. The transceiver is used to send and receive data and communicate with other devices in the communication system. The processor is configured to support the execution of the second device. Corresponding functions in the above-mentioned methods of the twenty-second aspect, the twenty-fifth aspect, the twenty-eighth aspect, or the thirty-first aspect. The memory is coupled to the processor and stores program instructions and data necessary for the second device.
第三十五方面,本申请还提供了一种计算机存储介质,计算机存储介质中存储有计算机可执行指令,计算机可执行指令在被计算机调用时用于使计算机执行上述第二十方面至第三十一方面中任一种方法。According to a thirty-fifth aspect, the present application also provides a computer storage medium. The computer storage medium stores computer-executable instructions. When the computer-executable instructions are called by a computer, the computer executes the foregoing twentieth aspect to the third aspect. Any one of the eleven aspects.
第三十六方面,本申请还提供了一种包含指令的计算机程序产品,当其在计算机上运行时,使得计算机执行上述第二十方面至第三十一方面中任一种方法。In a thirty-sixth aspect, the present application also provides a computer program product containing instructions that, when run on a computer, causes the computer to execute any one of the methods in the twentieth to thirty-first aspects.
第三十七方面,本申请还提供了一种芯片,芯片与存储器相连,用于读取并执行存储器中存储的程序指令,以实现上述第二十方面至第三十一方面中任一种方法。In a thirty-seventh aspect, the present application also provides a chip, which is connected to the memory and is used to read and execute program instructions stored in the memory to implement any one of the foregoing twentieth to thirty-first aspects. method.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1为本申请提供的一种通信系统的架构图;FIG. 1 is an architecture diagram of a communication system provided by the present application;
图2为本申请提供的一种通信系统的工作示意图;FIG. 2 is a working schematic diagram of a communication system provided by the present application;
图3为本申请提供的一种同步方法的流程图;3 is a flowchart of a synchronization method provided by the present application;
图4为本申请提供的一种进行同步的过程中报文的收发示意图;4 is a schematic diagram of sending and receiving messages in a synchronization process provided by the present application;
图5为一种协议栈框架的示意图;5 is a schematic diagram of a protocol stack framework;
图6为本申请提供的另一种协议栈框架的示意图;6 is a schematic diagram of another protocol stack framework provided by the present application;
图7为本申请提供的另一种同步方法的流程图;7 is a flowchart of another synchronization method provided by the present application;
图8为本申请提供的另一种同步方法的流程图;8 is a flowchart of another synchronization method provided by the present application;
图9为本申请提供的另一种进行同步的过程中报文的收发示意图;FIG. 9 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application; FIG.
图10为本申请提供的另一种同步方法的流程图;FIG. 10 is a flowchart of another synchronization method provided by the present application; FIG.
图11为本申请提供的一种第一设备的结构示意图;11 is a schematic structural diagram of a first device provided by this application;
图12为本申请提供的一种接入设备的结构示意图;FIG. 12 is a schematic structural diagram of an access device provided by this application;
图13为本申请提供的一种第二设备的结构示意图;13 is a schematic structural diagram of a second device provided by the present application;
图14为本申请提供的另一种第一设备的结构示意图;14 is a schematic structural diagram of another first device provided by the present application;
图15为本申请提供的另一种第一设备的结构示意图;15 is a schematic structural diagram of another first device provided by the present application;
图16为本申请提供的另一种第二设备的结构示意图;16 is a schematic structural diagram of another second device provided by the present application;
图17为本申请提供的另一种第一设备的结构示意图;17 is a schematic structural diagram of another first device provided by the present application;
图18为本申请提供的一种第一设备的结构图;18 is a structural diagram of a first device provided by the present application;
图19为本申请提供的一种接入设备的结构图;19 is a structural diagram of an access device provided by the present application;
图20为本申请提供的一种第二设备的结构图;20 is a structural diagram of a second device provided by the present application;
图21为本申请提供的另一种同步方法的流程图;21 is a flowchart of another synchronization method provided by the present application;
图22为本申请提供的另一种进行同步的过程中报文的收发示意图;FIG. 22 is a schematic diagram of sending and receiving messages in another synchronization process provided by this application; FIG.
图23为本申请提供的另一种通信系统的工作示意图;FIG. 23 is a working schematic diagram of another communication system provided by the present application; FIG.
图24为本申请提供的另一种同步方法的流程图;24 is a flowchart of another synchronization method provided by the present application;
图25为本申请提供的另一种进行同步的过程中报文的收发示意图;FIG. 25 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application; FIG.
图26为本申请提供的另一种同步方法的流程图;FIG. 26 is a flowchart of another synchronization method provided by the present application; FIG.
图27为本申请提供的另一种进行同步的过程中报文的收发示意图;FIG. 27 is a schematic diagram of sending and receiving messages during another synchronization process provided by this application; FIG.
图28为本申请提供的另一种同步方法的流程图;FIG. 28 is a flowchart of another synchronization method provided by the present application; FIG.
图29为本申请提供的另一种进行同步的过程中报文的收发示意图。FIG. 29 is a schematic diagram of sending and receiving messages during another synchronization process provided in this application.
具体实施方式detailed description
下面将结合附图对本申请作进一步地详细描述。The present application will be further described in detail below with reference to the accompanying drawings.
本申请实施例提供一种同步方法及装置,用以实现在移动网络与以太网络(例如,TSN)对接场景中,满足工业工厂的时间精度需求。其中,本申请所述方法和装置基于同一发明构思,由于方法及装置解决问题的原理相似,因此装置与方法的实施可以相互参见,重复之处不再赘述。Embodiments of the present application provide a synchronization method and device, which are used to implement a docking scenario between a mobile network and an Ethernet network (for example, TSN) to meet the time accuracy requirements of an industrial plant. The methods and devices described in this application are based on the same inventive concept. Since the principles of the methods and devices for solving problems are similar, the implementation of the devices and methods can be referred to each other, and duplicated details will not be repeated.
以下,对本申请中的部分用语进行解释说明,以便于本领域技术人员理解。In the following, some terms in this application are explained so as to facilitate understanding by those skilled in the art.
1)、终端设备,又称之为用户设备(user equipment,UE)、移动台(mobile station,MS)、移动终端(mobile terminal,MT)等,是一种向用户提供语音和/或数据连通性的设备。例如,在工业工厂场景中,所述终端设备可以是传感器、伺服电机、移动机器人等等。1) Terminal equipment, also known as user equipment (UE), mobile station (MS), mobile terminal (MT), etc., is a way to provide voice and / or data connectivity to users Sexual equipment. For example, in an industrial factory scenario, the terminal device may be a sensor, a servo motor, a mobile robot, or the like.
2)、用户面网元,可用于转发终端设备的用户面数据。主要功能是数据包路由和转发、移动性锚点。此外,用户面网元还可以作为上行分类器来支持路由业务流到数据网络、或作为分支点来支持多归属分组数据单元(Packet Data Unit,PDU)会话等。例如,所述用户面网元可以是用户面功能(user plane function,UPF)网元。2) The user plane network element can be used to forward user plane data of the terminal device. The main functions are packet routing and forwarding, and mobility anchors. In addition, the user plane network element can also be used as an uplink classifier to support routing service flows to the data network, or as a branch point to support multi-homed packet data unit (PDU) sessions. For example, the user plane network element may be a user plane function (UPF) network element.
3)、第一设备和第二设备,分别为主时钟节点和需要进行时钟同步的节点,在通信过程中,所述第二设备的时钟均需要同步到所述第一设备的时钟。其中,在以太网络中所述第一设备和所述第二设备为相邻的设备;在移动网络中所述第一设备和所述第二设备之间还有至少一跳其他设备,例如接入设备等。例如,所述第一设备为用户面网元且第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。3) The first device and the second device are a master clock node and a node requiring clock synchronization, respectively. During the communication process, the clock of the second device needs to be synchronized to the clock of the first device. Wherein, the first device and the second device are adjacent devices in an Ethernet network; there is at least one hop of other devices between the first device and the second device in a mobile network, for example, connecting Into the device, etc. For example, the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
4)、接入设备,向终端设备提供无线接入服务。所述接入网设备为无线接入网中的节点,又可以称为基站,还可以称为无线接入网(radio access network,RAN)节点(或设备)。目前,一些接入网设备的举例为:gNB、传输接收点(transmission reception point,TRP)、演进型节点B(evolved Node B,eNB)、无线网络控制器(radio network controller,RNC)、节点B(Node B,NB)、基站控制器(base station controller,BSC)、基站收发台(base transceiver station,BTS)、家庭基站(例如,home evolved NodeB,或home Node B,HNB)、基带单元(base band unit,BBU),或无线保真(wireless fidelity,Wifi)接入点(access point,AP)等。4) Access equipment, providing wireless access services to terminal equipment. The access network device is a node in a wireless access network, and may also be called a base station, and may also be called a radio access network (RAN) node (or device). At present, some examples of access network equipment are: gNB, transmission receiving point (TRP), evolved Node B (eNB), radio network controller (RNC), node B (Node B, NB), base station controller (BSC), base transceiver station (BTS), home base station (e.g., home NodeB, or home NodeB, HNB), baseband unit (base band unit (BBU), or wireless fidelity (Wifi) access point (AP).
5)、在本申请的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。5) In the description of this application, words such as "first" and "second" are used only for the purpose of distinguishing descriptions, and cannot be understood as indicating or implying relative importance, nor as indicating or implying order.
为了更加清晰地描述本申请实施例的技术方案,下面结合附图,对本申请实施例提供的同步方法及装置进行详细说明。In order to describe the technical solution of the embodiment of the present application more clearly, the synchronization method and device provided in the embodiment of the present application are described in detail below with reference to the accompanying drawings.
图1示出了本申请实施例提供的同步方法适用的一种可能的通信系统的架构。所述通信系统中分为以太网络和移动网络两部分,在所述通信系统中,所述以太网络为工业网络中的以太网络,所述移动网络应用于工业网络,与所述以太网络对接。其中,图1中以太网络以TSN网络示出,移动网络以第五代移动通信技术(5G)网络示出。FIG. 1 illustrates an architecture of a possible communication system to which the synchronization method provided in the embodiment of the present application is applicable. The communication system is divided into an Ethernet network and a mobile network. In the communication system, the Ethernet network is an Ethernet network in an industrial network, and the mobile network is applied to an industrial network and interfaces with the Ethernet network. Among them, the Ethernet network in FIG. 1 is shown by a TSN network, and the mobile network is shown by a fifth generation mobile communication technology (5G) network.
所述TSN网络中包括可编程逻辑控制器(programmable logic controller,PLC)、其他控制设备、终端设备。用户面网元等。其中,所述PLC可以为所述TSN网络中的主时钟设备。例如,图1所示的伺服电机1为所述其他控制设备,传感器1为TSN网络中的终端 设备。The TSN network includes a programmable logic controller (PLC), other control equipment, and terminal equipment. User plane network elements, etc. The PLC may be a master clock device in the TSN network. For example, the servo motor 1 shown in FIG. 1 is the other control device, and the sensor 1 is a terminal device in the TSN network.
所述5G网络中可以包括用户面网元、接入设备、终端设备等。其中所述用户面网元在图1中以UPF示出;所述接入设备以无线接入网(radio access network,RAN)节点(或设备)示出;传感器2、伺服电机2、移动机器人均为终端设备的示例。The 5G network may include a user plane network element, an access device, a terminal device, and the like. The user plane network element is shown as UPF in FIG. 1; the access device is shown as a radio access network (RAN) node (or device); the sensor 2, the servo motor 2, and the mobile robot Both are examples of terminal devices.
需要说明的是,图1所示的TSN网络仅作为以太网络的示例,以及5G网络仅作为移动网络的示例,并不能作为本申请通信系统的限定,所述以太网络还可以有其它多种举例,以及所述移动网络还可以有其它多种举例,此处不再一一列举。It should be noted that the TSN network shown in FIG. 1 is only an example of an Ethernet network, and the 5G network is only an example of a mobile network, and cannot be used as a limitation of the communication system of this application. The Ethernet network may also have various other examples. , And the mobile network may also have various other examples, which are not listed here one by one.
图2示出了本申请实施例提供的同步方法适用的一种通信系统的工作示意图。FIG. 2 shows a working schematic diagram of a communication system to which a synchronization method provided in an embodiment of the present application is applicable.
图2中的报文可以是以太报文、以太数据包等,可以将所述报文可以作为移动网络中PDU会话过程中的数据包进行传输。The message in FIG. 2 may be an Ethernet message, an Ethernet data packet, or the like, and the message may be transmitted as a data packet during a PDU session in a mobile network.
其中,以太网络中的主时钟设备为PLC,由PLC确定以太网络中的主时钟,图2中示出了以太网络同步域的主时钟为T1。在以太网络同步域中,UE和UPF被看作是相邻的两个节点。进行时钟同步时,当所述UPF作为主时钟节点时,所述UE则需要根据所述UPF的主时钟信息进行时钟同步。The master clock device in the Ethernet network is a PLC, and the PLC determines the master clock in the Ethernet network. FIG. 2 shows that the master clock in the Ethernet synchronization domain is T1. In the Ethernet synchronization domain, UE and UPF are considered as two adjacent nodes. When performing clock synchronization, when the UPF is used as a master clock node, the UE needs to perform clock synchronization according to the master clock information of the UPF.
在移动网络同步域中,主时钟设备可以为通信楼综合定时供给系统(building integrated timing supply,BITS)或者时间服务器、全球定位系统(global positioning system,GPS)、北斗等,由主时钟设备确定所述移动网络中的主时钟,图2中示出了移动网络同步域的主时钟为T2。相应的,在以太网络中为相邻节点的UE和UPF之间还存在多跳其他设备,例如RAN等。但是目前移动网络内部的时钟同步已经实现,所以可以根据移动网络内部的时钟同步,来进行以太网络的时钟同步。In the mobile network synchronization domain, the main clock device can be a building integrated timing supply system (building integrated timing supply, BITS) or time server, global positioning system (GPS), Beidou, etc., which is determined by the main clock device. The master clock in the mobile network is described. FIG. 2 shows that the master clock in the synchronization domain of the mobile network is T2. Correspondingly, there are other multi-hop devices between the UE and the UPF that are adjacent nodes in the Ethernet network, such as RAN. However, the current clock synchronization in the mobile network has been implemented, so the clock synchronization in the Ethernet network can be performed according to the clock synchronization in the mobile network.
需要说明的是,图2中仅示出了UPF作为主时钟节点,UE需要进行时钟同步的情况。可选的,在图2中所述UE和所述UPF的位置可以互换,也即所述UE可以作为所述主时钟节点,所述UPF需要进行时钟同步。It should be noted that FIG. 2 only shows the case where the UPF is used as the master clock node and the UE needs to perform clock synchronization. Optionally, in FIG. 2, the positions of the UE and the UPF may be interchanged, that is, the UE may serve as the master clock node, and the UPF needs to perform clock synchronization.
需要说明的是,图2中UE仅作为终端设备的一示例,UE还可以用其他终端设备替代(例如,图1中的移动机器人、传感器2等);UPF仅作为用户面网元的一种示例,UPF还可以用其他用户面网元替代,本申请对此不作限定。It should be noted that the UE in FIG. 2 is only an example of a terminal device, and the UE may also be replaced with another terminal device (for example, the mobile robot and the sensor 2 in FIG. 1); the UPF is only used as a type of user plane network element. For example, the UPF may also be replaced by other user plane network elements, which is not limited in this application.
本申请实施例提供的一种同步方法,适用于如图1和图2所示的通信系统。例如,图3中的第一设备为上述UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF。参阅图3所示,该方法的具体流程包括:A synchronization method provided in the embodiment of the present application is applicable to the communication system shown in FIG. 1 and FIG. 2. For example, the first device in FIG. 3 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF. Referring to FIG. 3, the specific process of the method includes:
步骤301、第一设备向接入设备发送第一报文,所述第一报文中携带第一时间戳信息,并确定第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻。Step 301: The first device sends a first message to the access device. The first message carries first time stamp information, and determines second time stamp information. The first time stamp information is the first time stamp information. The time in the Ethernet network when the device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message.
在一种可选的实施方式中,所述第一设备在向接入设备发送所述第一报文之前,所述第一设备会接收到来自以太网络中(例如TSN)的数据包,所述第一设备识别到所述数据包的格式(type)信息为0x88f7,则确定所述数据包为802.1AS同步数据包。然后,所述第一设备向所述接入设备发送所述第一报文,此时就发起了时钟同步流程。In an optional implementation manner, before the first device sends the first packet to an access device, the first device receives a data packet from an Ethernet network (for example, TSN), so When the first device recognizes that the format information of the data packet is 0x88f7, it determines that the data packet is an 802.1AS synchronization data packet. Then, the first device sends the first message to the access device, and a clock synchronization process is initiated at this time.
例如,图4示出了第一设备和第二设备之间进行同步的过程中报文的收发示意图。其中,图4中实线指示报文在以太网络中的传输情况,虚线指示报文在移动网络中的传输情况;应理解,图4中同向平行的实线和虚线指示是同一个报文的传输。For example, FIG. 4 shows a schematic diagram of message transmission and reception during synchronization between the first device and the second device. Among them, the solid line in FIG. 4 indicates the transmission of the message in the Ethernet network, and the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dotted line in FIG. 4 indicate the same message Transmission.
例如,步骤301中的所述第一时间戳信息对应的时刻在图4中记为t1,所述第二时间戳信息在图4中记为t1’。For example, the time corresponding to the first time stamp information in step 301 is recorded as t1 in FIG. 4, and the second time stamp information is recorded as t1 ′ in FIG. 4.
可选的,所述第一设备确定所述第二时间戳信息之后将所述第二时间戳信息记录在本地,以使所述第一设备后续计算第一设备和第二设备之间的往返传输时延差值。Optionally, after the first device determines the second time stamp information, the second time stamp information is recorded locally, so that the first device subsequently calculates a round-trip between the first device and the second device. Transmission delay difference.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。也就是说,所述用户面网元和所述终端设备中任一个都可以是主时钟节点,而另一个需要进行时钟同步。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
步骤302、所述接入设备基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息。Step 302: The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information.
其中,所述接入设备在执行步骤302时,具体可以为:所述接入设备将所述第一报文转发给所述第二设备,此时所述第三报文即为所述第一报文。When the access device performs step 302, the access device may specifically forward the first packet to the second device, and the third packet is the first packet. A message.
步骤303、所述第二设备确定第三时间戳信息和第八时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻,所述第八时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻。Step 303: The second device determines third time stamp information and eighth time stamp information. The third time stamp information is a time in the mobile network when the second device receives the third message. The eighth time stamp information is a time in the Ethernet network when the second device receives the third message.
例如,在图4中,所述第三时间戳信息对应的时刻记为t2’,所述第八时间戳信息记为t2。For example, in FIG. 4, the time corresponding to the third time stamp information is recorded as t2 ', and the eighth time stamp information is recorded as t2.
步骤304、所述第二设备向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息和第四时间戳信息,所述第四时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻。Step 304: The second device sends a fourth message to the access device. The fourth message carries the third time stamp information and the fourth time stamp information. The fourth time stamp information is The time in the mobile network when the second device sends the fourth message to the access device.
例如,在图4中,所述第四时间戳信息对应的时刻记为t3’。For example, in FIG. 4, the time corresponding to the fourth time stamp information is denoted as t3 '.
可选的,所述第四报文中还可以携带标示(flag),所述flag用于指示所述第四报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the fourth message, and the flag is used to indicate that the fourth message carries time stamp information indicating a time in the mobile network.
在一种可选的实施方式中,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息,具体实现方法可以是:所述第二设备将所述第三时间戳信息和所述第四时间戳信息携带在所述第四报文包括的第二协议字段中。其中,可选的,所述第二协议字段可以是目前协议栈框架中所述第四报文中现有的协议字段;所述第二协议字段中还可以是在目前协议栈框架中所述第四报文中新增加的协议字段。可选的,当所述第四报文中还携带flag时,所述flag也可以携带在所述第二协议字段中。In an optional implementation manner, the fourth packet carries the third timestamp information and the fourth timestamp information, and a specific implementation method may be: the second device sends the third timestamp information The timestamp information and the fourth timestamp information are carried in a second protocol field included in the fourth message. Wherein, optionally, the second protocol field may be an existing protocol field in the fourth message in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework Newly added protocol field in the fourth message. Optionally, when the fourth packet further carries a flag, the flag may also be carried in the second protocol field.
例如,图5示出了现有的协议栈框架的示意图,所述协议栈框架中指示了报文在不同位置(即不同设备)的字段示例(也即报文格式示例)。For example, FIG. 5 shows a schematic diagram of an existing protocol stack framework, which indicates field examples (that is, message format examples) of packets in different positions (that is, different devices) in the protocol stack framework.
基于图5的示例,对第二协议字段进行详细介绍:Based on the example in FIG. 5, the second protocol field is described in detail:
在一种示例性的实施方式中,当所述第二设备为终端设备且所述第一设备为用户面网元时,所述第二协议字段可以有以下两种情况:In an exemplary embodiment, when the second device is a terminal device and the first device is a user plane network element, the second protocol field may have the following two situations:
情况a1:所述第二协议字段可以为服务数据协议(service data protocol,SDAP)字段或数据汇聚协议(packet data convergence protocol,PDCP)字段。此情况中,所述第二设备将所述第三时间戳信息和所述第四时间戳信息封装在如图5所示的所述终端设备对应的报文协议字段SDAP字段或PDCP字段中,然后将封装后得到的第四报文发送给所述接入设备。Case a1: The second protocol field may be a service data protocol (SDAP) field or a data convergence protocol (PDCP) field. In this case, the second device encapsulates the third timestamp information and the fourth timestamp information in a message protocol field SDAP field or a PDCP field corresponding to the terminal device as shown in FIG. 5, Then, the fourth packet obtained after the encapsulation is sent to the access device.
当然,除上述SDAP字段或PDCP字段以外,所述第二协议字段还可以是图5所示的所述终端设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协 议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above SDAP field or PDCP field, the second protocol field may also be any other field in the message protocol field corresponding to the terminal device shown in FIG. When the two protocol fields are other protocol fields, they will not be repeated one by one here.
情况a2:所述第二协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述第二设备在图5所示的所述终端设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述终端设备对应的报文协议字段所示;然后将所述第三时间戳信息和所述第四时间戳信息封装在NEW字段中,将封装后得到的第四报文发送给所述接入设备。Case a2: The second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, the second device adds a new protocol field NEW field to the message protocol field corresponding to the terminal device shown in FIG. 5, for example, as described in the protocol stack architecture shown in FIG. The message protocol field corresponding to the terminal device is shown; then the third timestamp information and the fourth timestamp information are encapsulated in a NEW field, and the encapsulated fourth message is sent to the access device .
需要说明的是,NEW字段仅作为一个示例,例如NEW字段还可以有其它相同功能的任意名称,本申请对比不作限定。It should be noted that the NEW field is only used as an example. For example, the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
在另一种示例性的实施方式中,当所述第二设备为用户面网元且所述第一设备为终端设备时,所述第二协议字段可以有以下两种情况:In another exemplary embodiment, when the second device is a user plane network element and the first device is a terminal device, the second protocol field may have the following two situations:
情况b1:所述第二协议字段为通用分组无线服务隧道协议((general packet radio service,GPRS)tunneling protocol,GTP)字段。此情况中,所述第二设备将所述第三时间戳信息和所述第四时间戳信息封装如图5所示的所述用户面网元对应的报文协议字段GTP字段中,然后将封装后得到的第四报文发送给所述接入设备。Case b1: The second protocol field is a general packet radio service tunneling protocol (General Packet Radio Service, GPRS) tunneling protocol (GTP) field. In this case, the second device encapsulates the third time stamp information and the fourth time stamp information in a message protocol field GTP field corresponding to the user plane network element shown in FIG. 5, and then The fourth packet obtained after the encapsulation is sent to the access device.
当然,除上述GTP字段以外,所述第二协议字段还可以是图5所示的所述用户面网元对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协议字段为其他字段时,此处不再一一赘述。Of course, in addition to the above GTP field, the second protocol field may also be any other field in the message protocol field corresponding to the user plane network element shown in FIG. 5, which is not limited in this application for comparison. When the protocol fields are other fields, they are not repeated here one by one.
情况b2:所述第二协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述第二设备在图5所示的所述用户面网元对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述用户面网元对应的报文协议字段所示;然后将所述第三时间戳信息和所述第四时间戳信息封装在NEW字段中,将封装后得到的第四报文发送给所述接入设备。Case b2: The second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, the second device adds a new protocol field, the NEW field, to the message protocol field corresponding to the user plane network element shown in FIG. 5, for example, in the protocol stack architecture shown in FIG. As shown in the message protocol field corresponding to the user plane network element; then the third timestamp information and the fourth timestamp information are encapsulated in a NEW field, and the encapsulated fourth message is sent to all Mentioned access equipment.
需要说明的是,NEW字段仅作为一个示例,例如NEW字段还可以有其它相同功能的任意名称,本申请对比不作限定。It should be noted that the NEW field is only used as an example. For example, the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
步骤305、所述第二设备确定第九时间戳信息,所述第九时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻。Step 305: The second device determines ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device.
例如,在图4中,所述第九时间戳信息对应的时刻记为t3。For example, in FIG. 4, the time corresponding to the ninth time stamp information is denoted as t3.
步骤306、所述接入设备向所述第一设备发送第二报文,所述第二报文中携带所述第三时间戳信息和所述第四时间戳信息。Step 306: The access device sends a second message to the first device, and the second message carries the third time stamp information and the fourth time stamp information.
可选的,所述接入设备向所述第一设备发送第二报文,具体方法可以为:所述接入设备当检测到所述第四报文包括的第二协议字段中携带第三时间戳信息和第四时间戳信息时,将所述第三时间戳信息和所述第四时间戳信息封装到所述第四报文包括的第一协议字段中,生成所述第二报文,并向所述第一设备发送所述第二报文。Optionally, the access device sends a second message to the first device. The specific method may be: when the access device detects that the second protocol field included in the fourth message carries a third message, When the timestamp information and the fourth timestamp information, the third timestamp information and the fourth timestamp information are encapsulated into a first protocol field included in the fourth message, and the second message is generated And sending the second message to the first device.
例如,所述第二协议字段的具体情况可以参见上述步骤304中对所述第二协议字段的相关描述。同理,所述第一协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。其中,根据所述第一设备和所述第二设备具体的实际情况,以及所述二协议字段的实际情况不同,所述第一协议字段的实际情况可能分为多种。For example, for the specific situation of the second protocol field, refer to the related description of the second protocol field in step 304. Similarly, the first protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. The actual conditions of the first protocol field may be divided into multiple types according to the actual conditions of the first device and the second device, and the actual conditions of the two protocol fields are different.
在一种可能的实施方式中,当所述第二协议字段符合上述步骤304中的情况a1时,所 述第一协议字段可以有以下两种情况:In a possible implementation manner, when the second protocol field conforms to the condition a1 in step 304, the first protocol field may have the following two situations:
情况c1:所述第一协议字段可以是GTP字段。在此情况中,所述接入设备检测到接收到的所述第四报文中的SDAP字段或PDCP字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从SDAP字段或PDCP字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段GTP字段中,生成所述第二报文,此时所述第二报文的GTP字段中包含所述第三时间戳信息和所述第四时间戳信息。Case c1: The first protocol field may be a GTP field. In this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in an SDAP field or a PDCP field in the received fourth message, the access device The access device extracts the third timestamp information and the fourth timestamp information from the SDAP field or the PDCP field, and then encapsulates them in a message protocol field GTP corresponding to the access device as shown in FIG. 5 In the field, the second message is generated. At this time, the GTP field of the second message includes the third time stamp information and the fourth time stamp information.
当然,除上述GTP字段以外,所述第一协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above GTP field, the first protocol field may also be any other field in the packet protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison. The first protocol When the fields are other protocol fields, they are not repeated here one by one.
情况c2:所述第一协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第四报文中的SDAP字段或PDCP字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从SDAP字段或PDCP字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第三时间戳信息和所述第四时间戳信息封装在NEW字段中,得到所述第二报文,此时所述第二报文的NEW字段中包含所述第三时间戳信息和所述第四时间戳信息。Case c2: The first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in an SDAP field or a PDCP field in the received fourth message, The access device extracts the third timestamp information and the fourth timestamp information from an SDAP field or a PDCP field, and then the access device corresponds to the access device shown in FIG. 5 A new protocol field, the NEW field, is added to the message protocol field, for example, shown in the message protocol field corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then the third time stamp information and the The fourth timestamp information is encapsulated in a NEW field to obtain the second message. At this time, the NEW field of the second message includes the third timestamp information and the fourth timestamp information.
在另一种可能的实施方式中,当所述第二协议字段符合上述步骤304中的情况a2时,所述第一协议字段可以有以下两种情况:In another possible implementation manner, when the second protocol field meets the condition a2 in step 304, the first protocol field may have the following two situations:
情况d1:所述第一协议字段可以是GTP字段。在此情况中,所述接入设备检测到接收到的所述第四报文中的NEW字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从NEW字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段GTP字段中,生成所述第二报文,此时所述第二报文的GTP字段中包含所述第三时间戳信息和所述第四时间戳信息。Case d1: The first protocol field may be a GTP field. In this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from the NEW field, and then encapsulating them in a message protocol field GTP field corresponding to the access device as shown in FIG. 5 to generate the In the second message, the GTP field of the second message includes the third time stamp information and the fourth time stamp information.
当然,除上述GTP字段以外,所述第一协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above GTP field, the first protocol field may also be any other field in the packet protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison. The first protocol When the fields are other protocol fields, they are not repeated here one by one.
情况d2:所述第一协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第四报文中的NEW字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从NEW字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第三时间戳信息和所述第四时间戳信息封装在NEW字段中,得到所述第二报文,此时所述第二报文的NEW字段中包含所述第三时间戳信息和所述第四时间戳信息。Case d2: The first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth message, the access device The incoming device extracts the third timestamp information and the fourth timestamp information from the NEW field, and then the access device adds a message protocol field corresponding to the access device shown in FIG. 5 A new protocol field, the NEW field, for example, shown in the protocol field of the message corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then encapsulating the third time stamp information and the fourth time stamp information In the NEW field, the second message is obtained. At this time, the NEW field of the second message includes the third time stamp information and the fourth time stamp information.
在另一种可能的实施方式中,当所述第二协议字段符合上述步骤304中的情况b1时,所述第一协议字段可以有以下两种情况:In another possible implementation manner, when the second protocol field meets the condition b1 in step 304, the first protocol field may have the following two situations:
情况e1:所述第一协议字段可以是SDAP字段或PDCP字段。在此情况中,所述接入设备检测到接收到的所述第四报文中的GTP字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从GTP字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段SDAP字段或PDCP字段中,生成所述第二报文,此时所述第二报文的SDAP字段或PDCP字段中包含所述第三时间戳信息和所述第四时间戳信息。Case e1: The first protocol field may be an SDAP field or a PDCP field. In this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a received GTP field in the fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from a GTP field, and then encapsulating them in a message protocol field SDAP field or a PDCP field corresponding to the access device as shown in FIG. 5, Generate the second message, and at this time, the SDAP field or the PDCP field of the second message includes the third time stamp information and the fourth time stamp information.
当然,除上述SDAP字段或PDCP字段以外,所述第一协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above-mentioned SDAP field or PDCP field, the first protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. When the first protocol field is other protocol fields, details are not repeated here.
情况e2:所述第一协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第四报文中的GTP字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从GTP字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第三时间戳信息和所述第四时间戳信息封装在NEW字段中,得到所述第二报文,此时所述第二报文的NEW字段中包含所述第三时间戳信息和所述第四时间戳信息。Case e2: The first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in the received GTP field in the fourth message, the access device The incoming device extracts the third timestamp information and the fourth timestamp information from the GTP field, and then the access device adds a message protocol field corresponding to the access device shown in FIG. 5 A new protocol field, the NEW field, for example, shown in the protocol field of the message corresponding to the access device in the protocol stack architecture shown in FIG. 6; and then encapsulating the third time stamp information and the fourth time stamp information In the NEW field, the second message is obtained. At this time, the NEW field of the second message includes the third time stamp information and the fourth time stamp information.
在另一种可能的实施方式中,当所述第二协议字段符合上述步骤304中的情况b2时,所述第一协议字段可以有以下两种情况:In another possible implementation manner, when the second protocol field meets the condition b2 in step 304, the first protocol field may have the following two situations:
情况f1:所述第一协议字段可以是SDAP字段或PDCP字段。在此情况中,所述接入设备检测到接收到的所述第四报文中的NEW字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备将所述第三时间戳信息和所述第四时间戳信息从NEW字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段SDAP字段或PDCP字段中,生成所述第二报文,此时所述第二报文的SDAP字段或PDCP字段中包含所述第三时间戳信息和所述第四时间戳信息。Case f1: The first protocol field may be an SDAP field or a PDCP field. In this case, when the access device detects that the third time stamp information and the fourth time stamp information are encapsulated in a NEW field in the received fourth packet, the access device Extracting the third timestamp information and the fourth timestamp information from the NEW field, and then encapsulating them in a message protocol field SDAP field or a PDCP field corresponding to the access device as shown in FIG. 5, Generate the second message, and at this time, the SDAP field or the PDCP field of the second message includes the third time stamp information and the fourth time stamp information.
当然,除上述SDAP字段或PDCP字段以外,所述第一协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above-mentioned SDAP field or PDCP field, the first protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison. When the first protocol field is other protocol fields, details are not repeated here.
情况f2:与上述情况d2相同,可以相互参见,此处不再赘述。Case f2: It is the same as the above case d2, and you can refer to each other.
可选的,当所述第四报文中携带所述flag时,在上述情况c1、c2、d1、d2、e1、e2、f1、f2中,所述接入设备可以在检测到所述第四报文中的所述第二协议字段中包含所述flag时,就执行上述过程。可选的,所述接入设备同时从所述第二协议字段中提取所述flag,将所述flag封装在所述第一协议字段中。Optionally, when the flag is carried in the fourth packet, in the above case c1, c2, d1, d2, e1, e2, f1, f2, the access device may detect the first When the second protocol field in the four packets includes the flag, the foregoing process is performed. Optionally, the access device simultaneously extracts the flag from the second protocol field, and encapsulates the flag in the first protocol field.
可选的,所述第一设备接收到所述第二报文之后,所述第一设备提取所述第二报文包括的所述第一协议字段中携带的所述第三时间戳信息和所述第四时间戳信息。例如,根据上述介绍的所述第一协议字段的各种情况,可以分为以下三种情况:Optionally, after the first device receives the second message, the first device extracts the third time stamp information and the third time stamp information carried in the first protocol field included in the second message. The fourth time stamp information. For example, according to the various situations of the first protocol field described above, it can be divided into the following three cases:
情况g1:所述第一设备提取GTP字段中的所述第三时间戳信息和所述第四时间戳信息。此情况中,所述第一设备为用户面网元,且所述第一设备对应的报文协议字段为图5所示的所述用户面网元对应的字段。Case g1: The first device extracts the third time stamp information and the fourth time stamp information in a GTP field. In this case, the first device is a user plane network element, and a message protocol field corresponding to the first device is a field corresponding to the user plane network element shown in FIG. 5.
情况g2:所述第一设备提取SDAP字段或PDCP字段中的所述第三时间戳信息和所述第四时间戳信息。此情况中,所述第一设备为终端设备,且所述第一设备对应的报文协议字段为图5所示的所述终端设备对应的字段。Case g2: The first device extracts the third time stamp information and the fourth time stamp information in an SDAP field or a PDCP field. In this case, the first device is a terminal device, and a message protocol field corresponding to the first device is a field corresponding to the terminal device shown in FIG. 5.
情况g3:所述第一设备提取NEW字段中的所述第三时间戳信息和所述第四时间戳信息。此情况中,所述第一设备为终端设备或者用户面网元。当所述第一设备为终端设备时,所述第一设备对应的报文协议字段为图6所示的所述终端设备对应的字段;当所述第一设备为用户面网元时,所述第一设备对应的报文协议字段为图6所示的所述用户面网元对应的字段。Case g3: The first device extracts the third time stamp information and the fourth time stamp information in a NEW field. In this case, the first device is a terminal device or a user plane network element. When the first device is a terminal device, a message protocol field corresponding to the first device is a field corresponding to the terminal device shown in FIG. 6; when the first device is a user plane network element, all The message protocol field corresponding to the first device is a field corresponding to the user plane network element shown in FIG. 6.
在一种可选的实施方式中,当所述接入设备检测到所述第二协议字段为NEW字段时,即NEW字段中封装了所述第三时间戳信息和所述第四时间戳信息时,所述接入设备可以不对所述第四报文进行处理,直接将所述第四报文转发给所述第一设备,此时,所述第四报文即为所述第二报文。这样,当所述第一设备接收到所述第二报文之后,所述第一设备可以直接提取所述第二协议字段(即NEW字段)中的所述第三时间戳信息和所述第四时间戳信息。此时,所述第一设备对应的报文协议字段为图6所示的所述用户面网元或者所述终端设备对应的字段。此过程中,所述接入设备对应的报文协议字段为图5所示的所述接入设备对应的字段。In an optional implementation manner, when the access device detects that the second protocol field is a NEW field, the NEW field encapsulates the third time stamp information and the fourth time stamp information. When the access device does not process the fourth message, it may directly forward the fourth message to the first device. At this time, the fourth message is the second message. Text. In this way, after the first device receives the second packet, the first device can directly extract the third time stamp information and the first time stamp information in the second protocol field (that is, the NEW field). Four timestamp information. At this time, the message protocol field corresponding to the first device is a field corresponding to the user plane network element or the terminal device shown in FIG. 6. In this process, a message protocol field corresponding to the access device is a field corresponding to the access device shown in FIG. 5.
步骤307、所述第一设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第一设备接收到所述第二报文时所述以太网络中的时刻,所述第六时间戳信息为所述第一设备接收到所述第二报文时所述移动网络中的时刻。Step 307: The first device determines fifth time stamp information and sixth time stamp information. The fifth time stamp information is a time in the Ethernet network when the first device receives the second packet. The sixth time stamp information is a time in the mobile network when the first device receives the second message.
例如,在图4中,所述第五时间戳信息对应的时刻记为t4;所述第六时间戳信息对应的时刻记为t4’。For example, in FIG. 4, the time corresponding to the fifth time stamp information is recorded as t4; the time corresponding to the sixth time stamp information is recorded as t4 '.
步骤308、所述第一设备根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定第七时间戳信息。Step 308: The first device determines a first time stamp according to the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the sixth time stamp information. Seven timestamp information.
在一种可选的实施方式中,所述第一设备执行步骤308时,具体方法可以为:所述第一设备根据所述第二时间戳信息(t1’)、所述第三时间戳信息(t2’)、所述第四时间戳信息(t3’)和所述第六时间戳信息(t4’)确定所述第一设备与所述第二设备之间的往返传输时延差值;所述第一设备计算所述第五时间戳信息对应的时刻(t4)与所述往返传输时延差值的和,得到所述第七时间戳信息。In an optional implementation manner, when the first device executes step 308, the specific method may be: the first device according to the second time stamp information (t1 ') and the third time stamp information (t2 '), the fourth timestamp information (t3'), and the sixth timestamp information (t4 ') determine a round-trip transmission delay difference between the first device and the second device; The first device calculates a sum of a time (t4) corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the seventh time stamp information.
例如,可以利用移动网络内部已实现的第一设备和第二设备之间的时钟同步,来计算所述第一设备与所述第二设备之间的所述往返传输时延差值。例如,可以通过如下公式一和公式二计算得到:For example, the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formulas 1 and 2:
t2’-t1’=delay1+offset1            公式一;t2’-t1 ’= delay1 + offset1 formula one;
t4’-t3’=delay2-offset1            公式二;t4’-t3 ’= delay2-offset1 Equation 2;
其中,上述公式中,offset1为移动网络中所述第一设备和所述第二设备的时间偏差;delay1为所述第一设备到所述第二设备的传输时延;delay2为所述第二设备到所述第一设备的传输时延。In the above formula, offset1 is the time difference between the first device and the second device in the mobile network; delay1 is the transmission delay from the first device to the second device; delay2 is the second A transmission delay of the device to the first device.
由于移动内部的时钟同步,上述offset1的值为0,因此通过上述公式一和公式二可以得到所述往返传输时延差值delay1-delay2=t2’-t1’-t4’+t3’。Due to the internal clock synchronization of the mobile, the value of the above-mentioned offset1 is 0, so the round-trip transmission delay difference value delay1-delay2 = t2'-t1'-t4 '+ t3' can be obtained through the above formulas 1 and 2.
进一步地,所述第七时间戳信息对应的时刻为t4+t2’-t1’-t4’+t3’。Further, the time corresponding to the seventh timestamp information is t4 + t2'-t1'-t4 '+ t3'.
步骤309、所述第一设备将所述第七时间戳信息发送给所述接入设备。Step 309: The first device sends the seventh time stamp information to the access device.
例如,在现有技术中所述第一设备会将所述第五时间戳信息发送给所述接入设备,以使所述接入设备发送给所述第二设备。在本申请中,所述第一设备采用现有发送所述第五时间戳信息的方法向所述第二设备发送所述第七时间戳信息。也可以理解为,用所述第七时间戳信息代替所述第五时间戳信息被发送到所述第二设备,这样,所述第二设备收到所述第七时间戳信息时,会将所述第七时间戳信息当做现有技术中的所述第五时间戳信息处理。For example, in the prior art, the first device sends the fifth timestamp information to the access device, so that the access device sends the fifth time stamp information to the second device. In this application, the first device sends the seventh time stamp information to the second device by using the existing method for sending the fifth time stamp information. It can also be understood that instead of the fifth timestamp information, the seventh timestamp information is sent to the second device. In this way, when the second device receives the seventh timestamp information, it will send The seventh timestamp information is treated as the fifth timestamp information in the prior art.
步骤310、所述接入设备向所述第二设备发送所述第七时间戳信息。Step 310: The access device sends the seventh timestamp information to the second device.
步骤311、所述第二设备根据所述第一时间戳信息(t1)、所述第八时间戳信息(t2)、所述第九时间戳信息(t3)和所述第七时间戳信息(t4+t2’-t1’-t4’+t3’)确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。Step 311: The second device according to the first time stamp information (t1), the eighth time stamp information (t2), the ninth time stamp information (t3), and the seventh time stamp information ( t4 + t2'-t1'-t4 '+ t3') determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
在一种可选的实施方式中,正如所述步骤309中所描述的,所述第二设备根据所述第七时间戳信息可以确定自身认为的所述第一设备接收到第二报文时所述以太网络中的时刻,将所述第七时间戳信息当做所述第五时间戳信息来用。In an optional implementation manner, as described in step 309, the second device may determine, according to the seventh timestamp information, when the first device thinks that the first device receives the second packet. The time in the Ethernet network uses the seventh timestamp information as the fifth timestamp information.
可选的,所述第一设备和第二设备之间的时间偏差offset2可以符合以下公式三:Optionally, the time offset offset2 between the first device and the second device may meet the following formula 3:
Figure PCTCN2019093123-appb-000001
Figure PCTCN2019093123-appb-000001
需要说明的是,本实施例中涉及的报文均为802.1AS协议报文。It should be noted that the packets involved in this embodiment are all 802.1AS protocol packets.
在一种可选的实施方式中,上述涉及的对应移动网络中的时刻的时间戳信息,在携带在报文中的GTP字段、SDAP字段、NEW字段等任一个中时,可以在相应的协议字段中预留N个字节存在时间戳信息,例如N为正整数,例如N为10。可选的,当该协议字段中国除了携带该时间戳信息还携带flag时,在该协议字段中预留M个字节存在flag,M为正整数,例如M为1。In an optional implementation manner, when the timestamp information corresponding to the time in the mobile network mentioned above is carried in any one of the GTP field, SDAP field, and NEW field in the message, it may be in the corresponding protocol. N bytes are reserved in the field for timestamp information. For example, N is a positive integer, for example, N is 10. Optionally, when the protocol field China carries a flag in addition to the timestamp information, M bytes are reserved in the protocol field for a flag, where M is a positive integer, for example, M is 1.
采用本申请实施例提供的同步方法,第一设备通过移动网络中收发报文的时间戳信息确定第七时间戳信息,以使所述第二设备根据所述第七时间戳信息和以太网络中收发报文的时间来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the first device determines the seventh time stamp information by using the time stamp information of the message transmitted and received in the mobile network, so that the second device is based on the seventh time stamp information and the Ethernet network. The time of sending and receiving packets is used to calculate the time deviation between the first device and the second device, and then perform time synchronization. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
本申请实施例还提供了另一种同步方法,适用于如图1和图2所示的通信系统。例如,图7中的第一设备为上述UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF。参阅图7所示,该方法的具体流程可以包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2. For example, the first device in FIG. 7 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF. Referring to FIG. 7, the specific process of the method may include:
步骤701、第一设备向接入设备发送第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻。Step 701: The first device sends a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device. The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message.
其中,所述第一设备发起时钟同步流程的触发条件,与图3所示的实施例中步骤301中描述的原理相同,可以相互参见此处不再赘述。The trigger condition for the clock synchronization process initiated by the first device is the same as the principle described in step 301 in the embodiment shown in FIG.
其中,图4所示的第一设备和第二设备之间进行同步的过程中报文收发示意图,本实施例同样可以参见。例如,在图4中,步骤401中的所述第一时间戳信息对应的时刻在图4中记为t1,所述第二时间戳信息在图4中记为t1’。The schematic diagram of message transmission and reception during synchronization between the first device and the second device shown in FIG. 4 can also be referred to in this embodiment. For example, in FIG. 4, the time corresponding to the first time stamp information in step 401 is recorded as t1 in FIG. 4, and the second time stamp information is recorded as t1 'in FIG.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备 为终端设备且所述第二设备为用户面网元。也就是说,所述用户面网元和所述终端设备中任一个都可以是主时钟节点,而另一个需要进行时钟同步。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
可选的,所述第一报文中还可以携带标示(flag),所述flag用于指示所述第一报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the first message, and the flag is used to indicate that the first message carries time stamp information indicating a time in a mobile network.
在一种可选的实施方式中,所述第一报文中携带所述第二时间戳信息,具体实现方法可以是:所述第一设备将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第一报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第一报文中新增加的协议字段。可选的,当所述第一报文中还携带flag时,所述flag也可以携带在所述第一协议字段中。In an optional implementation manner, the first packet carries the second timestamp information, and a specific implementation method may be: the first device carries the second timestamp information in the first A message is included in a first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message. Optionally, when a flag is also carried in the first packet, the flag may also be carried in the first protocol field.
同样的,仍基于图5所示的示例,对所述第一协议字段进行详细介绍:Similarly, based on the example shown in FIG. 5, the first protocol field is described in detail:
在一种示例性的实施方式中,当所述第一设备为终端设备且所述第二设备为用户面网元时,所述第一协议字段可以有以下两种情况:In an exemplary embodiment, when the first device is a terminal device and the second device is a user plane network element, the first protocol field may have the following two situations:
情况h1:所述第一协议字段可以为SDAP字段或PDCP字段。此情况中,所述第一设备将所述第二时间戳信息封装在如图5所示的所述终端设备对应的报文协议字段SDAP字段或PDCP字段中,然后将封装后得到的第一报文发送给所述接入设备。Case h1: The first protocol field may be an SDAP field or a PDCP field. In this case, the first device encapsulates the second time stamp information in a message protocol field SDAP field or a PDCP field corresponding to the terminal device as shown in FIG. 5, and then encapsulates the first obtained A message is sent to the access device.
当然,除上述SDAP字段或PDCP字段以外,所述第一协议字段还可以是图5所示的所述终端设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above-mentioned SDAP field or PDCP field, the first protocol field may also be any other field in the message protocol field corresponding to the terminal device shown in FIG. 5, which is not limited in this application comparison. When one protocol field is another protocol field, details are not repeated here.
情况h2:所述第一协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述第一设备在图5所示的所述终端设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述终端设备对应的报文协议字段所示;然后将所述第二时间戳信息封装在NEW字段中,将封装后得到的第一报文发送给所述接入设备。Case h2: The first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, the first device adds a new protocol field, the NEW field, to the message protocol field corresponding to the terminal device shown in FIG. 5, for example, as described in the protocol stack architecture shown in FIG. The message protocol field corresponding to the terminal device is shown; then the second time stamp information is encapsulated in a NEW field, and the first message obtained after the encapsulation is sent to the access device.
需要说明的是,NEW字段仅作为一个示例,例如NEW字段还可以有其它相同功能的任意名称,本申请对比不作限定。It should be noted that the NEW field is only used as an example. For example, the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
在另一种示例性的实施方式中,当所述第一设备为用户面网元且所述第二设备为终端设备时,所述第一协议字段可以有以下两种情况:In another exemplary embodiment, when the first device is a user plane network element and the second device is a terminal device, the first protocol field may have the following two situations:
情况i1:所述第一协议字段为GTP字段。此情况中,所述第一设备将所述第二时间戳信息封装如图5所示的所述用户面网元对应的报文协议字段GTP字段中,然后将封装后得到的第一报文发送给所述接入设备。Case i1: The first protocol field is a GTP field. In this case, the first device encapsulates the second time stamp information in a message protocol field GTP field corresponding to the user plane network element shown in FIG. 5, and then encapsulates the first message obtained by the encapsulation. Sending to the access device.
当然,除上述GTP字段以外,所述第一协议字段还可以是图5所示的所述用户面网元对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第一协议字段为其他字段时,此处不再一一赘述。Of course, in addition to the above-mentioned GTP field, the first protocol field may also be any other field in the message protocol field corresponding to the user plane network element shown in FIG. When the protocol fields are other fields, they are not repeated here one by one.
情况i2:所述第一协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述第一设备在图5所示的所述用户面网元对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述用户面网元对应的报文协议字段所示;然后将所述第二时间戳信息封装在NEW字段中,将封装后得到的第一报文发送给所述接入设备。Case i2: The first protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, the first device adds a new protocol field, the NEW field, to the message protocol field corresponding to the user plane network element shown in FIG. 5, for example, in the protocol stack architecture shown in FIG. The message protocol field corresponding to the user plane network element is shown; then the second time stamp information is encapsulated in a NEW field, and the first message obtained after the encapsulation is sent to the access device.
需要说明的是,NEW字段仅作为一个示例,例如NEW字段还可以有其它相同功能的任意名称,本申请对比不作限定。It should be noted that the NEW field is only used as an example. For example, the NEW field may also have any other names with the same function, which is not limited by comparison in this application.
步骤702、所述接入设备基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息和所述第二时间戳信息。Step 702: The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information and the second time stamp information.
在一种可选的实施方式中,所述接入设备基于所述第一报文向所述第二设备发送所述第三报文,具体方法可以为:所述接入设备当检测到所述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文,并向所述第二设备发送所述第三报文。此时,所述第三报文的第二协议字段中携带所述第二时间戳信息。In an optional implementation manner, the access device sends the third message to the second device based on the first message, and a specific method may be: when the access device detects all the When the first protocol field included in the first packet includes the second time stamp information, the access device encapsulates the second time stamp information into the second protocol field included in the first packet. To generate the third message, and send the third message to the second device. At this time, the second protocol field of the third message carries the second time stamp information.
例如,所述第一协议字段的具体情况可以参见上述步骤701中对所述第一协议字段的相关描述。同理,所述第二协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。其中,根据所述第一设备和所述第二设备具体的实际情况,以及所述一协议字段的实际情况不同,所述第二协议字段的实际情况可能分为多种。For example, for details about the first protocol field, reference may be made to the related description of the first protocol field in step 701. Similarly, the second protocol field may be an existing protocol field or a newly added field in an existing protocol stack framework. Wherein, the actual situation of the second protocol field may be divided into multiple types according to the actual situation of the first device and the second device and the actual situation of the first protocol field.
在一种可能的实施方式中,当所述第一协议字段符合上述步骤701中的情况h1时,所述第二协议字段可以有以下两种情况:In a possible implementation manner, when the first protocol field meets the condition h1 in step 701, the second protocol field may have the following two situations:
情况j1:所述第二协议字段可以是GTP字段。在此情况中,所述接入设备检测到接收到的所述第一报文中的SDAP字段或PDCP字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从SDAP字段或PDCP字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段GTP字段中,生成所述第三报文,此时所述第三报文的GTP字段中包含所述第二时间戳信息。Case j1: The second protocol field may be a GTP field. In this case, when the access device detects that the second time stamp information is encapsulated in an SDAP field or a PDCP field in the received first packet, the access device adds the second time stamp information. The timestamp information is extracted from the SDAP field or the PDCP field, and then encapsulated in the message protocol field GTP field corresponding to the access device as shown in FIG. 5 to generate the third message. The GTP field of the three messages includes the second time stamp information.
当然,除上述GTP字段以外,所述第二协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above GTP field, the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. When the fields are other protocol fields, they are not repeated here one by one.
情况j2:所述第二协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第一报文中的SDAP字段或PDCP字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从SDAP字段或PDCP字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第二时间戳信息封装在NEW字段中,得到所述第三报文,此时所述第三报文的NEW字段中包含所述第二时间戳信息。Case j2: The second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the second time stamp information is encapsulated in the SDAP field or the PDCP field in the received first packet, the access device changes the The second timestamp information is extracted from the SDAP field or the PDCP field, and then the access device adds a new protocol field, the NEW field, to the message protocol field corresponding to the access device shown in FIG. 5, for example, as shown in FIG. The protocol protocol field shown in FIG. 6 indicates the message protocol field corresponding to the access device; then the second timestamp information is encapsulated in a NEW field to obtain the third message. The NEW field of the three messages contains the second time stamp information.
在另一种可能的实施方式中,当所述第一协议字段符合上述步骤701中的情况h2时,所述第二协议字段可以有以下两种情况:In another possible implementation manner, when the first protocol field meets the condition h2 in step 701, the second protocol field may have the following two situations:
情况k1:所述第二协议字段可以是GTP字段。在此情况中,所述接入设备检测到接收到的所述第一报文中的NEW字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从NEW字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段GTP字段中,生成所述第三报文,此时所述第三报文的GTP字段中包含所述第二时间戳信息。Case k1: The second protocol field may be a GTP field. In this case, when the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device adds the second time stamp information Extracted from the NEW field, and then encapsulated in the GTP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message. At this time, the GTP field of the third message The second time stamp information is included.
当然,除上述GTP字段以外,所述第二协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above GTP field, the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison. The second protocol When the fields are other protocol fields, they are not repeated here one by one.
情况k2:所述第二协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记 为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第一报文中的NEW字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从NEW字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第二时间戳信息封装在NEW字段中,得到所述第三报文,此时所述第三报文的NEW字段中包含所述第二时间戳信息。Case k2: The second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device sets the second time The stamp information is extracted from the NEW field, and then the access device adds a new protocol field, the NEW field, to the message protocol field corresponding to the access device shown in FIG. 5, such as the protocol stack shown in FIG. The message protocol field corresponding to the access device in the architecture is shown; then the second timestamp information is encapsulated in a NEW field to obtain the third message, and at this time, the NEW field of the third message The second time stamp information is included.
在另一种可能的实施方式中,当所述第一协议字段符合上述步骤701中的情况i1时,所述第二协议字段可以有以下两种情况:In another possible implementation manner, when the first protocol field meets the condition i1 in step 701, the second protocol field may have the following two situations:
情况l1:所述第二协议字段可以是SDAP字段或PDCP字段。在此情况中,所述接入设备检测到接收到的所述第一报文中的GTP字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从GTP字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段SDAP字段或PDCP字段中,生成所述第三报文,此时所述第三报文的SDAP字段或PDCP字段中包含所述第二时间戳信息。Case l1: The second protocol field may be an SDAP field or a PDCP field. In this case, when the access device detects that the second time stamp information is encapsulated in a received GTP field in the first packet, the access device adds the second time stamp information Extracted from the GTP field, and then encapsulated in the SDAP field or the PDCP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message. At this time, the third message The SDAP field or the PDCP field of the second time stamp information.
当然,除上述SDAP字段或PDCP字段以外,所述第二协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above-mentioned SDAP field or PDCP field, the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. When the second protocol field is another protocol field, details are not repeated here.
情况l2:所述第二协议字段可以为在图5所示的协议栈中新增加的协议字段,可以记为新协议(new protocol)字段(以下简称NEW字段)。例如,在此情况中,所述接入设备检测到接收到的所述第一报文中的GTP字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从GTP字段中提取出来,然后所述接入设备在图5所示的所述接入设备对应的报文协议字段中增加一个新的协议字段NEW字段,例如图6示出的协议栈架构中所述接入设备对应的报文协议字段所示;然后将所述第二时间戳信息封装在NEW字段中,得到所述第三报文,此时所述第三报文的NEW字段中包含所述第二时间戳信息。Case 12: The second protocol field may be a newly added protocol field in the protocol stack shown in FIG. 5, and may be recorded as a new protocol field (hereinafter referred to as a NEW field). For example, in this case, when the access device detects that the second time stamp information is encapsulated in the received GTP field in the first packet, the access device sets the second time The stamp information is extracted from the GTP field, and then the access device adds a new protocol field NEW field to the message protocol field corresponding to the access device shown in FIG. 5, such as the protocol stack shown in FIG. The message protocol field corresponding to the access device in the architecture is shown; then the second timestamp information is encapsulated in a NEW field to obtain the third message, and at this time, the NEW field of the third message The second time stamp information is included.
在另一种可能的实施方式中,当所述第二协议字段符合上述步骤701中的情况i2时,所述第二协议字段可以有以下两种情况:In another possible implementation manner, when the second protocol field meets the condition i2 in step 701, the second protocol field may have the following two situations:
情况m1:所述第二协议字段可以是SDAP字段或PDCP字段。在此情况中,所述接入设备检测到接收到的所述第一报文中的NEW字段中封装了所述第二时间戳信息时,所述接入设备将所述第二时间戳信息从NEW字段中提取出来,然后封装在如图5所示的所述接入设备对应的报文协议字段SDAP字段或PDCP字段中,生成所述第三报文,此时所述第三报文的SDAP字段或PDCP字段中包含所述第二时间戳信息。Case m1: The second protocol field may be an SDAP field or a PDCP field. In this case, when the access device detects that the second time stamp information is encapsulated in a NEW field in the received first packet, the access device adds the second time stamp information Extracted from the NEW field, and then encapsulated in the SDAP field or PDCP field of the message protocol field corresponding to the access device as shown in FIG. 5 to generate the third message. At this time, the third message The SDAP field or the PDCP field of the second time stamp information.
当然,除上述SDAP字段或PDCP字段以外,所述第二协议字段还可以是图5所示的所述接入设备对应的报文协议字段中的任何其他字段,本申请对比不作限定,所述第二协议字段为其他协议字段时,此处不再一一赘述。Of course, in addition to the above-mentioned SDAP field or PDCP field, the second protocol field may also be any other field in the message protocol field corresponding to the access device shown in FIG. 5, which is not limited in this application comparison. When the second protocol field is another protocol field, details are not repeated here.
情况m2:与上述情况k2相同,可以相互参见,此处不再赘述。Case m2: The same as the above case k2, which can be referred to each other, and will not be described again here.
可选的,当所述第一报文中携带所述flag时,在上述情况j1、j2、k1、k2、l1、l2、m1、m2中,所述接入设备可以在检测到所述第一报文中的所述第一协议字段中包含所述flag时,就执行上述过程。可选的,所述接入设备可以同时从所述第一协议字段中提取所述flag,将所述flag封装在所述第二协议字段中。Optionally, when the flag is carried in the first packet, in the foregoing situation j1, j2, k1, k2, l1, l2, m1, and m2, the access device may detect the When the flag is included in the first protocol field in the message, the foregoing process is performed. Optionally, the access device may simultaneously extract the flag from the first protocol field, and encapsulate the flag in the second protocol field.
可选的,所述第二设备接收到所述第三报文之后,所述第二设备提取所述第三报文包 括的所述第二协议字段中携带的所述第二时间戳信息。例如,根据上述介绍的所述第二协议字段的各种情况,可以分为以下三种情况:Optionally, after the second device receives the third message, the second device extracts the second time stamp information carried in the second protocol field included in the third message. For example, according to the various situations of the second protocol field described above, it can be divided into the following three cases:
情况n1:所述第二设备提取GTP字段中的所述第二时间戳信息。此情况中,所述第二设备为用户面网元,且所述第二设备对应的报文协议字段为图5所示的所述用户面网元对应的字段。Case n1: The second device extracts the second time stamp information in a GTP field. In this case, the second device is a user plane network element, and the message protocol field corresponding to the second device is a field corresponding to the user plane network element shown in FIG. 5.
情况n2:所述第二设备提取SDAP字段或PDCP字段中的所述第二时间戳信息。此情况中,所述第二设备为终端设备,且所述第二设备对应的报文协议字段为图5所示的所述终端设备对应的字段。Case n2: The second device extracts the second time stamp information in an SDAP field or a PDCP field. In this case, the second device is a terminal device, and a message protocol field corresponding to the second device is a field corresponding to the terminal device shown in FIG. 5.
情况n3:所述第二设备提取NEW字段中的所述第二时间戳信息。此情况中,所述第二设备为终端设备或者用户面网元。当所述第二设备为终端设备时,所述第二设备对应的报文协议字段为图6所示的所述终端设备对应的字段;当所述第二设备为用户面网元时,所述第二设备对应的报文协议字段为图6所示的所述用户面网元对应的字段。Case n3: The second device extracts the second time stamp information in a NEW field. In this case, the second device is a terminal device or a user plane network element. When the second device is a terminal device, a message protocol field corresponding to the second device is a field corresponding to the terminal device shown in FIG. 6; when the second device is a user plane network element, all The message protocol field corresponding to the second device is a field corresponding to the user plane network element shown in FIG. 6.
在一种可选的实施方式中,当所述接入设备检测到所述第一协议字段为NEW字段时,即NEW字段中封装了所述第二时间戳信息时,所述接入设备可以不对所述第一报文进行处理,直接将所述第一报文转发给所述第二设备,此时,所述第一报文即为所述第三报文。这样,当所述第二设备接收到所述第三报文之后,所述第二设备可以直接提取所述第一协议字段(即NEW字段)中的所述第二时间戳信息。此时,所述第二设备对应的报文协议字段为图6所示的所述用户面网元或者所述终端设备对应的字段。此过程中,所述接入设备对应的报文协议字段为图5所示的所述接入设备对应的字段。In an optional implementation manner, when the access device detects that the first protocol field is a NEW field, that is, when the second time stamp information is encapsulated in a NEW field, the access device may The first message is not processed, and the first message is directly forwarded to the second device. At this time, the first message is the third message. In this way, after the second device receives the third message, the second device can directly extract the second time stamp information in the first protocol field (ie, the NEW field). At this time, the message protocol field corresponding to the second device is a field corresponding to the user plane network element or the terminal device shown in FIG. 6. In this process, a message protocol field corresponding to the access device is a field corresponding to the access device shown in FIG. 5.
步骤703、所述第二设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第三报文时所述以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻。Step 703: The second device determines fifth time stamp information and sixth time stamp information. The fifth time stamp information is a time in the Ethernet network when the second device receives the third packet. The sixth time stamp information is a time in the mobile network when the second device receives the third message.
例如,所述第五时间戳信息对应的时刻可以为图4中的t2,所述第六时间戳信息对应的时刻可以为图4中的t2’。For example, the time corresponding to the fifth time stamp information may be t2 in FIG. 4, and the time corresponding to the sixth time stamp information may be t2 'in FIG.
步骤704、所述第二设备向所述接入设备发送第四报文。Step 704: The second device sends a fourth message to the access device.
其中,所述第四报文中可以未携带任何时间戳信息,仅作为同步流程中的用于识别报文收发时间的报文。例如,下边步骤705中的时间戳信息基于所述第四报文得到。The fourth message may not carry any time stamp information, and is only used as a message for identifying a message receiving and sending time in the synchronization process. For example, the time stamp information in the following step 705 is obtained based on the fourth message.
步骤705、所述第二设备确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻,所述第八时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻。Step 705: The second device determines seventh timestamp information and eighth timestamp information. The seventh timestamp information is described when the second device sends the fourth message to the access device. The time in the Ethernet network, and the eighth time stamp information is the time in the mobile network when the second device sends the fourth message to the access device.
例如,所述第七时间戳信息对应的时刻可以为图4中的t3,所述第八时间戳信息对应的时刻可以为图4中的t3’。For example, the time corresponding to the seventh timestamp information may be t3 in FIG. 4, and the time corresponding to the eighth timestamp information may be t3 'in FIG.
步骤706、所述接入设备基于所述第四报文向所述第一设备发送第二报文。Step 706: The access device sends a second message to the first device based on the fourth message.
其中,所述接入设备执行步骤706时,具体可以为:所述接入设备将所述第四报文转发给所述第一设备,此时所述第四报文即为所述第二报文。When the access device performs step 706, the access device may specifically forward the fourth packet to the first device, and the fourth packet is the second packet. Message.
步骤707、所述第一设备收到第二报文后,确定第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻。Step 707: After receiving the second message, the first device determines third time stamp information and fourth time stamp information. The third time stamp information is the second message received by the first device. The time in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device received the second message.
例如,所述第三时间戳信息对应的时刻可以为图4中的t4,所述第四时间戳信息对应的时刻可以为图4中的t4’。For example, the time corresponding to the third time stamp information may be t4 in FIG. 4, and the time corresponding to the fourth time stamp information may be t4 'in FIG.
步骤708、所述第一设备将所述第三时间戳信息和所述第四时间戳信息发送给所述接入设备。Step 708: The first device sends the third time stamp information and the fourth time stamp information to the access device.
可选的,所述第一设备执行步骤708时,具体方法可以为:所述第一设备向所述接入设备发送第五报文,所述第五报文携带所述第三时间戳信息和所述第四时间戳信息。Optionally, when the first device executes step 708, the specific method may be: the first device sends a fifth message to the access device, and the fifth message carries the third time stamp information And the fourth timestamp information.
其中,所述第五报文中携带所述第四时间戳信息的情况,以及所述第一设备对所述第五报文的处理原理,与步骤701中的所述第一报文中携带所述第二时间戳的情况以及所述第一设备对所述第一报文的处理原理相同,可以相互参见,具体的此处不再详细赘述。Wherein, the fifth message carries the fourth timestamp information, and the processing principle of the fifth message by the first device is the same as that carried in the first message in step 701. The condition of the second timestamp and the processing principle of the first packet by the first device are the same, and can be referred to each other, and details are not described in detail here.
步骤709、所述接入设备将所述第三时间戳信息和所述第四时间戳信息发送给所述第二设备。Step 709: The access device sends the third time stamp information and the fourth time stamp information to the second device.
可选的,所述接入设备执行步骤709的具体方法可以为:所述接入设备基于所述第五报文向所述第二设备发送第六报文,所述第六报文中携带所述第三时间戳信息和所述第四时间戳信息。Optionally, the specific method for the access device to perform step 709 may be: the access device sends a sixth message to the second device based on the fifth message, and the sixth message carries The third time stamp information and the fourth time stamp information.
其中,所述第六报文中携带所述第四时间戳信息的情况,以及所述接入设备对所述第五报文处理生成所述第六报文的原理,与步骤702中所述第三报文中携带所述第二时间戳信息的情况,以及所述接入设备对所述第一报文处理生成所述第三报文的原理相同,可以相互参见,具体的此处不再详细赘述。Wherein, the sixth message carries the fourth time stamp information, and the principle that the access device processes the fifth message to generate the sixth message is the same as that described in step 702. The third message carries the second timestamp information, and the principle that the access device generates the third message by processing the first message is the same, and you can refer to each other. More details.
步骤710、所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。Step 710: The second device according to the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth timestamp information, the third timestamp information, The fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
在一种可选的实施方式中,所述第二设备执行步骤710时,具体方法可以为:所述第二设备根据所述第二时间戳信息(t1’)、所述第六时间戳信息(t2’)、所述第八时间戳信息(t3’)和所述第四时间戳信息(t4’)确定所述第一设备与所述第二设备之间的往返传输时延差值;所述第二设备根据所述第一时间戳信息(t1)、所述第三时间戳信息(t4)、所述第五时间戳信息(t2)、所述第七时间戳信息(t3)和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差。In an optional implementation manner, when the second device executes step 710, the specific method may be: the second device according to the second time stamp information (t1 ') and the sixth time stamp information (t2 '), the eighth timestamp information (t3'), and the fourth timestamp information (t4 ') determine a round-trip transmission delay difference between the first device and the second device; The second device according to the first time stamp information (t1), the third time stamp information (t4), the fifth time stamp information (t2), the seventh time stamp information (t3), and The round-trip transmission delay difference value determines a time deviation between the first device and the second device.
其中,可选的,所述往返时延差值的计算过程可以参见图3所示的实施例中的公式一和公式二,进而计算出所述往返传输时延差值delay1-delay2=t2’-t1’-t4’+t3’。具体参见步骤308中的详细过程,此处不再重复赘述。Wherein, optionally, for the calculation process of the round-trip delay difference value, refer to formula 1 and formula 2 in the embodiment shown in FIG. 3, and then calculate the round-trip transmission delay difference value delay1-delay2 = t2 ' -t1'-t4 '+ t3'. For details, refer to the detailed process in step 308, which will not be repeated here.
在一种可选的实施方式中,所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差,具体方法可以为:所述第二设备确定第九时间戳信息,所述第九时间戳信息为所述第三时间戳信息对应的时刻与所述往返传输时延差值的和;所述第二设备根据所述第一时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。In an optional implementation manner, the second device is based on the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and the The round-trip transmission delay difference determines the time deviation between the first device and the second device. The specific method may be: the second device determines ninth time stamp information, and the ninth time stamp information is A sum of a time corresponding to the third timestamp information and the round-trip transmission delay difference; the second device according to the first timestamp information, the fifth timestamp information, and the seventh timestamp information And the ninth time stamp information determines a time offset between the first device and the second device.
例如,基于上述得出的所述往返传输时延差值,可以得出所述第九时间戳信息对应的时刻为t4+t2’-t1’-t4’+t3’。For example, based on the round-trip transmission delay difference value obtained above, it can be obtained that the time corresponding to the ninth time stamp information is t4 + t2'-t1'-t4 '+ t3'.
可选的,所述第一设备和所述第二设备之间的时间偏差仍可以符合图3所示的实施例中的公式三,此处不再详细描述。Optionally, the time deviation between the first device and the second device may still conform to Formula 3 in the embodiment shown in FIG. 3, which is not described in detail here.
需要说明的是,本实施例中涉及的报文均为802.1AS协议报文。It should be noted that the packets involved in this embodiment are all 802.1AS protocol packets.
在一种可选的实施方式中,上述涉及的对应移动网络中的时刻的时间戳信息,在携带在报文中的GTP字段、SDAP字段、NEW字段等任一个中时,可以在相应的协议字段中预留N个字节存在时间戳信息,例如N为正整数,例如N为10。可选的,当该协议字段中国除了携带该时间戳信息还携带flag时,在该协议字段中预留M个字节存在flag,M为正整数,例如M为1。In an optional implementation manner, when the timestamp information corresponding to the time in the mobile network mentioned above is carried in any one of the GTP field, SDAP field, and NEW field in the message, it may be in the corresponding protocol. N bytes are reserved in the field for timestamp information. For example, N is a positive integer, for example, N is 10. Optionally, when the protocol field China carries a flag in addition to the timestamp information, M bytes are reserved in the protocol field for a flag, where M is a positive integer, for example, M is 1.
采用本申请实施例提供的同步方法,第二设备通过移动网络中收发报文的时间戳信息以及以太网络中收发报文的时间戳信息来计算第一设备和第二设备之间的时间偏差,进而进行时间同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the second device calculates a time offset between the first device and the second device by using time stamp information of a message sent and received in a mobile network and time stamp information of a message sent and received in an Ethernet network. Furthermore, time synchronization is performed. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
本申请实施例还提供了另一种同步方法,适用于如图1和图2所示的通信系统。例如,图8中的第一设备为上述UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF。参阅图8所示,该方法的具体流程可以包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2. For example, the first device in FIG. 8 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF. Referring to FIG. 8, the specific process of the method may include:
步骤801、第一设备向接入设备发送第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻。Step 801: The first device sends a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device. The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message.
在一种可选的实施方式中,所述第一设备在向接入设备发送所述第一报文之前,所述第一设备会接收到来自以太网络中(例如TSN)的数据包,所述第一设备识别到所述数据包为802.1AS频率同步数据包后,所述第一设备向所述接入设备发送所述第一报文,此时就发起了时钟同步流程(这里指频率同步流程)。In an optional implementation manner, before the first device sends the first packet to an access device, the first device receives a data packet from an Ethernet network (for example, TSN), so After the first device recognizes that the data packet is an 802.1AS frequency synchronization data packet, the first device sends the first message to the access device, and then initiates a clock synchronization process (here, the frequency Synchronization process).
例如,图9示出了第一设备和第二设备之间进行频率同步的过程中报文的收发示意图。其中,图9中实线指示报文在以太网络中的传输情况,虚线指示报文在移动网络中的传输情况;应理解,图9中同向平行的实线和虚线指示是同一个报文的传输。For example, FIG. 9 shows a schematic diagram of message transmission and reception during the frequency synchronization between the first device and the second device. Among them, the solid line in FIG. 9 indicates the transmission of the message in the Ethernet network, and the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dashed line in the same direction in FIG. 9 indicate the same message. Transmission.
例如,步骤801中的所述第一时间戳信息对应的时刻在图9中记为t5,所述第二时间戳信息在图9中记为t5’。For example, the time corresponding to the first time stamp information in step 801 is recorded as t5 in FIG. 9, and the second time stamp information is recorded as t5 'in FIG. 9.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。也就是说,所述用户面网元和所述终端设备中任一个都可以是主时钟节点,而另一个需要进行时钟同步。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
可选的,所述第一报文中还可以携带标示(flag),所述flag用于指示所述第一报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the first message, and the flag is used to indicate that the first message carries time stamp information indicating a time in a mobile network.
在一种可选的实施方式中,所述第一报文中携带所述第二时间戳信息,具体实现方法可以是:所述第一设备将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第一报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第一报文中新增加的协议字段。可选的,当所述第一报文中还携带flag时,所述flag也可以携带在所述第一协议字段中。In an optional implementation manner, the first packet carries the second timestamp information, and a specific implementation method may be: the first device carries the second timestamp information in the first A message is included in a first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message. Optionally, when a flag is also carried in the first packet, the flag may also be carried in the first protocol field.
可选的,所述第一协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第一协议字段的详细介绍可以参见步骤701中的相关描述,重复之处此处不再赘述。Optionally, the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the first protocol field, refer to the related description in step 701 and repeat. The details are not repeated here.
步骤802、所述接入设备基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息和所述第二时间戳信息。Step 802: The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information and the second time stamp information.
在一种可选的实施方式中,所述接入设备基于所述第一报文向第二设备发送第三报文,具体方法可以为:所述接入设备当检测到所述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第三协议字段中,生成所述第三报文,并向所述第二设备发送所述第三报文。In an optional implementation manner, the access device sends a third packet to the second device based on the first packet. The specific method may be: when the access device detects the first packet When the first protocol field included in the text includes the second time stamp information, the access device encapsulates the second time stamp information into a third protocol field included in the first message, and generates the second time stamp information. A third message, and sending the third message to the second device.
例如,所述第一协议字段与步骤801中的第一协议字段相同,同样可以参见步骤701中的相关描述。所述第三协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第一报文向第二设备发送第三报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第三协议字段与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the first protocol field is the same as the first protocol field in step 801, and similarly, reference may be made to the related description in step 701. The third protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending a third message to the second device based on the first message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first message. The device sends the third packet with the same principle. For related principles, see step 702. The third protocol field may be the same as the second protocol field in step 702, and may be referred to each other, and details are not described herein again.
步骤803、所述第二设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时移动网络中的时刻。Step 803: The second device determines fifth timestamp information and sixth timestamp information. The fifth timestamp information is a time in the Ethernet network when the second device receives the third packet. The sixth time stamp information is a time in the mobile network when the second device receives the third message.
例如,所述第五时间戳信息对应的时刻可以为图9中的t6,所述第六时间戳信息对应的时刻可以为图9中的t6’。For example, the time corresponding to the fifth time stamp information may be t6 in FIG. 9, and the time corresponding to the sixth time stamp information may be t6 'in FIG.
步骤804、所述第一设备向接入设备发送第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备发送所述第二报文时以太网络中的时刻,所述第四时间戳信息为所述第一设备发送所述第二报文时移动网络中的时刻。Step 804: The first device sends a second message to the access device. The second message carries third time stamp information and fourth time stamp information, and the third time stamp information is the first time stamp information. The time in the Ethernet network when the device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message.
例如,所述第三时间戳信息对应的时刻可以为图9中的t8,所述第四时间戳信息对应的时刻可以为图9中的t8’。For example, the time corresponding to the third time stamp information may be t8 in FIG. 9, and the time corresponding to the fourth time stamp information may be t8 'in FIG.
可选的,所述第二报文中携带所述第四时间戳信息,具体实现方法可以为:所述第一设备将所述第四时间戳信息携带在所述第二报文包括的第二协议字段中。可选的,所述第二协议字段可以是目前协议栈框架中所述第二报文中现有的协议字段;所述第二协议字段中还可以是在目前协议栈框架中所述第二报文中新增加的协议字段。可选的,当所述第二报文中还携带flag时,所述flag也可以携带在所述第二协议字段中。Optionally, the fourth message carries the fourth timestamp information, and a specific implementation method may be: the first device carries the fourth timestamp information in a first message included in the second message. Second agreement field. Optionally, the second protocol field may be an existing protocol field in the second message in the current protocol stack framework; the second protocol field may also be the second protocol field in the current protocol stack framework Newly added protocol field in the message. Optionally, when the second packet also carries a flag, the flag may also be carried in the second protocol field.
可选的,所述第二协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第二协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the second protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the second protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
步骤805、所述接入设备基于所述第二报文向所述第二设备发送第四报文,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息。Step 805: The access device sends a fourth message to the second device based on the second message, and the fourth message carries the third time stamp information and the fourth time stamp information. .
在一种可选的实施方式中,所述接入设备基于所述第二报文向第二设备发送第四报文具体方法可以为:所述接入设备当检测到所述第二报文包括的第二协议字段中包括所述第四时间戳信息时,所述接入设备将所述第四时间戳信息封装到所述第二报文的第四协议字段中,生成所述第四报文,并向所述第二设备发送所述第四报文。In an optional implementation manner, the specific method for the access device to send a fourth message to the second device based on the second message may be: when the access device detects the second message When the included second protocol field includes the fourth timestamp information, the access device encapsulates the fourth timestamp information into a fourth protocol field of the second message to generate the fourth A message, and sending the fourth message to the second device.
例如,所述第二协议字段与步骤804中的第二协议字段相同,同样可以参见步骤701中第一协议字段的相关描述。所述第四协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第二报文向第二设备发送第四报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第四协议字段与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the second protocol field is the same as the second protocol field in step 804, and similarly, reference may be made to the description of the first protocol field in step 701. The fourth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending a fourth packet to the second device based on the second packet is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first packet. The device sends the third packet with the same principle. For related principles, see step 702. The fourth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
步骤806、所述第二设备确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻,所述第八时间戳信息为所述第二设备接收到所述第四报文时移动网络中的时刻。Step 806: The second device determines seventh timestamp information and eighth timestamp information. The seventh timestamp information is a time in the Ethernet network when the second device receives the fourth packet. The eighth time stamp information is a time in the mobile network when the second device receives the fourth message.
例如,所述第七时间戳信息对应的时刻可以为图9中的t7,所述第八时间戳信息对应的时刻可以为图9中的t7’。For example, the time corresponding to the seventh time stamp information may be t7 in FIG. 9, and the time corresponding to the eighth time stamp information may be t7 'in FIG.
步骤807、所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息和所述第八时间戳信息确定所述第一设备和所述第二设备之间的频率偏差,并根据所述频率偏差进行频率同步。Step 807: The second device according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, and perform frequency synchronization according to the frequency deviation.
在一种可选的实施方式中,所述第二设备根据所述第一时间戳信息(t5)、所述第二时间戳信息(t5’)、所述第三时间戳信息(t8)、所述第四时间戳信息(t8’)、所述第五时间戳信息(t6)、所述第六时间戳信息(t6’)、所述第七时间戳信息(t7)和所述第八时间戳信息(t7’)确定所述第一设备和所述第二设备之间的频率偏差,具体方法可以为:所述第二设备确定所述第六时间戳信息对应的时刻与所述第二时间戳信息对应的时刻的第一差值,以及确定所述第八时间戳信息对应的时刻与所述第四时间戳信息对应的时刻的第二差值;所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第一差值和所述第二差值确定所述第一设备和所述第二设备之间的频率偏差。其中,例如,所述第一差值可以记为t6’-t5’,所述第二差值可以记为t7’-t8’。In an optional implementation manner, the second device is based on the first timestamp information (t5), the second timestamp information (t5 '), the third timestamp information (t8), The fourth timestamp information (t8 '), the fifth timestamp information (t6), the sixth timestamp information (t6'), the seventh timestamp information (t7), and the eighth The timestamp information (t7 ') determines a frequency deviation between the first device and the second device, and a specific method may be: the second device determines that a time corresponding to the sixth timestamp information is different from the first time A first difference between the times corresponding to the two timestamp information, and a second difference between the times corresponding to the eighth timestamp information and the times corresponding to the fourth timestamp information; and the second device according to the First time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the first difference value and the second difference value determine the first device and A frequency deviation between the second devices. Among them, for example, the first difference may be recorded as t6'-t5 ', and the second difference may be recorded as t7'-t8'.
在一种可选的实施方式中,所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第一差值和所述第二差值确定所述第一设备和所述第二设备之间的频率偏差,具体方法可以为:In an optional implementation manner, the second device is based on the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, and the The first difference and the second difference determine a frequency deviation between the first device and the second device, and a specific method may be:
所述第二设备判断所述第一差值与所述第二差值的大小关系;Determining, by the second device, a magnitude relationship between the first difference and the second difference;
当所述第二设备判定所述第二差值小于所述第一差值时,所述第二设备确定所述频率偏差为第一值与第二值的商,所述第一值为所述第三时间戳信息对应的时刻与所述第一时间戳信息对应的时刻的差值,所述第二值为所述第七时间戳信息对应的时刻与所述第五时间戳信息对应的时刻的差值加上第三值所得的值,所述第三值为第四值与第五值的乘积值,所述第四值为所述第一差值减去所述第二差值所得的值,所述第五值为所述第七时间戳信息对应的时刻与所述第五时间戳对应的时刻的差值除以所述第八时间戳信息对应的时刻与所述第六时间戳对应的时刻的差值所得的值;When the second device determines that the second difference is smaller than the first difference, the second device determines that the frequency deviation is a quotient of the first value and a second value, and the first value is A difference between the time corresponding to the third time stamp information and the time corresponding to the first time stamp information, and the second value is a time value corresponding to the seventh time stamp information and the fifth time stamp information A value obtained by adding a difference between the times to a third value, the third value being a product of a fourth value and a fifth value, and the fourth value being the first difference minus the second difference The obtained value, the fifth value is a difference between a time corresponding to the seventh timestamp information and a time corresponding to the fifth timestamp divided by a time corresponding to the eighth timestamp information and the sixth The value obtained by the difference between the times corresponding to the timestamps;
当所述第二设备判定所述第二差值大于所述第一差值时,所述第二设备确定所述频率偏差为所述第一值与第六值的商,所述第六值为所述第七时间戳信息对应的时刻与所述第五时间戳信息对应的时刻的差值减去第七值所得的值,所述第七值为第八值与所述第五值的乘积值,所述第八值为所述第二差值减去所述第一差值所得的值。When the second device determines that the second difference is greater than the first difference, the second device determines that the frequency deviation is a quotient of the first value and a sixth value, and the sixth value A value obtained by subtracting a seventh value from a difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp information, where the seventh value is the difference between the eighth value and the fifth value The product value, the eighth value is a value obtained by subtracting the first difference value from the second difference value.
例如,当所述第一差值小于所述第二差值时,此场景可以看作是进行频率同步的第二个流程中的报文(即所述第二报文和所述第四报文)早到了第二设备,因此所述第二设备需要等移动网络内部的时延差相等的时刻再进行频率偏差计算,即有上述相应操作。例如,所述第一值可以记为t8-t5,所述第三值可以记为[(t6’-t5’)-(t7’-t8’)]*[(t7-t6)/(t7’-t6’)],所述第二值可以记为t7-t6+[(t6’-t5’)-(t7’-t8’)]*[(t7-t6)/(t7’-t6’)]。例如,所述频率偏差rateratio可以符合以下公式四:For example, when the first difference is smaller than the second difference, this scenario can be regarded as a message in the second process of frequency synchronization (that is, the second message and the fourth message). (Text) Arrived at the second device early, so the second device needs to wait until the time difference within the mobile network is equal, and then perform the frequency deviation calculation. For example, the first value may be recorded as t8-t5, and the third value may be recorded as [(t6'-t5 ')-(t7'-t8')] * [(t7-t6) / (t7 ' -t6 ')], the second value can be written as t7-t6 + [(t6'-t5')-(t7'-t8 ')] * [(t7-t6) / (t7'-t6')] . For example, the frequency deviation ratio may meet the following formula four:
Figure PCTCN2019093123-appb-000002
Figure PCTCN2019093123-appb-000002
例如,当所述第一差值大于所述第二差值时,此场景可以看作是进行频率同步的第二个流程中的报文(即所述第二报文和所述第四报文)晚到了第二设备,因此所述第二设备需要后退到移动网络内部的时延差相等的时刻进行频率偏差计算,即有上述相应操作。例如,所述第一值可以记为t8-t5,所述第七值可以记为[(t7’-t8’)-(t6’-t5’)]*[(t7-t6)/(t7’-t6’)],所述第六值可以记为t7-t6-[(t7’-t8’)-(t6’-t5’)]*[(t7-t6)/(t7’-t6’)]。例如,所述频率偏差rateratio可以符合以下公式五:For example, when the first difference is greater than the second difference, this scenario can be regarded as a message in the second process of frequency synchronization (that is, the second message and the fourth message). (Text) The second device arrives late, so the second device needs to perform a frequency deviation calculation at a time when the delay difference within the mobile network is equal, that is, the corresponding operation described above is performed. For example, the first value may be recorded as t8-t5, and the seventh value may be recorded as [(t7'-t8 ')-(t6'-t5')] * [(t7-t6) / (t7 ' -t6 ')], the sixth value can be recorded as t7-t6-[(t7'-t8')-(t6'-t5 ')] * [(t7-t6) / (t7'-t6') ]. For example, the frequency deviation ratio may conform to the following formula 5:
Figure PCTCN2019093123-appb-000003
Figure PCTCN2019093123-appb-000003
在一种可选的实施方式中,当所述第一差值等于所述第二差值时,此场景是两次频率同步的报文收发的绝对时延差相等(即移动网络内部的时延差相等)。所述频率偏差可以按照上述公式四计算,也可以按照上述公式五计算。由于第一差值等于第二差值时,两者的差值为零,因此所述频率偏差可以直接通过以下公式六计算:In an optional implementation manner, when the first difference is equal to the second difference, in this scenario, the absolute delay difference between the two frequency-synchronized message sending and receiving is equal (that is, the time difference within the mobile network). Equal delay). The frequency deviation may be calculated according to the above formula 4, or may be calculated according to the above formula 5. Because when the first difference is equal to the second difference, the difference between the two is zero, so the frequency deviation can be directly calculated by the following formula six:
Figure PCTCN2019093123-appb-000004
Figure PCTCN2019093123-appb-000004
采用本申请实施例提供的同步方法,第二设备通过第一设备发起的报文传输时移动网络和以太网络钟报文收发时间,计算第一设备和第二设备之间频率偏差,进而进行频率同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时钟精度需求。By adopting the synchronization method provided in the embodiment of the present application, the second device uses the mobile network and Ethernet clock message transmission and reception time to transmit the message initiated by the first device, calculates the frequency deviation between the first device and the second device, and then performs the frequency. Synchronize. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the clock accuracy requirements of industrial plants.
本申请实施例还提供了另一种同步方法,适用于如图1和图2所示的通信系统。例如,图10中的第一设备为上述UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF。参阅图10所示,该方法的具体流程可以包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 2. For example, the first device in FIG. 10 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF. Referring to FIG. 10, the specific process of the method may include:
步骤1001、第一设备确定第一时间戳信息,所述第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,所述第二时间戳信息为以太网络中的主时钟信息,所述第三时间戳信息为移动网络中的主时钟信息。Step 1001: The first device determines first time stamp information, where the first time stamp information is a difference between a time corresponding to the second time stamp information and a time corresponding to the third time stamp information, and the second time stamp information is Master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network.
在一种可选的实施方式中,所述第一设备会识别到来自以太网络中(例如TSN)的数据包,所述第一设备识别到所述数据包的格式(type)信息为0x88f7,则确定所述数据包为802.1AS同步数据包。然后,所述第一设备执行步骤1001,此时就发起了时钟同步流程。In an optional implementation manner, the first device recognizes a data packet from an Ethernet network (for example, TSN), and the first device recognizes that the format information of the data packet is 0x88f7, It is determined that the data packet is an 802.1AS synchronization data packet. Then, the first device executes step 1001, and a clock synchronization process is initiated at this time.
可选的,所述第二时间戳信息对应的时刻可以记为T2,所述第三时间戳信息对应的时刻可以记为T1,所述第一时间戳信息记为T1-T2。Optionally, the time corresponding to the second time stamp information may be recorded as T2, the time corresponding to the third time stamp information may be recorded as T1, and the first time stamp information is recorded as T1-T2.
在一种可选的实施方式中,所述第一设备中有两层芯片,其中一层芯片识别移动网络的时刻,另一层芯片识别以太网络的时刻,所述第一设备确定所述第一时间戳信息时,具体可以通过两层芯片分别识别到移动网络和以太网络中的主时钟信息,进而确定两者的差值。In an optional implementation manner, the first device has two layers of chips, one of which recognizes the time of the mobile network, and the other layer of chips recognizes the time of the Ethernet network, and the first device determines the first In the case of time stamp information, the master clock information in the mobile network and the Ethernet network can be identified through the two-layer chip, and the difference between the two can be determined.
步骤1002、所述第一设备向接入设备发送第一报文,所述第一报文中携带所述第一时间戳信息。Step 1002: The first device sends a first message to the access device, and the first message carries the first time stamp information.
可选的,所述第一设备向所述接入设备发送所述第一报文时,可以通过同步请求(sync  request)信令携带所述第一时间戳信息。Optionally, when the first device sends the first message to the access device, the first time stamp information may be carried by synchronization request (sync request) signaling.
在一种可选的实施方式中,所述第一报文中携带所述第一时间戳信息,具体实现方式可以为:所述第一设备将所述第一时间戳信息携带在所述第一报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第一报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第一报文中新增加的协议字段。In an optional implementation manner, the first message carries the first time stamp information, and a specific implementation manner may be that the first device carries the first time stamp information in the first time stamp. A message is included in a first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the first message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the first message.
可选的,所述第一协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第一协议字段的详细介绍可以参见步骤701中的相关描述,重复之处此处不再赘述。Optionally, the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the first protocol field, refer to the related description in step 701 and repeat. The details are not repeated here.
步骤1003、所述接入设备基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息。Step 1003: The access device sends a third message to the second device based on the first message, and the third message carries the first time stamp information.
可选的,所述接入设备基于所述第一报文向第二设备发送第三报文,具体方法可以为:所述接入设备当检测到所述第一报文包括的第一协议字段中包括所述第一时间戳信息时,所述接入设备将所述第一时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文,并向所述第二设备发送所述第三报文。Optionally, the access device sends a third message to the second device based on the first message. The specific method may be: when the access device detects the first protocol included in the first message, When the first time stamp information is included in the field, the access device encapsulates the first time stamp information into a second protocol field included in the first message, generates the third message, and Sending the third message to the second device.
例如,所述第一协议字段与步骤1001中的第一协议字段相同,同样可以参见步骤701中的相关描述。所述第二协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第一报文向第二设备发送第三报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第二协议字段与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the first protocol field is the same as the first protocol field in step 1001, and similarly, reference may be made to the related description in step 701. The second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending a third message to the second device based on the first message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the second device based on the first message. The device sends the third packet with the same principle. For related principles, see step 702. The second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
可选的,所述第二设备从所述接入设备接收第三报文之后,所述第二设备提取所述第三报文包括的第二协议字段中携带的所述第一时间戳信息。例如,可以参见步骤702中情况n1、n2、n3,此处不再重复赘述。Optionally, after the second device receives a third message from the access device, the second device extracts the first time stamp information carried in a second protocol field included in the third message . For example, reference may be made to the conditions n1, n2, and n3 in step 702, and details are not repeatedly described herein.
步骤1004、所述第二设备确定第四时间戳信息,所述第四时间戳信息为所述第二设备接收到所述第三报文时移动网络中的时刻。Step 1004: The second device determines fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the second device receives the third message.
在一种可能的示例中,所述第四时间戳信息对应的时刻可以记为T2’。In a possible example, the time corresponding to the fourth timestamp information may be recorded as T2 '.
步骤1005、所述第二设备用所述第四时间戳信息对应的时刻加上所述第一时间戳信息对应的差值,完成时间同步。Step 1005: The second device uses the time corresponding to the fourth timestamp information to add the difference corresponding to the first timestamp information to complete time synchronization.
例如,所述第二设备执行步骤1005的具体过程可以为T2’+T1-T2,即完成了时间同步。For example, the specific process in which the second device executes step 1005 may be T2 '+ T1-T2, that is, time synchronization is completed.
步骤1006、所述第二设备向所述接入设备发送第二报文,所述第二报文用于通知所述第一设备时间同步已完成。Step 1006: The second device sends a second message to the access device, where the second message is used to notify the first device that time synchronization is complete.
步骤1007、所述接入设备向所述第一设备发送所述第二报文。Step 1007: The access device sends the second message to the first device.
其中,上述步骤1006和步骤1007为可选的步骤,在图10中用虚线示出。当所述步骤1006和步骤1007执行后,所述第一设备可以通过识别到时间同步已完成而结束现有的同步流程中第三报文之后的报文的传输,从而可以节省资源消耗。Among them, the above steps 1006 and 1007 are optional steps, which are shown by dashed lines in FIG. 10. After the steps 1006 and 1007 are performed, the first device may end the transmission of the message after the third message in the existing synchronization process by recognizing that time synchronization has been completed, thereby saving resource consumption.
采用本申请实施例提供的同步方法,第一设备确定移动网络和以太网络中的主时钟信息之间的差值,并发送给第二设备,以使第二设备通过主时钟信息的差值直接完成时钟同步。在该方法中,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。With the synchronization method provided in the embodiment of the present application, the first device determines the difference between the master clock information in the mobile network and the Ethernet network, and sends the difference to the second device, so that the second device directly uses the difference in the master clock information. Complete clock synchronization. In this method, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario of the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of the industrial plant.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图2所示的通信系统,用于实现以上图3所示的实施例提供的同步方法。图11示出了所述第一设备的结构。参阅图11所示,第一设备包括:发送单元1101、处理单元1102,以及接收单元1103,其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method. FIG. 11 shows the structure of the first device. Referring to FIG. 11, the first device includes: a sending unit 1101, a processing unit 1102, and a receiving unit 1103, where:
发送单元1101,用于向接入设备发送第一报文,所述第一报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻;The sending unit 1101 is configured to send a first message to the access device, where the first message carries first time stamp information, and the first time stamp information is the first device sending the first message Time in the Ethernet network;
处理单元1102,用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A processing unit 1102, configured to determine second time stamp information, where the second time stamp information is a time in a mobile network when the first device sends the first message;
接收单元1103,用于从所述接入设备接收第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为第二设备接收到所述接入设备基于所述第一报文向所述第二设备发送的第三报文时所述移动网络中的时刻,所述第四时间戳信息为所述第二设备向所述接入设备发送第四报文时所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;A receiving unit 1103 is configured to receive a second message from the access device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is received by the second device. At the time in the mobile network when the access device sends a third message to the second device based on the first message, the fourth time stamp information is the time when the second device sends the message to the second device. The moment in the mobile network when the access device sends a fourth message; the second message is sent by the access device to the first device based on the fourth message;
所述处理单元1102,还用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第一设备接收到所述第二报文时所述以太网络中的时刻,所述第六时间戳信息为所述第一设备接收到所述第二报文时所述移动网络中的时刻;The processing unit 1102 is further configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is in the Ethernet network when the first device receives the second packet. Time, the sixth time stamp information is the time in the mobile network when the first device receives the second message;
所述处理单元1102,还用于根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定第七时间戳信息;The processing unit 1102 is further configured to determine according to the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, and the sixth timestamp information. Seventh time stamp information;
所述发送单元1101,还用于将所述第七时间戳信息通过所述接入设备转发给所述第二设备;The sending unit 1101 is further configured to forward the seventh timestamp information to the second device through the access device;
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述处理单元1102,在根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定所述第七时间戳信息时,具体用于:In an optional implementation manner, the processing unit 1102, in accordance with the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and When the sixth time stamp information determines the seventh time stamp information, it is specifically used to:
根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第六时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the second time stamp information, the third time stamp information, the fourth time stamp information, and the sixth time stamp information Delay difference
计算所述第五时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第七时间戳信息。Calculate the sum of the time corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the seventh time stamp information.
在一种可选的实施方式中,所述处理单元1102,还用于在所述接收单元1103从所述接入设备接收第二报文之后,提取所述第二报文包括的第一协议字段中携带的所述第三时间戳信息和所述第四时间戳信息。In an optional implementation manner, the processing unit 1102 is further configured to extract the first protocol included in the second packet after the receiving unit 1103 receives the second packet from the access device. The third timestamp information and the fourth timestamp information carried in the fields.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In an optional implementation manner, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device The first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图2所示的通信系统,用于实现以上图3所示的实施例提供的同步方法。参阅图12所示,接入设备中包括:接收单元1201和发送单元1202,其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method. Referring to FIG. 12, the access device includes a receiving unit 1201 and a sending unit 1202, where:
接收单元1201,用于从第一设备接收第一报文,所述第一报文中携带第一时间戳信息, 所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻;The receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first timestamp information, and the first timestamp information is the first message sent by the first device. Time in the Ethernet network;
发送单元1202,用于基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息;A sending unit 1202, configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information;
所述接收单元1201,还用于从所述第二设备接收第四报文,所述第四报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻,所述第四时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;The receiving unit 1201 is further configured to receive a fourth message from the second device, where the fourth message carries third time stamp information and fourth time stamp information, and the third time stamp information is The time in the mobile network when the second device receives the third message, and the fourth time stamp information is the time when the second device sends the fourth message to the access device. Moments in mobile networks;
所述发送单元1202,还用于向所述第一设备发送第二报文,所述第二报文中携带所述第三时间戳信息和所述第四时间戳信息;The sending unit 1202 is further configured to send a second message to the first device, where the second message carries the third time stamp information and the fourth time stamp information;
所述接收单元1201,还用于从所述第一设备接收第七时间戳信息;The receiving unit 1201 is further configured to receive seventh timestamp information from the first device;
所述发送单元1202,还用于向所述第二设备发送所述第七时间戳信息;The sending unit 1202 is further configured to send the seventh timestamp information to the second device;
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述接入设备还包括处理单元,用于检测到所述第四报文包括的第二协议字段中携带第三时间戳信息和第四时间戳信息时,将所述第三时间戳信息和所述第四时间戳信息封装到所述第四报文包括的第一协议字段中,生成所述第二报文;所述发送单元1202在向所述第一设备发送第二报文时,具体用于:在所述处理单元当检测到所述第四报文包括的第二协议字段中携带第三时间戳信息和第四时间戳信息时,将所述第三时间戳信息和所述第四时间戳信息封装到所述第四报文包括的第一协议字段中,生成所述第二报文后,向所述第一设备发送所述第二报文。In an optional implementation manner, the access device further includes a processing unit, configured to detect when the second protocol field included in the fourth packet carries third time stamp information and fourth time stamp information. , Encapsulate the third timestamp information and the fourth timestamp information into a first protocol field included in the fourth message to generate the second message; the sending unit 1202 is sending the When the first device sends the second message, it is specifically configured to: when the processing unit detects that the second protocol field included in the fourth message carries third time stamp information and fourth time stamp information, The third timestamp information and the fourth timestamp information are encapsulated into a first protocol field included in the fourth message, and after the second message is generated, the first device sends the first time stamp to the first device. Two messages.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;In an optional implementation manner, when the first device is a user plane network element, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field, and the first protocol field is general GTP field of packet radio service GPRS tunneling protocol;
当所述第一设备为终端设备时,所述第二协议字段为GTP字段,所述第一协议字段为SDAP字段或PDCP字段。When the first device is a terminal device, the second protocol field is a GTP field, and the first protocol field is an SDAP field or a PDCP field.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图2所示的通信系统,用于实现以上图3所示的实施例提供的同步方法。参阅图13所示,第二设备中包括:接收单元1301、处理单元1302和发送单元1303,其中:Based on the above embodiments, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 3 above. method. Referring to FIG. 13, the second device includes a receiving unit 1301, a processing unit 1302, and a sending unit 1303, where:
接收单元1301,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;The receiving unit 1301 is configured to receive a third message from the access device, where the third message carries first time stamp information, and the first time stamp information is in an Ethernet network when the first device sends the first message. Time; the third message is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane A network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element;
处理单元1302,用于确定第三时间戳信息和第八时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻,所述第八时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻;The processing unit 1302 is configured to determine third time stamp information and eighth time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the third message, so The eighth time stamp information is a time in the Ethernet network when the second device receives the third message;
发送单元1303,用于向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息和第四时间戳信息,所述第四时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;A sending unit 1303 is configured to send a fourth message to the access device, where the fourth message carries the third time stamp information and the fourth time stamp information, and the fourth time stamp information is the The time in the mobile network when the second device sends the fourth message to the access device;
所述处理单元1302,还用于确定第九时间戳信息,所述第九时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻;The processing unit 1302 is further configured to determine ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device. ;
所述接收单元1301,还用于从所述接入设备接收第七时间戳信息;The receiving unit 1301 is further configured to receive seventh timestamp information from the access device;
所述处理单元1302,还用于根据所述第一时间戳信息、所述第八时间戳信息、所述第九时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。The processing unit 1302 is further configured to determine the first device and the first device according to the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Time deviation between the second devices, and time synchronization is performed according to the time deviation.
在一种可选的实施方式中,所述处理单元1302,还用于:根据所述第七时间戳信息确定所述第一设备接收到第二报文时所述以太网络中的时刻,所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的。In an optional implementation manner, the processing unit 1302 is further configured to determine, according to the seventh timestamp information, a time in the Ethernet network when the first device receives a second packet, so that The second message is sent by the access device to the first device based on the fourth message.
在一种可选的实施方式中,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息时,所述发送单元1303,具体用于:In an optional implementation manner, when the fourth message carries the third time stamp information and the fourth time stamp information, the sending unit 1303 is specifically configured to:
将所述第三时间戳信息和所述第四时间戳信息携带在所述第四报文包括的第二协议字段中。Carrying the third timestamp information and the fourth timestamp information in a second protocol field included in the fourth message.
在一种可选的实施方式中,当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;In an optional implementation manner, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field;
当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图2所示的通信系统,用于实现以上图7所示的实施例提供的同步方法。参阅图14所示,第一设备中包括:发送单元1401和接收单元1402,其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method. Referring to FIG. 14, the first device includes: a sending unit 1401 and a receiving unit 1402, where:
发送单元1401,用于向接入设备发送第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;The sending unit 1401 is configured to send a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message;
接收单元1402,用于从所述接入设备接收第二报文,并确定第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;The receiving unit 1402 is configured to receive a second message from the access device, and determine third time stamp information and fourth time stamp information, where the third time stamp information is the first device receiving the first time stamp. The time when the two messages are in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device receives the second message;
所述发送单元1401,还用于将所述第三时间戳信息和所述第四时间戳信息发送给所述接入设备,所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息用于时间同步;The sending unit 1401 is further configured to send the third time stamp information and the fourth time stamp information to the access device. The first time stamp information, the second time stamp information, the The third time stamp information and the fourth time stamp information are used for time synchronization;
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述第一报文中携带所述第二时间戳信息时,所述发送单元1401,具体用于:将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。In an optional implementation manner, when the first message carries the second time stamp information, the sending unit 1401 is specifically configured to carry the second time stamp information in the first message. A message is included in a first protocol field.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。In an optional implementation manner, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device The first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或 图2所示的通信系统,用于实现以上图7所示的实施例提供的同步方法。同样可以参阅图12所示,接入设备中包括:接收单元1201和发送单元1202,其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method. See also FIG. 12. The access device includes: a receiving unit 1201 and a sending unit 1202, where:
接收单元1201,用于从第一设备接收第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message;
发送单元1202,用于基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息和所述第二时间戳信息;A sending unit 1202, configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information and the second time stamp information;
所述接收单元1201,还用于从所述第二设备接收第四报文,并基于所述第四报文向所述第一设备发送第二报文;The receiving unit 1201 is further configured to receive a fourth message from the second device, and send a second message to the first device based on the fourth message;
所述接收单元1201,还用于从所述第一设备接收第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;The receiving unit 1201 is further configured to receive third time stamp information and fourth time stamp information from the first device, where the third time stamp information is when the first device receives the second message. The time in the Ethernet network, the fourth time stamp information is the time in the mobile network when the first device received the second message;
所述发送单元1202,还用于将所述第三时间戳信息和所述第四时间戳信息发送给所述第二设备,所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息用于时间同步;The sending unit 1202 is further configured to send the third timestamp information and the fourth timestamp information to the second device. The first timestamp information, the second timestamp information, all The third time stamp information and the fourth time stamp information are used for time synchronization;
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述接入设备还包括处理单元,用于当检测到所述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文;所述发送单元1202,在基于所述第一报文向所述第二设备发送所述第三报文时,具体用于:在所述处理单元当检测到所述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文后,向所述第二设备发送所述第三报文。In an optional implementation manner, the access device further includes a processing unit, configured to detect that the first protocol field included in the first packet includes the second time stamp information, and The access device encapsulates the second timestamp information into a second protocol field included in the first message, and generates the third message. The sending unit 1202, based on the first message direction, When the second device sends the third message, the second device is specifically configured to: when the processing unit detects that the second protocol time stamp information is included in a first protocol field included in the first message, The access device encapsulates the second time stamp information into a second protocol field included in the first message, and generates the third message, and then sends the third message to the second device. .
在一种可选的实施方式中,当所述第一设备为用户面网元,所述第二设备为终端设备时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第一设备为终端设备,所述第二设备为用户面网元时,所述第一协议字段为SDAP字段或PDCP字段,所述第二协议字段为GTP字段。In an optional implementation manner, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and The second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field. When the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or A PDCP field, and the second protocol field is a GTP field.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图2所示的通信系统,用于实现以上图7所示的实施例提供的同步方法。同样可以参阅图13所示,第二设备中包括:接收单元1301、处理单元1302和发送单元1303,其中:Based on the above embodiments, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 7 above. method. Similarly, referring to FIG. 13, the second device includes a receiving unit 1301, a processing unit 1302, and a sending unit 1303, where:
接收单元1301,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;The receiving unit 1301 is configured to receive a third message from the access device, where the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is sent by the first device to the first device. The message is the time in the Ethernet network; the second time stamp information is the time in the mobile network when the first device sends the first message; the third message is the time when the access device is The first device sends the first message based on the first message after receiving the first message; wherein the first device is a user plane network element and the second device is a terminal device; or A device is a terminal device and the second device is a user plane network element;
处理单元1302,用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为 所述第二设备接收到所述第三报文时所述以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻;The processing unit 1302 is configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is a time in the Ethernet network when the second device receives the third packet, so that The sixth time stamp information is a time in the mobile network when the second device receives the third message;
发送单元1303,用于向所述接入设备发送第四报文,并确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻,所述第八时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;A sending unit 1303 is configured to send a fourth message to the access device, and determine seventh time stamp information and eighth time stamp information, where the seventh time stamp information is the second device accessing the access device. The time in the Ethernet network when the device sends the fourth message, and the eighth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device time;
所述接收单元1301,还用于从所述接入设备接收第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;The receiving unit 1301 is further configured to receive third timestamp information and fourth timestamp information from the access device, where the third timestamp information is at the time when the first device receives the second message. The time in the Ethernet network, the fourth time stamp information is the time in the mobile network when the first device received the second message; the second message is the access device Sent to the first device based on the fourth message;
所述处理单元1302,还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。The processing unit 1302 is further configured to: according to the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, the third time stamp information, The fourth timestamp information, the fifth timestamp information, and the seventh timestamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation .
在一种可选的实施方式中,所述处理单元1302,在根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差时,具体用于:In an optional implementation manner, the processing unit 1302, in accordance with the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, When the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, Specifically used for:
根据所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息和所述第四时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the second time stamp information, the sixth time stamp information, the eighth time stamp information, and the fourth time stamp information Delay difference
根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差。Determining the first device and the first device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and the round-trip transmission delay difference value Time deviation between the second devices.
在一种可选的实施方式中,所述处理单元1302,在根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差时,具体用于:In an optional implementation manner, the processing unit 1302, in accordance with the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and When the round-trip transmission delay difference determines a time deviation between the first device and the second device, it is specifically used to:
确定第九时间戳信息,所述第九时间戳信息为所述第三时间戳信息对应的时刻与所述往返传输时延差值的和;Determining ninth time stamp information, where the ninth time stamp information is a sum of a time corresponding to the third time stamp information and the round-trip transmission delay difference value;
根据所述第一时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。Determining a time offset between the first device and the second device according to the first time stamp information, the fifth time stamp information, the seventh time stamp information, and the ninth time stamp information.
在一种可选的实施方式中,所述处理单元1302,还用于:在所述接收单元1301从接入设备接收第三报文之后,提取所述第三报文包括的第二协议字段中携带的所述第二时间戳信息。In an optional implementation manner, the processing unit 1302 is further configured to: after the receiving unit 1301 receives a third message from the access device, extract a second protocol field included in the third message The second timestamp information carried in.
在一种可选的实施方式中,当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。In an optional implementation manner, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network The second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图2所示的通信系统,用于实现以上图8所示的实施例提供的同步方法。参阅图15所示,第一设备中包括:发送单元1501和处理单元1502,其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method. Referring to FIG. 15, the first device includes: a sending unit 1501 and a processing unit 1502, where:
发送单元1501,用于向接入设备发送第一报文,所述第一报文中携带第一时间戳信息 和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;The sending unit 1501 is configured to send a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message;
所述发送单元1501,还用于向接入设备发送第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备发送所述第二报文时以太网络中的时刻,所述第四时间戳信息为所述第一设备发送所述第二报文时移动网络中的时刻;The sending unit 1501 is further configured to send a second message to the access device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is the first time stamp information. The time in the Ethernet network when a device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message;
处理单元1502,用于控制所述发送单元1501发送数据;A processing unit 1502, configured to control the sending unit 1501 to send data;
其中,所述第一设备为用户面网元且第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述第一报文中携带所述第二时间戳信息时,所述发送单元1501,具体用于:将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。In an optional implementation manner, when the first message carries the second time stamp information, the sending unit 1501 is specifically configured to carry the second time stamp information in the first message. A message is included in a first protocol field.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In an optional implementation manner, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device The first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
在一种可选的实施方式中,所述第二报文中携带所述第四时间戳信息时,所述发送单元1501具体用于:将所述第四时间戳信息携带在所述第二报文包括的第二协议字段中。In an optional implementation manner, when the fourth message carries the fourth timestamp information, the sending unit 1501 is specifically configured to carry the fourth timestamp information on the second The message includes a second protocol field.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段;当所述第一设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In an optional implementation manner, when the first device is a user plane network element, the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device The second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图2所示的通信系统,用于实现以上图8所示的实施例提供的同步方法。同样可以参阅图12所示,接入设备中包括:接收单元1201和发送单元1202,其中:Based on the above embodiment, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method. See also FIG. 12. The access device includes: a receiving unit 1201 and a sending unit 1202, where:
接收单元1201,用于从第一设备接收第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is sent by the first device The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message;
发送单元1202,用于基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息和所述第二时间戳信息;A sending unit 1202, configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information and the second time stamp information;
所述接收单元1201,还用于从所述第一设备接收第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备发送所述第二报文时以太网络中的时刻,所述第四时间戳信息为所述第一设备发送所述第二报文时移动网络中的时刻;The receiving unit 1201 is further configured to receive a second message from the first device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is The time in the Ethernet network when the first device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message;
所述发送单元1202,还用于基于所述第二报文向所述第二设备发送第四报文,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息;The sending unit 1202 is further configured to send a fourth message to the second device based on the second message, where the fourth message carries the third time stamp information and the fourth time stamp information;
其中,所述第一设备为用户面网元且第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述接入设备还包括处理单元,用于当检测到所述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第三协议字段中,生成所述第三报文;所述发送单元1202,在基于所述第一报文向第二设备发送第三报文时,具体用于:在所述处理单元当检测到所 述第一报文包括的第一协议字段中包括所述第二时间戳信息时,所述接入设备将所述第二时间戳信息封装到所述第一报文包括的第三协议字段中,生成所述第三报文之后,向所述第二设备发送所述第三报文。In an optional implementation manner, the access device further includes a processing unit, configured to detect that the first protocol field included in the first packet includes the second time stamp information, and The access device encapsulates the second timestamp information into a third protocol field included in the first message, and generates the third message. The sending unit 1202, based on the first message direction, When the second device sends the third message, the second device is specifically configured to: when the processing unit detects that the second protocol timestamp information is included in the first protocol field included in the first message, the access device Encapsulate the second time stamp information into a third protocol field included in the first message, and generate the third message, and then send the third message to the second device.
在一种可选的实施方式中,当所述第一设备为用户面网元且所述第二设备为终端设备时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,所述第三协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第一设备为终端设备且所述第二设备为用户面网元时,所述第一协议字段为SDAP字段或PDCP字段,所述第三协议字段为GTP字段。In an optional implementation manner, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and The third protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or A PDCP field, and the third protocol field is a GTP field.
在一种可选的实施方式中,所述接入设备还包括处理单元,用于当检测到所述第二报文包括的第二协议字段中包括所述第四时间戳信息时,所述接入设备将所述第四时间戳信息封装到所述第二报文的第四协议字段中,生成所述第四报文;所述发送单元1202,在基于所述第二报文向第二设备发送第四报文时,具体用于:在所述处理单元当检测到所述第二报文包括的第二协议字段中包括所述第四时间戳信息时,所述接入设备将所述第四时间戳信息封装到所述第二报文的第四协议字段中,生成所述第四报文之后,向所述第二设备发送所述第四报文。In an optional implementation manner, the access device further includes a processing unit, configured to detect that the second protocol field included in the second packet includes the fourth time stamp information, and The access device encapsulates the fourth timestamp information into a fourth protocol field of the second message to generate the fourth message; and the sending unit 1202, based on the second message, sends the When the two devices send the fourth message, the second device is specifically configured to: when the processing unit detects that the fourth time stamp information is included in a second protocol field included in the second message, the access device sends The fourth time stamp information is encapsulated into a fourth protocol field of the second message, and after the fourth message is generated, the fourth message is sent to the second device.
在一种可选的实施方式中,当所述第一设备为用户面网元且所述第二设备为终端设备时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段,所述第四协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第一设备为终端设备且所述第二设备为用户面网元时,所述第二协议字段为SDAP字段或PDCP字段,所述第四协议字段为GTP字段。In an optional implementation manner, when the first device is a user plane network element and the second device is a terminal device, the second protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and The fourth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the second protocol field is an SDAP field or A PDCP field, and the fourth protocol field is a GTP field.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图2所示的通信系统,用于实现以上图8所示的实施例提供的同步方法。参阅图16所示,第二设备中包括:接收单元1601和处理单元1602,其中:Based on the above embodiments, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 8 above. method. Referring to FIG. 16, the second device includes a receiving unit 1601 and a processing unit 1602, where:
接收单元1601,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息和所述第二时间戳信息,所述第一时间戳信息为第一设备向所述接入设备发送第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备向所述接入设备发送所述第一报文时移动网络中的时刻;其中所述第三报文为所述接入设备基于所述第一报文向所述第二设备发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;The receiving unit 1601 is configured to receive a third message from the access device, where the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is sent by the first device to The time in the Ethernet network when the access device sends the first message, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device; The third message is sent by the access device to the second device based on the first message; wherein the first device is a user plane network element and the second device is a terminal device Or, the first device is a terminal device and the second device is a user plane network element;
处理单元1602,用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时移动网络中的时刻;The processing unit 1602 is configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is a time in the Ethernet network when the second device receives the third packet, and the first The six timestamp information is the time in the mobile network when the second device receives the third message;
接收单元1601,用于从接入设备接收第四报文,所述第四报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备向所述接入设备发送第二报文时以太网络中的时刻,所述第四时间戳信息为所述第一设备向所述接入设备发送所述第二报文时移动网络中的时刻;其中所述第四报文为所述接入设备基于所述第二报文向所述第二设备发送的;The receiving unit 1601 is configured to receive a fourth message from the access device, where the fourth message carries third timestamp information and fourth timestamp information, and the third timestamp information is sent by the first device to The time in the Ethernet network when the access device sends the second message, and the fourth time stamp information is the time in the mobile network when the first device sends the second message to the access device; The fourth message is sent by the access device to the second device based on the second message;
所述处理单元1602,还用于确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻,所述第八时间戳信息为所 述第二设备接收到所述第四报文时移动网络中的时刻;The processing unit 1602 is further configured to determine seventh time stamp information and eighth time stamp information, where the seventh time stamp information is a time in the Ethernet network when the second device receives the fourth packet, The eighth time stamp information is a time in the mobile network when the second device receives the fourth message;
所述处理单元1602,还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息和所述第八时间戳信息确定所述第一设备和所述第二设备之间的频率偏差,并根据所述频率偏差进行频率同步。The processing unit 1602 is further configured to: according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, and perform frequency synchronization according to the frequency deviation .
在一种可选的实施方式中,所述处理单元1602,在根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息和所述第八时间戳信息确定所述第一设备和所述第二设备之间的频率偏差时,具体用于:In an optional implementation manner, the processing unit 1602, in accordance with the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, When the fifth time stamp information, the sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a frequency deviation between the first device and the second device, Specifically used for:
确定所述第六时间戳信息对应的时刻与所述第二时间戳信息对应的时刻的第一差值,以及确定所述第八时间戳信息对应的时刻与所述第四时间戳信息对应的时刻的第二差值;Determining a first difference between a time corresponding to the sixth time stamp information and a time corresponding to the second time stamp information, and determining a time corresponding to the eighth time stamp information and the fourth time stamp information The second difference in time;
根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第一差值和所述第二差值确定所述第一设备和所述第二设备之间的频率偏差。Determining the first time stamp information according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the first difference value and the second difference value. A frequency deviation between a device and the second device.
在一种可选的实施方式中,所述处理单元1602,在根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第一差值和所述第二差值确定所述第一设备和所述第二设备之间的频率偏差时,具体用于:In an optional implementation manner, the processing unit 1602, in accordance with the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, When the first difference value and the second difference value determine a frequency deviation between the first device and the second device, the method is specifically configured to:
判断所述第一差值与所述第二差值的大小关系;Determine the magnitude relationship between the first difference and the second difference;
当判定所述第二差值小于所述第一差值时,确定所述频率偏差为第一值与第二值的商,所述第一值为所述第三时间戳信息对应的时刻与所述第一时间戳信息对应的时刻的差值,所述第二值为所述第七时间戳信息对应的时刻与所述第五时间戳信息对应的时刻的差值加上第三值所得的值,所述第三值为第四值与第五值的乘积值,所述第四值为所述第一差值减去所述第二差值所得的值,所述第五值为所述第七时间戳信息对应的时刻与所述第五时间戳对应的时刻的差值除以所述第八时间戳信息对应的时刻与所述第六时间戳对应的时刻的差值所得的值;When it is determined that the second difference value is smaller than the first difference value, it is determined that the frequency deviation is a quotient of the first value and a second value, and the first value is a time instant corresponding to the third time stamp information and A difference between the times corresponding to the first timestamp information, and the second value is obtained by adding a third value to the difference between the times corresponding to the seventh timestamp information and the times corresponding to the fifth timestamp information The third value is a product of a fourth value and a fifth value, the fourth value is a value obtained by subtracting the second difference from the first difference, and the fifth value is A difference between the time corresponding to the seventh timestamp information and the time corresponding to the fifth timestamp divided by the difference between the time corresponding to the eighth time stamp information and the time corresponding to the sixth timestamp value;
当判定所述第二差值大于所述第一差值时,确定所述频率偏差为所述第一值与第六值的商,所述第六值为所述第七时间戳信息对应的时刻与所述第五时间戳信息对应的时刻的差值减去第七值所得的值,所述第七值为第八值与所述第五值的乘积值,所述第八值为所述第二差值减去所述第一差值所得的值。When it is determined that the second difference value is greater than the first difference value, it is determined that the frequency deviation is a quotient of the first value and a sixth value, and the sixth value is a value corresponding to the seventh time stamp information. A value obtained by subtracting a seventh value from a time difference corresponding to the fifth time stamp information, the seventh value being a product of an eighth value and the fifth value, and the eighth value being A value obtained by subtracting the first difference from the second difference.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图2所示的通信系统,用于实现图10所示的实施例提供的同步方法。参阅图17所示,第一设备中包括:处理单元1701和发送单元1702,其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided in the embodiment shown in FIG. 10 . Referring to FIG. 17, the first device includes a processing unit 1701 and a sending unit 1702, where:
处理单元1701,用于确定第一时间戳信息,所述第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,所述第二时间戳信息为以太网络中的主时钟信息,所述第三时间戳信息为移动网络中的主时钟信息;The processing unit 1701 is configured to determine first time stamp information, where the first time stamp information is a difference between a time corresponding to the second time stamp information and a time corresponding to the third time stamp information, and the second time stamp information is Master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network;
发送单元1702,用于向接入设备发送第一报文,所述第一报文中携带所述第一时间戳信息;A sending unit 1702, configured to send a first message to the access device, where the first message carries the first time stamp information;
其中,所述第一设备为用户面网元且第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述第一报文中携带所述第一时间戳信息时,所述发送单元1702具体用于:将所述第一时间戳信息携带在所述第一报文包括的第一协议字段中。In an optional implementation manner, when the first message carries the first timestamp information, the sending unit 1702 is specifically configured to carry the first timestamp information in the first message. The message includes the first protocol field.
在一种可选的实施方式中,当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。In an optional implementation manner, when the first device is a user plane network element, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; when the first device is a terminal device The first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
在一种可选的实施方式中,所述第一设备还包括接收单元,用于从所述接入设备接收第二报文,所述第二报文用于通知所述第一设备时间同步已完成。In an optional implementation manner, the first device further includes a receiving unit, configured to receive a second message from the access device, and the second message is used to notify the first device of time synchronization. completed.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图2所示的通信系统,用于实现图10所示的实施例提供的同步方法。同样可以参阅图12所示,接入设备中包括:接收单元1201和发送单元1202,其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided by the embodiment shown in FIG. 10 . See also FIG. 12. The access device includes: a receiving unit 1201 and a sending unit 1202, where:
接收单元1201,用于从第一设备接收第一报文,所述第一报文中携带第一时间戳信息,所述第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值,所述第二时间戳信息为以太网络中的主时钟信息,所述第三时间戳信息为移动网络中的主时钟信息;The receiving unit 1201 is configured to receive a first message from a first device, where the first message carries first time stamp information, and the first time stamp information is a time corresponding to the second time stamp information and a third time. A time difference corresponding to the stamp information, the second time stamp information is master clock information in an Ethernet network, and the third time stamp information is master clock information in a mobile network;
发送单元1202,用于基于所述第一报文向第二设备发送第三报文,所述第三报文中携带所述第一时间戳信息;A sending unit 1202, configured to send a third message to the second device based on the first message, where the third message carries the first time stamp information;
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述接入设备还包括处理单元,用于当检测到所述第一报文包括的第一协议字段中包括所述第一时间戳信息时,所述接入设备将所述第一时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文;所述发送单元1202,在基于所述第一报文向第二设备发送第三报文时,具体用于:在所述处理单元当检测到所述第一报文包括的第一协议字段中包括所述第一时间戳信息时,所述接入设备将所述第一时间戳信息封装到所述第一报文包括的第二协议字段中,生成所述第三报文之后,向所述第二设备发送所述第三报文。In an optional implementation manner, the access device further includes a processing unit, configured to detect that, when the first protocol field included in the first packet includes the first time stamp information, the The access device encapsulates the first timestamp information into a second protocol field included in the first message, and generates the third message. The sending unit 1202, based on the first message direction, When the second device sends the third message, it is specifically configured to: when the processing unit detects that the first time stamp information is included in the first protocol field included in the first message, the access device Encapsulate the first time stamp information into a second protocol field included in the first message, and generate the third message, and then send the third message to the second device.
在一种可选的实施方式中,当所述第一设备为用户面网元且所述第二设备为终端设备时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第一设备为终端设备且所述第二设备为用户面网元时,所述第一协议字段为SDAP字段或PDCP字段,所述第二协议字段为GTP字段。In an optional implementation manner, when the first device is a user plane network element and the second device is a terminal device, the first protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field, and The second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the first device is a terminal device and the second device is a user plane network element, the first protocol field is an SDAP field or A PDCP field, and the second protocol field is a GTP field.
在一种可选的实施方式中,所述接收单元1201还用于从所述第二设备接收第二报文,所述发送单元1202还用于将所述第二报文转发给所述第一设备,所述第二报文用于通知所述第一设备时间同步已完成。In an optional implementation manner, the receiving unit 1201 is further configured to receive a second message from the second device, and the sending unit 1202 is further configured to forward the second message to the first device. A device, the second message is used to notify the first device that time synchronization is completed.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图2所示的通信系统,用于实现图10所示的实施例提供的同步方法。参阅图16所示,第二设备中包括:接收单元1601和处理单元1602,其中:Based on the above embodiments, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method provided by the embodiment shown in FIG. 10 . Referring to FIG. 16, the second device includes a receiving unit 1601 and a processing unit 1602, where:
接收单元1601,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息,所述第一时间戳信息为第二时间戳信息对应的时刻和第三时间戳信息对应的时刻的差值, 所述第二时间戳信息为以太网络中的主时钟信息,所述第三时间戳信息为移动网络中的主时钟信息;所述第三报文为所述接入设备基于第一报文发送的,所述第一报文为第一设备向所述接入设备发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;The receiving unit 1601 is configured to receive a third message from the access device, where the third message carries first time stamp information, and the first time stamp information is a time corresponding to the second time stamp information and a third time. A time difference corresponding to the stamp information, the second time stamp information is master clock information in an Ethernet network, the third time stamp information is master clock information in a mobile network, and the third message is the Sent by the access device based on a first message sent by the first device to the access device; wherein the first device is a user plane network element and the second device is a terminal Device, or the first device is a terminal device and the second device is a user plane network element;
处理单元1602,用于确定第四时间戳信息,所述第四时间戳信息为所述第二设备接收到所述第三报文时移动网络中的时刻;A processing unit 1602, configured to determine fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the second device receives the third message;
所述处理单元1602,还用于用所述第四时间戳信息对应的时刻加上所述第一时间戳信息对应的差值,完成时间同步。The processing unit 1602 is further configured to use the time corresponding to the fourth timestamp information to add a difference corresponding to the first timestamp information to complete time synchronization.
在一种可选的实施方式中,所述处理单元1602,还用于:在所述接收单元1601从所述接入设备接收第三报文之后,提取所述第三报文包括的第二协议字段中携带的所述第一时间戳信息。In an optional implementation manner, the processing unit 1602 is further configured to: after the receiving unit 1601 receives a third message from the access device, extract a second message included in the third message The first time stamp information carried in the protocol field.
在一种可选的实施方式中,当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。In an optional implementation manner, when the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; when the second device is a user plane network The second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
在一种可选的实施方式中,所述第二设备还包括发送单元,用于向所述接入设备发送第二报文,所述第二报文用于通知所述第一设备时间同步已完成。In an optional implementation manner, the second device further includes a sending unit, configured to send a second message to the access device, and the second message is used to notify the first device of time synchronization. completed.
需要说明的是,本申请实施例中对单元的划分是示意性的,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式。在本申请的实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。It should be noted that the division of the units in the embodiments of the present application is schematic, and is only a logical function division. In actual implementation, there may be another division manner. The functional units in the embodiments of the present application may be integrated into one processing unit, or each of the units may exist separately physically, or two or more units may be integrated into one unit. The above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(read-only memory,ROM)、随机存取存储器(random access memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially a part that contributes to the existing technology or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium , Including a number of instructions for causing a computer device (which may be a personal computer, a server, or a network device) or a processor to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage media include: U disks, mobile hard disks, read-only memories (ROM), random access memories (RAM), magnetic disks or optical disks, and other media that can store program codes .
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图2所示的通信系统,用于实现如图3所示的同步方法。参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3. Referring to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是中央处理器(central processing unit,CPU),网络处理器(network processor,NP)或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是专用集成电路(application-specific integrated circuit,ASIC),可编程逻辑器件(programmable logic device,PLD)或其组合。上述PLD可以是复杂可编程逻辑器件(complex programmable logic device,CPLD),现场可编程逻辑门阵列(field-programmable gate array,FPGA),通用阵列逻辑(generic array logic,GAL)或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执 行相应的软件实现。The processor 1802 may be a central processing unit (CPU), a network processor (NP), a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The above hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, or of course, by executing corresponding software by hardware.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图3所示的同步方法,具体可以参见上述图3所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如图3所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 3.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1或图2所示的通信系统,用于实现如图3所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图3所示的同步方法,具体可以参见上述图3所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图3所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 3.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图3所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 3. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the functions described above, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图3所示的同步方法,具体可以参见上述图3所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 3. For details, refer to the related description in the embodiment shown in FIG. 3, and details are not described herein again.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图3所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 3.
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图2所示的通信系统,用于实现如图7所示的同步方法。同样可以参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device, where the first device is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 7. Referring also to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是CPU,NP或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图7所示的同步方法,具体可以参见上述图7所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 7. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如图7所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1或图2所示的通信系统,用于实现如图7所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 and is used to implement the synchronization method shown in FIG. 7. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图7所示的同步方法,具体可以参见上述图7所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 7. For details, refer to related descriptions in the embodiment shown in FIG. 7, and details are not described herein again.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图7所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图7所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 7. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the above functions, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图7所示的同步方法,具体可以参见上述图7所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 7. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图7所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 7.
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图2所示的通信系统,用于实现如图8所示的同步方法。同样可以参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8. Referring also to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是CPU,NP或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, or of course, by executing corresponding software by hardware.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图8所示的同步方法,具体可以参见上述图8所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如图8所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 8.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1或图2所示的通信系统,用于实现如图8所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图8所示的同步方法,具体可以参见上述图8所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图8所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 8.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图8所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 8. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the functions described above, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图8所示的同步方法,具体可以参见上述图8所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 8. For details, refer to the related description in the embodiment shown in FIG. 8, and details are not described herein again.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图8所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 8.
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图2所示的通信系统,用于实现如图10所示的同步方法。同样可以参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device, where the first device is applied to the communication system shown in FIG. 1 or FIG. 2 and is used to implement the synchronization method shown in FIG. Referring also to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是CPU,NP或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图10所示的同步方法,具体可以参见上述图10所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如图10所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 10.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1或图2所示的通信系统,用于实现如图10所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 10. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图10所示的同步方法,具体可以参见上述图10所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图10所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 10.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图10所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 10. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the above functions, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图10所示的同步方法,具体可以参见上述图10所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 10. For details, refer to the related description in the embodiment shown in FIG. 10, and details are not described herein again.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图10所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 10.
本申请实施例还提供了另一种同步方法,同样适用于如图1和图2所示的通信系统。例如,图21中的第一设备为上述UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF。参阅图21所示,该方法的具体流程包括:The embodiment of the present application also provides another synchronization method, which is also applicable to the communication system shown in FIG. 1 and FIG. 2. For example, the first device in FIG. 21 is the above-mentioned UPF and the second device is a UE, or the first device is a UE and the second device is a UPF. Referring to FIG. 21, the specific process of the method includes:
步骤2101、第一设备向接入设备发送第一报文,并确定第一时间戳信息和第二时间戳信息;所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述 第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻。Step 2101: The first device sends a first message to the access device, and determines first time stamp information and second time stamp information; the first time stamp information is the first device sending the first message Time in the Ethernet network, the second time stamp information is the time in the mobile network when the first device sends the first message.
其中,所述第一设备发起时钟同步流程的触发条件,与图3所示的实施例中步骤301中描述的原理相同,可以相互参见此处不再赘述。The trigger condition for the clock synchronization process initiated by the first device is the same as the principle described in step 301 in the embodiment shown in FIG.
例如,图22示出了第一设备和第二设备之间进行同步的过程中报文的收发示意图。其中,图22中实线指示报文在以太网络中的传输情况,虚线指示报文在移动网络中的传输情况;应理解,图22中同向平行的实线和虚线指示是同一个报文的传输。For example, FIG. 22 shows a schematic diagram of sending and receiving messages during synchronization between the first device and the second device. Among them, the solid line in FIG. 22 indicates the transmission of the message in the Ethernet network, and the dotted line indicates the transmission of the message in the mobile network. It should be understood that the solid line and the dotted line in FIG. 22 indicate the same message Transmission.
例如,步骤2101中的所述第一时间戳信息对应的时刻在图22中记为t9,所述第二时间戳信息对应的时刻在图22中记为t9’。For example, the time corresponding to the first time stamp information in step 2101 is recorded as t9 in FIG. 22, and the time corresponding to the second time stamp information is recorded as t9 'in FIG.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。也就是说,所述用户面网元和所述终端设备中任一个都可以是主时钟节点,而另一个需要进行时钟同步。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element. That is, either the user plane network element or the terminal device may be a master clock node, and the other needs to perform clock synchronization.
步骤2102、所述接入设备向第二设备转发所述第一报文。Step 2102: The access device forwards the first message to a second device.
步骤2103、所述第二设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第一报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第一报文时移动网络中的时刻。Step 2103: The second device determines fifth time stamp information and sixth time stamp information. The fifth time stamp information is a time in the Ethernet network when the second device receives the first packet. The sixth time stamp information is a time in the mobile network when the second device receives the first message.
例如,在图22中,所述第五时间戳信息对应的时刻记为t10,所述第六时间戳信息对应的时刻记为t10’。For example, in FIG. 22, the time corresponding to the fifth time stamp information is denoted as t10, and the time corresponding to the sixth time stamp information is denoted as t10 '.
步骤2104、所述第一设备向所述接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息和所述第二时间戳信息。Step 2104: The first device sends a second message to the access device, and the second message carries the first time stamp information and the second time stamp information.
可选的,所述第二报文中还可以携带标示(flag),所述flag用于指示所述第二报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the second message, and the flag is used to indicate that the second message carries time stamp information indicating a time in the mobile network.
在一种可选的实施方式中,所述第二报文中携带所述第二时间戳信息具体实现方式可以为:所述第一设备将所述第二时间戳信息携带在所述第二报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第二报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第二报文中新增加的协议字段。可选的,当所述第二报文中还携带flag时,所述flag也可以携带在所述第一协议字段中。In an optional implementation manner, the second message carrying the second timestamp information may be specifically implemented as follows: the first device carries the second timestamp information in the second message. The message includes the first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the second message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the second message. Optionally, when the second packet also carries a flag, the flag may also be carried in the first protocol field.
可选的,所述第一协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第一协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the first protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
步骤2105、所述接入设备基于所述第二报文向所述第二设备发送第六报文,所述第六报文中携带所述第一时间戳信息和所述第二时间戳信息。Step 2105: The access device sends a sixth message to the second device based on the second message, and the sixth message carries the first time stamp information and the second time stamp information. .
在一种可选的实施方式中,所述接入设备基于所述第二报文向所述第二设备发送第六报文具体方法可以为:所述接入设备当检测到所述第二报文包括的第一协议字段中携带所述第二时间戳信息时,将所述第二时间戳信息封装到所述第二报文的第二协议字段中,生成所述第六报文,并向所述第二设备发送所述第六报文。此时,所述第六报文的第二协议字段中携带所述第二时间戳信息。In an optional implementation manner, the specific method for the access device to send a sixth message to the second device based on the second message may be: when the access device detects the second message When the first protocol field included in the message carries the second time stamp information, encapsulating the second time stamp information into the second protocol field of the second message to generate the sixth message, And sending the sixth message to the second device. At this time, the second protocol field of the sixth message carries the second time stamp information.
例如,所述第一协议字段与步骤2104中的第一协议字段相同,同样可以参见步骤701中的相关描述。所述第二协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第二报文向所述第二设备发送第六报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送 第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第二协议字段可以与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the first protocol field is the same as the first protocol field in step 2104, and similarly, reference may be made to the related description in step 701. The second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending a sixth message to the second device based on the second message is the same as that in step 702 in the embodiment shown in FIG. 7 by the access device to the first device. The principle that the second device sends the third packet is the same. For related principles, see step 702. The second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
在一种可选的实施方式中,所述第二设备从所述接入设备接收第六报文之后,提取所述第六报文包括的第二协议字段中携带的所述第二时间戳信息。例如,具体方法可以参见步骤702中情况n1、n2、n3,此处不再重复赘述。In an optional implementation manner, after the second device receives the sixth message from the access device, the second device extracts the second timestamp carried in a second protocol field included in the sixth message. information. For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
步骤2106、所述第二设备向所述接入设备发送第三报文,并确定第七时间戳信息,所述第七时间戳信息为所述第二设备发送所述第三报文时以太网络中的时刻。Step 2106: The second device sends a third message to the access device, and determines seventh time stamp information, where the seventh time stamp information is Ethernet when the second device sends the third message. Moments in the network.
例如,在图22中,所述第七时间戳信息对应的时刻记为t11。For example, in FIG. 22, the time corresponding to the seventh timestamp information is recorded as t11.
步骤2107、所述接入设备向所述第一设备转发所述第三报文。Step 2107: The access device forwards the third message to the first device.
步骤2108、所述第一设备确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第三报文时以太网络中的时刻。Step 2108: The first device determines third time stamp information, where the third time stamp information is a time in the Ethernet network when the first device receives the third message.
例如,在图22中,所述第三时间戳信息对应的时刻记为t12。For example, in FIG. 22, the time corresponding to the third time stamp information is recorded as t12.
步骤2109、所述第一设备向所述接入设备发送第四报文,并确定第四时间戳信息;所述第四时间戳信息为所述第一设备发送所述第四报文时以太网络中的时刻,所述第四报文中携带所述第三时间戳信息。Step 2109: The first device sends a fourth message to the access device, and determines fourth timestamp information; the fourth timestamp information is Ethernet when the first device sends the fourth message. At the time in the network, the fourth message carries the third time stamp information.
例如,在图22中,所述第四时间戳信息对应的时刻记为t13。For example, in FIG. 22, the time corresponding to the fourth time stamp information is denoted as t13.
步骤2110、所述接入设备向所述第二设备转发所述第四报文。Step 2110: The access device forwards the fourth message to the second device.
步骤2111、所述第二设备确定第八时间戳信息,所述第八时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻。Step 2111: The second device determines eighth time stamp information, where the eighth time stamp information is a time in the Ethernet network when the second device receives the fourth message.
例如,在图22中,所述第八时间戳信息对应的时刻记为t14。For example, in FIG. 22, the time corresponding to the eighth time stamp information is denoted as t14.
步骤2112、所述第一设备向所述接入设备发送第五报文,所述第五报文中携带所述第四时间戳信息。Step 2112: The first device sends a fifth message to the access device, and the fifth message carries the fourth time stamp information.
步骤2113、所述接入设备向所述第二设备转发所述第五报文。Step 2113: The access device forwards the fifth message to the second device.
步骤2114、所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。Step 2114: The second device according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
在一种可选的实施方式中,所述第二设备执行步骤2114时具体方法可以为:In an optional implementation manner, the specific method when the second device executes step 2114 may be:
所述第二设备根据所述第二时间戳信息(t9’)、所述第三时间戳信息(t12)、所述第六时间戳信息(t10’)、所述第七时间戳信息(t11)和所述第八时间戳信息(t14)确定第九时间戳信息;The second device according to the second time stamp information (t9 '), the third time stamp information (t12), the sixth time stamp information (t10'), and the seventh time stamp information (t11 ) And the eighth timestamp information (t14) determine the ninth timestamp information;
所述第二设备删除所述第四时间戳信息(t13),并根据所述第九时间戳信息确定所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;Deleting, by the second device, the fourth timestamp information (t13), and determining, according to the ninth timestamp information, the time in the Ethernet network when the first device sends the fourth message to the access device. time;
所述第二设备根据所述第一时间戳信息(t9)、所述第三时间戳信息(t12)、所述第五时间戳信息(t10)、所述第七时间戳信息(t11)、所述第八时间戳信息(t14)和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。The second device according to the first time stamp information (t9), the third time stamp information (t12), the fifth time stamp information (t10), the seventh time stamp information (t11), The eighth time stamp information (t14) and the ninth time stamp information determine a time offset between the first device and the second device.
例如,在现有固网(以太网络)中master和slaver(这里指所述第一设备和所述第二设备)之间的时间偏差offset3可以符合以下公式七:For example, in an existing fixed network (Ethernet network), the time offset offset3 between the master and slaver (here, the first device and the second device) may meet the following formula 7:
Figure PCTCN2019093123-appb-000005
Figure PCTCN2019093123-appb-000005
其中,t为所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻,在现有固网中t为t13。Wherein, t is the time in the Ethernet network when the first device sends the fourth message to the access device, and t is t13 in the existing fixed network.
在本申请中,可以利用移动网络内部已实现的第一设备和第二设备之间的时钟同步,来计算移动网络与以太网络对接场景的所述第一设备与所述第二设备之间的时间偏差,例如可以通过以下公式八和公式九计算得到:In this application, the clock synchronization between the first device and the second device that has been implemented inside the mobile network may be used to calculate the relationship between the first device and the second device in the mobile network and Ethernet network docking scenario. The time deviation can be calculated, for example, by the following formulas 8 and 9:
t10-t9=offset4+delay3             公式八;t10-t9 = offset4 + delay3 formula eight;
t10'-t9'=offset5+delay3           公式九;t10'-t9 '= offset5 + delay3 formula 9;
其中,公式八表示以太网络中的时间关系,offset4为以太网络中所述第一设备和所述第二设备之间的时间偏差;公式九表示移动网络中的时间关系,offset5为移动网络中所述第一设备和所述第二设备的时间偏差;delay3为所述第一设备到所述第二设备的传输时延。Among them, formula 8 represents the time relationship in the Ethernet network, offset4 is the time deviation between the first device and the second device in the Ethernet network; formula 9 represents the time relationship in the mobile network, and offset5 is the time relationship in the mobile network A time deviation between the first device and the second device; delay3 is a transmission delay from the first device to the second device.
由于移动网络内部的时钟同步,因此,上述offset5的值为0,因此可得,delay3=t10’-t9’,进一步可得offset4=t10-t9-t10’+t9’。然后令offset3=offset4,则可得:Due to the internal clock synchronization in the mobile network, the value of the above offset5 is 0, so that delay3 = t10'-t9 'can be obtained, and offset4 = t10-t9-t10' + t9 '. Then let offset3 = offset4, then we get:
Figure PCTCN2019093123-appb-000006
Figure PCTCN2019093123-appb-000006
从而可以整理得到:t=t12-t11+t14-2(t10'-t9'),此时得到的t即为所述第九时间戳信息,即所述第九时间戳信息对应的时刻为:t12-t11+t14-2(t10'-t9')。Therefore, it can be sorted and obtained: t = t12-t11 + t14-2 (t10'-t9 '), and the t obtained at this time is the ninth time stamp information, that is, the time corresponding to the ninth time stamp information is: t12-t11 + t14-2 (t10'-t9 ').
而所述第二设备在得到所述第九时间戳信息之后,会将所述第九时间戳信息当做现有技术中的所述第四时间戳信息(t13)处理。可选的,所述第二设备可以得到所述第一设备和所述第二设备之间的时间偏差,可以符合以下公式十:After the second device obtains the ninth time stamp information, the second device treats the ninth time stamp information as the fourth time stamp information (t13) in the prior art. Optionally, the second device can obtain the time offset between the first device and the second device, which can meet the following formula X:
Figure PCTCN2019093123-appb-000007
Figure PCTCN2019093123-appb-000007
其中,上述公式十可以看做是所述第二设备将所述第九时间戳信息代入上述公式二中替换t所得到的,也即所述第二设备将所述第九时间戳信息当做现有的t13处理得到的。The above formula 10 can be regarded as obtained by the second device replacing the t with the ninth timestamp information in the above formula 2, that is, the second device uses the ninth timestamp information as cash. Some t13 can be obtained.
采用本申请实施例提供的同步方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
图23示出了本申请实施例提供的同步方法适用的另一种通信系统的工作示意图。图23中的报文与图2所示的图中的报文可以相同,详细介绍可以参见图2中的相关描述。FIG. 23 is a working schematic diagram of another communication system to which the synchronization method according to the embodiment of the present application is applicable. The message in FIG. 23 may be the same as the message in the diagram shown in FIG. 2. For details, refer to the related description in FIG. 2.
其中,以太网络中的主时钟设备为PLC,由PLC确定以太网络中的主时钟,图23中示出了以太网络同步域的主时钟为T1。在以太网络同步域中,UE和UPF被看作是相邻的两个节点,且所述UE和所述UPF是master和slaver传输路径中的设备。进行时钟同步时,所述slaver需要根据所述master的主时钟信息进行时钟同步。The master clock device in the Ethernet network is a PLC, and the PLC determines the master clock in the Ethernet network. FIG. 23 shows that the master clock in the Ethernet synchronization domain is T1. In the Ethernet network synchronization domain, the UE and the UPF are regarded as two adjacent nodes, and the UE and the UPF are devices in a master and slave transmission path. When performing clock synchronization, the slave needs to perform clock synchronization according to the master clock information of the master.
在移动网络同步域中,主时钟设备可以参见图2中涉及的相关描述,由主时钟设备确定所述移动网络中的主时钟,图23中示出了移动网络同步域的主时钟为T2。相应的,在以太网络中为相邻节点的UE和UPF之间还存在多跳其他设备,例如RAN等。但是目前移动网络内部的时钟同步已经实现,所以可以根据移动网络内部的时钟同步,来进行以太网络的时钟同步。In the mobile network synchronization domain, the master clock device may refer to the related description in FIG. 2. The master clock device determines the master clock in the mobile network. FIG. 23 shows that the master clock in the mobile network synchronization domain is T2. Correspondingly, there are other multi-hop devices between the UE and the UPF that are adjacent nodes in the Ethernet network, such as RAN. However, the current clock synchronization in the mobile network has been implemented, so the clock synchronization in the Ethernet network can be performed according to the clock synchronization in the mobile network.
需要说明的是,图23中UE仅作为终端设备的一示例,UE还可以用其他终端设备替代(例如,图1中的移动机器人、传感器2等);UPF仅作为用户面网元的一种示例,UPF还可以用其他用户面网元替代,本申请对此不作限定。It should be noted that the UE in FIG. 23 is only an example of a terminal device, and the UE may also be replaced with another terminal device (for example, the mobile robot and the sensor 2 in FIG. 1); the UPF is only used as a type of user plane network element. For example, the UPF may also be replaced by other user plane network elements, which is not limited in this application.
本申请实施例还提供了另一种同步方法,适用于如图1和图23所示的通信系统。例如,图24中的第一设备为UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF;所述第三设备为master,所述第四设备为slaver。参阅图24所示,该方法的具体流程包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23. For example, the first device in FIG. 24 is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver. Referring to FIG. 24, the specific process of the method includes:
步骤2401、第一设备从第三设备接收第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻。Step 2401, the first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is in the mobile network when the first device receives the first message. time.
例如,图25示出了第三设备和第四设备之间进行同步的过程中报文的收发示意图。For example, FIG. 25 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
例如,所述第一时间戳信息对应的时刻在图25中记为t16。For example, the time corresponding to the first time stamp information is recorded as t16 in FIG. 25.
其中,由第三设备发起时钟同步流程,所述第三设备发起时钟同步流程的触发条件,与图3所示的实施例中步骤301中描述的原理相同,可以相互参见此处不再赘述。The clock synchronization process is initiated by a third device, and the trigger condition of the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
步骤2402、所述第一设备向接入设备发送所述第一报文。Step 2402: The first device sends the first message to an access device.
步骤2403、所述接入设备向第二设备转发所述第一报文。Step 2403: The access device forwards the first message to a second device.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
步骤2404、所述第二设备向第四设备发送所述第一报文,并确定第五时间戳信息,所述第五时间戳信息为所述第二设备向所述第四设备发送所述第一报文时移动网络中的时刻。Step 2404: The second device sends the first message to a fourth device, and determines fifth time stamp information, where the fifth time stamp information is that the second device sends the fourth device to the fourth device. The first message is the time in the mobile network.
例如,所述第五时间戳信息对应的时刻在图25中可以记为t17。For example, the time corresponding to the fifth time stamp information may be recorded as t17 in FIG. 25.
之后,所述第四设备确定接收到所述第二设备发送的所述第一报文时以太网络中的时刻,例如图25中示出的t18。After that, the fourth device determines the time in the Ethernet network when the first message sent by the second device is received, for example, t18 shown in FIG. 25.
步骤2405、所述第一设备从所述第三设备接收第二报文。Step 2405: The first device receives a second packet from the third device.
其中,所述第二报文中携带了所述第三设备发送所述第一报文的时刻,例如图25中示出的t15。The second message carries the time when the third device sends the first message, for example, t15 shown in FIG. 25.
步骤2406、所述第一设备基于所述第二报文向所述接入设备发送第三报文,所述第三报文中携带所述第一时间戳信息。其中,所述第三报文中还携带t15。Step 2406: The first device sends a third message to the access device based on the second message, and the third message carries the first time stamp information. The third packet also carries t15.
可选的,所述第三报文中还可以携带标示(flag),所述flag用于指示所述第三报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the third message, and the flag is used to indicate that the third message carries time stamp information indicating a time in the mobile network.
在一种可选的实施方式中,所述第三报文中携带所述第一时间戳信息,具体实现方式可以为:所述第一设备将所述第一时间戳信息携带在所述第三报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第三报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第三报文中新增加的协议字段。可选的,当所述第三报文中还携带flag时,所述flag也可以携带在所述第一协议字段中。In an optional implementation manner, the third packet carries the first timestamp information, and a specific implementation manner may be: the first device carries the first timestamp information in the first The three messages include the first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the third message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the third message. Optionally, when the third packet also carries a flag, the flag may also be carried in the first protocol field.
在一种可选的实施方式中,所述第三报文可以是所述第一设备将所述第一时间戳信息封装到所述第二报文的第一协议字段中生成的。In an optional implementation manner, the third message may be generated by the first device encapsulating the first time stamp information into a first protocol field of the second message.
可选的,所述第一协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第一协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the first protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
步骤2407、所述接入设备基于所述第三报文向所述第二设备发送第九报文;所述第九报文中携带第一时间戳信息。Step 2407: The access device sends a ninth message to the second device based on the third message; the ninth message carries first time stamp information.
具体的,所述第九报文中还携带t15。Specifically, the ninth message also carries t15.
在一种可选的实施方式中,所述接入设备基于所述第三报文向所述第二设备发送第九报文,具体方法可以为:所述接入设备当检测到所述第三报文包括的第一协议字段中携带所述第一时间戳信息时,将所述第一时间戳信息封装到所述第三报文的第四协议字段中,生成所述第九报文,并向所述第二设备发送所述第九报文。此时,所述第九报文的第四协议字段中携带所述第一时间戳信息。In an optional implementation manner, the access device sends a ninth message to the second device based on the third message, and a specific method may be: when the access device detects the first When the first protocol field included in the three messages carries the first time stamp information, the first time stamp information is encapsulated into a fourth protocol field of the third message to generate the ninth message And sending the ninth message to the second device. At this time, the fourth protocol field of the ninth message carries the first time stamp information.
例如,所述第一协议字段与步骤2406中的第一协议字段相同,同样可以参见步骤701中的相关描述。所述第四协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第三报文向所述第二设备发送第九报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第四协议字段可以与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the first protocol field is the same as the first protocol field in step 2406, and similarly, reference may be made to the related description in step 701. The fourth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending the ninth message to the second device based on the third message is the same as that of the access device in step 702 in the embodiment shown in FIG. The principle that the second device sends the third packet is the same. For related principles, see step 702. The fourth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
在一种可选的实施方式中,所述第二设备从所述接入设备接收第九报文之后提取所述第九报文包括的第四协议字段中携带的所述第一时间戳信息。例如,具体方法可以参见步骤702中情况n1、n2、n3,此处不再重复赘述。In an optional implementation manner, after the second device receives the ninth message from the access device, the second device extracts the first time stamp information carried in a fourth protocol field included in the ninth message. . For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
步骤2408、所述第二设备基于所述第九报文向所述第四设备发送第十二报文。Step 2408: The second device sends a twelfth message to the fourth device based on the ninth message.
在一种实施方式中,所述第二设备在执行步骤2408时,具体方法可以为:所述第二设备将所述第九报文中所述第四协议字段中的所述第一时间戳信息删除,生成所述第十二报文。此时,所述第十二报文中只携带t15。In an implementation manner, when the second device executes step 2408, the specific method may be: the second device adds the first timestamp in the fourth protocol field in the ninth message. The information is deleted, and the twelfth message is generated. At this time, the twelfth message only carries t15.
步骤2409、所述第二设备从所述第四设备接收第四报文,并确定第六时间戳信息,所述第六时间戳信息为所述第二设备接收到所述第四报文时移动网络中的时刻。Step 2409: The second device receives a fourth message from the fourth device, and determines sixth time stamp information. The sixth time stamp information is when the second device receives the fourth message. Moments in mobile networks.
其中,所述第四设备记录了发送所述第四报文时以太网络中的时刻,例如图25中的t19。The fourth device records the time in the Ethernet network when the fourth packet is sent, for example, t19 in FIG. 25.
例如,所述第六时间戳信息对应的时刻在图25中记为t20。For example, the time corresponding to the sixth time stamp information is recorded as t20 in FIG. 25.
步骤2410、所述第二设备向所述接入设备发送所述第四报文。Step 2410: The second device sends the fourth message to the access device.
步骤2411、所述接入设备向所述第一设备发送所述第四报文。Step 2411: The access device sends the fourth message to the first device.
步骤2412、所述第一设备向所述第三设备发送所述第四报文,并确定第二时间戳信息,所述第二时间戳信息为所述第一设备向所述第三设备发送所述第四报文时移动网络中的时刻。Step 2412: The first device sends the fourth message to the third device, and determines second time stamp information, where the second time stamp information is sent by the first device to the third device. The fourth message is a time in a mobile network.
例如,所述第二时间戳信息对应的时刻在图25中记为t21。For example, the time corresponding to the second time stamp information is recorded as t21 in FIG. 25.
其中,所述第三设备记录接收到所述第四报文时以太网络中的时刻,例如图25中示出的t22。The third device records the time in the Ethernet network when the fourth message is received, such as t22 shown in FIG. 25.
步骤2413、所述第一设备从所述第三设备接收第五报文,并确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第五报文时移动网络中的时刻。Step 2413: The first device receives a fifth message from the third device, and determines third time stamp information. The third time stamp information is when the first device receives the fifth message. Moments in mobile networks.
其中,所述第三设备记录了发送所述第五报文时以太网络中的时刻,例如图25中的t23。The third device records a time in the Ethernet network when the fifth message is sent, for example, t23 in FIG. 25.
例如,所述第三时间戳信息对应的时刻在图25中可以记为t24。For example, the time corresponding to the third time stamp information may be recorded as t24 in FIG. 25.
步骤2414、所述第一设备基于所述第五报文向所述接入设备发送第六报文,所述第六报文中携带所述第二时间戳信息。Step 2414: The first device sends a sixth message to the access device based on the fifth message, and the sixth message carries the second time stamp information.
其中,所述第六报文中还携带t22。The sixth packet also carries t22.
可选的,所述第六报文中还可以携带标示(flag),所述flag用于指示所述第六报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the sixth message, and the flag is used to indicate that the sixth message carries time stamp information indicating a time in a mobile network.
在一种可选的实施方式中,所述第六报文中携带所述第二时间戳信息具体实现方式可以为:所述第一设备将所述第二时间戳信息携带在所述第六报文包括的第二协议字段中。其中,可选的,所述第二协议字段可以是目前协议栈框架中所述第六报文中现有的协议字段;所述第二协议字段中还可以是在目前协议栈框架中所述第六报文中新增加的协议字段。可选的,当所述第六报文中还携带flag时,所述flag也可以携带在所述第二协议字段中。In an optional implementation manner, the sixth message carries the second timestamp information in a specific implementation manner: the first device carries the second timestamp information in the sixth message. The message includes a second protocol field. Wherein, optionally, the second protocol field may be an existing protocol field in the sixth packet in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework Newly added protocol field in the sixth message. Optionally, when a flag is also carried in the sixth packet, the flag may also be carried in the second protocol field.
在一种可选的实施方式中,所述第六报文可以是所述第一设备将所述第二时间戳信息封装到所述第五报文的第二协议字段中生成的。In an optional implementation manner, the sixth message may be generated when the first device encapsulates the second time stamp information into a second protocol field of the fifth message.
可选的,所述第二协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第二协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the second protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the second protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
步骤2415、所述接入设备基于所述第六报文向所述第二设备发送第十报文;所述第十报文中携带所述第二时间戳信息。Step 2415: The access device sends a tenth message to the second device based on the sixth message; the tenth message carries the second time stamp information.
其中,所述第十报文中还携带t22。The tenth message also carries t22.
在一种可选的实施方式中,所述接入设备基于所述第六报文向所述第二设备发送第十报文,具体方法可以为:所述接入设备当检测到所述第六报文包括的第二协议字段中携带所述第二时间戳信息时,将所述第二时间戳信息封装到所述第六报文的第五协议字段中,生成所述第十报文,并向所述第二设备发送所述第十报文。此时,所述第十报文的第五协议字段中携带所述第二时间戳信息。In an optional implementation manner, the access device sends a tenth packet to the second device based on the sixth packet. The specific method may be: when the access device detects the first packet, When the second protocol field included in the six messages carries the second time stamp information, the second time stamp information is encapsulated into a fifth protocol field of the sixth message to generate the tenth message And sending the tenth message to the second device. At this time, the fifth protocol field of the tenth message carries the second time stamp information.
例如,所述第二协议字段与步骤2414中的第二协议字段相同,同样可以参见步骤701中的相关描述。所述第五协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第六报文向所述第二设备发送第十报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第五协议字段可以与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the second protocol field is the same as the second protocol field in step 2414, and similarly, reference may be made to the related description in step 701. The fifth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending the tenth packet to the second device based on the sixth packet is the same as that of the access device in step 702 in the embodiment shown in FIG. 7 based on the first packet. The principle that the second device sends the third packet is the same. For related principles, see step 702. The fifth protocol field may be the same as the second protocol field in step 702, and may be referred to each other, and details are not described herein again.
在一种可选的实施方式中,所述第二设备从所述接入设备接收第十报文之后提取所述第十报文包括的第五协议字段中携带的所述第二时间戳信息。例如,具体方法可以参见步骤702中情况n1、n2、n3,此处不再重复赘述。In an optional implementation manner, after the second device receives the tenth message from the access device, the second device extracts the second time stamp information carried in a fifth protocol field included in the tenth message. . For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
步骤2416、所述第二设备向所述第四设备发送第十三报文,并确定第七时间戳信息;所述第七时间戳信息为所述第二设备向所述第四设备发送所述第十三报文时移动网络中的时刻。Step 2416: The second device sends a thirteenth message to the fourth device, and determines seventh timestamp information; the seventh timestamp information is sent by the second device to the fourth device. The time in the mobile network at the time of the thirteenth message is described.
其中,所述第十三报文为所述第二设备将所述第十报文中第五协议字段中的所述第二时间戳信息删除后生成的。此时,所述第十三报文中携带t22。The thirteenth message is generated after the second device deletes the second time stamp information in a fifth protocol field in the tenth message. At this time, the thirteenth message carries t22.
例如,所述第七时间戳信息对应的时刻在图25中可以记为t25。For example, the time corresponding to the seventh timestamp information may be recorded as t25 in FIG. 25.
具体实施中,所述第四设备记录接收到所述第十三报文时以太网络中的时刻,例如图25中的t26。In specific implementation, the fourth device records the time in the Ethernet network when the thirteenth message is received, for example, t26 in FIG. 25.
步骤2417、所述第一设备从所述第三设备接收第七报文,所述第七报文中携带第四时间戳信息,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻。Step 2417: The first device receives a seventh message from the third device, and the seventh message carries fourth timestamp information, and the fourth timestamp information is sent from the third device to the third device. The time in the Ethernet network when the first device sends the fifth message.
例如,所述第四时间戳信息对应的时刻为图25中的t23。For example, the time corresponding to the fourth timestamp information is t23 in FIG. 25.
步骤2418、所述第一设备向所述接入设备发送第八报文,所述第八报文中携带所述第三时间戳信息和所述第四时间戳信息。Step 2418: The first device sends an eighth message to the access device, and the eighth message carries the third time stamp information and the fourth time stamp information.
可选的,所述第八报文中还可以携带标示(flag),所述flag用于指示所述第八报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag (flag) may be carried in the eighth message, and the flag is used to indicate that the eighth message carries time stamp information indicating a time in a mobile network.
在一种可选的实施方式中,所述第八报文中携带所述第三时间戳信息,具体方法可以为:所述第一设备将所述第三时间戳信息携带在所述第八报文包括的第三协议字段中。其中,可选的,所述第三协议字段可以是目前协议栈框架中所述第八报文中现有的协议字段;所述第三协议字段中还可以是在目前协议栈框架中所述第八报文中新增加的协议字段。可选的,当所述第八报文中还携带flag时,所述flag也可以携带在所述第三协议字段中。In an optional implementation manner, the third timestamp information carries the third timestamp information, and a specific method may be: the first device carries the third timestamp information in the eighth message The message includes the third protocol field. Wherein, optionally, the third protocol field may be an existing protocol field in the eighth message in the current protocol stack framework; the third protocol field may also be described in the current protocol stack framework Newly added protocol field in the eighth message. Optionally, when the eighth message also carries a flag, the flag may also be carried in the third protocol field.
在一种可选的实施方式中,所述第八报文可以是所述第一设备将所述第三时间戳信息封装到所述第七报文的第三协议字段中生成的。In an optional implementation manner, the eighth message may be generated by the first device encapsulating the third time stamp information into a third protocol field of the seventh message.
可选的,所述第三协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第三协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the third protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the third protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
步骤2419、所述接入设备基于所述第八报文向所述第二设备发送第十一报文;所述第十一报文中携带所述第三时间戳信息和所述第四时间戳信息。Step 2419: The access device sends an eleventh message to the second device based on the eighth message; the eleventh message carries the third time stamp information and the fourth time Poke information.
在一种可选的实施方式中,所述接入设备基于所述第八报文向所述第二设备发送第十一报文,具体方法可以为:所述接入设备当检测到所述第八报文包括的第三协议字段中携带所述第三时间戳信息时,将所述第三时间戳信息封装到所述第八报文的第六协议字段中,生成所述第十一报文,并向所述第二设备发送所述第十一报文。此时,所述第十一报文的第六协议字段中携带所述第二时间戳信息。In an optional implementation manner, the access device sends an eleventh message to the second device based on the eighth message. The specific method may be: when the access device detects the When the third protocol field included in the eighth message carries the third time stamp information, the third time stamp information is encapsulated into the sixth protocol field of the eighth message to generate the eleventh message A message, and sending the eleventh message to the second device. At this time, the sixth protocol field of the eleventh message carries the second time stamp information.
例如,所述第三协议字段与步骤2418中的第三协议字段相同,同样可以参见步骤701中的相关描述。所述第六协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第八报文向所述第二设备发送第十一报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第六协议字段可以与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the third protocol field is the same as the third protocol field in step 2418, and similarly, reference may be made to the related description in step 701. The sixth protocol field may also be an existing protocol field, or may be a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending an eleventh message to the second device based on the eighth message is the same as that of the access device in step 702 in the embodiment shown in FIG. The principle for sending the third packet to the second device is the same. For related principles, see step 702. The sixth protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
在一种可选的实施方式中,所述第二设备从所述接入设备接收第十一报文之后提取所述第十一报文包括的第六协议字段中携带的所述第三时间戳信息。例如,具体方法可以参见步骤702中情况n1、n2、n3,此处不再重复赘述。In an optional implementation manner, after the second device receives the eleventh message from the access device, the second device extracts the third time carried in a sixth protocol field included in the eleventh message. Poke information. For example, for a specific method, reference may be made to situations n1, n2, and n3 in step 702, and details are not described herein again.
步骤2420、所述第二设备根据所述第一时间戳信息(t16)、所述第二时间戳信息(t21)、所述第三时间戳信息(t24)、所述第四时间戳信息、所述第五时间戳信息(t17)、所述第六时间戳信息(t20)和所述第七时间戳信息(t25),确定第八时间戳信息。Step 2420: The second device according to the first time stamp information (t16), the second time stamp information (t21), the third time stamp information (t24), the fourth time stamp information, The fifth timestamp information (t17), the sixth timestamp information (t20), and the seventh timestamp information (t25) determine the eighth timestamp information.
例如,在现有固网(以太网络)中master和slaver(这里指所述第三设备和所述第四设备)之间的时间偏差offset7可以符合以下公式十一:For example, in the existing fixed network (Ethernet network), the time offset offset7 between the master and slaver (here, the third device and the fourth device) may meet the following formula 11:
Figure PCTCN2019093123-appb-000008
Figure PCTCN2019093123-appb-000008
其中,t’为所述第三设备向所述接入设备发送所述第五报文时以太网络中的时刻,在现有固网中t为t23。Among them, t 'is the time in the Ethernet network when the third device sends the fifth message to the access device, and t is t23 in the existing fixed network.
例如,在以太网络中的时间关系可以存在以下公式十四至公式十四中的情况:For example, the time relationship in the Ethernet network can exist in the following formulas 14 to 14:
t18-t15=offset8+delay4+Δt1+Δt2              公式十二;t18-t15 = offset8 + delay4 + Δt1 + Δt2 Equation 12;
t22-t19=-offset8+delay5+Δt1+Δt2             公式十三;t22-t19 = -offset8 + delay5 + Δt1 + Δt2 Formula 13;
t26-t23=offset8+delay6+Δt1+Δt2              公式十四;t26-t23 = offset8 + delay6 + Δt1 + Δt2 Equation 14;
其中,offset8为以太网络中所述第三设备和所述第四设备之间的时间偏差,delay4为所述第一设备到所述第二设备的传输时延;delay5为所述第二设备到所述第一设备的传输时延;delay6为所述第一设备到所述第二设备的传输时延;Δt1为所述第三设备和所述第一设备之间的传输时长(或者所述第二设备和所述第四设备之间的传输时长);Δt2为所述第二设备和所述第四设备之间的传输时长(或者所述第三设备和所述第一设备之间的传输时长)。Wherein, offset8 is the time difference between the third device and the fourth device in the Ethernet network, delay4 is the transmission delay from the first device to the second device, and delay5 is the delay from the second device to The transmission delay of the first device; delay6 is the transmission delay of the first device to the second device; Δt1 is the transmission time between the third device and the first device (or the Transmission time between the second device and the fourth device); Δt2 is the transmission time between the second device and the fourth device (or between the third device and the first device) Transmission time).
在移动网络中的时间关系可以存在公式十五至公式十七中的情况:The time relationship in the mobile network can exist in formula 15 to formula 17:
t17-t16=offset9+delay4                  公式十五;t17-t16 = offset9 + delay4 Formula 15;
t21-t20=-offset9+delay5                 公式十六;t21-t20 = -offset9 + delay5 Formula 16;
t25-t24=offset9+delay6                  公式十七;t25-t24 = offset9 + delay6 Equation 17; formula 17;
其中,offset9为移动网络中所述第一设备和所述第二设备的时间偏差。Wherein, offset9 is a time deviation between the first device and the second device in the mobile network.
由于移动网络内部的时钟同步,因此,上述offset9的值为0,因此可以得到delay4=t17-t16。Because the clock inside the mobile network is synchronized, the value of the above offset9 is 0, so delay4 = t17-t16 can be obtained.
通过上述公式十三、公式十四和公式十六、公式十七,整理可以得到
Figure PCTCN2019093123-appb-000009
According to the above formula 13, formula 14, and formula 16, and formula 17, finishing can be
Figure PCTCN2019093123-appb-000009
将delay4和Δt1+Δt2的结果代入公式十二中,可得:Substituting the results of delay4 and Δt1 + Δt2 into formula 12, we can get:
Figure PCTCN2019093123-appb-000010
Figure PCTCN2019093123-appb-000010
另offset8=offset7,则可得:Another offset8 = offset7, we can get:
Figure PCTCN2019093123-appb-000011
Figure PCTCN2019093123-appb-000011
然后整理可得:t'=2(t16-t17)+t23+t21-t20+t25-t24,此时得到的t’即为所述第八时间戳信息,即所述第八时间戳信息对应的时刻为2(t16-t17)+t23+t21-t20+t25-t24。Then finishing can be obtained: t '= 2 (t16-t17) + t23 + t21-t20 + t25-t24, at this time, t' is the eighth time stamp information, that is, the eighth time stamp information corresponds The time is 2 (t16-t17) + t23 + t21-t20 + t25-t24.
步骤2421、所述第二设备将所述第八时间戳信息发送给所述第四设备,以使所述第四设备基于所述第八时间戳信息进行时间同步。Step 2421: The second device sends the eighth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth timestamp information.
在现有技术中所述第二设备会将t23发送给第四设备。在本申请中,所述第二设备采用现有发送t23的方法向所述第四设备发送所述第八时间戳信息。也可以理解为,用所述第八时间戳信息代替t23被发送到所述第四设备,这样,所述第四设备收到所述第八时间戳信息时,会将所述第八时间戳信息当做现有技术中的t23处理。In the prior art, the second device sends t23 to the fourth device. In this application, the second device sends the eighth timestamp information to the fourth device by using the existing method of sending t23. It can also be understood that instead of t23, the eighth timestamp information is sent to the fourth device. In this way, when the fourth device receives the eighth timestamp information, the fourth device Information is treated as t23 in the prior art.
在一种可选的实施方式中:所述第四设备接收到所述第八时间戳新信息之后,根据所述t18、t15、t22、t19、t26和所述第八时间戳信息(2(t16-t17)+t23+t21-t20+t25-t24)得到所述第三设备和所述第四设备之间的时间偏差,可以符合以下公式十八:In an optional implementation manner, after the fourth device receives the eighth timestamp new information, the fourth device is t16-t17) + t23 + t21-t20 + t25-t24) to obtain the time deviation between the third device and the fourth device, which can meet the following formula 18:
Figure PCTCN2019093123-appb-000012
Figure PCTCN2019093123-appb-000012
其中,上述公式十八可以看做是所述第四设备将所述第八时间戳信息代入上述公式十一中替换t’所得到的,也即所述第四设备将所述第八时间戳信息当做现有的t23处理得到 的。The above formula 18 can be regarded as obtained by the fourth device substituting the eighth timestamp information into the above formula eleven and replacing t ′, that is, the fourth device substitutes the eighth timestamp The information is obtained as the existing t23 processing.
基于上述结果,所述第四设备可以根据offset10进行时间同步。Based on the above results, the fourth device may perform time synchronization according to offset10.
采用本申请实施例提供的同步方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
本申请实施例还提供了另一种同步方法,适用于如图1和图23所示的通信系统。例如,图26中的第一设备为UPF且第二设备为UE,或者,所述第一设备为UE且所述第二设备为UPF;所述第三设备为master,所述第四设备为slaver。参阅图26所示,该方法的具体流程包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23. For example, in FIG. 26, the first device is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver. Referring to FIG. 26, the specific process of the method includes:
步骤2601、第一设备从第三设备接收第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻。Step 2601: The first device receives a first message from a third device, and determines first time stamp information, where the first time stamp information is in a mobile network when the first device receives the first message. time.
例如,图27示出了第三设备和第四设备之间进行同步的过程中报文的收发示意图。For example, FIG. 27 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
例如,所述第一时间戳信息对应的时刻可以为图27中示出的t28。For example, the time corresponding to the first time stamp information may be t28 shown in FIG. 27.
实施中,所述第一报文中携带所述第三设备发送所述第一报文时以太网络中的时刻,例如图27中所示的t27。In implementation, the first message carries the time in the Ethernet network when the third device sends the first message, for example, t27 shown in FIG. 27.
其中,由第三设备发起时钟同步流程,所述第三设备发起时钟同步流程的触发条件,与图3所示的实施例中步骤301中描述的原理相同,可以相互参见此处不再赘述。The clock synchronization process is initiated by a third device, and the trigger condition of the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
步骤2602、所述第一设备向所述接入设备所述第一报文。Step 2602: The first device sends the first message to the access device.
步骤2603、所述接入设备向第二设备发送所述第一报文。Step 2603: The access device sends the first message to a second device.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
步骤2604、所述第二设备向第四设备发送所述第一报文,并确定第二时间戳信息,所述第二时间戳信息为所述第二设备发送所述第一报文时移动网络中的时刻。Step 2604: The second device sends the first message to a fourth device, and determines second time stamp information, where the second time stamp information moves when the second device sends the first message. Moments in the network.
例如,所述第二时间戳信息对应的时刻在图27中可以为t29。For example, the time corresponding to the second time stamp information may be t29 in FIG. 27.
所述第四设备接收到所述第一报文后,记录接收到所述第一报文时以太网络中的时刻,例如图27中的t30。After receiving the first message, the fourth device records a time in the Ethernet network when the first message is received, for example, t30 in FIG. 27.
步骤2605、所述第二设备从所述第四设备接收第五报文,并确定第三时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第五报文时所述移动网络中的时刻。Step 2605: The second device receives a fifth message from the fourth device, and determines third time stamp information. The third time stamp information is when the second device receives the fifth message. The moment in the mobile network.
例如,所述第三时间戳信息对应的时刻在图27中可以记为t32。For example, the time corresponding to the third time stamp information may be recorded as t32 in FIG. 27.
其中,所述第四设备可以记录发送所述第五报文时以太网络中的时刻,例如图27中示出的t31。The fourth device may record a time in the Ethernet network when the fifth message is sent, for example, t31 shown in FIG. 27.
步骤2606、所述第二设备向所述接入设备发送第四报文,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息。Step 2606: The second device sends a fourth message to the access device, where the fourth message carries the second time stamp information and the third time stamp information.
可选的,所述第四报文中还可以携带标示(flag),所述flag用于指示所述第四报文中携带了表示移动网络中的时刻的时间戳信息。Optionally, a flag may be carried in the fourth message, and the flag is used to indicate that the fourth message carries time stamp information indicating a time in the mobile network.
在一种可选的实施方式中,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息,具体方法可以为:所述第二设备将所述第二时间戳信息和所述第三时间戳信息携带在所述第四报文包括的第二协议字段中。其中,示例性的,所述第二协议字段可以是目前协议栈框架中所述第四报文中现有的协议字段;所述第二协议字段中还可以是在目前协议栈框架中所述第四报文中新增加的协议字段。可选的,当所述第四报文中还携带flag时, 所述flag也可以携带在所述第二协议字段中。In an optional implementation manner, the fourth message carries the second timestamp information and the third timestamp information, and a specific method may be: the second device sends the second time The stamp information and the third time stamp information are carried in a second protocol field included in the fourth message. For example, the second protocol field may be an existing protocol field in the fourth message in the current protocol stack framework; the second protocol field may also be described in the current protocol stack framework. Newly added protocol field in the fourth message. Optionally, when the fourth packet further carries a flag, the flag may also be carried in the second protocol field.
在一种可选的实施方式中,所述第四报文可以是所述第二设备将所述第二时间戳信息和所述第三时间戳信息封装到所述第五报文的第二协议字段中生成的。In an optional implementation manner, the fourth message may be a second message in which the second device encapsulates the second time stamp information and the third time stamp information into the fifth message. Generated in the agreement field.
可选的,所述第二协议字段与图3所示的实施例中步骤304中的第二协议字段可以相同,对所述第二协议字段的详细介绍可以参见步骤304中第二协议字段的相关描述,重复之处此处不再赘述。Optionally, the second protocol field may be the same as the second protocol field in step 304 in the embodiment shown in FIG. 3. For a detailed description of the second protocol field, refer to the second protocol field in step 304. Relevant descriptions are not repeated here.
步骤2607、所述接入设备向所述第一设备发送第二报文,所述第二报文中携带所述第二时间戳信息和所述第三时间戳信息。Step 2607: The access device sends a second message to the first device, where the second message carries the second time stamp information and the third time stamp information.
在一种可选的实施方式中,所述接入设备向所述第一设备发送所述第二报文,具体方法可以为:所述接入设备当检测到所述第四报文包括的第二协议字段中携带第二时间戳信息和第三时间戳信息时,将所述第二时间戳信息和所述第三时间戳信息封装到所述第四报文包括的第一协议字段中,生成所述第二报文,并向所述第一设备发送所述第二报文。In an optional implementation manner, the access device sends the second message to the first device, a specific method may be: when the access device detects that the fourth message includes When the second protocol field carries the second time stamp information and the third time stamp information, the second time stamp information and the third time stamp information are encapsulated into a first protocol field included in the fourth message. To generate the second message, and send the second message to the first device.
例如,所述第二协议字段与步骤2606中的第二协议字段相同,同样可以参见步骤304中的相关描述。所述第一协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备向所述第一设备发送第二报文的执行原理,与图3所示的实施例中步骤306中接入设备向第一设备发送第二报文的原理相同,可以参见步骤306中的相关原理。其中,所述第一协议字段可以与步骤306中的第一协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the second protocol field is the same as the second protocol field in step 2606, and reference may also be made to the related description in step 304. The first protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending the second message to the first device is the same as the principle of the access device sending the second message to the first device in step 306 in the embodiment shown in FIG. 3, See related principles in step 306. The first protocol field may be the same as the first protocol field in step 306 and may be referred to each other, and details are not repeatedly described herein.
在一种可选的实施方式中,所述第一设备从所述接入设备接收第二报文后提取所述第二报文包括的第一协议字段中携带的所述第二时间戳信息和所述第三时间戳信息。例如,具体方法可以参见步骤306中情况g1、g2、g3,此处不再重复赘述。In an optional implementation manner, after receiving the second message from the access device, the first device extracts the second time stamp information carried in a first protocol field included in the second message. And the third timestamp information. For example, for specific methods, reference may be made to the situations g1, g2, and g3 in step 306, and details are not repeatedly described herein.
步骤2608、所述第一设备向所述第三设备发送第三报文。Step 2608: The first device sends a third message to the third device.
在一种实施方式中,所述第一设备在执行步骤2608时,具体方法可以为:所述第一设备将所述第二报文中所述第一协议字段中的所述第二时间戳信息和所述第三时间戳信息删除,生成所述第三报文并发送所述第三报文。In an implementation manner, when the first device performs step 2608, the specific method may be: the first device sends the second timestamp in the first protocol field in the second packet. Information and the third time stamp information are deleted, the third message is generated and the third message is sent.
其中,所述第三设备可以记录接收到所述第三报文时以太网络中的时刻,例如图27中的t34。The third device may record a time in the Ethernet network when the third message is received, for example, t34 in FIG. 27.
步骤2609、所述第一设备确定第四时间戳信息,所述第四时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻。Step 2609: The first device determines fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the first device sends the third message.
例如,所述第四时间戳信息对应的时刻在图27中可以记为t33。For example, the time corresponding to the fourth time stamp information may be recorded as t33 in FIG. 27.
步骤2610、所述第一设备从所述第三设备接收第六报文,所述第六报文中携带第五时间戳信息,所述第五时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻。Step 2610: The first device receives a sixth message from the third device. The sixth message carries fifth time stamp information, and the fifth time stamp information is received by the third device. The time in the Ethernet network when the third message sent by the first device is described.
其中,所述第五时间戳信息对应的时刻即为图27中的t34。The time corresponding to the fifth time stamp information is t34 in FIG. 27.
步骤2611、所述第一设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定第六时间戳信息。Step 2611, the first device determines a first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information. Six timestamp information.
在一种可选的实施方式中,所述第一设备执行步骤2611的具体方法可以为:所述第一设备根据所述第一时间戳信息(t28)、所述第二时间戳信息(t29)、所述第三时间戳信息(t32)和所述第四时间戳信息(t33)确定所述第一设备与所述第二设备之间的往返传输时延差值;然后所述第一设备计算所述第五时间戳信息对应的时刻(t34)与所述往返传输 时延差值的和,得到所述第六时间戳信息。In an optional implementation manner, the specific method for the first device to perform step 2611 may be: the first device according to the first time stamp information (t28), the second time stamp information (t29) ), The third time stamp information (t32) and the fourth time stamp information (t33) determine a round-trip transmission delay difference between the first device and the second device; and then the first The device calculates the sum of the time (t34) corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
例如,可以利用移动网络内部已实现的第一设备和第二设备之间的时钟同步,来计算所述第一设备与所述第二设备之间的所述往返传输时延差值。例如,可以通过如下公式十九和公式二十计算得到:For example, the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formula 19 and formula 20:
t29-t28=delay7+offset10                      公式十九;t29-t28 = delay7 + offset10 Formula nineteen; formula 19;
t33-t32=delay8-offset10                      公式二十;t33-t32 = delay8-offset10 Formula 20;
其中,上述公式中,offset10为移动网络中所述第一设备和所述第二设备的时间偏差;delay7为所述第一设备到所述第二设备的传输时延;delay8为所述第二设备到所述第一设备的传输时延。In the above formula, offset10 is the time difference between the first device and the second device in the mobile network; delay7 is the transmission delay from the first device to the second device; delay8 is the second A transmission delay of the device to the first device.
由于移动内部的时钟同步,上述offset10的值为0,因此通过上述公式十九和公式二十可以得到所述往返传输时延差值delay7-delay8=t29-t28-t33+t32。Due to the internal clock synchronization of the mobile, the value of the above-mentioned offset10 is 0, so the round-trip transmission delay difference value delay7-delay8 = t29-t28-t33 + t32 can be obtained through the above formula 19 and formula 20.
进一步地,所述第六时间戳信息对应的时刻为t34+t29-t28-t33+t32。Further, the time corresponding to the sixth timestamp information is t34 + t29-t28-t33 + t32.
步骤2612、所述第一设备将所述第六时间戳信息发送给所述接入设备。Step 2612, the first device sends the sixth time stamp information to the access device.
例如,在现有技术中所述第一设备会将所述第五时间戳信息发送给所述接入设备,以使所述接入设备发送给所述第二设备,进而传输到所述第四设备。在本申请中,所述第一设备采用现有发送所述第五时间戳信息的方法向所述第四设备传输所述第六时间戳信息。也可以理解为,用所述第六时间戳信息代替所述第五时间戳信息被发送到所述第四设备,这样,所述第四设备收到所述第六时间戳信息时,会将所述第六时间戳信息当做现有技术中的所述第五时间戳信息处理。For example, in the prior art, the first device sends the fifth timestamp information to the access device, so that the access device sends the second time stamp information to the second device, and then transmits the information to the first device. Four devices. In this application, the first device transmits the sixth time stamp information to the fourth device by using an existing method of sending the fifth time stamp information. It can also be understood that the sixth timestamp information is sent to the fourth device instead of the fifth timestamp information. In this way, when the fourth device receives the sixth timestamp information, it will send The sixth timestamp information is treated as the fifth timestamp information in the prior art.
在一种可选的实施方式中,所述第一设备在执行步骤2612时,所述第一设备可以将所述第六报文中的所述第五时间戳信息替换成所述第六时间戳信息,生成第七报文,并将所述第七报文发送给所述接入设备,所述第七报文中携带所述第六时间戳信息,最终所述第七报文被发送至所述第四设备。In an optional implementation manner, when the first device executes step 2612, the first device may replace the fifth time stamp information in the sixth packet with the sixth time Stamp the information, generate a seventh message, and send the seventh message to the access device, the seventh message carries the sixth time stamp information, and finally the seventh message is sent To the fourth device.
步骤2613、所述接入设备向所述第二设备发送所述第六时间戳信息。Step 2613: The access device sends the sixth time stamp information to the second device.
步骤2614、所述第二设备向所述第四设备发送所述第六时间戳信息,以使所述第四设备基于所述第六时间戳信息进行时间同步。Step 2614: The second device sends the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
在一种实施方式中,所述第四设备可以根据t27、t30、t31和所述第六时间戳信息(t34+t29-t28-t33+t32)确定所述第三设备和所述第四设备之间的时间偏差,并根据所述时间偏差进行时间同步。In an embodiment, the fourth device may determine the third device and the fourth device according to t27, t30, t31, and the sixth time stamp information (t34 + t29-t28-t33 + t32). Time deviation between the two, and time synchronization is performed according to the time deviation.
在一种可选的实施方式中,正如所述步骤2612中所描述的,所述第四设备根据所述第六时间戳信息可以确定自身认为的所述第三设备接收到第三报文时所述以太网络中的时刻,将所述第六时间戳信息当做所述第五时间戳信息来用。In an optional implementation manner, as described in step 2612, the fourth device may determine, according to the sixth timestamp information, when the third device considers that the third device receives the third packet. The time in the Ethernet network uses the sixth time stamp information as the fifth time stamp information.
可选的,所述第三设备和第四设备之间的时间偏差offset11可以符合以下公式二十一:Optionally, the time offset offset11 between the third device and the fourth device may meet the following formula twenty-one:
Figure PCTCN2019093123-appb-000013
Figure PCTCN2019093123-appb-000013
采用本申请实施例提供的同步方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
本申请实施例还提供了另一种同步方法,适用于如图1和图23所示的通信系统。例如,图28中的第一设备为UPF且第二设备为UE,或者,所述第一设备为UE且所述第二 设备为UPF;所述第三设备为master,所述第四设备为slaver。参阅图28所示,该方法的具体流程包括:The embodiment of the present application also provides another synchronization method, which is applicable to the communication system shown in FIG. 1 and FIG. 23. For example, the first device in FIG. 28 is a UPF and the second device is a UE, or the first device is a UE and the second device is a UPF; the third device is a master and the fourth device is slaver. Referring to FIG. 28, the specific process of the method includes:
步骤2801、第一设备从第三设备接收第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻。Step 2801: The first device receives the first message from the third device, and determines the first time stamp information, where the first time stamp information is in the mobile network when the first device receives the first message. time.
其中,所述第三设备发起时钟同步流程的触发条件,与图3所示的实施例中步骤301中描述的原理相同,可以相互参见此处不再赘述。The triggering condition for the clock synchronization process initiated by the third device is the same as the principle described in step 301 in the embodiment shown in FIG. 3, which can be referred to each other and will not be repeated here.
例如,图29示出了第三设备和第四设备之间进行同步的过程中报文的收发示意图。For example, FIG. 29 shows a schematic diagram of message transmission and reception during synchronization between the third device and the fourth device.
例如,所述第一时间戳信息在图29中可以记为t36。For example, the first time stamp information may be recorded as t36 in FIG. 29.
在具体实施中,所述第一报文中携带所述第三设备发送所述第一报文时以太网络中的时刻,例如图29中所示的t35。In a specific implementation, the first message carries a time in the Ethernet network when the third device sends the first message, for example, t35 shown in FIG. 29.
步骤2802、所述第一设备基于所述第一报文向接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息。Step 2802: The first device sends a second message to the access device based on the first message, and the second message carries the first time stamp information.
在一种可选的实施方式中,所述第二报文中携带所述第一时间戳信息,具体方法可以为:所述第一设备将所述第一时间戳信息携带在所述第二报文包括的第一协议字段中。其中,可选的,所述第一协议字段可以是目前协议栈框架中所述第二报文中现有的协议字段;所述第一协议字段中还可以是在目前协议栈框架中所述第二报文中新增加的协议字段。可选的,当所述第二报文中还携带flag时,所述flag也可以携带在所述第一协议字段中。In an optional implementation manner, the second message carries the first timestamp information, and a specific method may be: the first device carries the first timestamp information in the second The message includes the first protocol field. Wherein, optionally, the first protocol field may be an existing protocol field in the second message in the current protocol stack framework; the first protocol field may also be described in the current protocol stack framework Newly added protocol field in the second message. Optionally, when the second packet also carries a flag, the flag may also be carried in the first protocol field.
在一种可选的实施方式中,所述第二报文可以是所述第一设备将所述第一时间戳信息封装到所述第一报文的第三协议字段中生成的。In an optional implementation manner, the second message may be generated when the first device encapsulates the first time stamp information into a third protocol field of the first message.
可选的,所述第一协议字段与图7所示的实施例中步骤701中的第一协议字段可以相同,对所述第一协议字段的详细介绍可以参见步骤701中第一协议字段的相关描述,重复之处此处不再赘述。Optionally, the first protocol field may be the same as the first protocol field in step 701 in the embodiment shown in FIG. 7. For a detailed description of the first protocol field, see the first protocol field in step 701. Relevant descriptions are not repeated here.
在一种实施方式中,所述第二报文中还携带t35。In an implementation manner, the second message further carries t35.
步骤2803、所述接入设备基于所述第二报文向第二设备发送第五报文,所述第五报文中携带所述第一时间戳信息。Step 2803: The access device sends a fifth message to the second device based on the second message, and the fifth message carries the first time stamp information.
其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
在一种可选的实施方式中,所述接入设备基于所述第二报文向所述第二设备发送所述第五报文,具体方法可以为:所述接入设备当检测到所述第二报文包括的第一协议字段中包括所述第一时间戳信息时,所述接入设备将所述第一时间戳信息封装到所述第二报文包括的第二协议字段中,生成所述第五报文,并向所述第二设备发送所述第五报文。此时,所述第五报文的第二协议字段中携带所述第一时间戳信息。In an optional implementation manner, the access device sends the fifth message to the second device based on the second message, and a specific method may be: when the access device detects all the When the first protocol field included in the second message includes the first time stamp information, the access device encapsulates the first time stamp information into a second protocol field included in the second message. To generate the fifth message, and send the fifth message to the second device. At this time, the second protocol field of the fifth message carries the first time stamp information.
例如,所述第一协议字段与步骤2802中的第一协议字段相同,同样可以参见步骤701中的相关描述。所述第二协议字段同样可以是现有的协议字段,也可以是在现有的协议栈框架中新增加的字段。例如,所述接入设备基于所述第二报文向所述第二设备发送第五报文的执行原理,与图7所示的实施例中步骤702中接入设备基于第一报文向第二设备发送第三报文的原理相同,可以参见步骤702中的相关原理。其中,所述第二协议字段可以与步骤702中的第二协议字段可以相同,可以相互参见,此处不再重复赘述。For example, the first protocol field is the same as the first protocol field in step 2802, and similarly, reference may be made to the related description in step 701. The second protocol field may also be an existing protocol field or a newly added field in an existing protocol stack framework. For example, the execution principle of the access device sending a fifth packet to the second device based on the second packet is the same as that in step 702 in the embodiment shown in FIG. 7 based on the first packet. The principle that the second device sends the third packet is the same. For related principles, see step 702. The second protocol field may be the same as the second protocol field in step 702 and may be referred to each other, and details are not repeatedly described herein.
在一种可选的实施方式中,所述第二设备从接入设备接收所述第五报文之后提取所述第五报文包括的第二协议字段中携带的所述第一时间戳信息。例如,具体方法可以参见步 骤702中情况n1、n2、n3,此处不再重复赘述。In an optional implementation manner, after the second device receives the fifth message from the access device, the second device extracts the first time stamp information carried in a second protocol field included in the fifth message. . For example, for specific methods, reference may be made to the situations n1, n2, and n3 in step 702, which will not be repeated here.
其中,所述第五报文中还携带t35。The fifth message also carries t35.
步骤2804、所述第二设备向第四设备发送第六报文,并确定第四时间戳信息,所述第四时间戳信息为所述第二设备发送所述第六报文时所述移动网络中的时刻。Step 2804: The second device sends a sixth message to the fourth device, and determines fourth timestamp information, where the fourth timestamp information is the movement when the second device sends the sixth message. Moments in the network.
例如,所述第四时间戳信息在图29中可以记为t37。For example, the fourth time stamp information may be recorded as t37 in FIG. 29.
其中,所述第六报文可以为所述第二设备将所述第五报文中第二协议字段中的所述第一时间戳信息删除后生成的。此时,所述第六报文中携带t35。The sixth message may be generated after the second device deletes the first time stamp information in a second protocol field in the fifth message. At this time, the sixth message carries t35.
具体实施中,所述第四设备记录接收到所述第六报文时以太网络中的时刻,例如图29中的t38。In specific implementation, the fourth device records the time in the Ethernet network when the sixth packet is received, for example, t38 in FIG. 29.
步骤2805、所述第二设备从所述第四设备接收第三报文,并确定第五时间戳信息;所述第五时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻。Step 2805: The second device receives a third message from the fourth device, and determines fifth timestamp information; the fifth timestamp information is when the second device receives the third message. The moment in the mobile network.
例如,所述第五时间戳信息在图29中可以记为t40。For example, the fifth time stamp information may be recorded as t40 in FIG. 29.
具体实施中,所述第四设备记录发送所述第三报文时以太网络中的时刻,例如图29中的t39。In specific implementation, the fourth device records the time in the Ethernet network when the third message is sent, for example, t39 in FIG. 29.
步骤2806、所述第二设备向所述接入设备发送所述第三报文。Step 2806: The second device sends the third message to the access device.
步骤2807、所述接入设备向所述第一设备发送所述第三报文。Step 2807: The access device sends the third message to the first device.
步骤2808、所述第一设备向所述第三设备发送所述第三报文,并确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻。Step 2808: The first device sends the third message to the third device, and determines second time stamp information, where the second time stamp information is the first device sending the third message. The moment in the mobile network.
例如,所述第二时间戳信息对应的时刻在图29中可以记为t41。For example, the time corresponding to the second time stamp information may be recorded as t41 in FIG. 29.
在具体实施中,所述第三设备记录接收到所述第三报文时以太网络中的时刻,例如图29中所示的t42。In a specific implementation, the third device records the time in the Ethernet network when the third message is received, such as t42 shown in FIG. 29.
步骤2809、所述第一设备从所述第三设备接收第四报文,所述第四报文中携带第三时间戳信息,所述的第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻。Step 2809: The first device receives a fourth message from the third device. The fourth message carries third time stamp information, and the third time stamp information is received by the third device. The third message sent by the first device is a time in an Ethernet network.
其中,所述第四时间戳信息对应的时刻即为t42。The time corresponding to the fourth timestamp information is t42.
步骤2810、所述第一设备将所述第二时间戳信息和所述第三时间戳信息发送给所述接入设备。Step 2810: The first device sends the second time stamp information and the third time stamp information to the access device.
步骤2811、所述接入设备向所述第二设备发送所述第二时间戳信息和所述第三时间戳信息。Step 2811: The access device sends the second time stamp information and the third time stamp information to the second device.
步骤2812、所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定第六时间戳信息。Step 2812, the second device determines a first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information. Six timestamp information.
在一种可选的实施方式中,所述第二设备执行步骤2812的具体方法可以为:所述第二设备根据所述第一时间戳信息(t36)、所述第二时间戳信息(t41)、所述第四时间戳信息(t37)和所述第五时间戳信息(t40)确定所述第一设备与所述第二设备之间的往返传输时延差值;所述第二设备计算所述第三时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第六时间戳信息。In an optional implementation manner, the specific method for the second device to perform step 2812 may be: the second device according to the first time stamp information (t36), the second time stamp information (t41 ), The fourth timestamp information (t37) and the fifth timestamp information (t40) determine a round-trip transmission delay difference between the first device and the second device; the second device Calculate the sum of the time corresponding to the third time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
例如,可以利用移动网络内部已实现的第一设备和第二设备之间的时钟同步,来计算所述第一设备与所述第二设备之间的所述往返传输时延差值。例如,可以通过如下公式二十二和公式二十三计算得到:For example, the clock synchronization between the first device and the second device that has been implemented within the mobile network may be used to calculate the round-trip transmission delay difference between the first device and the second device. For example, it can be calculated by the following formula 22 and formula 23:
t37-t36=delay9+offset12                公式二十二;t37-t36 = delay9 + offset12 formula twenty-two;
t41-t40=delay10-offset12               公式二十三;t41-t40 = delay10-offset12 formula twenty-three;
其中,上述公式中,offset12为移动网络中所述第一设备和所述第二设备的时间偏差;delay9为所述第一设备到所述第二设备的传输时延;delay10为所述第二设备到所述第一设备的传输时延。In the above formula, offset12 is the time difference between the first device and the second device in the mobile network; delay9 is the transmission delay from the first device to the second device; delay10 is the second A transmission delay of the device to the first device.
由于移动内部的时钟同步,上述offset12的值为0,因此通过上述公式二十二和公式二十三可以得到所述往返传输时延差值delay9-delay10=t37-t36-t41+t40。Due to the internal clock synchronization of the mobile, the value of the above-mentioned offset12 is 0, so the round-trip transmission delay difference value delay9-delay10 = t37-t36-t41 + t40 can be obtained through the above formulas 22 and 23.
进一步地,所述第六时间戳信息对应的时刻为t42+t37-t36-t41+t40。Further, the time corresponding to the sixth timestamp information is t42 + t37-t36-t41 + t40.
步骤2813、所述第二设备将所述第六时间戳信息发送给所述第四设备,以使所述第四设备基于所述第六时间戳信息进行时间同步。Step 2813: The second device sends the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information.
例如,在现有技术中所述第二设备会将所述第四时间戳信息发送给所述第四设备。在本申请中,所述第二设备采用现有发送所述第四时间戳信息的方法向所述第四设备发送所述第六时间戳信息。也可以理解为,用所述第六时间戳信息代替所述第四时间戳信息被发送到所述第四设备,这样,所述第四设备收到所述第六时间戳信息时,会将所述第六时间戳信息当做现有技术中的所述第四时间戳信息处理。For example, in the prior art, the second device sends the fourth time stamp information to the fourth device. In this application, the second device sends the sixth time stamp information to the fourth device by using the existing method for sending the fourth time stamp information. It can also be understood that the sixth timestamp information is sent to the fourth device instead of the fourth timestamp information. In this way, when the fourth device receives the sixth timestamp information, it will send The sixth timestamp information is treated as the fourth timestamp information in the prior art.
在一种实施方式中,所述第四设备可以根据t35、t38、t39和所述第六时间戳信息(t42+t37-t36-t41+t40)确定所述第三设备和所述第四设备之间的时间偏差,并根据所述时间偏差进行时间同步。In an embodiment, the fourth device may determine the third device and the fourth device according to t35, t38, t39, and the sixth time stamp information (t42 + t37-t36-t41 + t40). Time deviation between the two, and time synchronization is performed according to the time deviation.
在一种可选的实施方式中,所述第四设备根据所述第六时间戳信息可以确定自身认为的所述第三设备接收到第三报文时所述以太网络中的时刻,将所述第六时间戳信息当做所述第四时间戳信息来用。In an optional implementation manner, the fourth device may determine, according to the sixth timestamp information, the time in the Ethernet network when the third device considers that the third device receives the third packet, and The sixth time stamp information is used as the fourth time stamp information.
可选的,所述第三设备和第四设备之间的时间偏差offset13可以符合以下公式二十四:Optionally, the time offset offset13 between the third device and the fourth device may meet the following formula twenty-four:
Figure PCTCN2019093123-appb-000014
Figure PCTCN2019093123-appb-000014
采用本申请实施例提供的同步方法,由于可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时间精度需求。By adopting the synchronization method provided in the embodiment of the present application, the influence of the transmission delay between the first device and the second device can be avoided, so that the docking scenario between the mobile network and the Ethernet network can be implemented to meet the time accuracy requirements of industrial plants.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图2所示的通信系统,用于实现以上图21所示的实施例提供的同步方法。所述第一设备的结构同样可以参阅图11所示,所述第一设备可以包括接收单元1103、处理单元1102和发送单元1101。其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method. For the structure of the first device, reference may also be made to FIG. 11. The first device may include a receiving unit 1103, a processing unit 1102, and a sending unit 1101. among them:
接收单元1103用于从第三设备接收第一报文;处理单元1102用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;发送单元1101用于通过接入设备向第二设备发送所述第一报文;所述接收单元1103还用于从所述第三设备接收第二报文;所述发送单元1101还用于基于所述第二报文向所述接入设备发送第三报文,所述第三报文中携带所述第一时间戳信息;所述接收单元1103还用于从接入设备接收第四报文;所述发送单元1101还用于向所述第三设备发送所述第四报文;所述处理单元1102还用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备向所述第三设备发送所述第四报文时移动网络中的时刻;所述接收单元1103还用于从所述第三设备接收第五报文;所述处理单元1102还用于确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第五报文时移动网络中的时刻;所述发送单元1101还用于基于所述 第五报文向所述接入设备发送第六报文,所述第六报文中携带所述第二时间戳信息;所述接收单元1103还用于从所述第三设备接收第七报文;所述第七报文中携带第四时间戳信息,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;所述发送单元1101还用于向所述接入设备发送第八报文;所述第八报文中携带所述第三时间戳信息和所述第四时间戳信息;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1103 is configured to receive a first message from a third device; the processing unit 1102 is configured to determine first time stamp information, where the first time stamp information is moved when the first device receives the first message The time in the network; the sending unit 1101 is configured to send the first message to the second device through the access device; the receiving unit 1103 is further configured to receive the second message from the third device; the sending unit 1101 is further configured to send a third packet to the access device based on the second packet, and the third packet carries the first time stamp information; the receiving unit 1103 is further configured to receive the first packet from the access device. The device receives a fourth message; the sending unit 1101 is further configured to send the fourth message to the third device; the processing unit 1102 is further configured to determine second time stamp information, and the second time stamp The information is the time in the mobile network when the first device sends the fourth message to the third device; the receiving unit 1103 is further configured to receive a fifth message from the third device; the processing The unit 1102 is further configured to determine third time stamp information. The time stamp information is the time in the mobile network when the first device receives the fifth message; the sending unit 1101 is further configured to send a sixth message to the access device based on the fifth message. The sixth message carries the second timestamp information; the receiving unit 1103 is further configured to receive a seventh message from the third device; the seventh message carries fourth timestamp information The fourth timestamp information is the time in the Ethernet network when the third device sends the fifth message to the first device; the sending unit 1101 is further configured to send the first time to the access device. Eight messages; the eighth message carries the third timestamp information and the fourth timestamp information; wherein the first device is a user plane network element and the second device is a terminal device, Alternatively, the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第一设备中的接收单元1103、处理单元1102和发送单元1101,还可实现上述图21所示的实施例方法中第一设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1103, the processing unit 1102, and the sending unit 1101 in the first device, other operations or functions of the first device in the method in the embodiment shown in FIG. 21 may be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图2所示的通信系统,用于实现以上图21所示的实施例提供的同步方法。所述接入设备的结构同样可以参阅图12所示,所述接入设备可以包括接收单元1201和发送单元1202。其中:Based on the above embodiment, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method. For the structure of the access device, reference may also be made to FIG. 12. The access device may include a receiving unit 1201 and a sending unit 1202. among them:
接收单元1201用于从所述第一设备接收第一报文;发送单元1202用于向第二设备转发所述第一报文;所述接收单元1201还用于从所述第一设备接收第三报文;所述第三报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备从第三设备接收到所述第一报文时移动网络中的时刻;所述发送单元1202还用于基于所述第三报文向所述第二设备发送第九报文;所述第九报文中携带第一时间戳信息;所述接收单元1201还用于从所述第二设备接收到第四报文;所述发送单元1202还用于向所述第一设备发送所述第四报文;所述接收单元1201还用于从所述第一设备接收第六报文;所述第六报文为所述第一设备从所述第三设备接收到第五报文后基于所述第五报文向所述接入设备发送的;所述第六报文中携带第二时间戳信息,所述第二时间戳信息为所述第一设备从所述接入设备接收到所述第四报文后向所述第三设备发送所述第四报文时移动网络中的时刻;所述发送单元1202还用于基于所述第六报文向所述第二设备发送第十报文;所述第十报文中携带所述第二时间戳信息;所述接收单元1201还用于从所述第一设备接收第八报文;所述第八报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备从所述第三设备接收到所述第五报文时移动网络中的时刻,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;所述发送单元1202还用于基于所述第八报文向所述第二设备发送第十一报文;所述第十一报文中携带所述第三时间戳信息和所述第四时间戳信息;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1201 is configured to receive a first message from the first device; the sending unit 1202 is configured to forward the first message to a second device; the receiving unit 1201 is further configured to receive a first message from the first device Three messages; the third message carries first time stamp information, and the first time stamp information is a time in the mobile network when the first device receives the first message from the third device; The sending unit 1202 is further configured to send a ninth message to the second device based on the third message; the ninth message carries first time stamp information; and the receiving unit 1201 is further configured to receive The second device receives a fourth message; the sending unit 1202 is further configured to send the fourth message to the first device; the receiving unit 1201 is further configured to receive a first message from the first device Six messages; the sixth message is sent by the first device to the access device based on the fifth message after receiving the fifth message from the third device; the sixth message The text carries second time stamp information, and the second time stamp information is that the first device The time in the mobile network when the incoming device receives the fourth message and sends the fourth message to the third device; the sending unit 1202 is further configured to send the fourth message to the first device based on the sixth message; The two devices send a tenth message; the tenth message carries the second time stamp information; the receiving unit 1201 is further configured to receive an eighth message from the first device; the eighth message Carrying third time stamp information and fourth time stamp information, the third time stamp information is a time in the mobile network when the first device receives the fifth message from the third device, the The fourth time stamp information is the time in the Ethernet network when the third device sends the fifth message to the first device; the sending unit 1202 is further configured to send the fifth message to the first device based on the eighth message. The two devices send an eleventh message; the eleventh message carries the third time stamp information and the fourth time stamp information; wherein the first device is a user plane network element and the first The two devices are terminal devices, or the first device is a terminal device and the second device is User plane network elements.
可选的,所述接入设备还可以包括处理单元,用于检测报文中的协议字段中的时间戳信息,具体的操作可以参见上述图21所示的实施例中接入设备的具体操作,此处不再赘述。Optionally, the access device may further include a processing unit for detecting time stamp information in a protocol field in the message. For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 21 above. , Will not repeat them here.
此外,基于所述接入设备中的接收单元1201和发送单元1202,或者还有处理单元,还可实现上述图21所示的实施例方法中接入设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1201 and the sending unit 1202 in the access device, or a processing unit, other operations or functions of the access device in the method in the embodiment shown in FIG. 21 may be implemented. For details, refer to the foregoing. The embodiment is not repeated here.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或 图2所示的通信系统,用于实现以上图21所示的实施例提供的同步方法。所述第二设备的结构同样可以参阅图13所示,所述第二设备可以包括接收单元1301、处理单元1302和发送单元1303。其中:Based on the above embodiment, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 2 to implement synchronization provided by the embodiment shown in FIG. 21 above. method. For the structure of the second device, reference may also be made to FIG. 13. The second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
接收单元1301用于从接入设备接收第一报文;发送单元1303用于向第四设备发送所述第一报文;处理单元1302用于确定第五时间戳信息,所述第五时间戳信息为所述第二设备向所述第四设备发送所述第一报文时移动网络中的时刻;所述接收单元1301还用于从所述接入设备接收第九报文;所述第九报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备从第三设备接收到所述第一报文时移动网络中的时刻;所述发送单元1303还用于基于所述第九报文向所述第四设备发送第十二报文;所述接收单元1301还用于从所述第四设备接收第四报文;所述处理单元1302还用于确定第六时间戳信息,所述第六时间戳信息为所述第二设备接收到所述第四报文时移动网络中的时刻;所述发送单元1303还用于向所述接入设备发送所述第四报文;所述接收单元1301还用于从所述接入设备接收第十报文;所述第十报文中携带第二时间戳信息,所述第二时间戳信息为所述接入设备将所述第四报文发送给第一设备后,所述第一设备向第三设备发送所述第四报文时移动网络中的时刻;所述发送单元1303还用于向所述第四设备发送第十三报文;所述处理单元1302,还用于确定第七时间戳信息;所述第七时间戳信息为所述第二设备向所述第四设备发送所述第十三报文时移动网络中的时刻;所述接收单元1301还用于从所述接入设备接收第十一报文,所述第十一报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备从所述第三设备接收到所述第五报文时移动网络中的时刻,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;所述处理单元1302还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息和所述第七时间戳信息,确定第八时间戳信息;所述发送单元1303还用于将所述第八时间戳信息发送给所述第四设备,以使所述第四设备基于所述第八时间戳信息进行时间同步;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1301 is configured to receive a first message from an access device; the sending unit 1303 is configured to send the first message to a fourth device; the processing unit 1302 is configured to determine fifth time stamp information, and the fifth time stamp The information is the time in the mobile network when the second device sends the first message to the fourth device; the receiving unit 1301 is further configured to receive a ninth message from the access device; the first The nine messages carry first time stamp information, where the first time stamp information is a time in the mobile network when the first device receives the first message from a third device; the sending unit 1303 also uses Sending a twelfth message to the fourth device based on the ninth message; the receiving unit 1301 is further configured to receive a fourth message from the fourth device; the processing unit 1302 is further configured to determine Sixth time stamp information, where the sixth time stamp information is a time in the mobile network when the second device receives the fourth message; and the sending unit 1303 is further configured to send all information to the access device. The fourth message; the receiving unit 1301 is further configured to send The incoming device receives the tenth message; the tenth message carries second timestamp information, and the second timestamp information is obtained after the access device sends the fourth message to the first device. The time in the mobile network when the first device sends the fourth message to the third device; the sending unit 1303 is further configured to send the thirteenth message to the fourth device; the processing unit 1302, For determining seventh time stamp information; the seventh time stamp information is a time in the mobile network when the second device sends the thirteenth message to the fourth device; the receiving unit 1301 also uses Receiving an eleventh message from the access device, the eleventh message carries third time stamp information and fourth time stamp information, and the third time stamp information is obtained from the first device The time in the mobile network when the third device receives the fifth message, and the fourth time stamp information is the time in the Ethernet network when the third device sends the fifth message to the first device. Time; the processing unit 1302 is further configured to use the first time stamp information The second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, the sixth time stamp information, and the seventh time stamp information determine a first time stamp information. Eight timestamp information; the sending unit 1303 is further configured to send the eighth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth timestamp information; wherein, The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第二设备中的接收单元1301、处理单元1302和发送单元1303,还可实现上述图21所示的实施例方法中第二设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1301, the processing unit 1302, and the sending unit 1303 in the second device, other operations or functions of the second device in the method in the embodiment shown in FIG. 21 may be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图23所示的通信系统,用于实现以上图24所示的实施例提供的同步方法。所述第一设备的结构同样可以参阅图11所示,所述第一设备可以包括发送单元1101、处理单元1102和接收单元1103。其中:Based on the above embodiment, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method. For the structure of the first device, reference may also be made to FIG. 11. The first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
发送单元1101用于向接入设备发送第一报文;处理单元1102,用于确定第一时间戳信息和第二时间戳信息;所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;所述发送单元1101还用于向所述接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息和所述第二时间戳信息;接收单元1103用于从所述接入设备接收第三报文;所述处理单元1102还用于确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所 述第三报文时以太网络中的时刻;所述发送单元1101还用于向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息;所述处理单元1102还用于确定第四时间戳信息;所述第四时间戳信息为所述第一设备发送所述第四报文时以太网络中的时刻;所述发送单元1101还用于向所述接入设备发送第五报文,所述第五报文中携带所述第四时间戳信息;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The sending unit 1101 is configured to send a first message to an access device; the processing unit 1102 is configured to determine first time stamp information and second time stamp information; and the first time stamp information is sent by the first device to the first device. The first message is the time in the Ethernet network, and the second time stamp information is the time in the mobile network when the first device sends the first message; the sending unit 1101 is further configured to send the message to the receiver. The incoming device sends a second message, where the second message carries the first timestamp information and the second timestamp information; the receiving unit 1103 is configured to receive a third message from the access device; The processing unit 1102 is further configured to determine third time stamp information, where the third time stamp information is a time in the Ethernet network when the first device receives the third packet; the sending unit 1101 is further configured to: Sending a fourth message to the access device, where the fourth message carries the third timestamp information; the processing unit 1102 is further configured to determine fourth timestamp information; the fourth timestamp information When sending the fourth message for the first device The time in the Ethernet network; the sending unit 1101 is further configured to send a fifth message to the access device, where the fifth message carries the fourth time stamp information; wherein the first device is A user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第一设备中的接收单元1103、处理单元1102和发送单元1101,还可实现上述图24所示的实施例方法中第一设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1103, the processing unit 1102, and the sending unit 1101 in the first device, other operations or functions of the first device in the method in the embodiment shown in FIG. 24 may be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图23所示的通信系统,用于实现以上图24所示的实施例提供的同步方法。所述接入设备的结构同样可以参阅图12所示,所述接入设备可以包括接收单元1201和发送单元1202。其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method. For the structure of the access device, reference may also be made to FIG. 12. The access device may include a receiving unit 1201 and a sending unit 1202. among them:
接收单元1201用于从第一设备接收第一报文后;发送单元1202,用于向第二设备转发所述第一报文;所述接收单元1201还用于从所述第一设备接收第二报文后;所述第二报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备向所述接入设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备向所述接入设备发送所述第一报文时移动网络中的时刻;所述发送单元1202还用于基于所述第二报文向所述第二设备发送第六报文;所述第六报文中携带所述第一时间戳信息和所述第二时间戳信息;所述接收单元1201还用于从所述第二设备接收第三报文;所述发送单元1202还用于向所述第一设备转发所述第三报文;所述接收单元1201还用于从所述第一设备接收第四报文,所述第四报文中携带第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述接入设备发送的第三报文时以太网络中的时刻;所述发送单元1202还用于向所述第二设备转发所述第四报文;所述接收单元1201还用于从所述第一设备接收到第五报文,所述第五报文中携带第四时间戳信息,所述第四时间戳信息为所述第一设备向所述接入设备发送第四报文时以太网络中的时刻;所述发送单元1202还用于向所述第二设备转发所述第五报文;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1201 is configured to receive the first message from the first device; the sending unit 1202 is configured to forward the first message to the second device; the receiving unit 1201 is further configured to receive the first message from the first device After two messages; the second message carries first time stamp information and second time stamp information, and the first time stamp information is that the first device sends the first message to the access device The time in the Ethernet network at the time, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device; the sending unit 1202 is further configured to The second message sends a sixth message to the second device; the sixth message carries the first time stamp information and the second time stamp information; and the receiving unit 1201 is further configured to: Receiving a third message from the second device; the sending unit 1202 is further configured to forward the third message to the first device; the receiving unit 1201 is further configured to receive a third message from the first device Four messages, the fourth message carries third time stamp information, and the third time The time stamp information is the time in the Ethernet network when the first device receives the third message sent by the access device; the sending unit 1202 is further configured to forward the fourth message to the second device The receiving unit 1201 is further configured to receive a fifth message from the first device, where the fifth message carries fourth timestamp information, and the fourth timestamp information is sent by the first device to The time in the Ethernet network when the access device sends the fourth message; the sending unit 1202 is further configured to forward the fifth message to the second device; wherein the first device is a user plane network And the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
可选的,所述接入设备还可以包括处理单元,用于检测报文中的协议字段中的时间戳信息,具体的操作可以参见上述图24所示的实施例中接入设备的具体操作,此处不再赘述。Optionally, the access device may further include a processing unit for detecting time stamp information in a protocol field in the message. For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 24 above. , Will not repeat them here.
此外,基于所述接入设备中的接收单元1201和发送单元1202,或者还有处理单元,还可实现上述图24所示的实施例方法中接入设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1201 and the sending unit 1202 in the access device, or a processing unit, other operations or functions of the access device in the method of the embodiment shown in FIG. 24 may be implemented. For details, refer to the foregoing. The embodiment is not repeated here.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图23所示的通信系统,用于实现以上图24所示的实施例提供的同步方法。所述第二设备的结构同样可以参阅图13所示,所述第二设备可以包括接收单元1301、处理单元1302和发送单元1303。其中:Based on the above embodiments, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 24 above. method. For the structure of the second device, reference may also be made to FIG. 13. The second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
接收单元1301用于从接入设备接收第一报文;处理单元1302用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第一报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第一报文时移动网络中的时刻;所述接收单元1301还用于从所述接入设备接收第六报文,所述第六报文中携带第一时间戳信息和所述第二时间戳信息;所述第一时间戳信息为所述第一设备向所述接入设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备向所述接入设备发送所述第一报文时移动网络中的时刻;发送单元1303用于向所述接入设备发送第三报文;所述处理单元1302还用于确定第七时间戳信息,所述第七时间戳信息为所述第二设备发送所述第三报文时以太网络中的时刻;所述接收单元1301还用于从所述接入设备接收第四报文;所述第四报文中携带第三时间戳信息,所述第三时间戳信息为所述接入设备从所述第二设备接收所述第三报文后,向所述第一设备转发所述第三报文后,所述第一设备接收到所述第三报文时以太网络中的时刻;所述处理单元1302还用于确定第八时间戳信息,所述第八时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻;所述接收单元1301还用于从所述接入设备接收第五报文,所述第五报文中携带第四时间戳信息,所述第四时间戳信息为所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;所述处理单元1302还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1301 is configured to receive a first message from an access device; the processing unit 1302 is configured to determine fifth time stamp information and sixth time stamp information, where the fifth time stamp information is received by the second device. The first message is the time in the Ethernet network, and the sixth time stamp information is the time in the mobile network when the second device receives the first message; the receiving unit 1301 is further configured to receive The access device receives a sixth message, where the sixth message carries the first timestamp information and the second timestamp information; the first timestamp information is the first device to the access device The time in the Ethernet network when the first message is sent, and the second time stamp information is the time in the mobile network when the first device sends the first message to the access device; the sending unit 1303 Configured to send a third message to the access device; the processing unit 1302 is further configured to determine seventh timestamp information, where the seventh timestamp information is when the second device sends the third message The time in the Ethernet network; the receiving unit 1301 also uses Receiving a fourth message from the access device; the fourth message carries third timestamp information, and the third timestamp information is that the access device receives the third message from the second device After the message, after forwarding the third message to the first device, the time in the Ethernet network when the first device received the third message; the processing unit 1302 is further configured to determine an eighth time Timestamp information, the eighth timestamp information is the time in the Ethernet network when the second device receives the fourth packet; the receiving unit 1301 is further configured to receive a fifth packet from the access device Message, the fifth message carries fourth timestamp information, and the fourth timestamp information is the time in the Ethernet network when the first device sends the fourth message to the access device; The processing unit 1302 is further configured to: according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, the Sixth time stamp information, the seventh time stamp information, and the eighth time The information determines a time deviation between the first device and the second device, and performs time synchronization according to the time deviation; wherein the first device is a user plane network element and the second device is a terminal device. Or, the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第二设备中的接收单元1301、处理单元1302和发送单元1303,还可实现上述图24所示的实施例方法中第二设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1301, processing unit 1302, and sending unit 1303 in the second device, other operations or functions of the second device in the method in the embodiment shown in FIG. 24 may also be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图23所示的通信系统,用于实现以上图26所示的实施例提供的同步方法。所述第一设备的结构同样可以参阅图11所示,所述第一设备可以包括发送单元1101、处理单元1102和接收单元1103。其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method. For the structure of the first device, reference may also be made to FIG. 11. The first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
接收单元1103用于从第三设备接收第一报文;发送单元1101用于通过接入设备向第二设备发送所述第一报文;处理单元1102用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;所述接收单元1103还用于从所述接入设备接收第二报文;所述第二报文中携带第二时间戳信息和第三时间戳信息,所述第二时间戳信息为所述第二设备接收到所述第一报文后,向第四设备发送所述第一报文时所述移动网络中的时刻;所述第三时间戳信息为所述第二设备从第四设备接收到第五报文时所述移动网络中的时刻;所述发送单元1101还用于向所述第三设备发送第三报文;所述处理单元1102还用于确定第四时间戳信息,所述第四时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;所述接收单元1103还用于从所述第三设备接收第六报文,所述第六报文中携带第五时间戳信息,所述第五时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;所述处理单元1102还用于根据所述第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息 确定第六时间戳信息;所述发送单元1101还用于将所述第六时间戳信息通过所述接入设备转发给所述第二设备;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1103 is configured to receive a first message from a third device; the sending unit 1101 is configured to send the first message to a second device through an access device; and the processing unit 1102 is configured to determine first time stamp information. The first time stamp information is a time in the mobile network when the first device receives the first message; the receiving unit 1103 is further configured to receive a second message from the access device; the second The message carries the second time stamp information and the third time stamp information, and the second time stamp information is that the second device sends the first message to the fourth device after receiving the first message The time in the mobile network; the third time stamp information is the time in the mobile network when the second device receives the fifth message from the fourth device; the sending unit 1101 is further configured to send The third device sends a third message; the processing unit 1102 is further configured to determine fourth timestamp information, where the fourth timestamp information is the movement when the first device sends the third message Time in the network; the receiving unit 1103 is further configured to The third device receives a sixth message, and the sixth message carries fifth timestamp information, where the fifth timestamp information is the third device received the third message sent by the first device The time when the message is in the Ethernet network; the processing unit 1102 is further configured to determine according to the first time stamp information, second time stamp information, third time stamp information, fourth time stamp information, and fifth time stamp information Sixth time stamp information; the sending unit 1101 is further configured to forward the sixth time stamp information to the second device through the access device; wherein the first device is a user plane network element and is The second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第一设备中的接收单元1103、处理单元1102和发送单元1101,还可实现上述图26所示的实施例方法中第一设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1103, the processing unit 1102, and the sending unit 1101 in the first device, other operations or functions of the first device in the method in the embodiment shown in FIG. 26 may also be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图23所示的通信系统,用于实现以上图26所示的实施例提供的同步方法。所述接入设备的结构同样可以参阅图12所示,所述接入设备可以包括接收单元1201和发送单元1202。其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method. For the structure of the access device, reference may also be made to FIG. 12. The access device may include a receiving unit 1201 and a sending unit 1202. among them:
接收单元1201用于从所述第一设备接收第一报文;发送单元1202用于向第二设备发送所述第一报文;所述接收单元1201,还用于从所述第二设备接收第四报文,所述第四报文中携带第二时间戳信息和第三时间戳信息;所述第二时间戳信息为所述第二设备接收到所述第一报文后,向第四设备发送所述第一报文时所述移动网络中的时刻;所述第四报文是所述第二设备从所述第四设备接收到第五报文后,基于所述第五报文向所述接入设备发送的;所述第三时间戳信息为所述第二设备接收到所述第五报文时所述移动网络中的时刻;所述发送单元1202还用于向所述第一设备发送第二报文,所述第二报文中携带所述第二时间戳信息和所述第三时间戳信息;所述接收单元1201还用于从所述第一设备接收第六时间戳信息;所述发送单元1202还用于向所述第二设备发送所述第六时间戳信息;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1201 is configured to receive a first message from the first device; the sending unit 1202 is configured to send the first message to a second device; and the receiving unit 1201 is further configured to receive from the second device A fourth message, where the fourth message carries second timestamp information and third timestamp information; the second timestamp information is sent to the first device after the second device receives the first message; The moment in the mobile network when the four devices send the first message; the fourth message is based on the fifth message after the second device receives the fifth message from the fourth device The third time stamp information is the time in the mobile network when the second device receives the fifth message; the sending unit 1202 is further configured to send The first device sends a second message, and the second message carries the second timestamp information and the third timestamp information; the receiving unit 1201 is further configured to receive a first message from the first device. Six timestamp information; the sending unit 1202 is further configured to send the first time stamp to the second device. Timestamp information; wherein, the first device is a user plane network element and the second device is a terminal device or said first device is a terminal device and the second device is a user plane network element.
可选的,所述接入设备还可以包括处理单元,用于检测报文中的协议字段中的时间戳信息,具体的操作可以参见上述图26所示的实施例中接入设备的具体操作,此处不再赘述。Optionally, the access device may further include a processing unit for detecting timestamp information in a protocol field in the message. For specific operations, refer to the specific operations of the access device in the embodiment shown in FIG. 26 above. , Will not repeat them here.
此外,基于所述接入设备中的接收单元1201和发送单元1202,或者还有处理单元,还可实现上述图26所示的实施例方法中接入设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1201 and the sending unit 1202 in the access device, or a processing unit, other operations or functions of the access device in the method in the embodiment shown in FIG. 26 may be implemented. For details, refer to the foregoing. The embodiment is not repeated here.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图23所示的通信系统,用于实现以上图26所示的实施例提供的同步方法。所述第二设备的结构同样可以参阅图13所示,所述第二设备可以包括接收单元1301、处理单元1302和发送单元1303。其中:Based on the above embodiment, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 26 above. method. For the structure of the second device, reference may also be made to FIG. 13. The second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
接收单元1301用于从接入设备接收第一报文;发送单元1303用于向第四设备发送所述第一报文;处理单元1302,用于确定第二时间戳信息,所述第二时间戳信息为所述第二设备发送所述第一报文时移动网络中的时刻;所述接收单元1301还用于从所述第四设备接收第五报文;所述处理单元1302还用于确定第三时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第五报文时所述移动网络中的时刻;所述发送单元1303还用于向所述接入设备发送第四报文,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息;所述接收单元1301还用于从所述接入设备接收第六时间戳信息;所述发送单元 1303还用于向所述第四设备发送所述第六时间戳信息,以使所述第四设备基于所述第六时间戳信息进行时间同步;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1301 is configured to receive a first message from an access device; the sending unit 1303 is configured to send the first message to a fourth device; and the processing unit 1302 is configured to determine second time stamp information and the second time The stamp information is the time in the mobile network when the second device sends the first message; the receiving unit 1301 is further configured to receive a fifth message from the fourth device; and the processing unit 1302 is further configured to Determining third time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the fifth message; and the sending unit 1303 is further configured to send an access message to the access device. The device sends a fourth message, where the fourth message carries the second timestamp information and the third timestamp information; the receiving unit 1301 is further configured to receive a sixth timestamp from the access device Information; the sending unit 1303 is further configured to send the sixth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth timestamp information; wherein the first The device is a user plane network element and the second device The terminal device, or, the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第二设备中的接收单元1301、处理单元1302和发送单元1303,还可实现上述图26所示的实施例方法中第二设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1301, the processing unit 1302, and the sending unit 1303 in the second device, other operations or functions of the second device in the method in the embodiment shown in FIG. 26 may also be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种第一设备,所述第一设备可以应用于如图1或图23所示的通信系统,用于实现以上图28所示的实施例提供的同步方法。所述第一设备的结构同样可以参阅图11所示,所述第一设备可以包括发送单元1101、处理单元1102和接收单元1103。其中:Based on the above embodiments, this application further provides a first device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method. For the structure of the first device, reference may also be made to FIG. 11. The first device may include a sending unit 1101, a processing unit 1102, and a receiving unit 1103. among them:
接收单元1103用于从第三设备接收第一报文;处理单元1102用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;发送单元1101用于基于所述第一报文向接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息;所述接收单元1103还用于从所述接入设备接收第三报文;所述发送单元1101还用于向所述第三设备发送所述第三报文;所述处理单元1102用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;所述接收单元1103还用于从所述第三设备接收第四报文,所述第四报文中携带第三时间戳信息,所述的第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;所述发送单元1101还用于将所述第二时间戳信息和所述第三时间戳信息发送给所述接入设备;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1103 is configured to receive a first message from a third device; the processing unit 1102 is configured to determine first time stamp information, where the first time stamp information is moved when the first device receives the first message Time in the network; the sending unit 1101 is configured to send a second message to the access device based on the first message, and the second message carries the first time stamp information; the receiving unit 1103 also uses Receiving a third message from the access device; the sending unit 1101 is further configured to send the third message to the third device; the processing unit 1102 is configured to determine second time stamp information, so The second time stamp information is a time in the mobile network when the first device sends the third message; the receiving unit 1103 is further configured to receive a fourth message from the third device, and the The fourth message carries third time stamp information, and the third time stamp information is a time in the Ethernet network when the third device receives the third message sent by the first device; the The sending unit 1101 is further configured to combine the second timestamp information with all Third time stamp information is sent to the access device; wherein the first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device The device is a user plane network element.
此外,基于所述第一设备中的接收单元1103、处理单元1102和发送单元1101,还可实现上述图28所示的实施例方法中第一设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1103, the processing unit 1102, and the sending unit 1101 in the first device, other operations or functions of the first device in the method in the embodiment shown in FIG. 28 may be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请还提供了一种接入设备,所述接入设备可以应用于如图1或图23所示的通信系统,用于实现以上图28所示的实施例提供的同步方法。所述接入设备的结构同样可以参阅图12所示,所述接入设备可以包括接收单元1201和发送单元1202。其中:Based on the above embodiments, this application further provides an access device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method. For the structure of the access device, reference may also be made to FIG. 12. The access device may include a receiving unit 1201 and a sending unit 1202. among them:
接收单元1201用于从所述第一设备接收第二报文,所述第二报文中携带第一时间戳信息,所述第二报文是所述第一设备从第三设备接收到第一报文后向所述接入设备发送的,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;发送单元1202用于基于所述第二报文向第二设备发送第五报文,所述第五报文中携带所述第一时间戳信息;The receiving unit 1201 is configured to receive a second message from the first device, where the second message carries first time stamp information, and the second message is the first message received by the first device from the third device. Sent to the access device after a message, the first time stamp information is the time in the mobile network when the first device receives the first message; the sending unit 1202 is configured to The second message sends a fifth message to the second device, and the fifth message carries the first time stamp information;
所述接收单元1201,还用于从所述第二设备接收第三报文;所述发送单元1202还用于向所述第一设备发送所述第三报文;所述接收单元1201还用于从所述第一设备接收第二时间戳信息和第三时间戳信息,所述第二时间戳信息为所述第一设备接收到所述第三报文后向第三设备发送所述第三报文时所述移动网络中的时刻;所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;所述发送单元 1202还用于向所述第二设备发送所述第二时间戳信息和所述第三时间戳信息;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1201 is further configured to receive a third message from the second device; the sending unit 1202 is further configured to send the third message to the first device; the receiving unit 1201 is further configured to: Receiving second time stamp information and third time stamp information from the first device, where the second time stamp information is that the first device sends the first time stamp to the third device after receiving the third message; The time in the mobile network during three messages; the third time stamp information is the time in the Ethernet network when the third device receives the third message sent by the first device; the sending The unit 1202 is further configured to send the second time stamp information and the third time stamp information to the second device; wherein the first device is a user plane network element and the second device is a terminal device, Alternatively, the first device is a terminal device and the second device is a user plane network element.
可选的,所述接入设备还可以包括处理单元,用于检测报文中的协议字段中的时间戳信息,具体的操作可以参见上述图28所示的实施例中接入设备的具体操作,此处不再赘述。Optionally, the access device may further include a processing unit for detecting time stamp information in a protocol field in the packet. For specific operations, refer to specific operations of the access device in the embodiment shown in FIG. 28 above. , Will not repeat them here.
此外,基于所述接入设备中的接收单元1201和发送单元1202,或者还有处理单元,还可实现上述图28所示的实施例方法中接入设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1201 and the sending unit 1202 in the access device, or a processing unit, other operations or functions of the access device in the method in the embodiment shown in FIG. 28 may also be implemented. For details, refer to the foregoing. The embodiment is not repeated here.
基于以上实施例,本申请还提供了一种第二设备,所述第二设备可以应用于如图1或图23所示的通信系统,用于实现以上图28所示的实施例提供的同步方法。所述第二设备的结构同样可以参阅图13所示,所述第二设备可以包括接收单元1301、处理单元1302和发送单元1303。其中:Based on the above embodiment, this application further provides a second device, which can be applied to the communication system shown in FIG. 1 or FIG. 23 to implement synchronization provided by the embodiment shown in FIG. 28 above. method. For the structure of the second device, reference may also be made to FIG. 13. The second device may include a receiving unit 1301, a processing unit 1302, and a sending unit 1303. among them:
接收单元1301用于从接入设备接收第五报文,所述第五报文中携带第一时间戳信息;所述第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;发送单元1303用于向第四设备发送第六报文;处理单元1302用于确定第四时间戳信息,所述第四时间戳信息为所述第二设备发送所述第六报文时所述移动网络中的时刻;所述接收单元1301还用于从所述第四设备接收第三报文;所述处理单元1302还用于确定第五时间戳信息;所述第五时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻;所述发送单元1303还用于向所述接入设备发送所述第三报文;所述接收单元1301还用于从所述接入设备接收第二时间戳信息和第三时间戳信息;所述第二时间戳信息为所述接入设备接收到所述第三报文并向所述第一设备发送所述第三报文后,所述第一设备向第三设备发送所述第三报文时所述移动网络中的时刻;所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;所述处理单元1302还用于根据所述第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息;所述发送单元1303还用于将所述第六时间戳信息发送给所述第四设备,以使所述第四设备基于所述第六时间戳信息进行时间同步;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The receiving unit 1301 is configured to receive a fifth message from the access device, where the fifth message carries first timestamp information; the first timestamp information is the first message received by the first device from the third device Time in a mobile network; a sending unit 1303 is configured to send a sixth message to a fourth device; a processing unit 1302 is configured to determine fourth time stamp information, where the fourth time stamp information is sent by the second device The sixth message is the time in the mobile network; the receiving unit 1301 is further configured to receive a third message from the fourth device; the processing unit 1302 is further configured to determine fifth time stamp information; the The fifth time stamp information is a time in the mobile network when the second device receives the third message; the sending unit 1303 is further configured to send the third message to the access device; The receiving unit 1301 is further configured to receive second timestamp information and third timestamp information from the access device; the second timestamp information is the third message received by the access device and sent to the access device. After the first device sends the third message, the The time in the mobile network when the first device sends the third message to the third device; the third time stamp information is the third message received by the third device and sent by the first device The time in the time Ethernet network; the processing unit 1302 is further configured to determine the first time stamp information according to the first time stamp information, the second time stamp information, the third time stamp information, the fourth time stamp information, and the fifth time stamp information; Six timestamp information; the sending unit 1303 is further configured to send the sixth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth timestamp information; wherein, The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
此外,基于所述第二设备中的接收单元1301、处理单元1302和发送单元1303,还可实现上述图28所示的实施例方法中第二设备的其他操作或功能,具体可以参见上述实施例,此处不再赘述。In addition, based on the receiving unit 1301, the processing unit 1302, and the sending unit 1303 in the second device, other operations or functions of the second device in the method in the embodiment shown in FIG. 28 may be implemented. For details, refer to the foregoing embodiments. , Will not repeat them here.
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图2所示的通信系统,用于实现如图21所示的同步方法。同样可以参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21. Referring also to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是CPU,NP或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也 可以通过硬件执行相应的软件实现。The processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, or of course, by executing corresponding software by hardware.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图21所示的同步方法,具体可以参见上述图21所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 21, and details are not described herein again.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如图21所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1或图2所示的通信系统,用于实现如图21所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图21所示的同步方法,具体可以参见上述图21所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 21, and details are not described herein again.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图21所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图21所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2 to implement the synchronization method shown in FIG. 21. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可 以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the above functions, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图21所示的同步方法,具体可以参见上述图7所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 21. For details, refer to the related description in the embodiment shown in FIG. 7, and details are not described herein again.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图21所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 21.
基于以上实施例,本申请实施例还提供了一种第一设备,所述第一设备应用于如图1或图23所示的通信系统,可以用于实现如图24、图26或者图28所示的同步方法。同样可以参阅图18所示,所述第一设备包括:收发器1801、处理器1802以及存储器1803,其中:Based on the above embodiments, an embodiment of the present application further provides a first device. The first device is applied to a communication system as shown in FIG. 1 or FIG. 23, and may be used to implement FIG. 24, FIG. 26, or FIG. 28. Synchronization method shown. Referring also to FIG. 18, the first device includes a transceiver 1801, a processor 1802, and a memory 1803, where:
其中,处理器1802可以是CPU,NP或者CPU和NP的组合等等。处理器1802还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1802在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1802 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 1802 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1802 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1801、所述处理器1802以及所述存储器1803之间相互连接。可选的,所述收发器1801、所述处理器1802以及所述存储器1803通过总线1804相互连接;所述总线1804可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图18中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1801, the processor 1802, and the memory 1803 are connected to each other. Optionally, the transceiver 1801, the processor 1802, and the memory 1803 are connected to each other through a bus 1804; the bus 1804 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 18, but it does not mean that there is only one bus or one type of bus.
所述收发器1801,用于与其他设备进行通信交互。The transceiver 1801 is configured to communicate and interact with other devices.
所述处理器1802,用于实现如图24、图26或者图28所示的同步方法,具体可以分别参见上述图24、图26或者图28所示的实施例中的相关描述,此处不再赘述。The processor 1802 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to related descriptions in the embodiments shown in FIG. 24, FIG. 26, or FIG. 28, respectively. More details.
所述存储器1803,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1803可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1802执行所述存储器1803所存放的应用程序,实现上述功能,从而实现如24、图26或者图28所示的同步方法。The memory 1803 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1803 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one disk memory. The processor 1802 executes an application program stored in the memory 1803 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 24, FIG. 26, or FIG. 28.
基于以上实施例,本申请实施例还提供了一种接入设备,所述接入设备应用于如图1 或图2所示的通信系统,用于实现如图24、图26或者图28所示的同步方法。参阅图19所示,所述接入设备包括:收发器1901、处理器1902以及存储器1903,其中:Based on the above embodiments, an embodiment of the present application further provides an access device, which is applied to a communication system as shown in FIG. 1 or FIG. 2 and is used to implement the communication device shown in FIG. The synchronization method shown below. Referring to FIG. 19, the access device includes a transceiver 1901, a processor 1902, and a memory 1903, where:
其中,处理器1902可以是CPU,NP或者CPU和NP的组合等等。处理器1902还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器1902在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 1902 may be a CPU, an NP, or a combination of a CPU and an NP. The processor 1902 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 1902 implements the foregoing functions, it may be implemented by hardware, and of course, it may also be implemented by hardware executing corresponding software.
所述收发器1901、所述处理器1902以及所述存储器1903之间相互连接。可选的,所述收发器1901、所述处理器1902以及所述存储器1903通过总线1904相互连接;所述总线1904可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图19中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 1901, the processor 1902, and the memory 1903 are connected to each other. Optionally, the transceiver 1901, the processor 1902, and the memory 1903 are connected to each other through a bus 1904; the bus 1904 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only a thick line is used in FIG. 19, but it does not mean that there is only one bus or one type of bus.
所述收发器1901,用于与其他设备进行通信交互。The transceiver 1901 is configured to communicate and interact with other devices.
所述处理器1902,用于实现如图24、图26或者图28所示的同步方法,具体可以分别参见上述图24、图26或者图28所示的实施例中的相关描述,此处不再赘述。The processor 1902 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to the related description in the embodiments shown in FIG. 24, FIG. 26, or FIG. 28, respectively. More details.
所述存储器1903,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器1903可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器1902执行所述存储器1903所存放的应用程序,实现上述功能,从而实现如图24、图26或者图28所示的同步方法。The memory 1903 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 1903 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 1902 executes an application program stored in the memory 1903 to implement the foregoing functions, thereby implementing the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28.
基于以上实施例,本申请实施例还提供了一种第二设备,所述第二设备应用于如图1或图2所示的通信系统,用于实现如图24、图26或者图28所示的同步方法。参阅图20所示,所述第二设备包括:收发器2001、处理器2002以及存储器2003,其中:Based on the above embodiments, an embodiment of the present application further provides a second device, which is applied to the communication system shown in FIG. 1 or FIG. 2, and is used to implement the device shown in FIG. 24, FIG. 26, or FIG. 28. The synchronization method shown below. Referring to FIG. 20, the second device includes a transceiver 2001, a processor 2002, and a memory 2003, where:
其中,处理器2002可以是CPU,NP或者CPU和NP的组合等等。处理器2002还可以进一步包括硬件芯片。上述硬件芯片可以是ASIC,PLD或其组合。上述PLD可以是CPLD,FPGA,GAL或其任意组合。处理器2002在实现上述功能时,可以通过硬件实现,当然也可以通过硬件执行相应的软件实现。The processor 2002 may be a CPU, an NP, or a combination of a CPU and an NP, and so on. The processor 2002 may further include a hardware chip. The aforementioned hardware chip may be an ASIC, a PLD, or a combination thereof. The PLD may be a CPLD, an FPGA, a GAL, or any combination thereof. When the processor 2002 realizes the above functions, it can be implemented by hardware, and of course, it can also be implemented by hardware executing corresponding software.
所述收发器2001、所述处理器2002以及所述存储器2003之间相互连接。可选的,所述收发器2001、所述处理器2002以及所述存储器2003通过总线2004相互连接;所述总线2004可以是外设部件互连标准(Peripheral Component Interconnect,PCI)总线或扩展工业标准结构(Extended Industry Standard Architecture,EISA)总线等。所述总线可以分为地址总线、数据总线、控制总线等。为便于表示,图20中仅用一条粗线表示,但并不表示仅有一根总线或一种类型的总线。The transceiver 2001, the processor 2002, and the memory 2003 are connected to each other. Optionally, the transceiver 2001, the processor 2002, and the memory 2003 are connected to each other through a bus 2004; the bus 2004 may be a Peripheral Component Interconnect (PCI) bus or an extended industry standard Structure (Extended Industry, Standard Architecture, EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, and the like. For ease of representation, only one thick line is used in FIG. 20, but it does not mean that there is only one bus or one type of bus.
所述收发器2001,用于与其他设备进行通信交互。The transceiver 2001 is configured to perform communication interaction with other devices.
所述处理器2002,用于实现如图24、图26或者图28所示的同步方法,具体可以参见上述图24、图26或者图28所示的实施例中的相关描述,此处不再赘述。The processor 2002 is configured to implement the synchronization method shown in FIG. 24, FIG. 26, or FIG. 28. For details, refer to related descriptions in the embodiments shown in FIG. 24, FIG. 26, or FIG. To repeat.
所述存储器2003,用于存放程序等。具体地,程序可以包括程序代码,该程序代码包括计算机操作指令。所述存储器2003可能包括RAM,也可能还包括非易失性存储器(non-volatile memory),例如至少一个磁盘存储器。所述处理器2002执行所述存储器2003所存放的应用程序,实现上述功能,从而实现如图24、图26或者图28所示的同步方法。The memory 2003 is used to store programs and the like. Specifically, the program may include program code, where the program code includes a computer operation instruction. The memory 2003 may include a RAM, and may also include a non-volatile memory (non-volatile memory), for example, at least one magnetic disk memory. The processor 2002 executes an application program stored in the memory 2003 to implement the foregoing functions, thereby implementing a synchronization method as shown in FIG. 24, FIG. 26, or FIG. 28.
综上所述,通过本申请实施例提供一种同步方法及装置,在时钟同步过程中,可以避免第一设备和第二设备之间的传输时延的影响,从而可以实现移动网络与以太网络对接场景中,满足工业工厂的时钟精度需求。In summary, the embodiments of the present application provide a synchronization method and device. During the clock synchronization process, the influence of the transmission delay between the first device and the second device can be avoided, thereby realizing the mobile network and the Ethernet network. In the docking scenario, the clock accuracy requirements of industrial factories are met.
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。Those skilled in the art should understand that the embodiments of the present application may be provided as a method, a system, or a computer program product. Therefore, this application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, this application may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
本申请是参照根据本申请实施例的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。This application is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present application. It should be understood that each process and / or block in the flowcharts and / or block diagrams, and combinations of processes and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, so that instructions generated by the processor of the computer or other programmable data processing device may be used to Means for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to work in a specific manner such that the instructions stored in the computer-readable memory produce a manufactured article including an instruction device, the instructions The device implements the functions specified in one or more flowcharts and / or one or more blocks of the block diagram.
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of steps can be performed on the computer or other programmable device to produce a computer-implemented process, which can be executed on the computer or other programmable device. The instructions provide steps for implementing the functions specified in one or more flowcharts and / or one or more blocks of the block diagrams.
显然,本领域的技术人员可以对本申请实施例进行各种改动和变型而不脱离本申请实施例的范围。这样,倘若本申请实施例的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the scope of the embodiments of the present application. In this way, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application also intends to include these changes and variations.

Claims (79)

  1. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备向接入设备发送第一报文,所述第一报文中携带第一时间戳信息,并确定第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;The first device sends a first message to the access device, the first message carries the first time stamp information, and determines the second time stamp information, where the first time stamp information is sent by the first device The time in the Ethernet network when the first message is described, and the second time stamp information is the time in the mobile network when the first device sends the first message;
    所述第一设备从所述接入设备接收第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为第二设备接收到所述接入设备基于所述第一报文向所述第二设备发送的第三报文时所述移动网络中的时刻,所述第四时间戳信息为所述第二设备向所述接入设备发送第四报文时所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;The first device receives a second message from the access device, the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is received by the second device The time in the mobile network when the access device sends a third message to the second device based on the first message, and the fourth time stamp information is the time when the second device sends the message to the access device. The moment in the mobile network when the incoming device sends a fourth message; the second message is sent by the access device to the first device based on the fourth message;
    所述第一设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第一设备接收到所述第二报文时所述以太网络中的时刻,所述第六时间戳信息为所述第一设备接收到所述第二报文时所述移动网络中的时刻;The first device determines fifth time stamp information and sixth time stamp information, the fifth time stamp information is a time in the Ethernet network when the first device receives the second message, the The sixth time stamp information is a time in the mobile network when the first device receives the second message;
    所述第一设备根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定第七时间戳信息;Determining, by the first device, a seventh timestamp based on the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, and the sixth timestamp information information;
    所述第一设备将所述第七时间戳信息通过所述接入设备转发给所述第二设备;The first device forwards the seventh timestamp information to the second device through the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  2. 如权利要求1所述的方法,其特征在于,所述第一设备根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定所述第七时间戳信息,包括:The method according to claim 1, wherein the first device is based on the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information Determining the seventh timestamp information with the sixth timestamp information includes:
    所述第一设备根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第六时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining, by the first device, between the first device and the second device according to the second time stamp information, the third time stamp information, the fourth time stamp information, and the sixth time stamp information. Round-trip transmission delay difference between rounds;
    所述第一设备计算所述第五时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第七时间戳信息。The first device calculates a sum of a time corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the seventh time stamp information.
  3. 如权利要求1或2所述的方法,其特征在于,所述第一设备从所述接入设备接收第二报文之后,所述方法还包括:The method according to claim 1 or 2, wherein after the first device receives a second message from the access device, the method further comprises:
    所述第一设备提取所述第二报文包括的第一协议字段中携带的所述第三时间戳信息和所述第四时间戳信息。Extracting, by the first device, the third time stamp information and the fourth time stamp information carried in a first protocol field included in the second message.
  4. 如权利要求3所述的方法,其特征在于,The method of claim 3, wherein:
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  5. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第三报文,所述第三报文中携带第一时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设 备为用户面网元;The second device receives a third message from the access device, and the third message carries first time stamp information, where the first time stamp information is a time in the Ethernet network when the first device sends the first message; The third message is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane network element and The second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element;
    所述第二设备确定第三时间戳信息和第八时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻,所述第八时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻;The second device determines third time stamp information and eighth time stamp information, the third time stamp information is a time in the mobile network when the second device receives the third message, the The eighth time stamp information is a time in the Ethernet network when the second device receives the third message;
    所述第二设备向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息和第四时间戳信息,所述第四时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;Sending, by the second device, a fourth message to the access device, where the fourth message carries the third time stamp information and the fourth time stamp information, and the fourth time stamp information is the first time stamp information The time in the mobile network when the two devices send the fourth message to the access device;
    所述第二设备确定第九时间戳信息,所述第九时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻;The second device determines ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device;
    所述第二设备从所述接入设备接收第七时间戳信息;Receiving, by the second device, seventh time stamp information from the access device;
    所述第二设备根据所述第一时间戳信息、所述第八时间戳信息、所述第九时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。Determining, by the second device, between the first device and the second device according to the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Between the time deviations, and time synchronization is performed according to the time deviations.
  6. 如权利要求5所述的方法,其特征在于,所述方法还包括:The method according to claim 5, further comprising:
    所述第二设备根据所述第七时间戳信息确定所述第一设备接收到第二报文时所述以太网络中的时刻,所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的。Determining, by the second device, a time in the Ethernet network when the first device receives a second message according to the seventh timestamp information, and the second message is based on the Four messages are sent to the first device.
  7. 如权利要求5或6所述的方法,其特征在于,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息,包括:The method according to claim 5 or 6, wherein the fourth message carries the third time stamp information and the fourth time stamp information, comprising:
    所述第二设备将所述第三时间戳信息和所述第四时间戳信息携带在所述第四报文包括的第二协议字段中。The second device carries the third timestamp information and the fourth timestamp information in a second protocol field included in the fourth message.
  8. 如权利要求7所述的方法,其特征在于,The method of claim 7, wherein:
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field;
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  9. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备向接入设备发送第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;The first device sends a first message to the access device, where the first message carries first time stamp information and second time stamp information, and the first time stamp information is the first device sending the first time stamp information. A time in the Ethernet network during a message, and the second time stamp information is a time in the mobile network when the first device sends the first message;
    所述第一设备从所述接入设备接收第二报文,并确定第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;Receiving, by the first device, a second message from the access device, and determining third time stamp information and fourth time stamp information, where the third time stamp information is that the first device receives the second time stamp The time when the message is in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device receives the second message;
    所述第一设备将所述第三时间戳信息和所述第四时间戳信息发送给所述接入设备,所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息用于时间同步;Sending, by the first device, the third timestamp information and the fourth timestamp information to the access device, the first timestamp information, the second timestamp information, and the third time The stamp information and the fourth time stamp information are used for time synchronization;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  10. 如权利要求9所述的方法,其特征在于,所述第一报文中携带所述第二时间戳信息,包括:The method according to claim 9, wherein the first message carrying the second timestamp information comprises:
    所述第一设备将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。The first device carries the second time stamp information in a first protocol field included in the first packet.
  11. 如权利要求10所述的方法,其特征在于,The method of claim 10, wherein:
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。When the first device is a terminal device, the first protocol field is in a service data protocol SDAP field or a data aggregation protocol PDCP field.
  12. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第三报文,所述第三报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;The second device receives a third message from the access device, and the third message carries the first time stamp information and the second time stamp information, and the first time stamp information is when the first device sends the first message The time in the Ethernet network; the second time stamp information is the time in the mobile network when the first device sends the first message; the third message is the time when the access device sends the first message from the first device And is sent based on the first message after the device receives the first message, wherein the first device is a user plane network element and the second device is a terminal device, or the first device is A terminal device and the second device is a user plane network element;
    所述第二设备确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第三报文时所述以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻;The second device determines fifth time stamp information and sixth time stamp information, where the fifth time stamp information is a time in the Ethernet network when the second device receives the third message, and The sixth time stamp information is a time in the mobile network when the second device receives the third message;
    所述第二设备向所述接入设备发送第四报文,并确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻,所述第八时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;Sending, by the second device, a fourth message to the access device, and determining seventh time stamp information and eighth time stamp information, where the seventh time stamp information is the second device sending to the access device The time in the Ethernet network when the fourth message is sent, and the eighth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device ;
    所述第二设备从所述接入设备接收第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;Receiving, by the second device, third timestamp information and fourth timestamp information from the access device, where the third timestamp information is in the Ethernet network when the first device receives the second message Time, the fourth timestamp information is the time in the mobile network when the first device received the second message; the second message is based on the Four packets are sent to the first device;
    所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。The second device according to the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth timestamp information, the third timestamp information, the fourth The timestamp information, the fifth timestamp information, and the seventh timestamp information determine a time offset between the first device and the second device, and perform time synchronization according to the time offset.
  13. 如权利要求12所述的方法,其特征在于,所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,包括:The method according to claim 12, wherein the second device is based on the first timestamp information, the second timestamp information, the sixth timestamp information, and the eighth timestamp information , The third time stamp information, the fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time offset between the first device and the second device, include:
    所述第二设备根据所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息和所述第四时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining, by the second device, between the first device and the second device according to the second time stamp information, the sixth time stamp information, the eighth time stamp information, and the fourth time stamp information. Round-trip transmission delay difference between rounds;
    所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差。Determining, by the second device, the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and the round-trip transmission delay difference value. A time offset between a device and the second device.
  14. 如权利要求13所述的方法,其特征在于,所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差,包括:The method according to claim 13, wherein the second device is based on the first timestamp information, the third timestamp information, the fifth timestamp information, and the seventh timestamp information Determining the time difference between the first device and the second device with the round-trip transmission delay difference includes:
    所述第二设备确定第九时间戳信息,所述第九时间戳信息为所述第三时间戳信息对应 的时刻与所述往返传输时延差值的和;Determining, by the second device, ninth time stamp information, which is a sum of a time corresponding to the third time stamp information and the round-trip transmission delay difference value;
    所述第二设备根据所述第一时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。Determining, by the second device, between the first device and the second device according to the first timestamp information, the fifth timestamp information, the seventh timestamp information, and the ninth timestamp information Time deviation.
  15. 如权利要求12-14任一项所述的方法,其特征在于,所述第二设备从接入设备接收第三报文之后,所述方法还包括:The method according to any one of claims 12 to 14, wherein after the second device receives the third packet from the access device, the method further comprises:
    所述第二设备提取所述第三报文包括的第二协议字段中携带的所述第二时间戳信息。Extracting, by the second device, the second time stamp information carried in a second protocol field included in the third message.
  16. 如权利要求15所述的方法,其特征在于,The method according to claim 15, wherein:
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field;
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  17. 一种第一设备,其特征在于,包括:A first device, comprising:
    发送单元,用于向接入设备发送第一报文,所述第一报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻;A sending unit, configured to send a first message to the access device, where the first message carries first timestamp information, and the first timestamp information is when the first device sends the first message Moments in Ethernet networks;
    处理单元,用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A processing unit, configured to determine second time stamp information, where the second time stamp information is a time in a mobile network when the first device sends the first message;
    接收单元,用于从所述接入设备接收第二报文,所述第二报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为第二设备接收到所述接入设备基于所述第一报文向所述第二设备发送的第三报文时所述移动网络中的时刻,所述第四时间戳信息为所述第二设备向所述接入设备发送第四报文时所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;A receiving unit, configured to receive a second message from the access device, where the second message carries third time stamp information and fourth time stamp information, and the third time stamp information is received by the second device The time in the mobile network when the access device sends a third message to the second device based on the first message, and the fourth time stamp information is the time when the second device sends the message to the access device. The moment in the mobile network when the incoming device sends a fourth message; the second message is sent by the access device to the first device based on the fourth message;
    所述处理单元,还用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第一设备接收到所述第二报文时所述以太网络中的时刻,所述第六时间戳信息为所述第一设备接收到所述第二报文时所述移动网络中的时刻;The processing unit is further configured to determine fifth time stamp information and sixth time stamp information, where the fifth time stamp information is a time in the Ethernet network when the first device receives the second message. The sixth time stamp information is a time in the mobile network when the first device receives the second message;
    所述处理单元,还用于根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定第七时间戳信息;The processing unit is further configured to determine a first time stamp according to the second time stamp information, the third time stamp information, the fourth time stamp information, the fifth time stamp information, and the sixth time stamp information. Seven timestamp information;
    所述发送单元,还用于将所述第七时间戳信息通过所述接入设备转发给所述第二设备;The sending unit is further configured to forward the seventh timestamp information to the second device through the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  18. 如权利要求17所述的第一设备,其特征在于,所述处理单元,在根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第六时间戳信息确定所述第七时间戳信息时,具体用于:The first device according to claim 17, wherein the processing unit, in accordance with the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth When the timestamp information and the sixth timestamp information determine the seventh timestamp information, it is specifically used to:
    根据所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第六时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the second time stamp information, the third time stamp information, the fourth time stamp information, and the sixth time stamp information Delay difference
    计算所述第五时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第七时间戳信息。Calculate the sum of the time corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the seventh time stamp information.
  19. 如权利要求17或18所述的第一设备,其特征在于,所述处理单元,还用于:The first device according to claim 17 or 18, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第二报文之后,提取所述第二报文包括的第一协议字段中携带的所述第三时间戳信息和所述第四时间戳信息。After the receiving unit receives a second message from the access device, the third time stamp information and the fourth time stamp information carried in a first protocol field included in the second message are extracted.
  20. 如权利要求19所述的第一设备,其特征在于,The first device according to claim 19, wherein:
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  21. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;A receiving unit, configured to receive a third message from the access device, where the third message carries first timestamp information, where the first timestamp information is in the Ethernet network when the first device sends the first message; Time; the third message is sent by the access device based on the first message after receiving the first message from the first device; wherein the first device is a user plane network And the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element;
    处理单元,用于确定第三时间戳信息和第八时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻,所述第八时间戳信息为所述第二设备接收到所述第三报文时以太网络中的时刻;A processing unit, configured to determine third time stamp information and eighth time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the third message, and the The eighth time stamp information is a time in the Ethernet network when the second device receives the third message;
    发送单元,用于向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息和第四时间戳信息,所述第四时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;A sending unit, configured to send a fourth message to the access device, where the fourth message carries the third time stamp information and the fourth time stamp information, and the fourth time stamp information is the first time stamp information The time in the mobile network when the two devices send the fourth message to the access device;
    所述处理单元,还用于确定第九时间戳信息,所述第九时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻;The processing unit is further configured to determine ninth time stamp information, where the ninth time stamp information is a time in the Ethernet network when the second device sends the fourth message to the access device;
    所述接收单元,还用于从所述接入设备接收第七时间戳信息;The receiving unit is further configured to receive seventh timestamp information from the access device;
    所述处理单元,还用于根据所述第一时间戳信息、所述第八时间戳信息、所述第九时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。The processing unit is further configured to determine the first device and the first device according to the first time stamp information, the eighth time stamp information, the ninth time stamp information, and the seventh time stamp information. Time deviation between the two devices, and time synchronization is performed according to the time deviation.
  22. 如权利要求21所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to claim 21, wherein the processing unit is further configured to:
    根据所述第七时间戳信息确定所述第一设备接收到第二报文时所述以太网络中的时刻,所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的。Determine the time in the Ethernet network when the first device receives the second message according to the seventh timestamp information, and the second message is sent by the access device to the server based on the fourth message. Said by the first device.
  23. 如权利要求21或22所述的第二设备,其特征在于,所述第四报文中携带所述第三时间戳信息和所述第四时间戳信息时,所述发送单元,具体用于:The second device according to claim 21 or 22, wherein when the fourth packet carries the third time stamp information and the fourth time stamp information, the sending unit is specifically configured to: :
    将所述第三时间戳信息和所述第四时间戳信息携带在所述第四报文包括的第二协议字段中。Carrying the third timestamp information and the fourth timestamp information in a second protocol field included in the fourth message.
  24. 如权利要求23所述的第二设备,其特征在于,The second device according to claim 23, wherein
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field;
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  25. 一种第一设备,其特征在于,包括:A first device, comprising:
    发送单元,用于向接入设备发送第一报文,所述第一报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A sending unit, configured to send a first message to the access device, where the first message carries first and second timestamp information, and the first timestamp information is sent by the first device The time in the Ethernet network when the first message is described, and the second time stamp information is the time in the mobile network when the first device sends the first message;
    接收单元,用于从所述接入设备接收第二报文,并确定第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第二报文时在所述以太网络中的时 刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;A receiving unit, configured to receive a second message from the access device, and determine third time stamp information and fourth time stamp information, where the third time stamp information is that the first device receives the second time stamp The time when the message is in the Ethernet network, and the fourth time stamp information is the time in the mobile network when the first device receives the second message;
    所述发送单元,还用于将所述第三时间戳信息和所述第四时间戳信息发送给所述接入设备,所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息用于时间同步;The sending unit is further configured to send the third timestamp information and the fourth timestamp information to the access device, the first timestamp information, the second timestamp information, the The third timestamp information and the fourth timestamp information are used for time synchronization;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  26. 如权利要求25所述的第一设备,其特征在于,所述第一报文中携带所述第二时间戳信息时,所述发送单元,具体用于:The first device according to claim 25, wherein when the first message carries the second time stamp information, the sending unit is specifically configured to:
    将所述第二时间戳信息携带在所述第一报文包括的第一协议字段中。Carrying the second time stamp information in a first protocol field included in the first message.
  27. 如权利要求26所述的第一设备,其特征在于,The first device according to claim 26, wherein
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。When the first device is a terminal device, the first protocol field is in a service data protocol SDAP field or a data aggregation protocol PDCP field.
  28. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第三报文,所述第三报文中携带第一时间戳信息和第二时间戳信息,所述第一时间戳信息为第一设备发送第一报文时以太网络中的时刻;所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;所述第三报文是所述接入设备从所述第一设备接收到所述第一报文之后基于所述第一报文发送的;其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元;A receiving unit, configured to receive a third message from the access device, where the third message carries first time stamp information and second time stamp information, and the first time stamp information is the first device sending the first message The time in the Ethernet network; the second time stamp information is the time in the mobile network when the first device sends the first message; the third message is the time when the access device sends Sent by the first device based on the first message after receiving the first message; wherein the first device is a user plane network element and the second device is a terminal device, or the first device The device is a terminal device and the second device is a user plane network element;
    处理单元,用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第三报文时所述以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻;A processing unit, configured to determine fifth time stamp information and sixth time stamp information, where the fifth time stamp information is a time in the Ethernet network when the second device receives the third message, and the The sixth time stamp information is a time in the mobile network when the second device receives the third message;
    发送单元,用于向所述接入设备发送第四报文,并确定第七时间戳信息和第八时间戳信息,所述第七时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述以太网络中的时刻,所述第八时间戳信息为所述第二设备向所述接入设备发送所述第四报文时所述移动网络中的时刻;A sending unit, configured to send a fourth message to the access device, and determine seventh timestamp information and eighth timestamp information, where the seventh timestamp information is from the second device to the access device The time in the Ethernet network when the fourth message is sent, and the eighth timestamp information is the time in the mobile network when the second device sends the fourth message to the access device ;
    所述接收单元,还用于从所述接入设备接收第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备接收到第二报文时在所述以太网络中的时刻,所述第四时间戳信息为所述第一设备接收到所述第二报文时在所述移动网络中的时刻;所述第二报文为所述接入设备基于所述第四报文向所述第一设备发送的;The receiving unit is further configured to receive third timestamp information and fourth timestamp information from the access device, where the third timestamp information is in the first device when the second device receives the second message. The time in the Ethernet network, the fourth time stamp information is the time in the mobile network when the first device received the second message; the second message is based on the access device The fourth message is sent to the first device;
    所述处理单元,还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步。The processing unit is further configured to: according to the first time stamp information, the second time stamp information, the sixth time stamp information, the eighth time stamp information, the third time stamp information, The fourth time stamp information, the fifth time stamp information, and the seventh time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation.
  29. 如权利要求28所述的第二设备,其特征在于,所述处理单元,在根据所述第一时间戳信息、所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息和所述第七时间戳信息确定所述第一设备和所述第二设备之间的时间偏差时,具体用于:The second device according to claim 28, wherein the processing unit, in accordance with the first timestamp information, the second timestamp information, the sixth timestamp information, the eighth The timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, and the seventh timestamp information determine the time between the first device and the second device. When the time is offset, it is specifically used for:
    根据所述第二时间戳信息、所述第六时间戳信息、所述第八时间戳信息和所述第四时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the second time stamp information, the sixth time stamp information, the eighth time stamp information, and the fourth time stamp information Delay difference
    根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差。Determining the first device and the first device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, and the round-trip transmission delay difference value Time deviation between the second devices.
  30. 如权利要求29所述的第二设备,其特征在于,所述处理单元,在根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述往返传输时延差值确定所述第一设备和所述第二设备之间的时间偏差时,具体用于:The second device according to claim 29, wherein the processing unit, in accordance with the first timestamp information, the third timestamp information, the fifth timestamp information, and the seventh When the time stamp information and the round-trip transmission delay difference value determine a time deviation between the first device and the second device, the method is specifically used to:
    确定第九时间戳信息,所述第九时间戳信息为所述第三时间戳信息对应的时刻与所述往返传输时延差值的和;Determining ninth time stamp information, where the ninth time stamp information is a sum of a time corresponding to the third time stamp information and the round-trip transmission delay difference value;
    根据所述第一时间戳信息、所述第五时间戳信息、所述第七时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。Determining a time offset between the first device and the second device according to the first time stamp information, the fifth time stamp information, the seventh time stamp information, and the ninth time stamp information.
  31. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备从第三设备接收第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;Receiving, by a first device, a first message from a third device, and determining first time stamp information, where the first time stamp information is a time in a mobile network when the first device receives the first message;
    所述第一设备通过接入设备向第二设备发送所述第一报文;Sending, by the first device, the first message to a second device through an access device;
    所述第一设备从所述第三设备接收第二报文后,基于所述第二报文向所述接入设备发送第三报文,所述第三报文中携带所述第一时间戳信息;After receiving the second message from the third device, the first device sends a third message to the access device based on the second message, and the third message carries the first time Stamp information
    所述第一设备从接入设备接收第四报文后,向所述第三设备发送所述第四报文,并确定第二时间戳信息,所述第二时间戳信息为所述第一设备向所述第三设备发送所述第四报文时移动网络中的时刻;After receiving the fourth message from the access device, the first device sends the fourth message to the third device, and determines second time stamp information, where the second time stamp information is the first The time in the mobile network when the device sends the fourth message to the third device;
    所述第一设备从所述第三设备接收第五报文,并确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第五报文时移动网络中的时刻;Receiving, by the first device, a fifth message from the third device, and determining third time stamp information, where the third time stamp information is in a mobile network when the first device receives the fifth message The moment
    所述第一设备基于所述第五报文向所述接入设备发送第六报文,所述第六报文中携带所述第二时间戳信息;Sending, by the first device, a sixth message to the access device based on the fifth message, where the sixth message carries the second time stamp information;
    所述第一设备从所述第三设备接收第七报文后,向所述接入设备发送第八报文;所述第七报文中携带第四时间戳信息,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻,所述第八报文中携带所述第三时间戳信息和所述第四时间戳信息;After receiving the seventh message from the third device, the first device sends an eighth message to the access device; the seventh message carries fourth time stamp information, and the fourth time stamp The information is the time in the Ethernet network when the third device sends the fifth message to the first device, and the eighth message carries the third time stamp information and the fourth time stamp information. ;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  32. 如权利要求31所述的方法,其特征在于,所述第三报文中携带所述第一时间戳信息,包括:The method according to claim 31, wherein the carrying of the first timestamp information in the third packet comprises:
    所述第一设备将所述第一时间戳信息携带在所述第三报文包括的第一协议字段中;The first device carries the first time stamp information in a first protocol field included in the third message;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  33. 如权利要求31或32所述的方法,其特征在于,所述第六报文中携带所述第二时间戳信息,包括:The method according to claim 31 or 32, wherein the sixth message carries the second time stamp information, comprising:
    所述第一设备将所述第二时间戳信息携带在所述第六报文包括的第二协议字段中;The first device carries the second time stamp information in a second protocol field included in the sixth message;
    当所述第一设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  34. 如权利要求31-33任一项所述的方法,其特征在于,所述第八报文中携带所述第三时间戳信息,包括:The method according to any one of claims 31 to 33, wherein the third timestamp information carried in the eighth packet includes:
    所述第一设备将所述第三时间戳信息携带在所述第八报文包括的第三协议字段中;The first device carries the third time stamp information in a third protocol field included in the eighth message;
    当所述第一设备为终端设备时,所述第三协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the third protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第三协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the third protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  35. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第一报文后,向第四设备发送所述第一报文,并确定第五时间戳信息,所述第五时间戳信息为所述第二设备向所述第四设备发送所述第一报文时移动网络中的时刻;After the second device receives the first message from the access device, it sends the first message to the fourth device, and determines fifth time stamp information, where the fifth time stamp information is sent by the second device to the The time in the mobile network when the fourth device sends the first message;
    所述第二设备从所述接入设备接收第九报文后,基于所述第九报文向所述第四设备发送第十二报文;所述第九报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备从第三设备接收到所述第一报文时移动网络中的时刻;After receiving the ninth message from the access device, the second device sends a twelfth message to the fourth device based on the ninth message; the ninth message carries a first time stamp Information, the first time stamp information is a time in the mobile network when the first device receives the first message from a third device;
    所述第二设备从所述第四设备接收第四报文,并确定第六时间戳信息,所述第六时间戳信息为所述第二设备接收到所述第四报文时移动网络中的时刻;Receiving, by the second device, a fourth message from the fourth device, and determining sixth time stamp information, where the sixth time stamp information is in a mobile network when the second device receives the fourth message The moment
    所述第二设备向所述接入设备发送所述第四报文;Sending, by the second device, the fourth message to the access device;
    所述第二设备从所述接入设备接收第十报文;所述第十报文中携带第二时间戳信息,所述第二时间戳信息为所述接入设备将所述第四报文发送给第一设备后,所述第一设备向第三设备发送所述第四报文时移动网络中的时刻;Receiving, by the second device, a tenth message from the access device; the tenth message carries second time stamp information, and the second time stamp information is that the access device sends the fourth message The time in the mobile network when the first device sends the fourth message to the third device after the text is sent to the first device;
    所述第二设备向所述第四设备发送第十三报文,并确定第七时间戳信息;所述第七时间戳信息为所述第二设备向所述第四设备发送所述第十三报文时移动网络中的时刻;The second device sends a thirteenth message to the fourth device, and determines seventh time stamp information; the seventh time stamp information is that the second device sends the tenth message to the fourth device Moments in the mobile network at three message times;
    所述第二设备从所述接入设备接收第十一报文,所述第十一报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备从所述第三设备接收到所述第五报文时移动网络中的时刻,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;The second device receives an eleventh message from the access device, the eleventh message carries third time stamp information and fourth time stamp information, and the third time stamp information is the first time stamp information A moment in the mobile network when a device receives the fifth message from the third device, and the fourth time stamp information is when the third device sends the fifth message to the first device Moments in Ethernet networks;
    所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息和所述第七时间戳信息,确定第八时间戳信息;The second device according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, the sixth Determining the eighth timestamp information with the timestamp information and the seventh timestamp information;
    所述第二设备将所述第八时间戳信息发送给所述第四设备,以使所述第四设备基于所述第八时间戳信息进行时间同步。The second device sends the eighth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth time stamp information.
  36. 如权利要求35所述的方法,其特征在于,所述第二设备从所述接入设备接收第九报文之后,所述方法还包括:The method according to claim 35, wherein after the second device receives a ninth message from the access device, the method further comprises:
    所述第二设备提取所述第九报文包括的第四协议字段中携带的所述第一时间戳信息;Extracting, by the second device, the first time stamp information carried in a fourth protocol field included in the ninth message;
    当所述第二设备为用户面网元时,所述第四协议字段为通用分组无线服务GPRS隧道 协议GTP字段;或者When the second device is a user plane network element, the fourth protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第四协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the fourth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  37. 如权利要求35或36所述的方法,其特征在于,所述第二设备从所述接入设备接收第十报文之后,所述方法还包括:The method according to claim 35 or 36, wherein after the second device receives a tenth message from the access device, the method further comprises:
    所述第二设备提取所述第十报文包括的第五协议字段中携带的所述第二时间戳信息;Extracting, by the second device, the second time stamp information carried in a fifth protocol field included in the tenth message;
    当所述第二设备为用户面网元时,所述第五协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the fifth protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第五协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the fifth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  38. 如权利要求35-37任一项所述的方法,其特征在于,所述第二设备从所述接入设备接收第十一报文之后,所述方法还包括:The method according to any one of claims 35 to 37, wherein after the second device receives an eleventh message from the access device, the method further comprises:
    所述第二设备提取所述第十一报文包括的第六协议字段中携带的所述第三时间戳信息;Extracting, by the second device, the third time stamp information carried in a sixth protocol field included in the eleventh message;
    当所述第二设备为用户面网元时,所述第六协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the sixth protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第六协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the sixth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  39. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备向接入设备发送第一报文,并确定第一时间戳信息和第二时间戳信息;所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;The first device sends a first message to the access device, and determines first time stamp information and second time stamp information; the first time stamp information is an Ethernet network when the first device sends the first message. The second time stamp is the time in the mobile network when the first device sends the first message;
    所述第一设备向所述接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息和所述第二时间戳信息;Sending, by the first device, a second message to the access device, where the second message carries the first time stamp information and the second time stamp information;
    所述第一设备从所述接入设备接收第三报文,并确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第三报文时以太网络中的时刻;Receiving, by the first device, a third message from the access device, and determining third time stamp information, where the third time stamp information is in an Ethernet network when the first device receives the third message The moment
    所述第一设备向所述接入设备发送第四报文,并确定第四时间戳信息;所述第四时间戳信息为所述第一设备发送所述第四报文时以太网络中的时刻,所述第四报文中携带所述第三时间戳信息;Sending, by the first device, a fourth message to the access device, and determining fourth timestamp information; the fourth timestamp information is in the Ethernet network when the first device sends the fourth message At time, the fourth message carries the third time stamp information;
    所述第一设备向所述接入设备发送第五报文,所述第五报文中携带所述第四时间戳信息;Sending, by the first device, a fifth message to the access device, where the fifth message carries the fourth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  40. 如权利要求39所述的方法,其特征在于,所述第二报文中携带所述第二时间戳信息,包括:The method according to claim 39, wherein the second message carrying the second time stamp information comprises:
    所述第一设备将所述第二时间戳信息携带在所述第二报文包括的第一协议字段中;The first device carries the second time stamp information in a first protocol field included in the second message;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  41. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第一报文,并确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第一报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第一报文时移动网络中的时刻;The second device receives the first message from the access device, and determines fifth time stamp information and sixth time stamp information, where the fifth time stamp information is Ethernet when the second device receives the first message. The time in the network, the sixth time stamp information is the time in the mobile network when the second device receives the first message;
    所述第二设备从所述接入设备接收第六报文,所述第六报文中携带第一时间戳信息和所述第二时间戳信息;所述第一时间戳信息为所述第一设备向所述接入设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备向所述接入设备发送所述第一报文时移动网络中的时刻;Receiving, by the second device, a sixth message from the access device, where the sixth message carries first time stamp information and the second time stamp information; the first time stamp information is the first time stamp information; A time in the Ethernet network when a device sends the first message to the access device, and the second time stamp information is the time when the first device sends the first message to the access device and moves Moments in the network;
    所述第二设备向所述接入设备发送第三报文,并确定第七时间戳信息,所述第七时间戳信息为所述第二设备发送所述第三报文时以太网络中的时刻;Sending, by the second device, a third message to the access device, and determining seventh timestamp information, where the seventh timestamp information is in an Ethernet network when the second device sends the third message time;
    所述第二设备从所述接入设备接收第四报文,并确定第八时间戳信息,所述第八时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻;所述第四报文中携带第三时间戳信息,所述第三时间戳信息为所述接入设备从所述第二设备接收所述第三报文后,向所述第一设备转发所述第三报文后,所述第一设备接收到所述第三报文时以太网络中的时刻;Receiving, by the second device, a fourth message from the access device, and determining eighth time stamp information, where the eighth time stamp information is in an Ethernet network when the second device receives the fourth message Time; the fourth message carries third timestamp information, and the third timestamp information is after the access device receives the third message from the second device, and sends it to the first The time in the Ethernet network when the first device receives the third message after the device forwards the third message;
    所述第二设备从所述接入设备接收第五报文,所述第五报文中携带第四时间戳信息,所述第四时间戳信息为所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;Receiving, by the second device, a fifth message from the access device, the fifth message carrying fourth timestamp information, where the fourth timestamp information is the first device to the access device The time in the Ethernet network when the fourth message is sent;
    所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步;The second device according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, the sixth Timestamp information, the seventh timestamp information, and the eighth timestamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  42. 如权利要求41所述的方法,其特征在于,所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,包括:The method according to claim 41, wherein the second device is based on the first timestamp information, the second timestamp information, the third timestamp information, and the fourth timestamp information , The fifth time stamp information, the sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a time offset between the first device and the second device, include:
    所述第二设备根据所述第二时间戳信息、所述第三时间戳信息、所述第六时间戳信息、所述第七时间戳信息和所述第八时间戳信息确定第九时间戳信息;Determining, by the second device, a ninth timestamp based on the second timestamp information, the third timestamp information, the sixth timestamp information, the seventh timestamp information, and the eighth timestamp information information;
    所述第二设备删除所述第四时间戳信息,并根据所述第九时间戳信息确定所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;Deleting, by the second device, the fourth time stamp information, and determining a time in the Ethernet network when the first device sends the fourth message to the access device according to the ninth time stamp information;
    所述第二设备根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第八时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。The second device according to the first time stamp information, the third time stamp information, the fifth time stamp information, the seventh time stamp information, the eighth time stamp information, and the ninth time The time stamp information determines a time offset between the first device and the second device.
  43. 如权利要求41或42所述的方法,其特征在于,所述第二设备从所述接入设备接收第六报文之后,所述方法还包括:The method according to claim 41 or 42, after the second device receives a sixth message from the access device, the method further comprises:
    所述第二设备提取所述第六报文包括的第二协议字段中携带的所述第二时间戳信息;Extracting, by the second device, the second time stamp information carried in a second protocol field included in the sixth packet;
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  44. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备从第三设备接收第一报文后,通过接入设备向第二设备发送所述第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;After receiving the first message from the third device, the first device sends the first message to the second device through the access device, and determines first time stamp information, where the first time stamp information is the first The moment in the mobile network when the device receives the first message;
    所述第一设备从所述接入设备接收第二报文后,向所述第三设备发送第三报文;所述第二报文中携带第二时间戳信息和第三时间戳信息,所述第二时间戳信息为所述第二设备接收到所述第一报文后,向第四设备发送所述第一报文时所述移动网络中的时刻;所述第三时间戳信息为所述第二设备从第四设备接收到第五报文时所述移动网络中的时刻;After the first device receives a second message from the access device, it sends a third message to the third device; the second message carries second time stamp information and third time stamp information, The second timestamp information is the time in the mobile network when the second device sends the first message to the fourth device after receiving the first message; the third timestamp information The moment in the mobile network when the second device receives the fifth message from the fourth device;
    所述第一设备确定第四时间戳信息,所述第四时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;Determining, by the first device, fourth timestamp information, where the fourth timestamp information is a time in the mobile network when the first device sends the third message;
    所述第一设备从所述第三设备接收第六报文,所述第六报文中携带第五时间戳信息,所述第五时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;Receiving, by the first device, a sixth message from the third device, where the sixth message carries fifth time stamp information, and the fifth time stamp information is that the third device receives the first message The time in the Ethernet network when the third message sent by the device is;
    所述第一设备根据所述第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息;Determining, by the first device, sixth time stamp information according to the first time stamp information, second time stamp information, third time stamp information, fourth time stamp information, and fifth time stamp information;
    所述第一设备将所述第六时间戳信息通过所述接入设备转发给所述第二设备;The first device forwards the sixth time stamp information to the second device through the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  45. 如权利要求44所述的方法,其特征在于,所述第一设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第六时间戳信息,包括:The method according to claim 44, wherein the first device is based on the first timestamp information, the second timestamp information, the third timestamp information, and the fourth timestamp information Determining the sixth timestamp information with the fifth timestamp information includes:
    所述第一设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining, by the first device, between the first device and the second device according to the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information. Round-trip transmission delay difference between rounds;
    所述第一设备计算所述第五时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第六时间戳信息。The first device calculates a sum of a time corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  46. 如权利要求44或45所述的方法,其特征在于,所述第一设备从所述接入设备接收第二报文之后,所述方法还包括:The method according to claim 44 or 45, wherein after the first device receives a second message from the access device, the method further comprises:
    所述第一设备提取所述第二报文包括的第一协议字段中携带的所述第二时间戳信息和所述第三时间戳信息;Extracting, by the first device, the second time stamp information and the third time stamp information carried in a first protocol field included in the second message;
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  47. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第一报文后,向第四设备发送所述第一报文,并确定第二时间戳信息,所述第二时间戳信息为所述第二设备发送所述第一报文时移动网络中的时刻;After receiving the first message from the access device, the second device sends the first message to the fourth device, and determines second time stamp information, where the second time stamp information is sent by the second device to the second device. The moment in the mobile network when the first message is;
    所述第二设备从所述第四设备接收第五报文,并确定第三时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第五报文时所述移动网络中的时刻;Receiving, by the second device, a fifth message from the fourth device, and determining third time stamp information, where the third time stamp information is the movement when the second device receives the fifth message Moments in the network;
    所述第二设备向所述接入设备发送第四报文,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息;Sending, by the second device, a fourth message to the access device, where the fourth message carries the second time stamp information and the third time stamp information;
    所述第二设备从所述接入设备接收第六时间戳信息,并向所述第四设备发送所述第六时间戳信息,以使所述第四设备基于所述第六时间戳信息进行时间同步。Receiving, by the second device, sixth time stamp information from the access device, and sending the sixth time stamp information to the fourth device, so that the fourth device performs Time synchronization.
  48. 如权利要求47所述的方法,其特征在于,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息,包括:The method according to claim 47, wherein the fourth message carrying the second timestamp information and the third timestamp information comprises:
    所述第二设备将所述第二时间戳信息和所述第三时间戳信息携带在所述第四报文包括的第二协议字段中;Carrying, by the second device, the second time stamp information and the third time stamp information in a second protocol field included in the fourth message;
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  49. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第一设备从第三设备接收第一报文,并确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;Receiving, by a first device, a first message from a third device, and determining first time stamp information, where the first time stamp information is a time in a mobile network when the first device receives the first message;
    所述第一设备基于所述第一报文向接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息;Sending, by the first device, a second message to the access device based on the first message, where the second message carries the first time stamp information;
    所述第一设备从所述接入设备接收第三报文后,向所述第三设备发送所述第三报文,并确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;After receiving the third message from the access device, the first device sends the third message to the third device, and determines second time stamp information, where the second time stamp information is the The time in the mobile network when the first device sends the third message;
    所述第一设备从所述第三设备接收第四报文,所述第四报文中携带第三时间戳信息,所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;Receiving, by the first device, a fourth message from the third device, the fourth message carrying third time stamp information, and the third time stamp information is that the third device receives the first message The time in the Ethernet network when the third message sent by the device is;
    所述第一设备将所述第二时间戳信息和所述第三时间戳信息发送给所述接入设备;Sending, by the first device, the second time stamp information and the third time stamp information to the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  50. 如权利要求49所述的方法,其特征在于,所述第二报文中携带所述第一时间戳信息,包括:The method according to claim 49, wherein the carrying of the first timestamp information in the second message comprises:
    所述第一设备将所述第一时间戳信息携带在所述第二报文包括的第一协议字段中;The first device carries the first time stamp information in a first protocol field included in the second message;
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。When the first device is a terminal device, the first protocol field is in a service data protocol SDAP field or a data aggregation protocol PDCP field.
  51. 一种同步方法,其特征在于,包括:A synchronization method, comprising:
    第二设备从接入设备接收第五报文,所述第五报文中携带第一时间戳信息;所述第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;The second device receives a fifth message from the access device, and the fifth message carries first timestamp information; the first timestamp information is when the first device receives the first message from the third device Moments in the network;
    所述第二设备向第四设备发送第六报文,并确定第四时间戳信息,所述第四时间戳信息为所述第二设备发送所述第六报文时所述移动网络中的时刻;Sending, by the second device, a sixth message to a fourth device, and determining fourth timestamp information, where the fourth timestamp information is in the mobile network when the second device sends the sixth message time;
    所述第二设备从所述第四设备接收第三报文,并确定第五时间戳信息;所述第五时间戳信息为所述第二设备接收到所述第三报文时所述移动网络中的时刻;Receiving, by the second device, a third message from the fourth device, and determining fifth time stamp information; the fifth time stamp information is the movement when the second device receives the third message Moments in the network;
    所述第二设备向所述接入设备发送所述第三报文;Sending, by the second device, the third message to the access device;
    所述第二设备从所述接入设备接收第二时间戳信息和第三时间戳信息;所述第二时间戳信息为所述接入设备接收到所述第三报文并向所述第一设备发送所述第三报文后,所述第一设备向第三设备发送所述第三报文时所述移动网络中的时刻;所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;Receiving, by the second device, second time stamp information and third time stamp information from the access device; the second time stamp information is that the third message is received by the access device and sent to the first device; After a device sends the third message, the time in the mobile network when the first device sends the third message to the third device; the third time stamp information is received by the third device To the time in the Ethernet network when the third message sent by the first device is;
    所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定第六时间戳信息;Determining, by the second device, a sixth timestamp according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, and the fifth timestamp information information;
    所述第二设备将所述第六时间戳信息发送给所述第四设备,以使所述第四设备基于所述第六时间戳信息进行时间同步;Sending, by the second device, the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  52. 如权利要求51所述的方法,其特征在于,所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第六时间戳信息,包括:The method according to claim 51, wherein the second device is based on the first timestamp information, the second timestamp information, the third timestamp information, and the fourth timestamp information Determining the sixth timestamp information with the fifth timestamp information includes:
    所述第二设备根据所述第一时间戳信息、所述第二时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining, by the second device, between the first device and the second device according to the first timestamp information, the second timestamp information, the fourth timestamp information, and the fifth timestamp information Round-trip transmission delay difference between rounds;
    所述第二设备计算所述第三时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第六时间戳信息。The second device calculates a sum of a time corresponding to the third time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  53. 如权利要求51或52所述的方法,其特征在于,所述第二设备从接入设备接收所述第五报文之后,所述方法还包括:The method according to claim 51 or 52, wherein after the second device receives the fifth message from an access device, the method further comprises:
    所述第二设备提取所述第五报文包括的第二协议字段中携带的所述第一时间戳信息;Extracting, by the second device, the first time stamp information carried in a second protocol field included in the fifth message;
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  54. 一种第一设备,其特征在于,包括:A first device, comprising:
    接收单元,用于从第三设备接收第一报文;A receiving unit, configured to receive a first message from a third device;
    处理单元,用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;A processing unit, configured to determine first time stamp information, where the first time stamp information is a time in a mobile network when the first device receives the first message;
    发送单元,用于通过接入设备向第二设备发送所述第一报文;A sending unit, configured to send the first packet to a second device through an access device;
    所述接收单元,还用于从所述第三设备接收第二报文;The receiving unit is further configured to receive a second message from the third device;
    所述发送单元,还用于基于所述第二报文向所述接入设备发送第三报文,所述第三报文中携带所述第一时间戳信息;The sending unit is further configured to send a third message to the access device based on the second message, where the third message carries the first time stamp information;
    所述接收单元,还用于从接入设备接收第四报文;The receiving unit is further configured to receive a fourth message from the access device;
    所述发送单元,还用于向所述第三设备发送所述第四报文;The sending unit is further configured to send the fourth message to the third device;
    所述处理单元,还用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备向所述第三设备发送所述第四报文时移动网络中的时刻;The processing unit is further configured to determine second time stamp information, where the second time stamp information is a time in a mobile network when the first device sends the fourth message to the third device;
    所述接收单元,还用于从所述第三设备接收第五报文;The receiving unit is further configured to receive a fifth message from the third device;
    所述处理单元,还用于确定第三时间戳信息,所述第三时间戳信息为所述第一设备接 收到所述第五报文时移动网络中的时刻;The processing unit is further configured to determine third time stamp information, where the third time stamp information is a time in the mobile network when the first device receives the fifth message;
    所述发送单元,还用于基于所述第五报文向所述接入设备发送第六报文,所述第六报文中携带所述第二时间戳信息;The sending unit is further configured to send a sixth message to the access device based on the fifth message, where the sixth message carries the second time stamp information;
    所述接收单元,还用于从所述第三设备接收第七报文;所述第七报文中携带第四时间戳信息,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;The receiving unit is further configured to receive a seventh message from the third device; the seventh message carries fourth timestamp information, and the fourth timestamp information is sent from the third device to the third device. The time in the Ethernet network when the first device sends the fifth message;
    所述发送单元,还用于向所述接入设备发送第八报文;所述第八报文中携带所述第三时间戳信息和所述第四时间戳信息;The sending unit is further configured to send an eighth message to the access device; the eighth message carries the third time stamp information and the fourth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  55. 如权利要求54所述的第一设备,其特征在于,所述第三报文中携带所述第一时间戳信息时,所述发送单元,具体用于:The first device according to claim 54, wherein when the third message carries the first time stamp information, the sending unit is specifically configured to:
    将所述第一时间戳信息携带在所述第三报文包括的第一协议字段中;Carrying the first timestamp information in a first protocol field included in the third message;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  56. 如权利要求54或55所述的第一设备,其特征在于,所述第六报文中携带所述第二时间戳信息时,所述发送单元,具体用于:The first device according to claim 54 or 55, wherein when the sixth packet carries the second time stamp information, the sending unit is specifically configured to:
    将所述第二时间戳信息携带在所述第六报文包括的第二协议字段中;Carrying the second timestamp information in a second protocol field included in the sixth message;
    当所述第一设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  57. 如权利要求54-56任一项所述的第一设备,其特征在于,所述第八报文中携带所述第三时间戳信息时,所述发送单元,具体用于:The first device according to any one of claims 54-56, wherein when the third time stamp information is carried in the eighth message, the sending unit is specifically configured to:
    将所述第三时间戳信息携带在所述第八报文包括的第三协议字段中;Carrying the third time stamp information in a third protocol field included in the eighth message;
    当所述第一设备为终端设备时,所述第三协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the third protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第三协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the third protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  58. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第一报文;A receiving unit, configured to receive a first message from an access device;
    发送单元,用于向第四设备发送所述第一报文;A sending unit, configured to send the first message to a fourth device;
    处理单元,用于确定第五时间戳信息,所述第五时间戳信息为所述第二设备向所述第四设备发送所述第一报文时移动网络中的时刻;A processing unit, configured to determine fifth time stamp information, where the fifth time stamp information is a time in a mobile network when the second device sends the first message to the fourth device;
    所述接收单元,还用于从所述接入设备接收第九报文;所述第九报文中携带第一时间戳信息,所述第一时间戳信息为所述第一设备从第三设备接收到所述第一报文时移动网络中的时刻;The receiving unit is further configured to receive a ninth message from the access device; the ninth message carries first time stamp information, where the first time stamp information is The moment in the mobile network when the device receives the first message;
    所述发送单元,还用于基于所述第九报文向所述第四设备发送第十二报文;The sending unit is further configured to send a twelfth message to the fourth device based on the ninth message;
    所述接收单元,还用于从所述第四设备接收第四报文;The receiving unit is further configured to receive a fourth message from the fourth device;
    所述处理单元,还用于确定第六时间戳信息,所述第六时间戳信息为所述第二设备接收到所述第四报文时移动网络中的时刻;The processing unit is further configured to determine sixth time stamp information, where the sixth time stamp information is a time in the mobile network when the second device receives the fourth message;
    所述发送单元,还用于向所述接入设备发送所述第四报文;The sending unit is further configured to send the fourth message to the access device;
    所述接收单元,还用于从所述接入设备接收第十报文;所述第十报文中携带第二时间戳信息,所述第二时间戳信息为所述接入设备将所述第四报文发送给第一设备后,所述第一设备向第三设备发送所述第四报文时移动网络中的时刻;The receiving unit is further configured to receive a tenth message from the access device; the tenth message carries second time stamp information, where the second time stamp information The time in the mobile network when the fourth device sends the fourth message to the first device after the fourth message is sent to the first device;
    所述发送单元,还用于向所述第四设备发送第十三报文;The sending unit is further configured to send a thirteenth message to the fourth device;
    所述处理单元,还用于确定第七时间戳信息;所述第七时间戳信息为所述第二设备向所述第四设备发送所述第十三报文时移动网络中的时刻;The processing unit is further configured to determine seventh timestamp information; the seventh timestamp information is a time in the mobile network when the second device sends the thirteenth message to the fourth device;
    所述接收单元,还用于从所述接入设备接收第十一报文,所述第十一报文中携带第三时间戳信息和第四时间戳信息,所述第三时间戳信息为所述第一设备从所述第三设备接收到所述第五报文时移动网络中的时刻,所述第四时间戳信息为所述第三设备向所述第一设备发送所述第五报文时以太网络中的时刻;The receiving unit is further configured to receive an eleventh message from the access device, where the eleventh message carries third time stamp information and fourth time stamp information, and the third time stamp information is The time in the mobile network when the first device receives the fifth message from the third device, and the fourth time stamp information is that the third device sends the fifth device to the first device The time in the Ethernet network when the message was sent;
    所述处理单元,还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息和所述第七时间戳信息,确定第八时间戳信息;The processing unit is further configured to: according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, Determining the sixth time stamp information and the seventh time stamp information, and determining the eighth time stamp information;
    所述发送单元,还用于将所述第八时间戳信息发送给所述第四设备,以使所述第四设备基于所述第八时间戳信息进行时间同步;The sending unit is further configured to send the eighth timestamp information to the fourth device, so that the fourth device performs time synchronization based on the eighth timestamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  59. 如权利要求58所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to claim 58, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第九报文之后,提取所述第九报文包括的第四协议字段中携带的所述第一时间戳信息;After the receiving unit receives a ninth message from the access device, extracting the first time stamp information carried in a fourth protocol field included in the ninth message;
    当所述第二设备为用户面网元时,所述第四协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the fourth protocol field is a General Packet Radio Service GPRS Tunneling Protocol GTP field; or
    当所述第二设备为终端设备时,所述第四协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the fourth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  60. 如权利要求58或59所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to claim 58 or 59, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第十报文之后,提取所述第十报文包括的第五协议字段中携带的所述第二时间戳信息;After the receiving unit receives a tenth message from the access device, extracting the second time stamp information carried in a fifth protocol field included in the tenth message;
    当所述第二设备为用户面网元时,所述第五协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the fifth protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第五协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the fifth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  61. 如权利要求58-60任一项所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to any one of claims 58 to 60, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第十一报文之后,提取所述第十一报文包括的第六协议字段中携带的所述第三时间戳信息;After the receiving unit receives an eleventh message from the access device, extracting the third time stamp information carried in a sixth protocol field included in the eleventh message;
    当所述第二设备为用户面网元时,所述第六协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the sixth protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第六协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the sixth protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  62. 一种第一设备,其特征在于,包括:A first device, comprising:
    发送单元,用于向接入设备发送第一报文;A sending unit, configured to send a first message to the access device;
    处理单元,用于确定第一时间戳信息和第二时间戳信息;所述第一时间戳信息为所述第一设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备发送所述第一报文时移动网络中的时刻;A processing unit, configured to determine first time stamp information and second time stamp information; the first time stamp information is a time in the Ethernet network when the first device sends the first message, and the second time The stamp information is the time in the mobile network when the first device sends the first message;
    所述发送单元,还用于向所述接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息和所述第二时间戳信息;The sending unit is further configured to send a second message to the access device, where the second message carries the first time stamp information and the second time stamp information;
    接收单元,用于从所述接入设备接收第三报文;A receiving unit, configured to receive a third message from the access device;
    所述处理单元,还用于确定第三时间戳信息,所述第三时间戳信息为所述第一设备接收到所述第三报文时以太网络中的时刻;The processing unit is further configured to determine third time stamp information, where the third time stamp information is a time in the Ethernet network when the first device receives the third message;
    所述发送单元,还用于向所述接入设备发送第四报文,所述第四报文中携带所述第三时间戳信息;The sending unit is further configured to send a fourth message to the access device, where the fourth message carries the third time stamp information;
    所述处理单元,还用于确定第四时间戳信息;所述第四时间戳信息为所述第一设备发送所述第四报文时以太网络中的时刻;The processing unit is further configured to determine fourth timestamp information; the fourth timestamp information is a time in the Ethernet network when the first device sends the fourth message;
    所述发送单元,还用于向所述接入设备发送第五报文,所述第五报文中携带所述第四时间戳信息;The sending unit is further configured to send a fifth message to the access device, where the fifth message carries the fourth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  63. 如权利要求62所述的第一设备,其特征在于,所述第二报文中携带所述第二时间戳信息时,所述发送单元,具体用于:The first device according to claim 62, wherein when the second packet carries the second time stamp information, the sending unit is specifically configured to:
    将所述第二时间戳信息携带在所述第二报文包括的第一协议字段中;Carrying the second timestamp information in a first protocol field included in the second message;
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  64. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第一报文;A receiving unit, configured to receive a first message from an access device;
    处理单元,用于确定第五时间戳信息和第六时间戳信息,所述第五时间戳信息为所述第二设备接收到所述第一报文时以太网络中的时刻,所述第六时间戳信息为所述第二设备接收到所述第一报文时移动网络中的时刻;A processing unit, configured to determine fifth timestamp information and sixth timestamp information, where the fifth timestamp information is a time in the Ethernet network when the second device receives the first packet, and the sixth The time stamp information is the time in the mobile network when the second device receives the first message;
    所述接收单元,还用于从所述接入设备接收第六报文,所述第六报文中携带第一时间戳信息和所述第二时间戳信息;所述第一时间戳信息为所述第一设备向所述接入设备发送所述第一报文时以太网络中的时刻,所述第二时间戳信息为所述第一设备向所述接入设备发送所述第一报文时移动网络中的时刻;The receiving unit is further configured to receive a sixth message from the access device, where the sixth message carries the first time stamp information and the second time stamp information; the first time stamp information is The time in the Ethernet network when the first device sends the first message to the access device, and the second time stamp information is the first device sending the first message to the access device Moments in time mobile networks;
    发送单元,用于向所述接入设备发送第三报文;A sending unit, configured to send a third message to the access device;
    所述处理单元,还用于确定第七时间戳信息,所述第七时间戳信息为所述第二设备发送所述第三报文时以太网络中的时刻;The processing unit is further configured to determine seventh timestamp information, where the seventh timestamp information is a time in the Ethernet network when the second device sends the third message;
    所述接收单元,还用于从所述接入设备接收第四报文;所述第四报文中携带第三时间 戳信息,所述第三时间戳信息为所述接入设备从所述第二设备接收所述第三报文后,向所述第一设备转发所述第三报文后,所述第一设备接收到所述第三报文时以太网络中的时刻;The receiving unit is further configured to receive a fourth message from the access device; the fourth message carries third timestamp information, and the third timestamp information is obtained from the access device from the access device. After the second device receives the third message and forwards the third message to the first device, the time in the Ethernet network when the first device receives the third message;
    所述处理单元,还用于确定第八时间戳信息,所述第八时间戳信息为所述第二设备接收到所述第四报文时以太网络中的时刻;The processing unit is further configured to determine eighth time stamp information, where the eighth time stamp information is a time in the Ethernet network when the second device receives the fourth message;
    所述接收单元,还用于从所述接入设备接收第五报文,所述第五报文中携带第四时间戳信息,所述第四时间戳信息为所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;The receiving unit is further configured to receive a fifth message from the access device, where the fifth message carries fourth timestamp information, and the fourth timestamp information is sent from the first device to the The time in the Ethernet network when the access device sends the fourth message;
    所述处理单元,还用于根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差,并根据所述时间偏差进行时间同步;The processing unit is further configured to: according to the first timestamp information, the second timestamp information, the third timestamp information, the fourth timestamp information, the fifth timestamp information, The sixth time stamp information, the seventh time stamp information, and the eighth time stamp information determine a time deviation between the first device and the second device, and perform time synchronization according to the time deviation;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  65. 如权利要求64所述的第二设备,其特征在于,所述处理单元,在根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息、所述第五时间戳信息、所述第六时间戳信息、所述第七时间戳信息、所述第八时间戳信息确定所述第一设备和所述第二设备之间的时间偏差时,具体用于:The second device according to claim 64, wherein the processing unit, in accordance with the first timestamp information, the second timestamp information, the third timestamp information, and the fourth The timestamp information, the fifth timestamp information, the sixth timestamp information, the seventh timestamp information, and the eighth timestamp information determine the time between the first device and the second device. When the time is offset, it is specifically used for:
    根据所述第二时间戳信息、所述第三时间戳信息、所述第六时间戳信息、所述第七时间戳信息和所述第八时间戳信息确定第九时间戳信息;Determining ninth time stamp information according to the second time stamp information, the third time stamp information, the sixth time stamp information, the seventh time stamp information, and the eighth time stamp information;
    删除所述第四时间戳信息,并根据所述第九时间戳信息确定所述第一设备向所述接入设备发送所述第四报文时以太网络中的时刻;Deleting the fourth time stamp information, and determining a time in the Ethernet network when the first device sends the fourth message to the access device according to the ninth time stamp information;
    根据所述第一时间戳信息、所述第三时间戳信息、所述第五时间戳信息、所述第七时间戳信息、所述第八时间戳信息和所述第九时间戳信息确定所述第一设备和所述第二设备之间的时间偏差。Determining a location according to the first timestamp information, the third timestamp information, the fifth timestamp information, the seventh timestamp information, the eighth timestamp information, and the ninth timestamp information The time deviation between the first device and the second device.
  66. 如权利要求64或65所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to claim 64 or 65, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第六报文之后,提取所述第六报文包括的第二协议字段中携带的所述第二时间戳信息;After the receiving unit receives a sixth message from the access device, extracting the second time stamp information carried in a second protocol field included in the sixth message;
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  67. 一种第一设备,其特征在于,包括:A first device, comprising:
    接收单元,用于从第三设备接收第一报文;A receiving unit, configured to receive a first message from a third device;
    发送单元,用于通过接入设备向第二设备发送所述第一报文;A sending unit, configured to send the first packet to a second device through an access device;
    处理单元,用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;A processing unit, configured to determine first time stamp information, where the first time stamp information is a time in a mobile network when the first device receives the first message;
    所述接收单元,还用于从所述接入设备接收第二报文;所述第二报文中携带第二时间戳信息和第三时间戳信息,所述第二时间戳信息为所述第二设备接收到所述第一报文后,向第四设备发送所述第一报文时所述移动网络中的时刻;所述第三时间戳信息为所述第二设备从第四设备接收到第五报文时所述移动网络中的时刻;The receiving unit is further configured to receive a second message from the access device; the second message carries second time stamp information and third time stamp information, and the second time stamp information is the After the second device receives the first message, the time in the mobile network when the first message is sent to the fourth device; the third timestamp information is that the second device is from the fourth device The moment in the mobile network when the fifth message is received;
    所述发送单元,还用于向所述第三设备发送第三报文;The sending unit is further configured to send a third message to the third device;
    所述处理单元,还用于确定第四时间戳信息,所述第四时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;The processing unit is further configured to determine fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the first device sends the third message;
    所述接收单元,还用于从所述第三设备接收第六报文,所述第六报文中携带第五时间戳信息,所述第五时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;The receiving unit is further configured to receive a sixth message from the third device, where the sixth message carries fifth time stamp information, where the fifth time stamp information is received by the third device. The time in the Ethernet network when the third message sent by the first device is described;
    所述处理单元,还用于根据所述第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息;The processing unit is further configured to determine sixth timestamp information according to the first, second, third, fourth, and fifth timestamp information;
    所述发送单元,还用于将所述第六时间戳信息通过所述接入设备转发给所述第二设备;The sending unit is further configured to forward the sixth timestamp information to the second device through the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  68. 如权利要求67所述的第一设备,其特征在于,所述处理单元,在根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第六时间戳信息时,具体用于:The first device according to claim 67, wherein the processing unit, in accordance with the first time stamp information, the second time stamp information, the third time stamp information, and the fourth When the timestamp information and the fifth timestamp information determine the sixth timestamp information, it is specifically used to:
    根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息和所述第四时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the first time stamp information, the second time stamp information, the third time stamp information, and the fourth time stamp information Delay difference
    计算所述第五时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第六时间戳信息。Calculating the sum of the time corresponding to the fifth time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  69. 如权利要求67或68所述的第一设备,其特征在于,所述处理单元,还用于:The first device according to claim 67 or 68, wherein the processing unit is further configured to:
    在所述接收单元从所述接入设备接收第二报文之后,提取所述第二报文包括的第一协议字段中携带的所述第二时间戳信息和所述第三时间戳信息;After the receiving unit receives a second message from the access device, extracting the second time stamp information and the third time stamp information carried in a first protocol field included in the second message;
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段。When the first device is a terminal device, the first protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field.
  70. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第一报文;A receiving unit, configured to receive a first message from an access device;
    发送单元,用于向第四设备发送所述第一报文;A sending unit, configured to send the first message to a fourth device;
    处理单元,用于确定第二时间戳信息,所述第二时间戳信息为所述第二设备发送所述第一报文时移动网络中的时刻;A processing unit, configured to determine second time stamp information, where the second time stamp information is a time in a mobile network when the second device sends the first message;
    所述接收单元,还用于从所述第四设备接收第五报文;The receiving unit is further configured to receive a fifth message from the fourth device;
    所述处理单元,还用于确定第三时间戳信息,所述第三时间戳信息为所述第二设备接收到所述第五报文时所述移动网络中的时刻;The processing unit is further configured to determine third time stamp information, where the third time stamp information is a time in the mobile network when the second device receives the fifth message;
    所述发送单元,还用于向所述接入设备发送第四报文,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息;The sending unit is further configured to send a fourth message to the access device, where the fourth message carries the second time stamp information and the third time stamp information;
    所述接收单元,还用于从所述接入设备接收第六时间戳信息;The receiving unit is further configured to receive sixth time stamp information from the access device;
    所述发送单元,还用于向所述第四设备发送所述第六时间戳信息,以使所述第四设备基于所述第六时间戳信息进行时间同步;The sending unit is further configured to send the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  71. 如权利要求70所述的第二设备,其特征在于,所述第四报文中携带所述第二时间戳信息和所述第三时间戳信息时,所述发送单元,具体用于:The second device according to claim 70, wherein when the fourth message carries the second time stamp information and the third time stamp information, the sending unit is specifically configured to:
    将所述第二时间戳信息和所述第三时间戳信息携带在所述第四报文包括的第二协议字段中;Carrying the second timestamp information and the third timestamp information in a second protocol field included in the fourth packet;
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  72. 一种第一设备,其特征在于,包括:A first device, comprising:
    接收单元,用于从第三设备接收第一报文;A receiving unit, configured to receive a first message from a third device;
    处理单元,用于确定第一时间戳信息,所述第一时间戳信息为所述第一设备接收到所述第一报文时移动网络中的时刻;A processing unit, configured to determine first time stamp information, where the first time stamp information is a time in a mobile network when the first device receives the first message;
    发送单元,用于基于所述第一报文向接入设备发送第二报文,所述第二报文中携带所述第一时间戳信息;A sending unit, configured to send a second message to the access device based on the first message, where the second message carries the first time stamp information;
    所述接收单元,还用于从所述接入设备接收第三报文;The receiving unit is further configured to receive a third message from the access device;
    所述发送单元,还用于向所述第三设备发送所述第三报文;The sending unit is further configured to send the third message to the third device;
    所述处理单元,还用于确定第二时间戳信息,所述第二时间戳信息为所述第一设备发送所述第三报文时所述移动网络中的时刻;The processing unit is further configured to determine second time stamp information, where the second time stamp information is a time in the mobile network when the first device sends the third message;
    所述接收单元,还用于从所述第三设备接收第四报文,所述第四报文中携带第三时间戳信息,所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;The receiving unit is further configured to receive a fourth message from the third device, where the fourth message carries third timestamp information, and the third timestamp information is received by the third device. The time in the Ethernet network when the third message sent by the first device is described;
    所述发送单元,还用于将所述第二时间戳信息和所述第三时间戳信息发送给所述接入设备;The sending unit is further configured to send the second timestamp information and the third timestamp information to the access device;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  73. 如权利要求72所述的第一设备,其特征在于,所述第二报文中携带所述第一时间戳信息时,所述发送单元,具体用于:The first device according to claim 72, wherein, when the first time stamp information is carried in the second message, the sending unit is specifically configured to:
    将所述第一时间戳信息携带在所述第二报文包括的第一协议字段中;Carrying the first timestamp information in a first protocol field included in the second message;
    当所述第一设备为用户面网元时,所述第一协议字段为通用分组无线服务GPRS隧道协议GTP字段;或者When the first device is a user plane network element, the first protocol field is a general packet radio service GPRS tunneling protocol GTP field; or
    当所述第一设备为终端设备时,所述第一协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段中。When the first device is a terminal device, the first protocol field is in a service data protocol SDAP field or a data aggregation protocol PDCP field.
  74. 一种第二设备,其特征在于,包括:A second device, comprising:
    接收单元,用于从接入设备接收第五报文,所述第五报文中携带第一时间戳信息;所述第一时间戳信息为第一设备从第三设备接收到第一报文时移动网络中的时刻;A receiving unit, configured to receive a fifth message from the access device, where the fifth message carries first timestamp information; the first timestamp information is the first message received by the first device from the third device Time in the mobile network;
    发送单元,用于向第四设备发送第六报文;A sending unit, configured to send a sixth message to the fourth device;
    处理单元,用于确定第四时间戳信息,所述第四时间戳信息为所述第二设备发送所述第六报文时所述移动网络中的时刻;A processing unit, configured to determine fourth time stamp information, where the fourth time stamp information is a time in the mobile network when the second device sends the sixth message;
    所述接收单元,还用于从所述第四设备接收第三报文;The receiving unit is further configured to receive a third message from the fourth device;
    所述处理单元,还用于确定第五时间戳信息;所述第五时间戳信息为所述第二设备接 收到所述第三报文时所述移动网络中的时刻;The processing unit is further configured to determine fifth timestamp information; the fifth timestamp information is a time in the mobile network when the second device receives the third message;
    所述发送单元,还用于向所述接入设备发送所述第三报文;The sending unit is further configured to send the third message to the access device;
    所述接收单元,还用于从所述接入设备接收第二时间戳信息和第三时间戳信息;所述第二时间戳信息为所述接入设备接收到所述第三报文并向所述第一设备发送所述第三报文后,所述第一设备向第三设备发送所述第三报文时所述移动网络中的时刻;所述第三时间戳信息为所述第三设备接收到所述第一设备发送的所述第三报文时以太网络中的时刻;The receiving unit is further configured to receive second timestamp information and third timestamp information from the access device; the second timestamp information is the third message received by the access device and sent to the After the first device sends the third message, the time in the mobile network when the first device sends the third message to the third device; the third time stamp information is the first The time in the Ethernet network when the three devices receive the third message sent by the first device;
    所述处理单元,还用于根据所述第一时间戳信息、第二时间戳信息、第三时间戳信息、第四时间戳信息和第五时间戳信息确定第六时间戳信息;The processing unit is further configured to determine sixth timestamp information according to the first, second, third, fourth, and fifth timestamp information;
    所述发送单元,还用于将所述第六时间戳信息发送给所述第四设备,以使所述第四设备基于所述第六时间戳信息进行时间同步;The sending unit is further configured to send the sixth time stamp information to the fourth device, so that the fourth device performs time synchronization based on the sixth time stamp information;
    其中,所述第一设备为用户面网元且所述第二设备为终端设备,或者,所述第一设备为终端设备且所述第二设备为用户面网元。The first device is a user plane network element and the second device is a terminal device, or the first device is a terminal device and the second device is a user plane network element.
  75. 如权利要求74所述的第二设备,其特征在于,所述处理单元,在根据所述第一时间戳信息、所述第二时间戳信息、所述第三时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第六时间戳信息时,具体用于:The second device according to claim 74, wherein the processing unit, in accordance with the first timestamp information, the second timestamp information, the third timestamp information, and the fourth When the timestamp information and the fifth timestamp information determine the sixth timestamp information, it is specifically used to:
    根据所述第一时间戳信息、所述第二时间戳信息、所述第四时间戳信息和所述第五时间戳信息确定所述第一设备与所述第二设备之间的往返传输时延差值;Determining a round-trip transmission time between the first device and the second device according to the first time stamp information, the second time stamp information, the fourth time stamp information, and the fifth time stamp information Delay difference
    计算所述第三时间戳信息对应的时刻与所述往返传输时延差值的和,得到所述第六时间戳信息。Calculate the sum of the time corresponding to the third time stamp information and the round-trip transmission delay difference value to obtain the sixth time stamp information.
  76. 如权利要求74或75所述的第二设备,其特征在于,所述处理单元,还用于:The second device according to claim 74 or 75, wherein the processing unit is further configured to:
    在所述接收单元从接入设备接收所述第五报文之后,提取所述第五报文包括的第二协议字段中携带的所述第一时间戳信息;After the receiving unit receives the fifth message from the access device, extract the first time stamp information carried in a second protocol field included in the fifth message;
    当所述第二设备为终端设备时,所述第二协议字段为服务数据协议SDAP字段或数据汇聚协议PDCP字段;或者When the second device is a terminal device, the second protocol field is a service data protocol SDAP field or a data aggregation protocol PDCP field; or
    当所述第二设备为用户面网元时,所述第二协议字段为通用分组无线服务GPRS隧道协议GTP字段。When the second device is a user plane network element, the second protocol field is a general packet radio service GPRS tunneling protocol GTP field.
  77. 一种计算机存储介质,其特征在于,所述计算机可读存储介质中存储有指令,当其在计算机上运行时,使得计算机执行所述权利要求1-16或31-53中任意一项所述的方法。A computer storage medium, characterized in that instructions are stored in the computer-readable storage medium, and when it is run on a computer, the computer is caused to execute any one of claims 1-16 or 31-53. Methods.
  78. 一种装置,其特征在于,所述装置包括处理器和存储器;An apparatus, characterized in that the apparatus includes a processor and a memory;
    所述存储器用于存储计算机执行指令,当所述装置运行时,所述处理器执行所述存储器存储的所述计算机执行指令,以使所述装置执行如权利要求1-16或31-53中任一所述的方法。The memory is configured to store a computer execution instruction, and when the device is running, the processor executes the computer execution instruction stored in the memory, so that the device executes the instructions in claims 1-16 or 31-53 Any of the methods described.
  79. 一种包含指令的计算机程序产品,其特征在于,当其在计算机上运行时,使得计算机执行上述1-16或31-53中任意一项所述的方法。A computer program product containing instructions, which, when run on a computer, causes the computer to perform the method described in any one of 1-16 or 31-53 above.
PCT/CN2019/093123 2018-06-26 2019-06-26 Synchronization method and apparatus WO2020001504A1 (en)

Priority Applications (3)

Application Number Priority Date Filing Date Title
EP19825041.7A EP3817250A4 (en) 2018-06-26 2019-06-26 Synchronization method and apparatus
CA3104762A CA3104762A1 (en) 2018-06-26 2019-06-26 Synchronization method and apparatus
US17/132,150 US11469843B2 (en) 2018-06-26 2020-12-23 Synchronization method and apparatus

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201810672083.7 2018-06-26
CN201810672083 2018-06-26
CN201811168721.8A CN110649983B (en) 2018-06-26 2018-10-08 Synchronization method and device
CN201811168721.8 2018-10-08

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US17/132,150 Continuation US11469843B2 (en) 2018-06-26 2020-12-23 Synchronization method and apparatus

Publications (1)

Publication Number Publication Date
WO2020001504A1 true WO2020001504A1 (en) 2020-01-02

Family

ID=68984521

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2019/093123 WO2020001504A1 (en) 2018-06-26 2019-06-26 Synchronization method and apparatus

Country Status (1)

Country Link
WO (1) WO2020001504A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480331A (en) * 2010-11-26 2012-05-30 西门子公司 Arrangement and method for interchanging time markers
CN104115432A (en) * 2012-01-04 2014-10-22 马维尔国际贸易有限公司 Method and apparatus for communicating time information between time-aware devices
WO2016037259A1 (en) * 2014-09-12 2016-03-17 Siemens Canada Limited Clock synchronization over redundant networks
CN106656387A (en) * 2015-10-30 2017-05-10 华为技术有限公司 Method, node and system for detecting clock synchronization path
CN107113073A (en) * 2014-12-16 2017-08-29 罗伯特·博世有限公司 The method of the clock of synchronous network device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102480331A (en) * 2010-11-26 2012-05-30 西门子公司 Arrangement and method for interchanging time markers
CN104115432A (en) * 2012-01-04 2014-10-22 马维尔国际贸易有限公司 Method and apparatus for communicating time information between time-aware devices
WO2016037259A1 (en) * 2014-09-12 2016-03-17 Siemens Canada Limited Clock synchronization over redundant networks
CN107113073A (en) * 2014-12-16 2017-08-29 罗伯特·博世有限公司 The method of the clock of synchronous network device
CN106656387A (en) * 2015-10-30 2017-05-10 华为技术有限公司 Method, node and system for detecting clock synchronization path

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
See also references of EP3817250A4 *

Similar Documents

Publication Publication Date Title
US11469843B2 (en) Synchronization method and apparatus
US11695491B2 (en) 5G system support for conveying TSN time synchronization
CN110324889B (en) Clock synchronization method, communication device and communication equipment
WO2020063535A1 (en) Reference time determination method and apparatus
WO2020067977A1 (en) Inter-working between a time-sensitive network and a cellular communication network
WO2018137413A1 (en) Time service method, terminal device and network device
US20220007321A1 (en) Network Entities and Methods for a Wireless Network System for Determining Time Information
EP4044485A1 (en) Message transmission method and apparatus
CN112217615B (en) Method and device for supporting time-sensitive network
CN105325037A (en) Synchronization method, synchronization device and base station
WO2022027666A1 (en) Time synchronization method and apparatus
JP6319821B2 (en) Device-to-device D2D communication method and apparatus
WO2020200947A1 (en) Time synchronization including preserving origin time stamp
WO2021237525A1 (en) Wireless communication method and device
WO2018177320A1 (en) Clock processing method, access network device and terminal device
WO2020001504A1 (en) Synchronization method and apparatus
CN114071487A (en) Interface time delay measuring method, related network equipment and storage medium
WO2019090489A1 (en) Method for configuring radio resource, terminal device and network device
WO2021243614A1 (en) Information processing method and apparatus
WO2021097769A1 (en) Clock synchronization method and apparatus
CN112804746B (en) Method, device and computer readable medium for time synchronization
WO2024174941A1 (en) Clock synchronization method and apparatus
WO2023071919A1 (en) Communication method and related apparatus
KR20150016735A (en) Network synchronization system using centralized control plane
WO2022067758A1 (en) Wireless communication method, terminal device and network device

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

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 3104762

Country of ref document: CA

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 2019825041

Country of ref document: EP

Effective date: 20210126