WO2023115258A1 - 一种报文传输方法及对应装置 - Google Patents

一种报文传输方法及对应装置 Download PDF

Info

Publication number
WO2023115258A1
WO2023115258A1 PCT/CN2021/139652 CN2021139652W WO2023115258A1 WO 2023115258 A1 WO2023115258 A1 WO 2023115258A1 CN 2021139652 W CN2021139652 W CN 2021139652W WO 2023115258 A1 WO2023115258 A1 WO 2023115258A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
message
delay
follow
time information
Prior art date
Application number
PCT/CN2021/139652
Other languages
English (en)
French (fr)
Inventor
邵亨康
龚陈继
李�杰
姚志明
Original Assignee
华为技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 华为技术有限公司 filed Critical 华为技术有限公司
Priority to CN202180044135.6A priority Critical patent/CN116711261A/zh
Priority to PCT/CN2021/139652 priority patent/WO2023115258A1/zh
Publication of WO2023115258A1 publication Critical patent/WO2023115258A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04JMULTIPLEX COMMUNICATION
    • H04J3/00Time-division multiplex systems
    • H04J3/02Details
    • H04J3/06Synchronising arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L7/00Arrangements for synchronising receiver with transmitter

Definitions

  • the present application relates to the field of electronic technology, and in particular to a message transmission method and a corresponding device.
  • the clock of the audio player needs to be synchronized with the clock of the video player, so that the image played by the video player and the sound played by the audio player can be synchronized.
  • the node whose clock needs to be adjusted is a slave node
  • the node whose clock is used as a reference clock by the slave node is the master node
  • the slave node adjusts the local clock with reference to the clock of the master node.
  • the slave node can obtain the time delay and frequency deviation between the slave node and the master node by measuring the transmission time information of the message between the slave node and the master node, and then the slave node adjusts the local clock based on the time delay and frequency deviation , to synchronize the clock of the slave node with the clock of the master node.
  • both the slave node and the master node send messages in a multicast manner, so the messages between the slave node and the master node will reach other nodes that do not need to be reached, resulting in a problem of heavy network load.
  • the present application provides a message transmission method and a corresponding device for reducing network load.
  • a method for message transmission includes: a first node receives a first delay request message from a second node, wherein the first delay request message is used to request a communication between the first node and the second node The time delay between is measured, the source address of the first delay request message is the address of the second node; the first node sends the first delay response message to the second node, the first delay response message includes the first time information, The first time information is used to indicate the receiving time of the first delay request message, and the destination address of the first delay response message is the address of the second node; wherein, the first time information is used to determine the distance between the first node and the second node time delay between.
  • the first delay request packet may also be referred to as a first delay request.
  • other messages provided by this application can also be abbreviated as such, and other messages will not be described in detail one by one.
  • the first node responds to the first delayed response message sent by the second node in a unicast manner (that is, the first delayed response message is sent to the second node, and the destination address in the first delayed response message is the address of the second node), compared with the multicast transmission of all messages in the existing clock synchronization scheme, it can avoid the problem that the first delayed response message reaches other unnecessary nodes and causes a large network load.
  • the message is transmitted between the first node and the second node, which can enable the clock synchronization between the first node and the second node in the E2E manner, thereby reducing hardware deployment costs and improving clock synchronization efficiency. It can make the second node perceive the state of the first node in time, thereby increasing the security performance of the network.
  • the method further includes: the first node sends a first follow-up message to the second node, where the first follow-up message includes second time information, and the second time information is used to indicate the time of the first delayed response message
  • the destination address in the first following message is the address of the second node
  • the second time information is used to determine the time delay between the first node and the second node.
  • the first node can transmit the first follow-up message to the second node in the form of a unicast message, which can further reduce network load, reduce hardware cost, and improve clock synchronization efficiency.
  • the method further includes: the first node sends a second delay request message to the second node, where the second delay request message is used to request a time delay between the first node and the second node Measurement; the second delay request message corresponds to the address of the second node; the first node receives the second delay response message from the second node, the second delay response message includes the third time information, and the third time information is used
  • the source address of the second delay request message is the address of the second node; the second delay response message corresponds to the address of the second node.
  • the first node can measure the time delay between the first node and the second node, thereby helping the first node manage the connection state of the second node.
  • the second delayed response message corresponding to the second node corresponds to the address of the second node.
  • the method further includes: the first node receives a second follow-up message from the second node, the second follow-up message includes fourth time information, and the fourth time information is used to indicate that the second delayed response message
  • the sending time of the second follow-up message is the source address of the second node; the second follow-up message corresponds to the address of the second node.
  • the first node can distinguish follow-up packets corresponding to different nodes, thereby improving the measurement efficiency of time delay.
  • the method further includes: the first node sends a first synchronization message to the second node; the first node sends a third follow-up message to the second node, and the fifth time information included in the third follow-up message , the fifth time information is used to indicate the sending time of the first synchronization message; the first node sends the second synchronization message to the second node; the first node sends the fourth following message to the second node, and the fourth following message Sixth time information is included, and the sixth time information is used to indicate the sending time of the second synchronization message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency deviation between the first node and the second node.
  • the second node can measure the clock frequency deviation between the first node and the second node, thereby improving the reliability of clock synchronization between the second node and the first node.
  • the first node sends the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, and the third follow-up message to the second node through the third node , the second synchronization message or one or more of the fourth follow-up message; the first node receives the first delay request message, the second delay response message or the second follow-up message from the second node through the third node One or more items in the message.
  • the clock synchronization between the first node and the second node can be realized in E2E mode, which can improve the efficiency of the first node. and the clock synchronization efficiency of the second node.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the above-mentioned first node and second node communicate based on gPTP.
  • the gPTP protocol architecture can be adjusted from a layered architecture to a tree architecture, so that gPTP supports the E2E clock synchronization scenario.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message, or the second follow-up message further includes a clock domain identifier, where the clock domain identifier is used to indicate a clock domain.
  • the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the Precision Time Protocol PTP message; and/or, the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the gPTP message.
  • the gPTP message is preferentially forwarded by the third node, and the efficiency of clock synchronization based on gPTP can be further improved.
  • a message transmission method includes: the third node receives the first delay request message from the second node, and the third node sends the first delay request message to the first node; wherein the first The delay request message is used to request to measure the time delay between the first node and the second node, and the source address of the first delay request message is the address of the second node; the third node receives the first node from the first node A delay response message, the third node sends the first delay response message to the second node; the first delay response message includes first time information, and the first time information is used to indicate the receiving time of the first delay request message, The destination address of the first delay response message is the address of the second node; wherein, the first time information is used to determine the time delay between the first node and the second node.
  • the third node receives the first delay request message from the second node, including: the third node receives the first delay request message from the fourth node; or, the third node receives the first delay request message from the second node The first delay request message; the third node sends the first delay response message to the second node, including: the third node sends the first delay response message to the second node; or, the third node sends the first delay response message to the fourth node
  • the first delayed response message is used to enable the fourth node to send the first delayed message to the second node.
  • the third node there may be one (such as the third node) or multiple relay nodes (such as the third node and the fourth node) between the first node and the second node, which improves the flexibility of the solution.
  • the method further includes: the third node receives the first follow-up message from the first node, and the third node sends the first follow-up message to the second node, wherein the first follow-up message includes the first follow-up message
  • the first follow-up message includes the first follow-up message
  • Two time information the second time information is used to indicate the sending time of the first delayed response message
  • the destination address in the first following message is the address of the second node
  • the second time information is used to determine the relationship between the first node and the second node Time delay between nodes.
  • the method further includes: the third node receives the second delay request message from the first node, and the third node sends the second delay request message to the second node; wherein, the second delay request message The message is used to request to measure the time delay between the first node and the second node; the third node receives the second delay response message from the second node, and the third node sends the second delay response message to the first node A node; wherein, the second delay response message includes third time information, the third time information is used to indicate the receiving time of the second delay request message, and the source address of the second delay request message is the address of the second node.
  • the method further includes: the third node receives the second follow-up message from the second node, and the third node sends the second follow-up message to the first node; wherein, the second follow-up message includes the second follow-up message Four time information, the fourth time information is used to indicate the sending time of the second delayed response message, and the source address of the second following message is the address of the second node.
  • the method further includes: the third node receives the first synchronization message from the first node, and sends the first synchronization message to the second node; the third node receives the third follow-up message from the first node message, sending the third follow-up message to the second node, the fifth time information included in the third follow-up message, and the fifth time information is used to indicate the sending time of the first synchronization message; the third node receives the synchronization message from the first The second synchronization message of the node sends the second synchronization message to the second node; the third node receives the fourth follow-up message from the first node, sends the fourth follow-up message to the second node, and the fourth follow-up message
  • the message includes sixth time information, and the sixth time information is used to indicate the sending time of the second synchronization message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency between the first node and the second node deviation.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message, or the second follow-up message further includes a clock domain identifier, where the clock domain identifier is used to indicate a clock domain.
  • the method further includes: the third node responds to the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, and the second synchronization message according to the clock domain identifier.
  • One or more of the message or the fourth follow-up message, the first delay request message, the second delay response message or the second follow-up message are forwarded.
  • the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the Precision Time Protocol PTP message; and/or, the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the gPTP message.
  • the method further includes: when the third node receives the gPTP message and also receives the PTP message and/or service message, the third node preferentially forwards the gPTP message.
  • a message transmission method includes: the first node sends a second delay request message to the second node, wherein the second delay request message is used to request a connection between the first node and the second node The time delay is measured; the second delay request message corresponds to the address of the second node; the first node receives the second delay response message from the second node, the second delay response message includes the third time information, and the second delay response message includes the third time information.
  • the third time information is used to indicate the receiving time of the second delay request message, the source address of the second delay request message is the address of the second node; the second delay response message corresponds to the address of the second node.
  • the method further includes: the first node receives a second follow-up message from the second node, the second follow-up message includes fourth time information, and the fourth time information is used to indicate that the second delayed response message
  • the sending time of the second follow-up message is the source address of the second node; the second follow-up message corresponds to the address of the second node.
  • the method further includes: the first node receives a first delay request message from the second node, where the first delay request message is used to request a time delay between the first node and the second node
  • the source address of the first delay request message is the address of the second node
  • the first node sends the first delay response message to the second node
  • the first delay response message includes the first time information, and the first time information It is used to indicate the receiving time of the first delay request message, and the destination address of the first delay response message is the address of the second node; wherein, the first time information is used to determine the time delay between the first node and the second node .
  • the method further includes: the first node sends a first follow-up message to the second node, where the first follow-up message includes second time information, and the second time information is used to indicate the time of the first delayed response message
  • the destination address in the first following message is the address of the second node
  • the second time information is used to determine the time delay between the first node and the second node.
  • the method further includes: the first node sends a first synchronization message to the second node; the first node sends a third follow-up message to the second node, and the fifth time information included in the third follow-up message , the fifth time information is used to indicate the sending time of the first synchronization message; the first node sends the second synchronization message to the second node; the first node sends the fourth following message to the second node, and the fourth following message Sixth time information is included, and the sixth time information is used to indicate the sending time of the second synchronization message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency deviation between the first node and the second node.
  • the first node sends the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, and the third follow-up message to the second node through the third node , the second synchronization message or one or more of the fourth follow-up message; the first node receives the first delay request message, the second delay response message or the second follow-up message from the second node through the third node One or more items in the message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message, or the second follow-up message further includes a clock domain identifier, where the clock domain identifier is used to indicate a clock domain.
  • the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the Precision Time Protocol PTP message; and/or, the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the gPTP message.
  • a device for message transmission may include a module for performing the method described in the first aspect or any possible design of the first aspect.
  • the device may include a receiving unit and a sending unit.
  • the receiving unit is configured to receive the first delay request message from the second node, wherein the first delay request message is used to request to measure the time delay between the first node where the device is located and the second node, the first The source address of a delay request message is the address of the second node;
  • the sending unit is used to send the first delay response message to the second node, the first delay response message includes first time information, and the first time information is used for Indicating the receiving time of the first delay request message, the destination address of the first delay response message is the address of the second node; wherein the first time information is used to determine the time delay between the first node and the second node.
  • the sending unit is further configured to send a first follow-up message to the two nodes, where the first follow-up message includes second time information, and the second time information is used to indicate the sending of the first delayed response message time, the destination address in the first following message is the address of the second node, and the second time information is used to determine the time delay between the first node and the second node.
  • the sending unit is further configured to send a second delay request message to the second node, where the second delay request message is used to request to measure the time delay between the first node and the second node
  • the second delay request message corresponds to the address of the second node
  • the receiving unit is also used to receive the second delay response message from the second node, the second delay response message includes third time information, and the third time
  • the information is used to indicate the receiving time of the second delay request message, and the source address of the second delay request message is the address of the second node; the second delay response message corresponds to the address of the second node.
  • the receiving unit is further configured to receive a second follow-up message from the second node, the second follow-up message includes fourth time information, and the fourth time information is used to indicate the time of the second delayed response message
  • the source address of the second following message is the address of the second node; the second following message corresponds to the address of the second node.
  • the sending unit is also configured to send the first synchronization message to the second node; send the third follow-up message to the second node, the fifth time information included in the third follow-up message, and the fifth time
  • the information is used to indicate the sending time of the first synchronization message; send the second synchronization message to the second node; send the fourth follow-up message to the second node, the fourth follow-up message includes sixth time information, and the sixth time information It is used to indicate the sending time of the second synchronization message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency deviation between the first node and the second node.
  • the sending unit is specifically configured to send the first delay response message, the first following message, the second delay request message, the first synchronization message, the third One or more of the following message, the second synchronization message or the fourth following message;
  • the receiving unit is specifically used to receive the first delay request message and the second delay response from the second node through the third node One or more of the message or the second following message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message, or the second follow-up message further includes a clock domain identifier, where the clock domain identifier is used to indicate a clock domain.
  • the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the Precision Time Protocol PTP message; and/or, the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the gPTP message.
  • a fifth aspect provides a device for message transmission, and the device may include a module for performing the method described in the second aspect or any possible design of the second aspect.
  • the device includes a receiving unit and a sending unit.
  • the receiving unit is used to receive the first delay request message from the second node;
  • the sending unit is used to send the first delay request message to the first node; wherein the first delay request message is used to request the first delay request message The time delay between a node and the second node is measured, and the source address of the first delay request message is the address of the second node;
  • the receiving unit is also used to receive the first delay response message from the first node; send The unit is further configured to send the first delay response message to the second node;
  • the first delay response message includes first time information, and the first time information is used to indicate the receiving time of the first delay request message, and the first delay
  • the destination address of the response message is the address of the second node; wherein, the first time information is used to determine the time delay between the first node and the second node.
  • the receiving unit when the receiving unit receives the first delay request message from the second node, it is specifically configured to: receive the first delay request message from the fourth node; or, receive the first delay request message from the second node A request message; when the sending unit sends the first delayed response message to the second node, it is specifically used to: send the first delayed response message to the second node; or send the first delayed response message to the fourth node , so that the fourth node sends the first delayed packet to the second node.
  • the receiving unit is also used to receive the first following message from the first node; the sending unit is also used to send the first following message to the second node, wherein the first following message Including second time information, the second time information is used to indicate the sending time of the first delayed response message, the destination address in the first follow-up message is the address of the second node, and the second time information is used to determine the relationship between the first node and The time delay between the second nodes.
  • the receiving unit is also used to receive the second delay request message from the first node; the sending unit is also used to send the second delay request message to the second node; wherein, the second delay The request message is used to request to measure the time delay between the first node and the second node; the receiving unit is also used to receive the second delay response message from the second node; the sending unit is also used to send the second The delay response message is sent to the first node; wherein, the second delay response message includes third time information, the third time information is used to indicate the receiving time of the second delay request message, and the source address of the second delay request message is the address of the second node.
  • the receiving unit is also used to receive the second following message from the second node; the sending unit is also used to send the second following message to the first node; wherein, the second following message
  • the fourth time information is included, and the fourth time information is used to indicate the sending time of the second delayed response message, and the source address of the second follow-up message is the address of the second node.
  • the receiving unit is also used to receive the first synchronization message from the first node; the sending unit is also used to send the first synchronization message to the second node; the receiving unit is also used to receive A third follow-up message from the first node; the sending unit is further configured to send the third follow-up message to the second node, the third follow-up message includes fifth time information, and the fifth time information is used to indicate the first The sending time of the synchronization message; the receiving unit is also used to receive the second synchronization message from the first node; the sending unit is also used to send the second synchronization message to the second node; the receiving unit is also used to receive A fourth follow-up message from the first node; the sending unit is further configured to send the fourth follow-up message to the second node, the fourth follow-up message includes sixth time information, and the sixth time information is used to indicate the second synchronization The sending time of the message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency deviation between the first node
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second follow-up message also includes a clock domain identifier, and the clock domain identifier is used to indicate the clock domain; the sending unit is also used to The clock domain identifier is used for the first delay response packet, the first following packet, the second delay request packet, the first synchronization packet, the third following packet, the second synchronization packet or the fourth following packet, the first One or more items of the delay request message, the second delay response message or the second following message are forwarded.
  • the priority of forwarding the gPTP message by the third node where the device is located is higher than the priority of forwarding the Precision Time Protocol PTP message by the third node where the device is located; and/or, the third node where the device is located forwards the gPTP message;
  • the priority of the gPTP message is higher than the priority of the forwarding service message of the third node where the device is located; the sending unit is also used to receive the PTP message and/or when the third node where the device is located receives the gPTP message or service packets, the gPTP packets are forwarded preferentially.
  • a sixth aspect provides a packet transmission device, and the device may include a module for performing the method described in the third aspect or any possible design of the third aspect.
  • the device may include a receiving unit and a sending unit.
  • the sending unit is configured to send a second delay request message to the second node, wherein the second delay request message is used to request to measure the time delay between the first node and the second node; the second delay request message The text corresponds to the address of the second node; the receiving unit is configured to receive the second delay response message from the second node, the second delay response message includes third time information, and the third time information is used to indicate the second delay
  • the receiving time of the request message, the source address of the second delayed request message is the address of the second node; the second delayed response message corresponds to the address of the second node.
  • the receiving unit is further configured to receive a second follow-up message from the second node, the second follow-up message includes fourth time information, and the fourth time information is used to indicate the time of the second delayed response message
  • the source address of the second following message is the address of the second node; the second following message corresponds to the address of the second node.
  • the receiving unit is further configured to receive a first delay request message from the second node, where the first delay request message is used to request a connection between the first node where the device is located and the second node Time delay is measured, the source address of the first delay request message is the address of the second node; the sending unit is also used to send the first delay response message to the second node, the first delay response message includes the first time information , the first time information is used to indicate the receiving time of the first delay request message, and the destination address of the first delay response message is the address of the second node; wherein, the first time information is used to determine the first node and the second node time delay between.
  • the sending unit is further configured to send a first follow-up message to the two nodes, where the first follow-up message includes second time information, and the second time information is used to indicate the sending of the first delayed response message time, the destination address in the first following message is the address of the second node, and the second time information is used to determine the time delay between the first node and the second node.
  • the sending unit is also configured to send the first synchronization message to the second node; send the third follow-up message to the second node, the fifth time information included in the third follow-up message, and the fifth time
  • the information is used to indicate the sending time of the first synchronization message; send the second synchronization message to the second node; send the fourth follow-up message to the second node, the fourth follow-up message includes sixth time information, and the sixth time information It is used to indicate the sending time of the second synchronization message; wherein, the fifth time information and the sixth time information are used to determine the clock frequency deviation between the first node and the second node.
  • the sending unit is specifically configured to send the first delay response message, the first following message, the second delay request message, the first synchronization message, the third One or more of the following message, the second synchronization message or the fourth following message;
  • the receiving unit is specifically used to receive the first delay request message and the second delay response from the second node through the third node One or more of the message or the second following message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message or the second following message is a gPTP message.
  • the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message One or more of the first delay request message, the second delay response message, or the second follow-up message further includes a clock domain identifier, where the clock domain identifier is used to indicate a clock domain.
  • the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the Precision Time Protocol PTP message; and/or, the priority of the third node to forward the gPTP message is higher than the priority of the third node to forward the gPTP message.
  • a message transmission device the device includes a processor and an interface circuit, and the interface circuit is used to receive signals from other devices other than the device and transmit them to the processor or send signals from the processor to the device
  • the processor is used to implement any possible design of the first aspect or the first aspect or the second aspect or any possible design of the second aspect or the third aspect through a logic circuit or executing code instructions Or the method described in any possible design of the third aspect.
  • a computer-readable storage medium including programs or instructions.
  • programs or instructions When the programs or instructions are run on a computer, any possible design of the first aspect or the first aspect or the second aspect or the second Any possible design of the first aspect or the third aspect or any possible design of the third aspect is carried out.
  • a ninth aspect provides a message transmission system, including the device according to the fourth aspect or the sixth aspect, and the device according to the fifth aspect.
  • a vehicle including the device according to any one of the fourth aspect to the seventh aspect, or the computer-readable storage medium according to the eighth aspect, or the system according to the ninth aspect.
  • FIG. 1 is a schematic diagram of a scene applicable to an embodiment of the present application
  • Fig. 2 is a schematic diagram of a network architecture based on PTP
  • Fig. 3 is a schematic diagram of a network architecture based on gPTP
  • FIG. 4 is a flowchart of a message transmission method provided by an embodiment of the present application.
  • FIG. 5 is a flowchart of another message transmission method provided by the embodiment of the present application.
  • FIG. 6 is a schematic diagram of a gPTP-based network architecture provided by the present application.
  • FIG. 7 is a schematic diagram of another gPTP-based network architecture provided by the present application.
  • FIG. 8 is a schematic diagram of two clock domains
  • FIG. 9 is a schematic structural diagram of a message transmission device provided by the present application.
  • FIG. 10 is a schematic structural diagram of another message transmission device provided by the present application.
  • Clock synchronization including two concepts of time synchronization and frequency synchronization.
  • time synchronization means at the same moment, the time of node A and node B must be the same, similar to adjusting the time of a watch, for example, the time of node A is November 26, 2021 At 1:00 am, the time of node B is also 1:00 am on November 26, 2021;
  • frequency synchronization means the clock of node A and the clock of node B need to run at the same frequency, such as the crystal oscillator frequency of node A and The crystal frequency of node B is the same, which is similar to adjusting the timing accuracy of a watch.
  • the number of counts of the clock of node A is the same as the number of counts of the clock of node B, and the time increment value of node A and node B
  • the time increase value of B is the same, for example, the time of node A is increased by 20s, and the time of node B is also increased by 20s.
  • Master node and slave node when any two nodes perform clock synchronization, the node whose clock needs to be adjusted is the slave node, and the other node is the master node, that is, the slave node adjusts the local clock with reference to the clock of the master node.
  • Clock domain The area controlled by the same clock signal in the circuit, or in other words, multiple nodes whose clock refers to the same time reference form a clock domain.
  • a system may have one clock domain, or a system may have multiple clock domains at the same time, which is not limited in this application.
  • FIG. 1 it is a schematic diagram of a scenario applicable to an embodiment of the present application, and the scenario is a time synchronization scenario of a vehicle system.
  • the vehicle system includes a microcontroller unit (Micro Controller Unit, MCU), sensors (such as lidar, camera, etc.), a central processing unit (Central Processing Unit, CPU) and so on.
  • the switch can be respectively connected to the CPU, the sensor, and the MCU through an Ethernet (ETH) interface, so that the CPU, the sensor, and the MCU can communicate with each other.
  • MCU Micro Controller Unit
  • sensors such as lidar, camera, etc.
  • CPU Central Processing Unit
  • ETH Ethernet
  • the switch may specifically be an Ethernet switch integrated in an electronic control unit (Electronic Control Unit, ECU) in the vehicle-mounted system.
  • ECU Electronic Control Unit
  • the clocks of various devices (such as CPU, MCU, sensors, etc.) in the vehicle system need to be kept synchronized.
  • FIG. 1 only shows some devices in the vehicle system, and of course other devices (such as audio players, video players, etc.) may also be included, which is not limited in this application.
  • FIG. 1 is an example where the CPU, MCU, and sensors are connected to each other through a switch. In practical applications, the CPU, MCU, and sensors can also be directly connected to each other, which is not limited in this application.
  • clock synchronization between various devices in the vehicle system can be performed through a precision time protocol (Precision Time Protocol, PTP).
  • PTP Precision Time Protocol
  • the relevant messages used for clock synchronization in the PTP protocol may be referred to as PTP messages.
  • Grandmaster Clock Slave Clock
  • Transparent Clock Three types of Grandmaster Clock, Slave Clock and Transparent Clock are defined in PTP.
  • the master clock is the time reference of the entire clock domain
  • the slave clock needs to be synchronized with the master clock
  • the transparent clock does not need to be synchronized with the master clock or the slave clock.
  • Nodes in the PTP may include two types of endpoint nodes and bridge nodes.
  • the clock of the terminal node can be used as the main clock or the slave clock in the system.
  • the clock of the terminal node is used as the master clock
  • the role of the terminal node is the master node
  • the master clock can be used as the reference clock of the slave node.
  • the clock of the terminal node is used as a slave clock
  • the role of the terminal node is a slave node
  • the local clock can be adjusted according to the master clock.
  • the clock of the bridge node is a transparent clock.
  • the bridge node can be used as a relay node to connect to other nodes in the network and forward messages for other nodes. In addition, it can also calculate the residence time of the message in the bridge node (ie, the forwarding delay) .
  • the CPU, MCU, and sensor can be used as end nodes, and the switch is a relay device for the CPU, MCU, and sensor, etc., and may not participate in clock synchronization, so it can be used as a bridge node.
  • the CPU can be used as the master node, that is, the clock of the CPU can be used as the master clock
  • the MCU and the sensor can be used as the slave nodes, that is, the clocks of the MCU and the sensor can be used as the slave clock.
  • this is only an example rather than a specific limitation.
  • the port through which the master node publishes time information can be called the master port (Master Port).
  • the master node can issue a PTP message to the downstream node through the master port, and the PTP message carries the time information of the master clock, so that the slave node can perform clock synchronization according to the PTP message.
  • a port receiving time information from a node may be called a slave port (Slave Port).
  • the slave node can receive the PTP message from the upstream node through the slave port, and perform a clock synchronization operation according to the time information of the master clock carried in the PTP message.
  • the bridge node can have multiple ports, these ports can be called transparent ports (Transparent Port), the bridge node can forward PTP messages between these transparent ports, so as to realize the forwarding of messages received from one end point node to another end point node.
  • the PTP protocol is an end-to-end (End to End, E2E) protocol, that is, clock synchronization is directly performed between end nodes and end nodes.
  • FIG. 2 it is a schematic diagram of a PTP-based network architecture.
  • the network architecture is a mesh architecture, including a plurality of terminal nodes (four terminal nodes are taken as an example in Figure 2), wherein the clock of terminal node 1 is the main clock, that is, terminal node 1 is the main node, terminal nodes 2, 3,
  • the clock of 4 is a slave clock, that is, the terminal nodes 2, 3, and 4 are slave nodes.
  • at least one bridge node is also included (a bridge node is taken as an example in FIG. 2 , but it is not limited to this actually).
  • the slave nodes can send PTP messages to the master node in a multicast manner. Specifically, the slave node sends the PTP message to the bridge node through the slave port, and after the PTP message reaches the bridge node, the bridge node forwards the PTP message between transparent ports, thereby sending the PTP message to the master node.
  • the master node can send PTP messages to the slave nodes in multicast mode.
  • the master node multicasts the PTP message on its master port, and after the PTP message arrives at the transparent port connected with the master port of the master node in the bridge node, the bridge node forwards the PTP message between the transparent ports, thereby The PTP message is sent to the slave nodes (such as terminal nodes 2, 3, 4) connected to each transparent port.
  • the slave nodes such as terminal nodes 2, 3, 4
  • FIG. 2 only shows a single-level bridge node (that is, there is only one bridge node between the master node and the slave node), and it may actually be a multi-level bridge node (that is, there are only multiple bridge nodes between the master node and the slave node). ), this application is not limited.
  • the bridge node After the PTP message between a slave node and the master node reaches the bridge node, the bridge node will forward the PTP message between all transparent ports, so other slave nodes will also receive the PTP message from the node, lead to serious network load;
  • PTP only supports the delay measurement request initiated by the slave node. Only the slave node can measure the time delay between the master node and the slave node, while the master node does not support the initiative to initiate a delay measurement request, and cannot know the master node and the slave node The time delay between is not conducive to the master node to manage the connection status of the slave node;
  • the bridge node needs to support the calculation of the residence time of the PTP message, and the cost is high;
  • All PTP messages are transmitted in multicast mode, and only one-to-one delay measurement or clock frequency deviation measurement can be performed between the master node and the slave node, and the clock synchronization efficiency is low.
  • time synchronization between devices in the vehicle system can be performed through a generalized precision time protocol (Generalized Precision Time Protocol, gPTP).
  • gPTP Generalized Precision Time Protocol
  • a related message used for clock synchronization in the gPTP protocol may be called a gPTP message.
  • gPTP defines two clock types: Grandmaster Clock and Slave Clock. Wherein, for the definition of the master clock and the slave node, reference may be made to relevant definitions in the PTP, which will not be repeated here.
  • Nodes in gPTP also include endpoint (endpoint) nodes and bridge (Bridge) nodes. Wherein, for the definition of the terminal node, reference may be made to relevant definitions in the PTP, which will not be repeated here.
  • gPTP is a point-to-point (Point to Point, PTP) protocol, which can only synchronize clocks between two adjacent nodes, so bridge nodes need to participate in clock synchronization.
  • PTP Point to Point
  • the bridge node can adjust the local clock with reference to the clocks of other nodes.
  • the bridge node acts as a slave node; or, other nodes will adjust the local clock with reference to the clock of the bridge node.
  • the bridge node acts as a master node.
  • the port participating in message transmission in the bridge node is a slave port; when the bridge node acts as a master node to perform clock synchronization with other nodes, the port participating in message transmission in the bridge node is the master port.
  • FIG. 3 it is a schematic diagram of a network architecture based on gPTP, and the network architecture is a layered architecture.
  • Terminal node 1 is the most upstream node
  • the most upstream node is the master node
  • its clock is the master clock, which is the time reference of the entire network.
  • Terminal nodes 2, 3, and 4 are the most downstream nodes
  • the most downstream nodes are slave nodes
  • their clocks are slave clocks.
  • the bridge node is a relay node. When the bridge node faces its adjacent upstream node, the bridge node acts as a slave node.
  • the communication port between the bridge node and its adjacent upstream node is a slave port.
  • the bridge node When the bridge node faces its adjacent downstream node, The bridge node acts as the master node, and the port through which the bridge node communicates with its adjacent downstream nodes is the master port.
  • clock synchronization is performed at the time of two adjacent nodes in sequence. For example, terminal node 1 first synchronizes the clock to the bridge node, and then the bridge node synchronizes the clock to terminal nodes 2, 3, and 4 respectively.
  • the bridge node acts as a master node and a slave node
  • the time reference of the entire network is in principle the clock of the most upstream node, that is, clock node 1. 2, 3, 4)
  • the clock is synchronized with the clock of the most upstream node.
  • the most upstream node (terminal node 1) is defined as a master clock node
  • the most downstream nodes (terminal nodes 2, 3, 4) are defined as slave clock nodes.
  • FIG. 3 only shows a single-level bridge node (that is, there is only one bridge node between the master node and the slave node), and it may actually be a multi-level bridge node (that is, there are only multiple bridge nodes between the master node and the slave node). ), this application is not limited.
  • terminal node 1 fails, terminal nodes 2, 3, and 4 cannot perceive the failure of terminal node 1, and the clock errors between terminal nodes 2, 3, 4 and terminal node 1 will gradually accumulate, and the reliability of clock synchronization is poor;
  • Clock synchronization is performed between two adjacent nodes. It takes a long time to synchronize the clock from the master clock node (the most upstream node) to the slave clock node (the most downstream node), and the clock synchronization efficiency is low.
  • a message transmission method provided by the embodiment of the present application, the method includes:
  • the second node sends a first delay request packet to the first node, and the first node receives the first delay request (such as Pdelay_request_1) packet from the second node.
  • the first delay request message is used to request to measure the time delay between the first node and the second node, and the time delay refers to information transmission from the first node to the second node (or transmission from the second node to the second node).
  • a node elapsed time.
  • the source address of the first delay request message is the address of the second node, and the destination address is the multicast address.
  • the first delay request packet is a multicast packet.
  • the multicast address may be an address corresponding to a clock domain, and the clock domain is a clock domain composed of multiple nodes including the first node and the second node.
  • both the first node and the second node are terminal nodes, the second node is a node whose clock needs to be adjusted, and the clock of the first node is the time reference of the clock domain where the first node is located.
  • the CPU, MCU, and sensors form a clock domain
  • the first node may be the CPU
  • the second node may be the MCU or the sensor.
  • the first node sends a first delay response (such as Pdelay_response_1) message to the second node, and the second node receives the first delay response message from the first node.
  • a first delay response such as Pdelay_response_1
  • the source address of the first delayed response message is the address of the first node
  • the destination address is the address of the second node.
  • the first delayed response packet is a unicast packet.
  • the first delay response message includes first time information, and the first time information is used to indicate the receiving time of the first delay request message.
  • the first time information is used to determine the time delay between the first node and the second node, for example, the second node may determine the time delay between the first node and the second node based on the first time information.
  • the first time information may indicate an absolute time value, or may indicate a relative time value, which is not limited in this embodiment of the present application.
  • the first time information is from January 1, 1970 (midnight of Coordinated International Time (UTC)/Greenwich Mean Time (GMT)) to the end of the first node receiving the first delay request message.
  • the number of seconds (such as: 1639411230 seconds); or, for example, the first time information is the regional time when the first node receives the first delay request message (such as: 0:00:30 am on December 14, 2021, Beijing time); Or for example, the first time information is the time difference (for example: 1 second) between the time when the first node receives the first request message and the time when the second node sends the first request message.
  • the above values are only examples and cannot be used to represent the real time in actual application.
  • the first node and the second node may transmit messages based on PTP, gPTP or other time protocols, which is not limited in this application.
  • the first node and the second node transmit messages based on PTP
  • the first node is the master node (Grand Master) (terminal node 1 shown in Figure 2)
  • the second node is the slave node (Slave) ( Figure 2 end node 2 or end node 3 or end node 4 as shown).
  • the first node and the second node transmit messages based on the gPTP protocol
  • the first node is the master clock node (the terminal node 1 shown in Figure 3)
  • the second node is the slave clock node (the terminal node 1 shown in Figure 3). Node 2 or End Node 3 or End Node 4).
  • the type of address (source address or destination address) in the embodiment of the present application can be any address type that can be used to identify a node, such as a Media Access Control (Media Access Control, MAC) address or an Internet Protocol (Internet Protocol) address. Protocol, IP) address, etc., this application does not limit.
  • Media Access Control Media Access Control
  • Internet Protocol Internet Protocol
  • Protocol, IP IP address
  • the first node can interact with multiple nodes at the same time.
  • the interaction process between the first node and each of the multiple nodes Reference may be made to the above-mentioned processes of S401-S402, which will not be repeated here.
  • the transmission of the first delayed response message between two end nodes in the form of a unicast message (that is, transmission in an E2E manner) can be realized.
  • the first delayed response message in the embodiment of the present application is a unicast message, which can avoid the problem that the first delayed response message reaches other unnecessary nodes and causes a large network load .
  • the first delayed response message in the embodiment of the present application is transmitted between the first node and the second node in E2E mode, on the one hand, the bridge node does not need to support P2P capability , so the hardware cost can be reduced.
  • the clock synchronization is directly performed between the first node and the second node, so the clock synchronization efficiency can be improved.
  • the second node can also be aware of the first node in time. The state of the node, thereby increasing the security performance of the network.
  • the first node also sends a first follow-up (such as follow_up_1) message to the second node, where the first follow-up message includes second time information, and the second time information is used to indicate that the first delayed response message The sending time of the text.
  • the source address in the first following message is the address of the first node
  • the destination address is the address of the second node.
  • the first following packet is a unicast packet.
  • the second time information is used to determine the time delay between the first node and the second node.
  • the second node may determine the time delay between the first node and the second node according to the first time information and the second time information.
  • the first follow-up message is followed after the first delayed response message, and is used to indicate the sending time of the first delayed response message, so the first follow-up message can also be called the first delayed response follow-up (such as Pdelay_response_follow_up_1) message.
  • the second time information may indicate an absolute time value, or may indicate a relative time value, which is not limited in this embodiment of the present application.
  • the second node may record the time when the second node sends the first delay request message and the time when the second node receives the first delay response message. After the second node obtains the time when the first node receives the first delay request message according to the first delay response message, and obtains the time when the first node sends the first delay response message according to the first follow-up message, it can combine the second The time when the two nodes send the first delay request message and the time when the second node receives the first delay response message determines the time delay between the first node and the second node.
  • the time when the second node sends the first delay request message is t1
  • the time when the first node receives the first delay request message is t2
  • the time when the first node sends the first delay response message is t3
  • the time when the first node receives the first delay request message is t3.
  • the second node After the second node obtains the time delay between the first node and the second node, it can combine the time information issued by the first node (such as the local time of the first node, specifically for example, the local time at which the first node publishes the clock information time) and the time delay between the first node and the second node, and calibrate the local clock of the second node.
  • the time information issued by the first node such as the local time of the first node, specifically for example, the local time at which the first node publishes the clock information time
  • the first node can transmit the first following message to the second node in the form of a unicast message, which can further reduce network load, reduce hardware cost, and improve clock synchronization efficiency.
  • the second node can obtain the time delay between the first node and the second node, and then adjust the time of the local clock.
  • the second node measures the time delay between the first node and the second node.
  • the first node may also measure the time delay between the first node and the second node. Measurement.
  • another message transmission method provided by the embodiment of the present application includes:
  • the first node sends a second delay request (such as Pdelay_request_2) message to the second node, and correspondingly, the second node receives the second delay request message from the first node.
  • a second delay request such as Pdelay_request_2
  • the second delay request message is used to request to measure the time delay between the first node and the second node.
  • both the first node and the second node are terminal nodes, and the second node is a node whose clock needs to be adjusted, and the first node is a node whose clock serves as a time reference.
  • the first node is the terminal node 1 shown in Figure 2
  • the second node is the terminal node 2 or the terminal node 3 or the terminal node 4 shown in Figure 2
  • the first node is the terminal as shown in Figure 3
  • Node 1 and the second node are terminal node 2 or terminal node 3 or terminal node 4 shown in FIG. 3 .
  • the source address of the second delay request message is the address of the first node.
  • the second delay request message is a multicast message, that is, the destination address is a multicast address, for example, the multicast address may be an address corresponding to a clock domain, and the clock domain includes the first node, the second node in A clock domain composed of multiple nodes in the network.
  • the second delay request message is a unicast message, that is, the destination address of the second delay request message is the address of the second node, which is not limited in this application.
  • the second delay request message corresponds to the address of the second node.
  • the first node may maintain the correspondence between the second delay request message and the address of the second node.
  • the first node saves the second delay request message, and uses the address of the second node to add identification information to the second delay request message.
  • the first node creates a first table
  • the first table uses the address of the second node as identification information
  • the first node saves the second delay request message into the first table.
  • the table is only an example, and the first node may also store the first delay request message in other ways, such as folders, databases, etc., and the folders, databases, etc. are identified by the address of the second node.
  • the first node may also save time information at which the first node sends the second delay request packet. For example, the time at which the first node sends the second delay request packet is saved in the first table.
  • Table 1 takes the CPU as the first node as an example, and the sensor as the second node as an example.
  • Table 1 is only an example, and this embodiment of the present application does not limit the specific form of the first table.
  • the present application does not limit the order in which the first node sends the second delay request message and saves the correspondence between the second delay request message and the address of the second node. That is, the first node can first send the second delay request message to the second node, and then save the correspondence between the second delay request message and the address of the second node, or first save the second delay request message and the address of the second node.
  • the correspondence relation of the address of the second node, then send the second delay request message to the second node also can save the second delay request message and the second node's address while sending the second delay request message to the second node Address correspondence.
  • the second node sends a second delay response (such as Pdelay_response_2) message to the first node, and correspondingly, the first node receives the second delay response message from the second node.
  • a second delay response such as Pdelay_response_2
  • the second node after receiving the second delay request message, the second node returns a second delay response message to the first node in response to the second delay request message, and the second delay response message carries the third time information , the third time information is used to indicate the receiving time of the second delay request message.
  • the third time information may indicate an absolute time value, or may indicate a relative time value, which is not limited in this embodiment of the present application.
  • the source address of the second delayed response message is the address of the second node.
  • the second delayed response message is a multicast message, that is, the destination address is a multicast address, for example, the multicast address may be an address corresponding to the clock domain where the first node is located.
  • the second delayed response message is a unicast message, that is, the destination address of the second delayed response message is the address of the first node, which is not limited in this application.
  • the first node may maintain the correspondence between the second delayed response message and the address of the second node.
  • the first node saves the second delayed response message, and uses the address of the second node to add identification information to the second delayed response message. For example, the first node saves the second delayed response message into the first table.
  • the first node may also save time information when the first node receives the second delayed response packet. For example, the time at which the first node receives the second delayed response message is stored in the first table.
  • the first node can interact with multiple nodes at the same time.
  • the messages that the first node interacts with different nodes can be stored in the same table (or folder or database), or can be stored in different tables (or folders or databases), which is not limited in this application.
  • Table 2 it is another example of the first table, which simultaneously records the information of the message exchanged between the CPU and the sensor, and the information of the message exchanged between the CPU and the MCU.
  • t5 may be the same as or different from t7
  • t6 may be the same as or different from t8.
  • the first node and the second node may transmit messages based on PTP, gPTP or other time protocols, which is not limited in this application.
  • the first node and the second node transmit messages based on PTP
  • the first node is the master node (terminal node 1 as shown in Figure 2)
  • the second node is a slave node (terminal node 2 or end node 3 or end node 4).
  • the first node and the second node transmit messages based on the gPTP protocol
  • the first node is the master clock node (the terminal node 1 shown in Figure 3)
  • the second node is the slave clock node (the terminal node 1 shown in Figure 3). Node 2 or End Node 3 or End Node 4).
  • the first node can measure the time delay between the first node and the second node, thereby helping the first node manage the connection state of the second node.
  • the first node can associate the message corresponding to the second node with the address of the second node, so that the first node can distinguish the message corresponding to the second node from other messages.
  • the first node can maintain the connection status with multiple nodes and distinguish the packets corresponding to different nodes, so as to support the delay measurement of multiple nodes by the first node and improve the measurement efficiency.
  • the second node may also send a second follow-up message to the first node, and correspondingly, the first node receives the second follow-up message from the second node, and the second follow-up message includes the fourth Time information, the fourth time information is used to indicate the sending time of the second delayed response message; the second following message of the first node corresponds to the address of the second node.
  • the source address of the second following message is the address of the second node.
  • the destination address of the second following message is the multicast address or the address of the first node, which is not limited in this application.
  • the specific way for the first node to correspond the second follow-up message to the address of the second node can refer to the above section where the first node corresponds the second delay request message and the second delay response message to the address of the second node The specific manner will not be repeated here.
  • the second follow-up message is followed after the second delayed response message, and is used to indicate the sending time of the second delayed response message, so the second follow-up message can also be called the second delayed response follow-up (such as Pdelay_response_follow_up_2) message.
  • the fourth time information may indicate an absolute time value, or may indicate a relative time value, which is not limited in this embodiment of the present application.
  • the first node may send the second delay request message according to the time of the first node, the time when the second node receives the second delay request message, the time when the second node sends the second delay response message, and the time of the first node A time delay between the first node and the second node is determined when the second delayed response message is received.
  • the second node may determine the time delay between the first node and the second node.
  • the first node can obtain the time delay between the first node and the second node.
  • the first node sends the first synchronization (such as sync_1) message to the second node, and correspondingly, the second node receives the first synchronization message; the first node sends the third following (such as the follow_up_1) message, correspondingly, the second node receives the third following message, wherein the fifth time information included in the third following message, the fifth time information is used to indicate the sending time of the first synchronization message; the first The node sends a second synchronization (such as sync_2) message to the second node, and correspondingly, the second node receives the second synchronization message; the first node sends a fourth following (such as follow_up_2) message to the second node, and correspondingly, The second node receives the fourth following message, where the fourth following message includes sixth time information, where the sixth time information is used to indicate the sending time of the second synchronization message.
  • the first synchronization such as sync_1
  • the second node receives the third following message
  • the second node can transmit the first synchronization message according to the time of the first node, the time of the second node receiving the second node, the time of the first node sending the second synchronization message, the time of the second node receiving the second synchronization message Time calculates the clock frequency offset between the first node and the second node.
  • the fifth time information and the fifth time information may indicate an absolute time value, or may indicate a relative time value, which is not limited in this embodiment of the present application.
  • the second node After the second node obtains the clock frequency deviation between the first node and the second node, it can adjust the frequency of the local clock according to the clock frequency deviation between the first node and the second node, thereby realizing the clock frequency of the first node.
  • the frequency is synchronized with the frequency of the clock of the second node.
  • first node and the second node if the first node and the second node are directly connected, then the first node and the second node can interact directly, if there is another node between the first node and the second node For other nodes, such as the third node, the first node and the second node need to forward messages through other nodes.
  • the first node is a CPU
  • the second node is a sensor or MCU
  • the third node is a switch.
  • the first node may send the first delay response message, the first follow-up message, the second delay request message, the first synchronization message, and the third follow-up message to the second node through the third node.
  • the second node receives the first delayed response message, the first follow-up message, the first follow-up message from the first node through the third node.
  • the first node first sends the first delayed response message to the third node, and after receiving the first delayed response message, the third node transmits the first delayed response message sent to the second node.
  • the second node may send one or more items of the first delay request message, the second delay response message or the second following message to the second node through the third node; correspondingly, the first node sends the second node through The third node receives one or more items of the first delay request message, the second delay response message, or the second following message from the second node.
  • the second node may first send the first delay request packet to the third node, and the third node receives the first delay request packet, and sends the first delay request packet sent to the first node.
  • the message needs to be forwarded by the multiple nodes in sequence.
  • the first node is connected to the third node
  • the third node is connected to the fourth node
  • the fourth node is connected to the second node
  • the first delay response message, the first following message, and the second delay request message After being sent by the first node, the first synchronization message, the third follow-up message, the second synchronization message or the fourth follow-up message, etc., are first forwarded by the third node to the fourth node, and then by the fourth node forwarded to the second node.
  • the second delay response message or the second following message, etc. are sent by the second node, they are first forwarded by the fourth node to the third node, and then forwarded by the third node to the third node. Two nodes.
  • the first node is a CPU
  • the second node is a sensor or MCU
  • the third node and fourth node are two different switches.
  • the first node, the second node, and the third node communicate with each other through gPTP.
  • One or more of the first delay request message, the second delay response message, or the second following message may be gPTP messages.
  • FIG. 6 it is a schematic diagram of a network architecture based on gPTP provided by the present application.
  • the network architecture is a tree structure: the terminal node 1 is connected to the terminal node 2, the terminal node 3, and the terminal node 4 through the bridge node, and the terminal node 1
  • the clock is the time reference of the entire network.
  • the clocks of terminal node 2, terminal node 3, and terminal node 4 are slave clocks.
  • the clocks of bridge nodes are transparent clocks.
  • the port roles of bridge nodes are all transparent ports. 1, forward the message to end point 2, end point 3, or end point 4, or after the bridge node receives a message from end point 2, end point 3, or end point 4, it forwards the message Forward to end node 1.
  • the first node herein may be terminal node 1 shown in FIG. 6, the second node may be terminal node 2 or terminal node 3 or terminal node 4 shown in FIG. 6, and the third node may be terminal node 4 shown in FIG. The bridge node shown.
  • FIG. 6 is an example of a single-level bridge node, and may also be a multi-level bridge node.
  • FIG. 7 is a schematic diagram of another gPTP-based network architecture provided by the present application.
  • the terminal node 1 is connected to the first bridge node, the first bridge node is adjacent to the second bridge node, and the second bridge node is connected to the terminal node 2 , the terminal node 3 and the terminal node 4 .
  • Terminal node 1 is connected to terminal node 2, terminal node 3, and terminal node 4 through bridge nodes.
  • the first node herein may be terminal node 1 shown in FIG. 6, the second node may be terminal node 2 or terminal node 3 or terminal node 4 shown in FIG. 6, and the third node may be terminal node 4 shown in FIG.
  • the first bridge node shown, the fourth node may be the second bridge node shown in FIG. 7 .
  • the gPTP protocol architecture is adjusted from a layered architecture to a tree architecture, so that gPTP can support E2E communication scenarios, that is, clock synchronization is directly performed between end nodes and end nodes, and slave clock nodes (such as the The terminal node 2 or 3 or 4) can quickly perceive the state of the main clock node (such as the terminal node 1 in Figure 6), and at the same time improve the synchronization efficiency; secondly, the bridge node communicates based on the gPTP protocol, and does not need to calculate the residence time of the message , which can reduce the cost of hardware deployment; in addition, since all ports of the bridge node are transparent ports, even if the role of the node connected to the port of the bridge node is switched, the port network topology of the bridge node will not be affected, which can reduce the network convergence time .
  • One or more of the follow-up message, the first delay request message, the second delay response message, or the second follow-up message also includes a clock domain identifier (such as DomainId), and the clock domain identifier is used to indicate the clock domain,
  • the clock domain is a clock domain where the first node and the second node are located.
  • the third node ie, the bridge node forwards these packets according to the clock domain identifier.
  • the embodiment of the present application does not limit the number of clock domains supported by the third node (that is, the bridge node), for example, it can support 2 clock domains, or it can support 3 clock domains, or it can support 4 clock domains, etc. wait. It should be understood that if the third node also receives messages from other clock domains, it may also forward the messages according to the clock domain identifiers carried in the messages from other clock domains.
  • two clock domains are taken as an example: the port T1 of the bridge node is connected to the terminal node a, the port T2 of the bridge node is connected to the terminal node c, the port T3 of the bridge node is connected to the terminal node b, and the port of the bridge node T4 connects to terminal node d.
  • the clock domain identifier carried in the message sent by the terminal node a and the clock domain identifier carried in the message sent by the terminal node c are both "1", then the terminal node a and the terminal node c belong to the same clock domain, that is, the clock domain identifier
  • the first clock domain indicated by "1" correspondingly, the bridge node forwards the message sent by the terminal node a to the terminal node c (the message received from port T1 is sent out from port T2), and the terminal node c sends The message forwarded to the terminal node a (the message received from port T2 is sent out from port T1); similarly, the clock domain identifier carried in the message sent by terminal node b and the clock domain identifier carried in the message sent by terminal node d
  • the clock domain identifiers carried are both "2", then the terminal node b and the terminal node d belong to the same clock domain, that is, the second clock domain indicated by the clock domain identifier "2",
  • the path indicated by the dotted line is the forwarding path of the message in the first clock domain, that is, the bridge node forwards the message between ports T1 and T2, and the path indicated by the solid line and dotted line is the forwarding path of the message in the second clock domain. Forwarding path, that is, the bridge node forwards packets between ports T3 and T4.
  • the accuracy of packet forwarding by the third node (that is, the bridge node) in a multi-clock domain scenario can be improved.
  • the priority of the third node (that is, the bridge node) for forwarding the gPTP message is higher than the priority of the third node for forwarding the Precision Time Protocol PTP message; and/or, the priority of the bridge node for forwarding the gPTP message The priority is higher than the priority of the third node for forwarding service packets.
  • the service message refers to a message carrying service data transmitted during service transmission, for example, a message carrying service data such as map or video.
  • the third node preferentially forwards the gPTP message.
  • the bridge node after receiving the message, the bridge node marks the priority of the message according to the type of the message, and then processes each message in sequence from high priority to low priority. For example, the bridge node divides the priority levels of packets into 8 categories, from low to high, respectively "0", “1", “2”, “3”, “4", "5", "6", "7” ", after the gPTP message reaches the bridging point, the bridge node marks the priority of the gPTP message as "7" (the highest level), and after the PTP message reaches the bridging point, the bridge node marks the priority of the PTP message as "6".
  • the bridge node processes the messages in order of priority from high to low, and after forwarding the priority After the message with priority “6” is forwarded, the message with priority “5” is forwarded, and so on. It should be understood that this is only an example, and there may be other priority setting manners in practical applications.
  • the gPTP message is preferentially forwarded by the third node, and the efficiency of clock synchronization based on gPTP can be further improved.
  • an embodiment of the present application provides a message transmission device, which includes modules/units/means for executing the method performed by the first node, the second node, or the third node in the above method embodiments.
  • the module/unit/means can be realized by software, or by hardware, or can be realized by executing corresponding software by hardware.
  • the device may include a sending unit 901 and a receiving unit 902 .
  • a processing unit 903 may also be included.
  • the processing unit 903 is indicated by a dotted line as optional.
  • the receiving unit 902 is configured to receive a first delay request message from a second node, wherein the first delay request message is used to request a connection between the first node where the device is located and the second node.
  • the time delay between two nodes is measured, the source address of the first delay request message is the address of the second node; the sending unit 901 is used to send the first delay response message to the second node, the first delay response message Including first time information, the first time information is used to indicate the receiving time of the first delay request message, and the destination address of the first delay response message is the address of the second node; wherein, the first time information is used to determine the first The time delay between the node and the second node.
  • the sending unit 901 is configured to send a second delay request message to the second node, where the second delay request message is used to request to measure the time delay between the first node and the second node; the second delay request The message corresponds to the address of the second node; the receiving unit 902 is configured to receive a second delayed response message from the second node, the second delayed response message includes third time information, and the third time information is used to indicate the second delayed response message
  • the receiving time of the second delay request message, the source address of the second delay request message is the address of the second node; the second delay response message corresponds to the address of the second node.
  • the receiving unit 902 is configured to receive a first delay request message from the second node; the sending unit 901 is configured to send the first delay request message to the first node; Wherein the first delay request message is used to request to measure the time delay between the first node and the second node, and the source address of the first delay request message is the address of the second node; the receiving unit 902 is also used to receive A first delayed response message from the first node; the sending unit 901 is further configured to send the first delayed response message to the second node; the first delayed response message includes first time information, and the first time information is used for Indicating the receiving time of the first delay request message, the destination address of the first delay response message is the address of the second node; wherein the first time information is used to determine the time delay between the first node and the second node.
  • the above-mentioned device may have various product forms, and several possible product forms are introduced below.
  • the embodiment of the present application also provides a message transmission device, which includes at least one processor 1001 and an interface circuit 1002; the interface circuit 1002 is used to receive signals from other devices other than the device and transmit them to the processing
  • the processor 1001 or the signal from the processor 1001 is sent to other communication devices outside the device, and the processor 1001 is used to implement the first node or the second node or the third node in the above method embodiment through a logic circuit or executing code instructions The method executed.
  • the processor mentioned in the embodiments of the present application may be implemented by hardware or by software.
  • the processor may be a logic circuit, an integrated circuit, or the like.
  • the processor may be a general-purpose processor implemented by reading software codes stored in a memory.
  • the processor can be a central processing unit (Central Processing Unit, CPU), and can also be other general-purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC) , off-the-shelf programmable gate array (Field Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • a general-purpose processor may be a microprocessor, or the processor may be any conventional processor, or the like.
  • the memory mentioned in the embodiments of the present application may be a volatile memory or a nonvolatile memory, or may include both volatile memory and nonvolatile memory.
  • the non-volatile memory can be read-only memory (Read-Only Memory, ROM), programmable read-only memory (Programmable ROM, PROM), erasable programmable read-only memory (Erasable PROM, EPROM), electronically programmable Erase Programmable Read-Only Memory (Electrically EPROM, EEPROM) or Flash.
  • the volatile memory can be Random Access Memory (RAM), which acts as external cache memory.
  • RAM Static Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • Synchronous Dynamic Random Access Memory Synchronous Dynamic Random Access Memory
  • SDRAM double data rate synchronous dynamic random access memory
  • Double Data Eate SDRAM, DDR SDRAM enhanced synchronous dynamic random access memory
  • Enhanced SDRAM, ESDRAM synchronous connection dynamic random access memory
  • Synchlink DRAM, SLDRAM Direct Memory Bus Random Access Memory
  • Direct Rambus RAM Direct Rambus RAM
  • the processor is a general-purpose processor, DSP, ASIC, FPGA or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components
  • the memory storage module may be integrated in the processor.
  • the embodiment of the present application also provides a computer-readable storage medium, including programs or instructions, when the programs or instructions are run on the computer, so that the first node, the second node or the The method performed by the third node or the like is performed.
  • the embodiment of the present application also provides a computer program product containing instructions, the computer program product stores instructions, when it is run on a computer, the first node and the second node in the above method embodiment or the method performed by the third node or the like is performed.
  • an embodiment of the present application further provides a vehicle, including the device shown in FIG. 9 or FIG. 10 .
  • the embodiments of the present application may be provided as methods, systems, or computer program products. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.
  • These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing apparatus to operate in a specific manner, such that the instructions stored in the computer-readable memory produce an article of manufacture comprising instruction means, the instructions
  • the device realizes the function specified in one or more procedures of the flowchart and/or one or more blocks of the block diagram.

Landscapes

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

Abstract

本申请公开了一种报文传输方法及对应装置。方法包括:第一节点接收来自第二节点的第一延迟请求报文,第一延迟请求报文的源地址为第二节点的地址;第一节点向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。该方法第一节点以单播的方式回应第二节点发送的第一延迟响应报文,可以避免第一延迟响应报文达到其他不必要到达的节点进而导致网络负载大的问题。

Description

一种报文传输方法及对应装置 技术领域
本申请涉及电子技术领域,尤其涉及一种报文传输方法及对应装置。
背景技术
在汽车或工业自动化控制等领域中,需要将多个设备的时钟进行同步。例如,在车载系统中,需要将音频播放器的时钟与视频播放器的时钟同步,才能实现视频播放器播放的图像和音频播放器播放的声音同步。
在时钟同步时,需要被调整时钟的节点为从节点,时钟被从节点作为参考时钟的节点为主节点,即从节点参考主节点的时钟调整本地时钟。具体的,从节点通过测量报文在从节点与主节点之间的传输时间信息,可以得到从节点与主节点之间的时间延迟和频率偏差,进而从节点基于时间延迟和频率偏差调整本地时钟,实现将从节点的时钟与主节点的时钟同步。
然而,上述方案中,从节点、主节点均是以组播的方式发送报文,因此从节点与主节点之间的报文会到达其它不需要达到的节点,导致网络负载重的问题。
发明内容
本申请提供一种报文传输方法及对应装置,用于降低网络负载。
第一方面,提供一种报文传输方法,方法包括:第一节点接收来自第二节点的第一延迟请求报文,其中第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;第一节点向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
其中,第一延迟请求报文也可以称为第一延迟请求。同理,本申请提供的其他报文一样可以这样简称,其他报文不再一一赘述。
通过上述方案,可以实现第一节点以单播的方式回应第二节点发送的第一延迟响应报文(即向第二节点发送第一延迟响应报文,第一延迟响应报文中的目的地址为第二节点的地址),和现有时钟同步方案中所有报文以组播的方式传输相比,可以避免第一延迟响应报文达到其他不必要到达的节点进而导致网络负载大的问题。同时,该方案中,报文在第一节点和第二节点之间传输,可以使得第一节点和第二节点以E2E的方式进行时钟同步,进而降低硬件部署成本、提高时钟同步效率,另外还可以使得第二节点及时感知第一节点的状态,进而增加网络的安全性能。
一种可能的设计中,方法还包括:第一节点向二节点发送第一跟随报文,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
通过该方式,可以实现第一节点将第一跟随报文以单播报文的形式传输给第二节点, 可以进一步降低网络负载、降低硬件成本以及提高时钟同步效率。
一种可能的设计中,方法还包括:第一节点向第二节点发送第二延迟请求报文,其中第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第二延迟请求报文与第二节点的地址相对应;第一节点接收来自第二节点的第二延迟响应报文,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址;第二延迟响应报文与第二节点的地址相对应。
通过该方式,可以实现第一节点测量第一节点和第二节点之间的时间延迟,进而有助于第一节点管理第二节点的连接状态。同时,第二节点对应的第二延迟响应报文与第二节点的地址相对应,当第一节点同时对多个节点同时通信时,第一节点可以清楚地区分不同节点对应的报文,进而可以实现第一节点同时对多个节点对应的时间延迟进行测量,提高时间延迟的测量效率。
一种可能的设计中,方法还包括:第一节点接收来自第二节点的第二跟随报文,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址;第二跟随报文与第二节点的地址相对应。
通过该方式,第一节点可以区分不同节点对应的跟随报文,提高时间延迟的测量效率。
一种可能的设计中,方法还包括:第一节点向第二节点发送第一同步报文;第一节点向第二节点发送第三跟随报文,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;第一节点向第二节点发送第二同步报文;第一节点向第二节点发送第四跟随报文,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
通过该方式,可以实现第二节点对第一节点与第二节点之间的时钟频率偏差进行测量,进而提高第二节点与第一节点之间时钟同步的可靠性。
一种可能的设计中,第一节点通过第三节点向第二节点发送第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项;第一节点通过第三节点接收来自第二节点的第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项。
通过该方式,在第一节点和第二节点之间有中继节点(如第三节点)的场景下,可以实现第一节点与第二节点以E2E的方式进行时钟同步,可以提高第一节点和第二节点的时钟同步效率。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。换而言之,上述第一节点和第二节点基于gPTP通信。
通过该方式,可以实现将gPTP协议架构从分层架构调整为树形架构,使得gPTP支持E2E的时钟同步场景。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域。
如此,可以提高第三节点在多时钟域场景下转发报文的准确性。
一种可能的设计中,第三节点转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,第三节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。
如此,可以保证gPTP报文优先被第三节点转发,可以进一步提高基于gPTP的时钟同步的效率。
第二方面,提供一种报文传输方法,方法包括:第三节点接收来自第二节点的第一延迟请求报文,第三节点将第一延迟请求报文发送给第一节点;其中第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;第三节点接收来自第一节点的第一延迟响应报文,第三节点将第一延迟响应报文发送给第二节点;第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,第三节点接收来自第二节点的第一延迟请求报文,包括:第三节点从第四节点接收第一延迟请求报文;或者,第三节点从第二节点接收第一延迟请求报文;第三节点将第一延迟响应报文发送给第二节点,包括:第三节点向第二节点发送第一延迟响应报文;或者,第三节点向第四节点发送第一延迟响应报文,以使第四节点将第一延迟报文发送给第二节点。
通过该方式,第一节点和第二节点之间可以有一个(如第三节点)或多个中继节点(如第三节点和第四节点),提高了方案的灵活性。
一种可能的设计中,方法还包括:第三节点接收来自第一节点的第一跟随报文,第三节点将第一个跟随报文发送给第二节点,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,方法还包括:第三节点接收来自第一节点的第二延迟请求报文,第三节点将第二延迟请求报文发送给第二节点;其中,第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第三节点接收来自第二节点的第二延迟响应报文,第三节点将第二延迟响应报文发送给第一节点;其中,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址。
一种可能的设计中,方法还包括:第三节点接收来自第二节点的第二跟随报文,第三节点将第二跟随报文发送给第一节点;其中,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址。
一种可能的设计中,方法还包括:第三节点接收来自第一节点的第一同步报文,将第一同步报文发送给第二节点;第三节点接收来自第一节点的第三跟随报文,将第三跟随报文发送给第二节点,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;第三节点接收来自第一节点的第二同步报文,将第二同步报文发送给第二节点;第三节点接收来自第一节点的第四跟随报文,将第四跟随报文发送给第二节点,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域。相应的,方法还包括:第三节点根据时钟域标识对第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项进行转发。
一种可能的设计中,第三节点转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,第三节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。相应的,方法还包括:第三节点接收到gPTP报文的同时还接收到PTP报文和/或业务报文,则第三节点优先对gPTP报文进行转发。
以上第二方面各设计对应的有益效果可以参见第一方面对应设计的有益效果,此处不再赘述。
第三方面,提供一种报文传输方法,方法包括:第一节点向第二节点发送第二延迟请求报文,其中第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第二延迟请求报文与第二节点的地址相对应;第一节点接收来自第二节点的第二延迟响应报文,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址;第二延迟响应报文与第二节点的地址相对应。
一种可能的设计中,方法还包括:第一节点接收来自第二节点的第二跟随报文,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址;第二跟随报文与第二节点的地址相对应。
一种可能的设计中,方法还包括:第一节点接收来自第二节点的第一延迟请求报文,其中第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;第一节点向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,方法还包括:第一节点向二节点发送第一跟随报文,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,方法还包括:第一节点向第二节点发送第一同步报文;第一节点向第二节点发送第三跟随报文,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;第一节点向第二节点发送第二同步报文;第一节点向第二节点发送第四跟随报文,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
一种可能的设计中,第一节点通过第三节点向第二节点发送第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项;第一节点通过第三节点接收来自第二节点的第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域。
一种可能的设计中,第三节点转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,第三节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。
以上第三方面各设计对应的有益效果可以参见第一方面对应设计的有益效果,此处不再赘述。
第四方面,提供一种报文传输装置,该装置可以包括用于执行第一方面或第一方面任一种可能的设计中所述方法的模块。
一种可能的设计中,装置可以包括接收单元和发送单元。其中,接收单元,用于接收来自第二节点的第一延迟请求报文,其中第一延迟请求报文用于请求对装置所在的第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;发送单元,用于向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,发送单元,还用于向二节点发送第一跟随报文,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,发送单元,还用于向第二节点发送第二延迟请求报文,其中第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第二延迟请求报文与第二节点的地址相对应;接收单元,还用于接收来自第二节点的第二延迟响应报文,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址;第二延迟响应报文与第二节点的地址相对应。
一种可能的设计中,接收单元,还用于接收来自第二节点的第二跟随报文,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址;第二跟随报文与第二节点的地址相对应。
一种可能的设计中,发送单元,还用于向第二节点发送第一同步报文;向第二节点发送第三跟随报文,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;向第二节点发送第二同步报文;向第二节点发送第四跟随报文,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时 间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
一种可能的设计中,发送单元,具体用于通过第三节点向第二节点发送第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项;接收单元,具体用于通过第三节点接收来自第二节点的第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域。
一种可能的设计中,第三节点转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,第三节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。
第五方面,提供一种报文传输装置,该装置可以包括用于执行第二方面或第二方面任一种可能的设计中所述方法的模块。
一种可能的设计中,装置包括接收单元和发送单元。其中,接收单元,用于接收来自第二节点的第一延迟请求报文;发送单元,用于将第一延迟请求报文发送给第一节点;其中第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;接收单元,还用于接收来自第一节点的第一延迟响应报文;发送单元,还用于将第一延迟响应报文发送给第二节点;第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,接收单元在接收来自第二节点的第一延迟请求报文时,具体用于:从第四节点接收第一延迟请求报文;或者,从第二节点接收第一延迟请求报文;发送单元在将第一延迟响应报文发送给第二节点时,具体用于:向第二节点发送第一延迟响应报文;或者,向第四节点发送第一延迟响应报文,以使第四节点将第一延迟报文发送给第二节点。
一种可能的设计中,接收单元,还用于接收来自第一节点的第一跟随报文;发送单元,还用于将第一个跟随报文发送给第二节点,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,接收单元,还用于接收来自第一节点的第二延迟请求报文;发送单元,还用于将第二延迟请求报文发送给第二节点;其中,第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;接收单元,还用于接收来自第二节点的第二延迟响应报文;发送单元,还用于将第二延迟响应报文发送给第一节点;其中,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址。
一种可能的设计中,接收单元,还用于接收来自第二节点的第二跟随报文;发送单元,还用于将第二跟随报文发送给第一节点;其中,第二跟随报文包括第四时间信息,第四时 间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址。
一种可能的设计中,接收单元,还用于接收来自第一节点的第一同步报文;发送单元,还用于将第一同步报文发送给第二节点;接收单元,还用于接收来自第一节点的第三跟随报文;发送单元,还用于将第三跟随报文发送给第二节点,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;接收单元,还用于接收来自第一节点的第二同步报文;发送单元,还用于将第二同步报文发送给第二节点;接收单元,还用于接收来自第一节点的第四跟随报文;发送单元,还用于将第四跟随报文发送给第二节点,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域;发送单元,还用于根据时钟域标识对第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项进行转发。
一种可能的设计中,装置所在的第三节点转发gPTP报文的优先级高于装置所在的第三节点转发精确时间协议PTP报文的优先级;和/或,装置所在的第三节点转发gPTP报文的优先级高于装置所在的第三节点转发业务报文的优先级;发送单元,还用于在装置所在的第三节点接收到gPTP报文的同时还接收到PTP报文和/或业务报文时,优先对gPTP报文进行转发。
第六方面,提供一种报文传输装置,该装置可以包括用于执行第三方面或第三方面任一种可能的设计中所述方法的模块。
一种可能的设计中,装置可以包括接收单元和发送单元。其中,发送单元,用于向第二节点发送第二延迟请求报文,其中第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第二延迟请求报文与第二节点的地址相对应;接收单元,用于接收来自第二节点的第二延迟响应报文,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址;第二延迟响应报文与第二节点的地址相对应。
一种可能的设计中,接收单元,还用于接收来自第二节点的第二跟随报文,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间,第二跟随报文的源地址为第二节点的地址;第二跟随报文与第二节点的地址相对应。
一种可能的设计中,接收单元,还用于接收来自第二节点的第一延迟请求报文,其中第一延迟请求报文用于请求对装置所在的第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;发送单元,还用于向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,发送单元,还用于向二节点发送第一跟随报文,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间,第一跟随报文中的目的地址为第二节点的地址,第二时间信息用于确定第一节点与第二节点之间的时间延迟。
一种可能的设计中,发送单元,还用于向第二节点发送第一同步报文;向第二节点发送第三跟随报文,第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;向第二节点发送第二同步报文;向第二节点发送第四跟随报文,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间;其中,第五时间信息和第六时间信息用于确定第一节点与第二节点之间的时钟频率偏差。
一种可能的设计中,发送单元,具体用于通过第三节点向第二节点发送第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项;接收单元,具体用于通过第三节点接收来自第二节点的第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项为gPTP报文。
一种可能的设计中,第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识,时钟域标识用于指示时钟域。
一种可能的设计中,第三节点转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,第三节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。
第七方面,提供一种报文传输装置,装置包括处理器和接口电路,接口电路用于接收来自装置之外的其它装置的信号并传输至处理器或将来自处理器的信号发送给装置之外的其它通信装置,处理器通过逻辑电路或执行代码指令用于实现如第一方面或第一方面任一种可能的设计或第二方面或第二方面任一种可能的设计或第三方面或第三方面任一种可能的设计中所述的方法。
第八方面,提供一种计算机可读存储介质,包括程序或指令,当程序或指令在计算机上运行时,使得如第一方面或第一方面任一种可能的设计或第二方面或第二方面任一种可能的设计或第三方面或第三方面任一种可能的设计被执行。
第九方面,提供一种报文传输系统,包括如第四方面或第六方面所述的装置,以及如第五方面所述的装置。
第十方面,提供一种车辆,包括第四方面至第七方面中任一方面所述的装置、或者如第八方面所述的计算机可读存储介质、或者如第九方面所述的系统。
附图说明
图1为本申请实施例适用的一种场景示意图;
图2为基于PTP的网络架构示意图;
图3为基于gPTP的网络架构示意图;
图4为本申请实施例提供的一种报文传输方法的流程图;
图5为本申请实施例提供的另一种报文传输方法的流程图;
图6为本申请提供的一种基于gPTP的网络架构示意图;
图7为本申请提供的另一种基于gPTP的网络架构示意图;
图8为两个时钟域的示意图;
图9为本申请提供的一种报文传输装置的结构示意图;
图10为本申请提供的另一种报文传输装置的结构示意图。
具体实施方式
以下先对本申请涉及的部分术语进行介绍。
1)、时钟同步:包括时间同步和频率同步两个概念。以节点A和节点B的时钟同步为例,时间同步是指:在同一时刻,节点A和节点B的时间需相同,类似于调整手表的时间,如节点A的时间为2021年11月26日上午1:00,节点B的时间也为2021年11月26日上午1:00;频率同步是指:节点A的时钟和节点B的时钟需以相同的频率运行,比如节点A的晶振频率和节点B的晶振频率相同,类似于调整手表的计时精度。在节点A的时钟和节点B的时钟以相同的频率运行的情况下,在同一时间段内,节点A的时钟的计数次数与节点B的时钟的计数次数相同,节点A的时间增加值和节点B的时间增加值相同,例如,节点A的时间增加了20s,节点B的时间也增加了20s。
2)主节点、从节点:任意两个节点在进行时钟同步时,时钟需要被调整的节点为从节点,另一个节点为主节点,即从节点参考主节点的时钟调整本地时钟。
3)时钟域:电路中由同一个时钟信号控制的区域,或者说,时钟参考同一时间基准的多个节点组成一个时钟域。一个系统中可以有一个时钟域,或者一个系统中可以同时有多个时钟域,本申请不做限制。
本申请实施例可以应用于任何需要进行时钟同步的场景。参见图1,为本申请实施例适用的一种场景示意图,该场景为车载系统的时间同步场景。如图1所示,车载系统包括微控制器单元(Micro Controller Unit、MCU)、传感器(如激光雷达、摄像机等)、中央处理器(Central Processing Unit,CPU)等。交换机可以通过以太网(Ethernet,ETH)接口分别与CPU、传感器和MCU等相连,进而使得CPU、传感器和MCU等相互连通。其中,交换机具体可以是车载系统中某一电子控制单元(Electronic Control Unit,ECU)内部集成的以太交换机。该车载系统中的各设备(如CPU、MCU、传感器等)的时钟需要保持同步。
应理解,图1仅示意了车载系统中的部分设备,当然还可以包括其它设备(如音频播放器、视频播放器等),本申请不做限制。另外,图1是以CPU、MCU、传感器等之间通过交换机相互连接为例,实际应用中,CPU、MCU、传感器等之间也可以直接相互连接,本申请不做限制。
一种可能的实施方式中,车载系统中各设备之间可通过精确时间协议(Precision Time Protocol,PTP)进行时钟同步。PTP协议中用于时钟同步的相关报文可称为PTP报文。
PTP中定义了主时钟(Grandmaster Clock)、从时钟(Slave Clock)和透明时钟(Transparent Clock)三种类型。其中,主时钟为整个时钟域的时间基准,从时钟需要与主时钟保持同步,透明时钟不需要与主时钟或从时钟同步。
PTP中的节点可以包括终点(endpoint)节点、桥(Bridge)节点两种类型。终点节点的时钟可以作为系统内的主时钟,也可以作为从时钟。当终点节点的时钟作为主时钟时, 终点节点的角色为主节点,主时钟可以作为从节点的参考时钟。当终点节点的时钟作为从时钟时,终点节点的角色为从节点,可以根据主时钟调整本地时钟。桥节点的时钟为透明时钟,桥节点可以作为中继节点,连接网络内的其他节点,以及为其它节点转发报文,另外还可以计算报文在桥节点的驻留时间(即转发时延)。
示例性的,图1所示的场景中,CPU、MCU、传感器可以作为终点节点,而交换机为CPU、MCU、传感器等的中继设备,可以不参与时钟同步,因此可以作为桥节点。进一步的,CPU可以作为主节点,即CPU的时钟可以作为主时钟,MCU、传感器可以作为从节点,即MCU、传感器的时钟可以为从时钟。当然,此处仅为举例,而非具体限定。
进一步的,主节点发布时间信息的端口可称为主端口(Master Port)。主节点可以通过主端口向下游节点发布PTP报文,在该PTP报文中携带主时钟的时间信息,进而使得从节点可以根据该PTP报文进行时钟同步。从节点接收时间信息的端口可以称为从端口(Slave Potrt)。从节点可以通过从端口接收来自上游节点的PTP报文,根据该PTP报文中携带主时钟的时间信息进行时钟同步操作。桥节点可以有多个端口,这些端口可以称为透明端口(Transparent Port),桥节点可以在这些透明端口之间转发PTP报文,从而实现将来自一个端点节点接收的报文转发给另一个端点节点。
PTP协议是一种端到端(End to End,E2E)协议,即终点节点和终点节点之间直接进行时钟同步。如图2所示,为基于PTP的网络架构示意图。该网络架构为网状架构,包括多个终点节点(图2中以四个终点节点为例),其中终点节点1的时钟为主时钟,即终点节点1为主节点,终点节点2、3、4的时钟为从时钟,即终点节点2、3、4为从节点。另外还包括至少一个桥节点(图2中以一个桥节点为例,实际不限于此)。
在同步时,从节点(如终点节点2、3、4)可以组播的方式向主节点发送PTP报文。具体的,从节点通过从端口将PTP报文发送到桥节点,PTP报文到达桥节点后,桥节点将PTP报文在各透明端口之间进行转发,从而将PTP报文发送到主节点。主节点可以以组播的方式向从节点发送PTP报文。具体的,主节点在其主端口组播PTP报文,PTP报文到达桥节点中与主节点的主端口连接的透明端口之后,桥节点将PTP报文在透明端口之间进行转发,从而将PTP报文发送到与各透明端口连接的从节点(如终点节点2、3、4)。应理解,图2仅示出了单级桥节点(即主节点和从节点之间只有一个桥节点),实际还可以是多级桥节点(即主节点和从节点之间只有多个桥节点),本申请不做限制。
该方案存在如下技术缺陷:
1)某个从节点与主节点之间的PTP报文到达桥节点之后,桥节点会将该PTP报文在所有透明端口之间转发,所以其它从节点也会收到来自该PTP报文,导致网络负载严重;
2)PTP仅支持从节点主动发起时延测量请求,只有从节点能够测量到主节点和从节点之间的时间延迟,而主节点不支持主动发起时延测量请求,无法获知主节点和从节点之间的时间延迟,不利于主节点管理从节点的连接状态;
3)桥节点内部需要支持计算PTP报文的驻留时间,成本高;
4)所有PTP报文都是以组播方式传输,主节点和从节点之间只能一对一地进行时延测量或时钟频率偏差的测量,时钟同步效率低。
另一种可能的实施方式中,车载系统中各设备之间可通过广义精确时间协议(Generalized Precision Time Protocol,gPTP)进行时间同步。gPTP协议中用于时钟同步的相关报文可称为gPTP报文。
gPTP定义了主时钟(Grandmaster Clock)、从时钟(Slave Clock)两种时钟类型。其中,关于主时钟和从节点的定义可以参考PTP中的相关定义,此处不再赘述。
gPTP中的节点同样包括终点(endpoint)节点、桥(Bridge)节点两种类型。其中,关于终点节点的定义可以参考PTP中的相关定义,此处不再赘述。
与PTP不同的是,gPTP是一种点对点(Point to Point,PTP)协议,只能相邻两个节点之间进行时钟同步,因此桥节点需参与时钟同步。同步时,桥节点可以参考其它节点的时钟调整本地时钟,此时桥节点相当于从节点角色;或者,其它节点将参考桥节点的时钟调整本地时钟,此时桥节点相当于主节点角色。桥节点作为从节点与其它节点进行时钟同步时,桥节点中参与报文传输的端口为从端口;桥节点作为主节点与其它节点进行时钟同步时,桥节点中参与报文传输的端口为主端口。
如图3所示,为基于gPTP的网络架构示意图,该网络架构为分层架构。终点节点1为最上游节点,最上游节点作为主节点,其时钟作为主时钟,并且为整个网络的时间基准。终点节点2、3、4作为最下游的节点,最下游节点作为从节点,其时钟作为从时钟。桥节点为中继节点,桥节点面向其相邻的上游节点时,桥节点作为从节点,桥节点与其相邻的上游节点通信的端口为从端口,桥节点面向其相邻的下游节点时,桥节点作为主节点,桥节点与其相邻的下游节点通信的端口为主端口。同步时,由上至下,依次在相邻两个节点时间进行时钟同步。例如,终点节点1先将时钟同步给桥节点,然后桥节点再将时钟分别同步给终点节点2、3、4。
可以理解的是,同步过程中。虽然桥节点充当了主节点和从节点的角色,但实质上,整个网络的时间基准原则上是最上游节点的时钟,即时钟节点1,整个同步过程的最终目的是将最下游节点(终点节点2、3、4)的时钟与最上游节点的时钟同步。为了便于更加清晰地理解和说明,本文将该最上游节点(终点节点1)定义为主时钟节点,将该最下游节点(终点节点2、3、4)定义为从时钟节点。
应理解,图3仅示出了单级桥节点(即主节点和从节点之间只有一个桥节点),实际还可以是多级桥节点(即主节点和从节点之间只有多个桥节点),本申请不做限制。
该方案存在如下技术缺陷:
1)时钟同步仅在两个相邻节点之间进行,因此需要系统中所有节点都必须支持P2P通信能力,这不仅限制了使用场景,也提高了硬件成本;
2)终点节点1出现故障,终点节点2、3、4无法感知终点节点1的故障,终点节点2、3、4和终点节点1之间的时钟误差会逐渐积累,时钟同步可靠性差;
3)若桥节点端口连接的节点的角色发生切换,则桥节点的端口网络拓扑随之变换(原主端口变为从端口,或原从端口变为主端口等),会增加网络收敛时间,时钟同步效率低;
4)时钟同步在两个相邻节点之间进行,时钟从主时钟节点(最上游节点)同步到从时钟节点(最下游节点)的耗时较长,时钟同步效率低。
为了解决上述一个或多个技术问题,提供本申请技术方案。
参见图4,为本申请实施例提供的一种报文传输方法,方法包括:
S401、第二节点向第一节点发送第一延迟请求报文,第一节点接收来自第二节点的第一延迟请求(如Pdelay_request_1)报文。
其中,第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,该时间延迟是指信息从第一节点传输到第二节点(或第二节点传输到第一节点)所经历的 时间。
第一延迟请求报文的源地址为第二节点的地址,目的地址为组播地址。换而言之,第一延迟请求报文为组播报文。进一步的,该组播地址可以是对应一个时钟域的地址,该时钟域为包括第一节点、第二节点在内的多个节点组成的时钟域。
可以理解的是,第一节点和第二节点均为终点节点,第二节点为需要被调整时钟的节点,第一节点的时钟为第一节点所在时钟域的时间基准。
以图1所示的场景为例,CPU、MCU、传感器组成一个时钟域,第一节点可以为CPU,第二节点可以为MCU或传感器。
S402、第一节点向第二节点发送第一延迟响应(如Pdelay_response_1)报文,第二节点接收来自第一节点的第一延迟响应报文。
其中,第一延迟响应报文的源地址为第一节点的地址,目的地址为第二节点的地址。换而言之,第一延迟响应报文为单播报文。
第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间。第一时间信息用于确定第一节点与第二节点之间的时间延迟,例如第二节点可以基于第一时间信息确定第一节点与第二节点之间的时间延迟。
可以理解的是,第一时间信息可以指示绝对时间值,也可以指示相对时间值,本申请实施例不做限制。例如,第一时间信息是从1970年1月1日(国际协调时间(UTC)/格林尼治时间(GMT)的午夜)开始,到第一节点接收到第一延迟请求报文截止,期间所经过的秒数(如:1639411230秒);或者例如,第一时间信息是第一节点接收第一延迟请求报文的地区时间(如:北京时间2021年12月14日上午0点0分30秒);或者例如,第一时间信息是第一节点接收第一请求报文的时刻与第二节点发送第一请求报文的时刻的时间差(如:1秒)。当然,以上各数值仅为举例,不能用于代表实际应用时的真实时间。
进一步的,第一节点和第二节点可以基于PTP或gPTP或其它时间协议传输报文,本申请不做限制。当第一节点和第二节点基于PTP传输报文时,第一节点为主节点(Grand Master)(如图2所示的终点节点1),第二节点为从节点(Slave)(如图2所示的终点节点2或终点节点3或终点节点4)。当第一节点和第二节点基于gPTP协议传输报文时,第一节点为主时钟节点(如图3所示的终点节点1),第二节点为从时钟节点(如图3所示的终点节点2或终点节点3或终点节点4)。
可以理解的,本申请实施例中的地址(源地址或者目的地址)的类型可以是能够用于标识节点的任何地址类型,例如是介质访问控制(Media Access Control,MAC)地址或网际协议(Internet Protocol,IP)地址等,本申请不做限制。
应理解,以上是以第一节点和第二节点交互为例,在实际应用中,第一节点可以同时与多个节点交互,针对第一节点与该多个节点中每个节点的交互流程,可以参考上述S401~S402的流程,此处不再赘述。
通过上述S401~S402,可以实现第一延迟响应报文以单播报文的形式在两个终点节点之间传输(即以E2E的方式传输)。和图2所示的方案中相比,本申请实施例中的第一延迟响应报文为单播报文,可以避免第一延迟响应报文达到其他不必要到达的节点进而导致网络负载大的问题。和图3所示的方案中相比,本申请实施例中的第一延迟响应报文在第一节点和第二节点之间以E2E的方式传输,一方面,使得桥节点不需要支持P2P能力,因此可以降低硬件成本,另一方面,使得时钟同步直接在第一节点和第二节点之间进行,因 此可以提高时钟同步效率,除此之外,还可以使得第二节点可以及时感知第一节点的状态,进而增加网络的安全性能。
一种可能的实现方式中,第一节点还向二节点发送第一跟随(如follow_up_1)报文,其中第一跟随报文包括第二时间信息,第二时间信息用于指示第一延迟响应报文的发送时间。其中,第一跟随报文中的源地址为第一节点的地址,目的地址为第二节点的地址。换而言之,第一跟随报文为单播报文。第二时间信息用于确定第一节点与第二节点之间的时间延迟,例如第二节点可以根据第一时间信息和第二时间信息确定第一节点与第二节点之间的时间延迟。
其中,第一跟随报文是跟随在第一延迟响应报文之后,用于指示第一延迟响应报文的发送时间,因此第一跟随报文还可以称为第一延迟响应跟随(如Pdelay_response_follow_up_1)报文。
可以理解的是,第二时间信息可以指示绝对时间值,也可以指示相对时间值,本申请实施例不做限制。
进一步的,第二节点可以记录第二节点发送第一延时请求报文的时间和第二节点接收第一延迟响应报文的时间。第二节点在根据第一延迟响应报文获得第一节点接收第一延迟请求报文的时间,根据第一跟随报文获得第一节点发送第一延迟响应报文的时间之后,就可以结合第二节点发送第一延时请求报文的时间和第二节点接收第一延迟响应报文的时间确定第一节点和第二节点之间的时间延迟。
例如,设第二节点发送第一延时请求报文的时间为t1、第一节点接收第一延迟请求报文的时间为t2、第一节点发送第一延迟响应报文的时间为t3、第二节点接收第一延迟响应报文的时间为t4,则第一节点和第二节点之间的时间延迟可以为Δt=[(t4-t1)-(t3-t2))]/2。
当第二节点获得第一节点和第二节点之间的时间延迟之后,就可以结合第一节点发布的时间信息(如第一节点的本地时间,具体例如为第一节点发布时钟信息时刻的本地时间)以及第一节点和第二节点之间的时间延迟,校准第二节点的本地时钟。这是因为,第一节点发布的时间信息传输到第二节点存在时延(即第一节点和第二节点之间的时间延迟),因此该时间信息到达第二节点之后就已经过期了,所以需要通过第一节点和第二节点之间的时间延迟可以修正该时间信息,然后再根据修正后的时间信息调整本地时钟的时间,进而保证时钟同步中时间同步的准确性。
通过该方式,可以实现第一节点将第一跟随报文以单播报文的形式传输给第二节点,可以进一步降低网络负载、降低硬件成本以及提高时钟同步效率。第二节点可以获得第一节点和第二节点之间的时间延迟,进而对本地时钟的时间进行调整。
以上是以第二节点对第一节点和第二节点之间的时间延迟进行测量为例,在本申请实施例中,第一节点也可以对第一节点和第二节点之间的时间延迟进行测量。
参见图5,为本申请实施例提供的另一种报文传输方法,方法包括:
S501、第一节点向第二节点发送第二延迟请求(如Pdelay_request_2)报文,相应的,第二节点接收来自第一节点的第二延迟请求报文。
其中,第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量。
可以理解的是,第一节点和第二节点均为终点节点,且第二节点为需要被调整时钟的节点,第一节点为时钟作为时间基准的节点。例如,第一节点为图2所示的终点节点1,第二节点为图2所示的终点节点2或终点节点3或终点节点4);或者,第一节点为如图3 所示的终点节点1,第二节点为图3所示的终点节点2或终点节点3或终点节点4。关于第一节点、第二节点的相关定义,可以参考上文S401~S402中对第一节点、第二节点的相关介绍,此处不再赘述。
第二延迟请求报文的源地址为第一节点的地址。可选的,第二延迟请求报文为组播报文,即目的地址为组播地址,例如组播地址可以是对应一个时钟域的地址,该时钟域为包括第一节点、第二节点在内的多个节点组成的时钟域。可替换的,第二延迟请求报文为单播报文,即第二延迟请求报文的目的地址为第二节点的地址,本申请不做限制。
其中,第二延迟请求报文与第二节点的地址相对应。
第一节点可以维护第二延迟请求报文与第二节点的地址的对应关系。
一种的可能的设计中,第一节点保存第二延迟请求报文,并使用第二节点的地址为第二延迟请求报文添加标识信息。例如,第一节点创建第一表格,第一表格以第二节点的地址为标识信息,第一节点将第二延迟请求报文保存到第一表格中。当然,表格仅为举例,第一节点还可以采用其它方式存储第一延迟请求报文,例如文件夹、数据库等,文件夹、数据库等通过第二节点的地址标识。
进一步的,第一节点还可以保存第一节点发送第二延迟请求报文的时间信息。例如,将第一节点发送第二延迟请求报文的时间保存到第一表格中。
参见表1,为第一表格的示例。其中,表1以CPU是第一节点为例,传感器是第二节点为例。
表1
Figure PCTCN2021139652-appb-000001
应理解,表1仅为示例,本申请实施例不对第一表格的具体形式进行限定。
需要说明的是,本申请不限制第一节点发送第二延迟请求报文和保存第二延迟请求报文与第二节点的地址的对应关系的先后顺序。也即,第一节点可以先向第二节点发送第二延迟请求报文,然后再保存第二延迟请求报文与第二节点的地址的对应关系,也可以先保存第二延迟请求报文与第二节点的地址的对应关系,然后再向第二节点发送第二延迟请求报文,也可以向第二节点发送第二延迟请求报文的同时保存第二延迟请求报文与第二节点的地址的对应关系。
S502、第二节点向第一节点发送第二延迟响应(如Pdelay_response_2)报文,相应的,第一节点接收来自第二节点的第二延迟响应报文。
具体的,第二节点收到第二延迟请求报文之后,响应于第二延迟请求报文,向第一节点返回第二延迟响应报文,第二应延迟响应报文中携带第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间。
可以理解的是,第三时间信息可以指示绝对时间值,也可以指示相对时间值,本申请实施例不做限制。
其中,第二延迟响应报文的源地址为第二节点的地址。可选的,第二延迟响应报文为组播报文,即目的地址为组播地址,例如组播地址可以是对应第一节点所在时钟域的地址。 可替换的,第二延迟响应报文为单播报文,即第二延迟响应报文的目的地址为第一节点的地址,本申请不做限制。
第一节点可以维护第二延迟响应报文与第二节点的地址的对应关系。
一种可能的设计中,第一节点保存第二延迟响应报文,并使用第二节点的地址为第二延迟响应报文添加标识信息。例如,第一节点将第二延迟响应报文保存到第一表格中。
第一节点还可以保存第一节点接收第二延迟响应报文的时间信息。例如,将第一节点接收第二延迟响应报文的时间保存到第一表格中。
应理解,以上是以第一节点和第二节点交互为例,在实际应用中,第一节点可以同时与多个节点交互,针对第一节点与该多个节点中每个节点的交互流程,可以参考上述S501~S502的流程,此处不再赘述。其中,第一节点与不同节点交互的报文可以保存在同一个表格(或文件夹或数据库)中,也可以分别保存在不同的表格(或文件夹或数据库)中,本申请不做限制。
参见表2,为第一表格的另一种示例,同时记录了CPU与传感器交互报文的信息、CPU与MCU交互报文的信息。
表2
Figure PCTCN2021139652-appb-000002
可以理解的是,t5可以与t7相同或不同,t6可以与t8相同或不同。
可以理解的是,第一节点和第二节点可以基于PTP或gPTP或其它时间协议传输报文,本申请不做限制。当第一节点和第二节点基于PTP传输报文时,第一节点为主节点(如图2所示的终点节点1),第二节点为从节点(如图2所示的终点节点2或终点节点3或终点节点4)。当第一节点和第二节点基于gPTP协议传输报文时,第一节点为主时钟节点(如图3所示的终点节点1),第二节点为从时钟节点(如图3所示的终点节点2或终点节点3或终点节点4)。
通过上述S501~S502,可以实现第一节点测量第一节点和第二节点之间的时间延迟,进而有助于第一节点管理第二节点的连接状态。同时,该方案中,第一节点将可以将与第二节点对应的报文与第二节点的地址相对应,以便于第一节点将第二节点对应的报文与其它报文进行区分。以此类推,第一节点可以维护与多个节点之间的连接状态,区分不同节点对应的报文,从而可以支持第一节点对多个节点的时延测量,提高测量效率。
一种可能的实现方式中,第二节点还可以向第一节点发送第二跟随报文,相应的,第一节点接收来自第二节点的第二跟随报文,第二跟随报文包括第四时间信息,第四时间信息用于指示第二延迟响应报文的发送时间;第一节点第二跟随报文与第二节点的地址相对应。其中,第二跟随报文的源地址为第二节点的地址。第二跟随报文的目的地址为组播地 址或第一节点的地址,本申请不做限制。第一节点将第二跟随报文与第二节点的地址相对应的具体方式可以参考上文第一节点将第二延迟请求报文、第二延迟响应报文与第二节点的地址相对应的具体方式,此处不再赘述。
其中,第二跟随报文是跟随在第二延迟响应报文之后,用于指示第二延迟响应报文的发送时间,因此第二跟随报文还可以称为第二延迟响应跟随(如Pdelay_response_follow_up_2)报文。
可以理解的是,第四时间信息可以指示绝对时间值,也可以指示相对时间值,本申请实施例不做限制。
进一步的,第一节点可以根据第一节点发送第二延迟请求报文的时间、第二节点接收第二延迟请求报文的时间、第二节点发送第二延迟响应报文的时间以及第一节点接收第二延迟响应报文的时间,确定第一节点与第二节点之间的时间延迟。具体方法可以参考上文第二节点确定第一节点与第二节点之间的时间延迟的方法。
通过该方式,第一节点可以获得第一节点和第二节点之间的时间延迟。
可以理解的是上述S401~S402所示的方案和上述S501~S502所示的方案可以分别单独实施,也可以相互结合实施,本申请不做限制。当两者结合实施时,同时具备两个方案单独实施的有益效果。
以上介绍了对第一节点和第二节点之间的时间延迟进行测量的方案,以下介绍对第一节点与第二节点之间的时钟频率偏差进行测量的方案。
一种可能的设计中,第一节点向第二节点发送第一同步(如sync_1)报文,相应的,第二节点接收第一同步报文;第一节点向第二节点发送第三跟随(如follow_up_1)报文,相应的,第二节点接收第三跟随报文,其中第三跟随报文包括的第五时间信息,第五时间信息用于指示第一同步报文的发送时间;第一节点向第二节点发送第二同步(如sync_2)报文,相应的,第二节点接收第二同步报文;第一节点向第二节点发送第四跟随(如follow_up_2)报文,相应的,第二节点接收第四跟随报文,第四跟随报文包括第六时间信息,第六时间信息用于指示第二同步报文的发送时间。进而第二节点可以根据第一节点发送第一同步报文的时间、第二节点接收第二节点的时间、第一节点发送第二同步报文的时间、第二节点接收第二同步报文的时间计算第一节点与第二节点之间的时钟频率偏差。
可以理解的是,第五时间信息、第五时间信息可以指示绝对时间值,也可以指示相对时间值,本申请实施例不做限制。
例如,设第一节点发送第一同步报文的时间为t9、第二节点接收第二节点的时间为t10、第一节点发送第二同步报文的时间为t11、第二节点接收第二同步报文的时间为t12。则第一节点与第二节点之间的时钟频率偏差可以为Δf=(t11–t9)/(t12–t10)。
第二节点在得到第一节点与第二节点之间的时钟频率偏差之后,就可以根据第一节点与第二节点之间的时钟频率偏差调整本地时钟的频率,进而实现第一节点的时钟的频率与第二节点的时钟的频率同步。
可以理解的是,在本申请实施例中,第一节点和第二节点如果是直接相连,则第一节点和第二节点之间可以直接交互,如果第一节点和第二节点之间还有其它节点,如第三节点,则第一节点和第二节点需要通过其它节点来转发报文。
以图1所示的场景为例,第一节点为CPU,第二节点为传感器或MCU,第三节点为交换机。
一种可能的设计中,第一节点可以通过第三节点向第二节点发送第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项;相应的,第二节点通过第三节点接收来自第一节点的第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文中的一项或多项。示例性的,以第一延迟响应报文为例,第一节点先向第三节点发送第一延迟响应报文,第三节点收到第一延迟响应报文后,将第一延迟响应报文发送给第二节点。
进一步的,第二节点可以通过第三节点向第二节点发送第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项;相应的,第一节点通过第三节点接收来自第二节点的第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项。示例性的,以第一延迟请求报文为例,第二节点可以先向第三节点发送第一延迟请求报文,第三节点收到第一延迟请求报文,将第一延迟请求报文发送给第一节点。
可以理解的是,本申请实施例中,如果第一节点和第二节点之间有多个节点,则报文需要依次被该多个节点转发。示例性的,第一节点与第三节点相连,第三节点与第四节点相连,第四节点与第二节点相连,则第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文等,被第一节点发出后,先由第三节点转发给第四节点,再由第四节点转发给第二节点。类似的,第一延迟请求报文、第二延迟响应报文或第二跟随报文等,被第二节点发出后,先由第四节点转发给第三节点,再由第三节点转发给第二节点。
以图1所示的场景为例,第一节点为CPU,第二节点为传感器或MCU,第三节点、第四节点为两个不同的交换机。
一种可能的设计中,第一节点、第二节点和第三节点之间通过gPTP相互通信。换而言之,上述第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文等中的一项或多项可以为gPTP报文。
参见图6,为本申请提供的一种基于gPTP的网络架构示意图,该网络架构为树形架构:终点节点1通过桥节点与终点节点2、终点节点3、终点节点4相连,终点节点1的时钟为整个网络的时间基准,终点节点2、终点节点3、终点节点4的时钟为从时钟,桥节点的时钟为透明时钟,桥节点的端口角色全部为透明端口,桥节点收到来自终点节点1的报文后,将该报文转发给终点节点2或终点节点3或终点节点4,或者桥节点收到来自终点节点2或终点节点3或终点节点4的报文后,将该报文转发给终点节点1。相应的,本文中的第一节点可以是图6所示的终点节点1,第二节点可以是图6所示的终点节点2或终点节点3或终点节点4,第三节点可以是图6所示的桥节点。
应理解,图6是以单级桥节点为例,另外还可以是多级桥节点。
例如,参见图7,为本申请提供的另一种基于gPTP的网络架构示意图。终点节点1与第一桥节点相连,第一桥节点与第二桥节点相邻,第二桥节点与终点节点2、终点节点3、终点节点4相连。终点节点1通过桥节点与终点节点2、终点节点3、终点节点4相连。相应的,本文中的第一节点可以是图6所示的终点节点1,第二节点可以是图6所示的终点节点2或终点节点3或终点节点4,第三节点可以是图7所示的第一桥节点,第四节点可以是图7所示的第二桥节点。
本申请实施例将gPTP协议架构从分层架构调整为树形架构,使得gPTP可以支持E2E通信场景,即终点节点和终点节点之间直接进行时钟同步,可以使得从时钟节点(如图6中的终点节点2或3或4)能快速感知主时钟节点(如图6中的终点节点1)的状态,同时提高同步效率;其次,桥节点基于gPTP协议通信,不需要计算报文的驻留时间,可以降低硬件部署成本;另外,由于桥节点的全部端口均为透明端口,所以即便桥节点的端口连接的节点的角色发生切换,桥节点的端口网络拓扑也不受影响,可以减少网络收敛时间。
一种可能的设计中,本文涉及的第一延迟响应报文、第一跟随报文、第二延迟请求报文、第一同步报文、第三跟随报文、第二同步报文或第四跟随报文、第一延迟请求报文、第二延迟响应报文或第二跟随报文中的一项或多项中还包含时钟域标识(如DomainId),时钟域标识用于指示时钟域,该时钟域为第一节点、第二节点所在的时钟域。相应的,第三节点(即桥节点)根据时钟域标识对该些报文进行转发。本申请实施例对第三节点(即桥节点)支持的时钟域的个数不做限定,如,可以支持2个时钟域,或者可以支持3个时钟域,或者可以支持4个时钟域,等等。应理解,如果第三节点还接收到其它时钟域的报文,则还可以根据其它时钟域的报文中携带的时钟域标识转发报文。
示例性的,参见图8,以两个时钟域为例:桥节点的端口T1连接终点节点a、桥节点的端口T2连接终点节点c、桥节点的端口T3连接终点节点b、桥节点的端口T4连接终点节点d。终点节点a发送的报文中携带的时钟域标识和终点节点c发送的报文中携带的时钟域标识均为“1”,则终点节点a和终点节点c属于同一时钟域,即时钟域标识“1”指示的第一时钟域,相应的,桥节点将终点节点a发送的报文转发给终点节点c(将从端口T1接收到的报文从端口T2发送出去),将终点节点c发送的报文转发给终点节点a(将从端口T2接收到的报文从端口T1发送出去);类似的,终点节点b发送的报文中携带的时钟域标识和终点节点d发送的报文中携带的时钟域标识均为“2”,则终点节点b和终点节点d属于同一时钟域,即时钟域标识“2”指示的第二时钟域,相应的,桥节点将终点节点b发送的报文转发给终点节点d(将从端口T3接收到的报文从端口T4发送出去),将终点节点d发送的报文转发给终点节点b(将从端口T4接收到的报文从端口T2发送出去)。在图8中,虚线表示的路径为第一时钟域的报文的转发路径,即桥节点在端口T1和T2之间转发报文,实线虚线表示的路径为第二时钟域的报文的转发路径,即桥节点在端口T3和T4之间转发报文。
如此,可以提高第三节点(即桥节点)在多时钟域场景下转发报文的准确性。
一种可能的设计中,第三节点(即桥节点)转发gPTP报文的优先级高于第三节点转发精确时间协议PTP报文的优先级;和/或,桥节点转发gPTP报文的优先级高于第三节点转发业务报文的优先级。其中,业务报文是指业务传输过程中传输的携带有业务数据的报文,例如携带地图、或视频等业务数据的报文。相应的,在第三节点接收到gPTP报文的同时还接收到PTP报文和/或业务报文的场景下,则第三节点优先对gPTP报文进行转发。
在具体实施时,桥节点在收到报文之后,按照报文的类型,标记报文的优先级,然后按照优先级从高到低的顺序依次对各个报文进行处理。例如,桥节点将报文的优先级别划分为8类,从低至高分别为“0”、“1”、“2”、“3”、“4”、“5”、“6”、“7”,gPTP报文达到桥接点后,桥节点将gPTP报文的优先级标记为“7”(最高级),PTP报文达到桥接点后,桥节点将PTP报文的优先级标记为“6”(最高级),……,以此类推;桥节点按照优先级从高到低的顺序处理报文,将优先级“7”的报文转发完毕之后,再对优先级“6”的报文进行转发, 将优先级“6”的报文转发完毕之后,再对优先级“5”的报文进行转发,……,以此类推。应理解,此处仅为举例,实际应用中还可以有其它优先级设定方式。
如此,可以保证gPTP报文优先被第三节点转发,可以进一步提高基于gPTP的时钟同步的效率。
以上结合附图介绍了本申请实施例提供的方法,以下结合附图介绍本申请实施例提供的装置。
基于同一技术构思,本申请实施例提供一种报文传输装置,该装置包括用于执行上述方法实施例中第一节点、第二节点或第三节点所执行的方法的模块/单元/手段。该模块/单元/手段可以通过软件实现,或者通过硬件实现,也可以通过硬件执行相应的软件实现。
参见图9,该装置可以包括发送单元901和接收单元902。可选的,还可以包括处理单元903。图9中以虚线表示处理单元903为可选的。
例如,当该装置用于第一节点时,接收单元902,用于接收来自第二节点的第一延迟请求报文,其中第一延迟请求报文用于请求对装置所在的第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;发送单元901,用于向第二节点发送第一延迟响应报文,第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
或者,发送单元901,用于向第二节点发送第二延迟请求报文,其中第二延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量;第二延迟请求报文与第二节点的地址相对应;接收单元902,用于接收来自第二节点的第二延迟响应报文,第二延迟响应报文包括第三时间信息,第三时间信息用于指示第二延迟请求报文的接收时间,第二延迟请求报文的源地址为第二节点的地址;第二延迟响应报文与第二节点的地址相对应。
例如,当该装置用于第三节点时,接收单元902,用于接收来自第二节点的第一延迟请求报文;发送单元901,用于将第一延迟请求报文发送给第一节点;其中第一延迟请求报文用于请求对第一节点与第二节点之间的时间延迟进行测量,第一延迟请求报文的源地址为第二节点的地址;接收单元902,还用于接收来自第一节点的第一延迟响应报文;发送单元901,还用于将第一延迟响应报文发送给第二节点;第一延迟响应报文包括第一时间信息,第一时间信息用于指示第一延迟请求报文的接收时间,第一延迟响应报文的目的地址为第二节点的地址;其中,第一时间信息用于确定第一节点与第二节点之间的时间延迟。
应理解,上述方法实施例涉及的各步骤的所有相关内容均可以援引到对应功能模块的功能描述,在此不再赘述。
在具体实施时,上述装置可以有多种产品形态,以下介绍几种可能的产品形态。
参见图10,本申请实施例还提供一种报文传输装置,该装置包括至少一个处理器1001和接口电路1002;接口电路1002用于接收来自该装置之外的其它装置的信号并传输至处理器1001或将来自处理器1001的信号发送给该装置之外的其它通信装置,1001处理器通过逻辑电路或执行代码指令用于实现上述方法实施例中第一节点或第二节点或第三节点所执行的方法。
应理解,本申请实施例中提及的处理器可以通过硬件实现也可以通过软件实现。当通过硬件实现时,该处理器可以是逻辑电路、集成电路等。当通过软件实现时,该处理器可 以是一个通用处理器,通过读取存储器中存储的软件代码来实现。
示例性的,处理器可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器(Digital Signal Processor,DSP)、专用集成电路(Application Specific Integrated Circuit,ASIC)、现成可编程门阵列(Field Programmable Gate Array,FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
应理解,本申请实施例中提及的存储器可以是易失性存储器或非易失性存储器,或可包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),其用作外部高速缓存。通过示例性但不是限制性说明,许多形式的RAM可用,例如静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Eate SDRAM,DDR SDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DR RAM)。
需要说明的是,当处理器为通用处理器、DSP、ASIC、FPGA或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件时,存储器(存储模块)可以集成在处理器中。
应注意,本文描述的存储器旨在包括但不限于这些和任意其它适合类型的存储器。
基于相同技术构思,本申请实施例还提供一种计算机可读存储介质,包括程序或指令,当所述程序或指令在计算机上运行时,使得上述方法实施例中第一节点、第二节点或第三节点等所执行的方法被执行。
基于相同技术构思,本申请实施例还提供一种包含指令的计算机程序产品,该计算机程序产品中存储有指令,当其在计算机上运行时,使得上述方法实施例中第一节点、第二节点或第三节点等所执行的方法被执行。
基于相同技术构思,本申请实施例还提供一种车辆,包括图9或图10所示的装置。
本领域内的技术人员应明白,本申请的实施例可提供为方法、系统、或计算机程序产品。因此,本申请可采用完全硬件实施例、完全软件实施例、或结合软件和硬件方面的实施例的形式。而且,本申请可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本申请是参照根据本申请的方法、设备(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现流程图和/或方框图中的每一流程和/或方框、以及流程图和/或方框图中的流程和/或方框的结合。可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方 式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
这些计算机程序指令也可装载到计算机或其他可编程数据处理设备上,使得在计算机或其他可编程设备上执行一系列操作步骤以产生计算机实现的处理,从而在计算机或其他可编程设备上执行的指令提供用于实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能的步骤。
显然,本领域的技术人员可以对本申请进行各种改动和变型而不脱离本申请的保护范围。这样,倘若本申请的这些修改和变型属于本申请权利要求及其等同技术的范围之内,则本申请也意图包含这些改动和变型在内。

Claims (40)

  1. 一种报文传输方法,其特征在于,所述方法包括:
    第一节点接收来自第二节点的第一延迟请求报文,其中所述第一延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量,所述第一延迟请求报文的源地址为所述第二节点的地址;
    所述第一节点向所述第二节点发送第一延迟响应报文,所述第一延迟响应报文包括第一时间信息,所述第一时间信息用于指示所述第一延迟请求报文的接收时间,所述第一延迟响应报文的目的地址为所述第二节点的地址;
    其中,所述第一时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  2. 如权利要求1所述的方法,其特征在于,所述方法还包括:
    所述第一节点向所述二节点发送第一跟随报文,其中所述第一跟随报文包括第二时间信息,所述第二时间信息用于指示所述第一延迟响应报文的发送时间,所述第一跟随报文中的目的地址为所述第二节点的地址,所述第二时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  3. 如权利要求1或2所述的方法,其特征在于,所述方法还包括:
    所述第一节点向所述第二节点发送第二延迟请求报文,其中所述第二延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量;所述第二延迟请求报文与所述第二节点的地址相对应;
    所述第一节点接收来自所述第二节点的第二延迟响应报文,所述第二延迟响应报文包括第三时间信息,所述第三时间信息用于指示所述第二延迟请求报文的接收时间,所述第二延迟请求报文的源地址为所述第二节点的地址;所述第二延迟响应报文与所述第二节点的地址相对应。
  4. 如权利要求3所述的方法,其特征在于,所述方法还包括:
    所述第一节点接收来自所述第二节点的第二跟随报文,所述第二跟随报文包括第四时间信息,所述第四时间信息用于指示所述第二延迟响应报文的发送时间,所述第二跟随报文的源地址为所述第二节点的地址;所述第二跟随报文与所述第二节点的地址相对应。
  5. 如权利要求1-4任一项所述的方法,其特征在于,所述方法还包括:
    所述第一节点向所述第二节点发送第一同步报文;
    所述第一节点向所述第二节点发送第三跟随报文,所述第三跟随报文包括第五时间信息,所述第五时间信息用于指示所述第一同步报文的发送时间;
    所述第一节点向所述第二节点发送第二同步报文;
    所述第一节点向所述第二节点发送第四跟随报文,所述第四跟随报文中包括第六时间信息,所述第六时间信息用于指示所述第二同步报文的发送时间;
    其中,第五时间信息和所述第六时间信息用于确定所述第一节点与所述第二节点之间的时钟频率偏差。
  6. 如权利要求5所述的方法,其特征在于,
    所述第一节点通过第三节点向所述第二节点发送所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文中的一项或多项;
    所述第一节点通过所述第三节点接收来自所述第二节点的所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项。
  7. 如权利要求6所述的方法,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项为广义精准同步协议gPTP报文。
  8. 如权利要求6所述的方法,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项中还包含时钟域标识,所述时钟域标识用于指示时钟域。
  9. 如权利要求7所述的方法,其特征在于,所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发精确时间协议PTP报文的优先级;和/或,
    所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发业务报文的优先级。
  10. 一种报文传输方法,其特征在于,所述方法包括:
    第三节点接收来自第二节点的第一延迟请求报文,所述第三节点将所述第一延迟请求报文发送给第一节点;其中所述第一延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量,所述第一延迟请求报文的源地址为所述第二节点的地址;
    所述第三节点接收来自所述第一节点的第一延迟响应报文,所述第三节点将所述第一延迟响应报文发送给所述第二节点;所述第一延迟响应报文包括第一时间信息,所述第一时间信息用于指示所述第一延迟请求报文的接收时间,所述第一延迟响应报文的目的地址为所述第二节点的地址;
    其中,所述第一时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  11. 如权利要求10所述的方法,其特征在于,
    所述第三节点接收来自第二节点的第一延迟请求报文,包括:
    所述第三节点从第四节点接收所述第一延迟请求报文;或者,所述第三节点从所述第二节点接收所述第一延迟请求报文;
    所述第三节点将所述第一延迟响应报文发送给所述第二节点,包括:
    所述第三节点向所述第二节点发送所述第一延迟响应报文;或者,所述第三节点向所述第四节点发送所述第一延迟响应报文,以使所述第四节点将所述第一延迟报文发送给所述第二节点。
  12. 如权利要求10所述的方法,其特征在于,所述方法还包括:
    所述第三节点接收来自所述第一节点的第一跟随报文,所述第三节点将所述第一个跟随报文发送给所述第二节点,其中所述第一跟随报文包括第二时间信息,所述第二时间信息用于指示所述第一延迟响应报文的发送时间,所述第一跟随报文中的目的地址为所述第二节点的地址,所述第二时间信息用于所述第二节点确定所述第一节点与所述第二节点之间的时间延迟。
  13. 如权利要求10-12任一项所述的方法,其特征在于,所述方法还包括:
    所述第三节点接收来自所述第一节点的第二延迟请求报文,所述第三节点将第二延迟请求报文发送给所述第二节点;其中,所述第二延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量;
    所述第三节点接收来自所述第二节点的所述第二延迟响应报文,所述第三节点将所述第二延迟响应报文发送给所述第一节点;其中,所述第二延迟响应报文包括第三时间信息,所述第三时间信息用于指示所述第二延迟请求报文的接收时间,所述第二延迟请求报文的源地址为所述第二节点的地址。
  14. 如权利要求13所述的方法,其特征在于,所述方法还包括:
    所述第三节点接收来自所述第二节点的第二跟随报文,所述第三节点将所述第二跟随报文发送给所述第一节点;其中,所述第二跟随报文包括第四时间信息,所述第四时间信息用于指示所述第二延迟响应报文的发送时间,所述第二跟随报文的源地址为所述第二节点的地址。
  15. 如权利要求10-14任一项所述的方法,其特征在于,所述方法还包括:
    所述第三节点接收来自所述第一节点的第一同步报文,将所述第一同步报文发送给所述第二节点;所述第三节点接收来自所述第一节点的第三跟随报文,将所述第三跟随报文发送给所述第二节点,所述第三跟随报文包括第五时间信息,所述第五时间信息用于指示所述第一同步报文的发送时间;
    所述第三节点接收来自所述第一节点的第二同步报文,将所述第二同步报文发送给所述第二节点;所述第三节点接收来自所述第一节点的第四跟随报文,将所述第四跟随报文发送给所述第二节点,所述第四跟随报文包括第六时间信息,所述第六时间信息用于指示所述第二同步报文的发送时间;
    其中,所述第五时间信息和所述第六时间信息用于确定所述第一节点与所述第二节点之间的时钟频率偏差。
  16. 如权利要求15所述的方法,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项为gPTP报文。
  17. 如权利要求15所述的方法,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项中还包含时钟域标识,所述时钟域标识用于指示时钟域;
    所述方法还包括:
    所述第三节点根据所述时钟域标识对所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项进行转发。
  18. 如权利要求16所述的方法,其特征在于,所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发精确时间协议PTP报文的优先级;和/或,所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发业务报文的优先级;
    所述方法还包括:
    所述第三节点接收到所述gPTP报文的同时还接收到所述PTP报文和/或所述业务报文,则所述第三节点优先对所述gPTP报文进行转发。
  19. 一种报文传输装置,其特征在于,所述装置包括:
    接收单元,用于接收来自第二节点的第一延迟请求报文,其中所述第一延迟请求报文用于请求对所述装置所在的第一节点与所述第二节点之间的时间延迟进行测量,所述第一延迟请求报文的源地址为所述第二节点的地址;
    发送单元,用于向所述第二节点发送第一延迟响应报文,所述第一延迟响应报文包括第一时间信息,所述第一时间信息用于指示所述第一延迟请求报文的接收时间,所述第一延迟响应报文的目的地址为所述第二节点的地址;
    其中,所述第一时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  20. 如权利要求19所述的装置,其特征在于,
    所述发送单元,还用于向所述二节点发送第一跟随报文,其中所述第一跟随报文包括第二时间信息,所述第二时间信息用于指示所述第一延迟响应报文的发送时间,所述第一跟随报文中的目的地址为所述第二节点的地址,所述第二时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  21. 如权利要求19或20所述的装置,其特征在于,所述发送单元,还用于向所述第二节点发送第二延迟请求报文,其中所述第二延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量;所述第二延迟请求报文与所述第二节点的地址相对应;
    所述接收单元,还用于接收来自所述第二节点的第二延迟响应报文,所述第二延迟响应报文包括第三时间信息,所述第三时间信息用于指示所述第二延迟请求报文的接收时间,所述第二延迟请求报文的源地址为所述第二节点的地址;所述第二延迟响应报文与所述第二节点的地址相对应。
  22. 如权利要求21所述的装置,其特征在于,所述接收单元,还用于接收来自所述第二节点的第二跟随报文,所述第二跟随报文包括第四时间信息,所述第四时间信息用于指示所述第二延迟响应报文的发送时间,所述第二跟随报文的源地址为所述第二节点的地址;所述第二跟随报文与所述第二节点的地址相对应。
  23. 如权利要求19-22任一项所述的装置,其特征在于,所述发送单元,还用于向所述第二节点发送第一同步报文;向所述第二节点发送第三跟随报文,所述第三跟随报文包括第五时间信息,所述第五时间信息用于指示所述第一同步报文的发送时间;向所述第二节点发送第二同步报文;向所述第二节点发送第四跟随报文,所述第四跟随报文包括第六时间信息,所述第六时间信息用于指示所述第二同步报文的发送时间;
    其中,所述第五时间信息和所述第六时间信息用于确定所述第一节点与所述第二节点之间的时钟频率偏差。
  24. 如权利要求23所述的装置,其特征在于,
    所述发送单元,具体用于通过第三节点向所述第二节点发送所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文中的一项或多项;
    所述接收单元,具体用于通过所述第三节点接收来自所述第二节点的所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项。
  25. 如权利要求24所述的装置,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项为gPTP报文。
  26. 如权利要求24所述的装置,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项中还包含时钟域标识,所述时钟域标识用于指示时钟域。
  27. 如权利要求25所述的装置,其特征在于,所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发精确时间协议PTP报文的优先级;和/或,
    所述第三节点转发所述gPTP报文的优先级高于所述第三节点转发业务报文的优先级。
  28. 一种报文传输装置,其特征在于,所述装置包括:
    接收单元,用于接收来自第二节点的第一延迟请求报文;
    发送单元,用于将所述第一延迟请求报文发送给第一节点;其中所述第一延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量,所述第一延迟请求报文的源地址为所述第二节点的地址;
    所述接收单元,还用于接收来自所述第一节点的第一延迟响应报文;
    所述发送单元,还用于将所述第一延迟响应报文发送给所述第二节点;所述第一延迟响应报文包括第一时间信息,所述第一时间信息用于指示所述第一延迟请求报文的接收时间,所述第一延迟响应报文的目的地址为所述第二节点的地址;
    其中,所述第一时间信息用于确定所述第一节点与所述第二节点之间的时间延迟。
  29. 如权利要求28所述的装置,其特征在于,
    所述接收单元在接收来自第二节点的第一延迟请求报文时,具体用于:
    从第四节点接收所述第一延迟请求报文;或者,从所述第二节点接收所述第一延迟请求报文;
    所述发送单元在将所述第一延迟响应报文发送给所述第二节点时,具体用于:
    向所述第二节点发送所述第一延迟响应报文;或者,向所述第四节点发送所述第一延迟响应报文,以使所述第四节点将所述第一延迟报文发送给所述第二节点。
  30. 如权利要求28所述的装置,其特征在于,所述接收单元,还用于接收来自所述第一节点的第一跟随报文;
    所述发送单元,还用于将所述第一个跟随报文发送给所述第二节点,其中所述第一跟随报文包括第二时间信息,所述第二时间信息用于指示所述第一延迟响应报文的发送时间,所述第一跟随报文中的目的地址为所述第二节点的地址,所述第二时间信息用于所述第二节点确定所述第一节点与所述第二节点之间的时间延迟。
  31. 如权利要求28-30任一项所述的装置,其特征在于,所述接收单元,还用于接收来自所述第一节点的第二延迟请求报文;
    所述发送单元,还用于将第二延迟请求报文发送给所述第二节点;其中,所述第二延迟请求报文用于请求对所述第一节点与所述第二节点之间的时间延迟进行测量;
    所述接收单元,还用于接收来自所述第二节点的所述第二延迟响应报文;
    所述发送单元,还用于将所述第二延迟响应报文发送给所述第一节点;其中,所述第二延迟响应报文包括第三时间信息,所述第三时间信息用于指示所述第二延迟请求报文的接收时间,所述第二延迟请求报文的源地址为所述第二节点的地址。
  32. 如权利要求31所述的装置,其特征在于,所述接收单元,还用于接收来自所述第二节点的第二跟随报文;
    所述发送单元,还用于将所述第二跟随报文发送给所述第一节点;其中,所述第二跟随报文包括第四时间信息,所述第四时间信息用于指示所述第二延迟响应报文的发送时间,所述第二跟随报文的源地址为所述第二节点的地址。
  33. 如权利要求28-32任一项所述的装置,其特征在于,所述接收单元,还用于接收来自所述第一节点的第一同步报文;
    所述发送单元,还用于将所述第一同步报文发送给所述第二节点;
    所述接收单元,还用于接收来自所述第一节点的第三跟随报文;
    所述发送单元,还用于将所述第三跟随报文发送给所述第二节点,所述第三跟随报文包括第五时间信息,所述第五时间信息用于指示所述第一同步报文的发送时间;
    所述接收单元,还用于接收来自所述第一节点的第二同步报文;
    所述发送单元,还用于将所述第二同步报文发送给所述第二节点;
    所述接收单元,还用于接收来自所述第一节点的第四跟随报文;
    所述发送单元,还用于将所述第四跟随报文发送给所述第二节点,所述第四跟随报文包括第六时间信息,所述第六时间信息用于指示所述第二同步报文的发送时间;
    其中,所述第五时间信息和所述第六时间信息用于确定所述第一节点与所述第二节点之间的时钟频率偏差。
  34. 如权利要求33所述的装置,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项为gPTP报文。
  35. 如权利要求33所述的装置,其特征在于,所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项中还包含时钟域标识,所述时钟域标识用于指示时钟域;
    所述发送单元,还用于根据所述时钟域标识对所述第一延迟响应报文、所述第一跟随报文、所述第二延迟请求报文、所述第一同步报文、所述第三跟随报文、所述第二同步报文或所述第四跟随报文、所述第一延迟请求报文、所述第二延迟响应报文或所述第二跟随报文中的一项或多项进行转发。
  36. 如权利要求34所述的装置,其特征在于,所述装置所在的第三节点转发所述gPTP报文的优先级高于所述装置所在的第三节点转发精确时间协议PTP报文的优先级;和/或,所述装置所在的第三节点转发所述gPTP报文的优先级高于所述装置所在的第三节点转发业务报文的优先级;
    所述发送单元,还用于在所述装置所在的第三节点接收到所述gPTP报文的同时还接收到所述PTP报文和/或所述业务报文时,优先对所述gPTP报文进行转发。
  37. 一种报文传输装置,其特征在于,所述装置包括处理器和接口电路,所述接口电路用于接收来自所述装置之外的其它装置的信号并传输至所述处理器或将来自所述处理器的信号发送给所述装置之外的其它通信装置,所述处理器通过逻辑电路或执行代码指令用于实现如权利要求1至9或者权利要求10至18中任一项所述的方法。
  38. 一种计算机可读存储介质,其特征在于,包括程序或指令,当所述程序或指令在计算机上运行时,使得如权利要求1至9或者权利要求10至18中任一项所述的方法被执行。
  39. 一种报文传输系统,其特征在于,包括如权利要求19至27中任一项所述的装置和如权利要求28至36中任一项所述的装置。
  40. 一种车辆,其特征在于,包括如权利要求19至27中任一项所述的装置、或者如权利要求28至36中任一项所述的装置、或者如权利要求37所述的装置、或者如权利要求38所述的计算机可读存储介质、或者如权利要求39所述的系统。
PCT/CN2021/139652 2021-12-20 2021-12-20 一种报文传输方法及对应装置 WO2023115258A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180044135.6A CN116711261A (zh) 2021-12-20 2021-12-20 一种报文传输方法及对应装置
PCT/CN2021/139652 WO2023115258A1 (zh) 2021-12-20 2021-12-20 一种报文传输方法及对应装置

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/139652 WO2023115258A1 (zh) 2021-12-20 2021-12-20 一种报文传输方法及对应装置

Publications (1)

Publication Number Publication Date
WO2023115258A1 true WO2023115258A1 (zh) 2023-06-29

Family

ID=86900777

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/139652 WO2023115258A1 (zh) 2021-12-20 2021-12-20 一种报文传输方法及对应装置

Country Status (2)

Country Link
CN (1) CN116711261A (zh)
WO (1) WO2023115258A1 (zh)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051406A (zh) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 一种1588-2008协议中时钟同步的方法及系统
WO2014117489A1 (zh) * 2013-01-30 2014-08-07 华为技术有限公司 时钟同步方法及设备
CN108322281A (zh) * 2018-05-14 2018-07-24 上海市计量测试技术研究院 基于ntp的网络授时服务与评估系统及方法

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103051406A (zh) * 2011-10-17 2013-04-17 中兴通讯股份有限公司 一种1588-2008协议中时钟同步的方法及系统
WO2014117489A1 (zh) * 2013-01-30 2014-08-07 华为技术有限公司 时钟同步方法及设备
CN108322281A (zh) * 2018-05-14 2018-07-24 上海市计量测试技术研究院 基于ntp的网络授时服务与评估系统及方法

Also Published As

Publication number Publication date
CN116711261A (zh) 2023-09-05

Similar Documents

Publication Publication Date Title
US10158444B1 (en) Event-driven precision time transfer
US11251891B2 (en) Method for identifying an incorrect time stamp of an ethernet message and control unit for a motor vehicle
US20090086764A1 (en) System and method for time synchronization on network
US20170359139A1 (en) Synchronization with Different Clock Transport Protocols
US20110051754A1 (en) Measurement and adjustment of real-time values according to residence time in networking equipment without access to real time
US9698926B2 (en) Distributed two-step clock
CN105680973B (zh) 航空电子设备网络中的自由运转节点的时间同步方法
US20200344333A1 (en) Computer network packet transmission timing
US10158441B1 (en) Securing time between nodes
US20210288736A1 (en) Method, device, and computer program for improving synchronization of clocks in devices linked according to a daisy-chain topology
US11099599B2 (en) Communication device, cascaded network and internal synchronization method
US20030142696A1 (en) Method for ensuring access to a transmission medium
CN110719135A (zh) 时间校准方法、系统及电子装置
US11979481B2 (en) Time synchronisation
TW201625040A (zh) 同步網路裝置的時脈之方法
US11349587B2 (en) Generating a timestamp
CN111835656B (zh) 工业互联网中基于优先级的业务实时编排方法
WO2021190051A1 (zh) 同步方法、装置、设备和存储介质
WO2022257447A1 (zh) 时间同步方法、网络设备和存储介质
WO2023115258A1 (zh) 一种报文传输方法及对应装置
WO2017221970A1 (ja) ログ情報作成装置、ログ情報作成方法、ログ情報作成プログラムが記録された記録媒体、及び、情報処理システム
US20200073838A1 (en) Bus system
Diarra et al. Improved clock synchronization start-up time for Ethernet AVB-based in-vehicle networks
WO2023197835A1 (zh) 一种时钟同步方法和相关设备
JP2012178770A (ja) 時刻同期システム

Legal Events

Date Code Title Description
WWE Wipo information: entry into national phase

Ref document number: 202180044135.6

Country of ref document: CN

121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21968414

Country of ref document: EP

Kind code of ref document: A1