Communication method and related device
Through the message delivery method that carries the timestamp in the PTP system, the accuracy of time information transmission in the PTP system is solved, and the accuracy of clock synchronization and the accuracy of link delay determination are improved.
Patent Information
- Application Number
- PCT/CN2025/070713
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-01-22
- Filing Date
- 2025-01-06
- Publication Date
- 2025-07-31
AI Technical Summary
In PTP system, how to achieve high-precision transmission of time information is a technical problem that needs to be solved urgently.
By carrying a time stamp in the node transmission message in the PTP system, the transmission of time information, including receiving and sending time stamps, is realized to determine the one-way link delay and improve the clock synchronization accuracy.
It improves the accuracy of time information transmission and clock synchronization in the PTP system, and meets the requirements of one-way link delay determination in link asymmetry scenarios.
Smart Images

Figure CN2025070713_31072025_PF_FP_ABST
Abstract
Description
A communication method and related equipment
[0001] This application claims priority to the Chinese patent application filed with the China National Intellectual Property Administration on January 22, 2024, with application number 202410094568.8 and invention name “A communication method and related equipment”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the field of communications, and in particular to a communication method and related equipment. Background Art
[0003] In communications networks, the normal operation of most telecommunications services requires that frequency or time differences between devices across the network remain within a reasonable tolerance, a process known as network clock synchronization. The Precision Time Protocol (PTP) is a time protocol for network measurement and control systems that achieves high network timing accuracy and high-precision time synchronization. Generally, a system running PTP is referred to as a PTP system or a PTP network, and nodes within a PTP system are referred to as clock nodes.
[0004] However, in the PTP system, how to realize the transmission of time information is a technical problem that needs to be solved urgently. Summary of the Invention
[0005] The present application provides a communication method and related equipment for implementing the transmission of time information in a PTP system by carrying timestamps in messages transmitted between different nodes.
[0006] In a first aspect, the present application provides a communication method, which is performed by a first node, or the method is performed by some components in the first node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the first node. In the first aspect and its possible implementation, the method is described as being performed by a first node. The first node can be a router, a switch, a virtual switch, a virtual router, a smart network card, a packet transport network (PTN) device, an optical transport network (OTN) device, or other communication device.
[0007] The first node includes a first port, which is a one-step PTP port or a two-step PTP port in Mode A. In the method, the first node receives a first message from the second node via the first port, where the first message is for a delay request; and sends a second message to the second node via the first port, where the second message is for a delay response and carries a reception timestamp of the first message and / or a transmission timestamp of the second message.
[0008] Based on the above technical solution, after the first node receives the first message for the delay request through the first port, the first node can send the second message for the delay response through the first port, and the second message carries the receiving timestamp of the first message and / or the sending timestamp of the second message. In other words, the recipient of the second message can obtain the receiving timestamp of the first message and / or the sending timestamp of the second message. Thus, by carrying the receiving timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above-mentioned receiving timestamp and / or sending timestamp, and then the recipient of the delay response message can obtain the time information of the first node.
[0009] It should be understood that in the first aspect, the first node can be a peer-to-peer (P2P) node, and / or the first port can be a P2P port. Accordingly, the first message for the delay request can be a point-to-point delay request (Pdelay_Req) message defined by PTP, and the second message for the delay response can be a point-to-point delay request (Pdelay_Resp) message defined by PTP. Optionally, as the PTP standard evolves, the first message and the second message can also have other message names, which are not limited here.
[0010] In this application, a message carrying a timestamp can be understood as one or more fields carried by the message taking the value of the timestamp (or the opposite of the timestamp), or the timestamp (or the opposite of the timestamp) being carried by one or more fields carried by the message. For example, a second message carrying the reception timestamp of a first message can be understood as one or more fields in the second message taking the value of the reception timestamp of the first message, or the reception timestamp of the first message being carried by one or more fields in the second message. Exemplarily, the one or more fields are fields in a PTP message (or a 1588 message).
[0011] In this application, sending a message through a port can be understood as that the port is the sending port of the message. Similarly, receiving a message through a port can be understood as that the port is the receiving port of the message.
[0012] Optionally, in the present application, the timestamp carried by the message (such as the receiving timestamp or the sending timestamp) can be the timestamp of the actual sending of the message by the port or the timestamp of the actual receiving of the message. Compared with the method of carrying the estimated value of the timestamp, the timestamp carried by the message can reflect the actual sending time or the actual receiving time of the message, so as to improve the accuracy of clock synchronization or delay measurement.
[0013] In a possible implementation of the first aspect, the reception timestamp of the first message and / or the transmission timestamp of the second message are used to determine the unidirectional link delay between the first port and the second port, where the second port is the port for receiving the second message.
[0014] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Afterwards, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0015] In the present application, the unidirectional link delay between one port and another port may include the unidirectional link delay in the communication direction between the one port and the other port, and / or the unidirectional link delay in the communication direction between the other port and the one port (i.e., the reverse link delay in the communication direction between the one port and the other port). For example, the unidirectional link delay between a first port and a second port may include the unidirectional link delay in the communication direction between the first port and the second port, and / or the unidirectional link delay in the communication direction between the second port and the first port (i.e., the reverse link delay in the communication direction between the first port and the second port).
[0016] Optionally, the one-way link delay can be replaced by other terms, such as one-way delay, one-way transmission delay, or one-way delay of the link.
[0017] In the present application, for the receiver of the message carrying a timestamp, the receiver can determine the one-way link delay based on the timestamp carried by the message, and the receiver can also determine other information based on the timestamp carried by the message. For example, the receiver of the second message can determine whether the first node has a fault based on the timestamp, wherein, in the process of the second node sending the first message to the first node, the sending time of the second node sending the first message (for example, t1) must be earlier than the time when the first node receives the first message (for example, t2). To this end, in the case where the second message carries the receiving timestamp (t2) of the first message, if the time indicated by the receiving timestamp (for example, t2) is before the time indicated by the sending timestamp (for example, t1) of the second node sending the first message, the receiver can determine that the first node has a fault. Alternatively, if the time indicated by the receiving timestamp (for example, t2) is before the time indicated by the receiving timestamp (for example, t2pre) of the previous first message, the receiver can confirm that the first node has a fault.
[0018] In a possible implementation of the first aspect, the receiving timestamp of the first message is carried in the first field, or the receiving timestamp of the first message is carried in the first field and the second field; wherein, the accuracy of the value of the first field is 1 nanosecond (ns), and the accuracy of the value of the second field is less than 1ns.
[0019] Based on the above technical solution, the second message can carry the receiving timestamp of the first message through the above multiple methods, and in this way, different accuracy requirements can be met.
[0020] In this application, the accuracy of less than 1ns can be achieved in many ways, such as an accuracy of 1 / 2 16 ns, 1 / 2 8 ns, etc., not limited here.
[0021] In a possible implementation of the first aspect, the first port is a PTP port supporting one-step, and the first field is a request receive timestamp (requestReceiptTimestamp) field; or, the first port is a PTP port supporting two-step mode A, the first field is a requestReceiptTimestamp field, and the second field is a correctionField field.
[0022] Based on the above technical solution, in different implementations of the first port, the field used to carry the reception timestamp of the first message can be the requestReceiptTimestamp field defined by PTP, or the requestReceiptTimestamp field and the correctionField field. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0023] Optionally, the first field and / or the second field may be implemented using one or more newly defined fields (e.g., requestReceiptTimestampFractionalNS) or a newly defined type-length value (TLV) to enhance the flexibility of the solution implementation. For example, the second field may be named requestReceiptTimestampFractionalNS or another name.
[0024] In a possible implementation manner of the first aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0025] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0026] In a possible implementation manner of the first aspect, the second port is a PTP port supporting one-step, and the first message carries a sending timestamp of the first message.
[0027] Based on the above technical solution, when the second port is a one-step PTP port, the first message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the first node can obtain the time information of other nodes (such as the second node that sent the first message).
[0028] In a possible implementation manner of the first aspect, the sending timestamp of the first message is used to determine a unidirectional link delay between the first port and the second port.
[0029] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0030] In a possible implementation of the first aspect, the sending timestamp of the first message is carried in the third field, or the sending timestamp of the first message is carried in the third field and the fourth field; wherein, the accuracy of the value of the third field is 1ns, and the accuracy of the value of the fourth field is less than 1ns.
[0031] Based on the above technical solution, the first message can carry the sending timestamp of the first message through the above multiple methods, and in this way, different accuracy requirements can be met.
[0032] In a possible implementation manner of the first aspect, the third field is an origin timestamp (originTimestamp) field.
[0033] Based on the above technical solution, when the second port is a one-step PTP port, the field used to carry the reception timestamp of the first message can be the originTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce the message overhead.
[0034] Optionally, the fourth field is originTimestampFractionalNS, or other names.
[0035] In a possible implementation manner of the first aspect, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message.
[0036] Based on the above technical solution, the first message can also carry second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0037] In a possible implementation of the first aspect, the second port is a PTP port supporting two-step, the first message carries a sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message.
[0038] Based on the above technical solution, when the second port is a two-step PTP port, the first message received by the first node through the first port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0039] In this application, the previous (or pre) transmission can be replaced by other terms, such as the last transmission, the previous transmission, the previous transmission, etc.
[0040] In this application, transmission can be understood as sending or receiving. For example, if a first node is the receiver of a first message, then for the first node, the third message can be the previously received message of the same type as the first message. For another example, if a second node is the sender of a first message, then for the second node, the third message can be the previously sent message of the same type as the first message.
[0041] In a possible implementation manner of the first aspect, the sending timestamp of the third message is used to determine a unidirectional link delay between the first port and the second port.
[0042] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0043] In a possible implementation of the first aspect, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein, the accuracy of the value of the fifth field is 1ns, and the accuracy of the value of the sixth field is less than 1ns.
[0044] Based on the above technical solution, the first message can carry the sending timestamp of the third message through the above multiple methods, and in this way, different accuracy requirements can be met.
[0045] In a possible implementation manner of the first aspect, the fifth field is an originTimestamp field.
[0046] Based on the above technical solution, when the second port is a one-step PTP port, the field used to carry the sending timestamp of the third message can be the originTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce the overhead of the message.
[0047] Optionally, the sixth field is originTimestampFractionalNS, or other names.
[0048] In a possible implementation manner of the first aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0049] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0050] In a possible implementation of the first aspect, the first port is a PTP port supporting two-step mode A, and the method also includes: the first node sends a fourth message to the second node through the first port, the fourth message is a follow-up message of the second message, and the fourth message carries a sending timestamp of the second message.
[0051] Based on the above technical solution, if the first port of the first node is a PTP port that supports two-step mode A, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the sending timestamp of the second message. In this way, the receiver of the fourth message can obtain more time information.
[0052] In a possible implementation manner of the first aspect, the sending timestamp of the second message is used to determine a unidirectional link delay between the first port and the second port.
[0053] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0054] It is understandable that the second message and the fourth message received by the second port can both carry timestamps, so that the second node including the second port can determine the one-way link delay using the timestamp carried by the second message, and can also determine the one-way link delay using the timestamp carried by the fourth message. This allows the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation while also allowing the second nodes to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0055] In a possible implementation of the first aspect, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein, the accuracy of the value of the seventh field is 1ns, and the accuracy of the value of the eighth field is less than 1ns.
[0056] Based on the above technical solution, the second message can carry the sending timestamp of the second message through the above multiple methods, and in this way, different accuracy requirements can be met.
[0057] In a possible implementation manner of the first aspect, the seventh field is a response origin timestamp (responseOriginTimestamp) field.
[0058] Based on the above technical solution, when the first port is a PTP port supporting two-step mode A, the field used to carry the send timestamp of the second message can be the responseOriginTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0059] Optionally, the eighth field is the nanosecond fractional part of the response origin timestamp (responseoriginTimestampFractionalNS), or other names.
[0060] In a possible implementation manner of the first aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0061] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0062] In a possible implementation manner of the first aspect, the method further includes: the first node receiving a fifth message from the second node through the first port, the fifth message carrying a sending timestamp of the first message, and the fifth message being a follow-up message of the first message.
[0063] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0064] In a possible implementation of the first aspect, the method further includes: the first node determining a unidirectional link delay between the first port and a second port based on a sending timestamp of the first message, where the second port is a port through which the second node sends the fifth message.
[0065] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0066] In a possible implementation of the first aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0067] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0068] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the precise origin timestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0069] In a possible implementation manner of the first aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0070] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0071] A second aspect of the present application provides a communication method, which is executed by a second node, or the method is executed by some components of the second node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the second node. In the second aspect and its possible implementations, the method is described as being executed by a second node. The second node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0072] The second node includes a second port, which is a PTP port. In this method, the second node receives a second message from the first node through the second port, the second message being used for a delay response and carrying a reception timestamp of the first message, the first message being used for a delay request, the first message being a message sent by the second node to the first node, and the reception timestamp of the first message being the timestamp of the first node receiving the first message.
[0073] Based on the above technical solution, after the second node sends the first message for the delay request through the second port, the second node can receive the second message for the delay response through the second port, and the second message carries the reception timestamp of the first message and / or the transmission timestamp of the second message. In other words, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message) in the delay response message, the second node can obtain the above-mentioned reception timestamp and / or transmission timestamp, and thus the second node can obtain the time information of the first node.
[0074] It should be understood that in the second aspect, the second node can be a P2P node, and / or the second port can be a P2P port (for example, the second port can be a PTP port supporting one-step, or the second port can be a PTP port supporting two-step mode A). Accordingly, the first message for the delay request can be a point-to-point delay request (Pdelay_Req) message defined by PTP, and the second message for the delay response can be a point-to-point delay request (Pdelay_Resp) message defined by PTP. Optionally, as the PTP standard evolves, the first message and the second message can also be other message names, which are not limited here.
[0075] In a possible implementation of the second aspect, the method further includes: the second node determining a unidirectional link delay between a first port and the second port based on a reception timestamp of the first message, where the first port is a port through which the first node receives the first message.
[0076] Based on the above technical solution, the receiving timestamp of the first message is used to determine the one-way link delay between the first port and the second port. In this way, compared with the method of carrying the timestamp difference by the message and then only determining the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in the link asymmetric scenario and improving the accuracy of clock synchronization.
[0077] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the first field and the second field can refer to the description of the first aspect and its possible implementation methods above.
[0078] In a possible implementation manner of the second aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0079] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0080] In a possible implementation manner of the second aspect, the second port is a PTP port supporting one-step, and the first message carries a sending timestamp of the first message.
[0081] Based on the above technical solution, when the second port is a one-step PTP port, the first message sent by the second node through the second port can also carry the sending timestamp of the first message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of other nodes (e.g., the second node).
[0082] In a possible implementation manner of the second aspect, the sending timestamp of the first message is used to determine a unidirectional link delay between the first port and the second port.
[0083] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0084] Optionally, the sending timestamp of the first message is carried in the third field, or the sending timestamp of the first message is carried in the third field and the fourth field; wherein the accuracy of the value of the third field is 1 ns, and the accuracy of the value of the fourth field is less than 1 ns. The implementation of the third field and the fourth field can refer to the description of the first aspect and its possible implementation methods above.
[0085] In a possible implementation manner of the second aspect, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message.
[0086] Based on the above technical solution, the first message can also carry second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0087] In a possible implementation of the second aspect, the second port is a PTP port supporting two-step, the first message carries a sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message.
[0088] Based on the above technical solution, when the second port is a two-step PTP port, the first message sent by the second node through the second port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0089] In a possible implementation manner of the second aspect, the sending timestamp of the third message is used to determine a unidirectional link delay between the first port and the second port.
[0090] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0091] Optionally, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the fifth and sixth fields can refer to the description of the first aspect and its possible implementation methods above.
[0092] In a possible implementation manner of the second aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0093] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0094] In a possible implementation of the second aspect, the first port is a PTP port supporting two-step, and the method also includes: the second node receives a fourth message from the first node through the second port, the fourth message is a follow-up message of the second message, and the fourth message carries the sending timestamp of the second message and / or the receiving timestamp of the first message.
[0095] Based on the above technical solution, if the first port of the second node is a two-step PTP port, the second node can also receive a fourth message from the first node through the second port. The fourth message carries the sending timestamp of the second message and / or the receiving timestamp of the first message. In this way, the receiver of the fourth message can obtain more time information.
[0096] In a possible implementation manner of the second aspect, the sending timestamp of the second message is used to determine a unidirectional link delay between the first port and the second port.
[0097] Based on the above technical solution, the second node acts as the receiver of the fourth message, and the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamp of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0098] It is understandable that the second message and the fourth message received by the second port can both carry timestamps, so that the second node including the second port can determine the one-way link delay using the timestamp carried by the second message, and can also determine the one-way link delay using the timestamp carried by the fourth message. This allows the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation while also allowing the second nodes to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0099] Optionally, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields can refer to the description of the first aspect and its possible implementation methods above.
[0100] In a possible implementation manner of the second aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0101] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0102] In a possible implementation manner of the second aspect, the method further includes: the second node sending a fifth message to the first node through the second port, the fifth message carrying a sending timestamp of the first message, and the fifth message being a follow-up message of the first message.
[0103] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0104] In a possible implementation manner of the second aspect, the sending timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port through which the second node sends the fifth message.
[0105] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0106] In a possible implementation of the second aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0107] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0108] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0109] In a possible implementation manner of the second aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0110] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0111] In a third aspect, the present application provides a communication method, which is executed by a first node, or the method is executed by some components of the first node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the first node. In the third aspect and its possible implementations, the method is described as being executed by a first node. The first node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0112] The first node includes a first port, which is a PTP port. In this method, the first node receives a first message from the second node via the first port, the first message being used for a delay request and carrying a timestamp of when the first message was sent. The first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0113] Based on the above technical solution, after a first node receives a first message for a delay request via a first port, the first node can obtain the sending timestamp of the first message from the first message. In other words, the first node can obtain the sending timestamp of the first message. Consequently, the recipient of the delay request message can obtain the sending timestamp, thereby enabling the recipient of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0114] It should be understood that in the third aspect, the first node can be a P2P node, and / or the first port can be a P2P port (e.g., a port that supports one-step); accordingly, the first message for the delay request can be a Pdelay_Req message defined by PTP. Alternatively, in the third aspect, the first node can be an end-to-end (E2E) node, or the first port can be an E2E port; accordingly, the first message for the delay request can be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message can also have other message names, which are not limited here.
[0115] In a possible implementation of the third aspect, the method further includes: the first node determining a unidirectional link delay between the first port and a second port based on a sending timestamp of the first message, where the second port is a port through which the second node sends the first message.
[0116] Based on the above technical solution, the sending timestamp of the first message is used to determine the one-way link delay between the first port and the second port. In this way, compared to an approach that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0117] Optionally, the sending timestamp of the first message is carried in the third field, or the sending timestamp of the first message is carried in the third field and the fourth field; wherein the accuracy of the value of the third field is 1 ns, and the accuracy of the value of the fourth field is less than 1 ns. The implementation of the third field and the fourth field can refer to the description of the first aspect and its possible implementation methods above.
[0118] In a possible implementation manner of the third aspect, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message.
[0119] Based on the above technical solution, the first message can also carry second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0120] In a possible implementation of the third aspect, the first message is a Pdelay_Req message, and the method further includes: the first node sends a second message to the second node through the first port, the second message is used for delay response, and the second message carries a reception timestamp of the first message and / or a transmission timestamp of the second message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0121] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0122] In a possible implementation of the third aspect, the reception timestamp of the first message and / or the transmission timestamp of the second message are used to determine the unidirectional link delay between the first port and the second port, where the second port is the port for receiving the second message.
[0123] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0124] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the first field and the second field can refer to the description of the first aspect and its possible implementation methods above.
[0125] In a possible implementation manner of the third aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0126] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0127] In a fourth aspect, the present application provides a communication method, which is executed by a second node, or the method is executed by some components in the second node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the second node. In the fourth aspect and its possible implementations, the method is described as being executed by a second node. The second node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0128] The second node includes a second port, which is a one-step PTP port. In this method, the second node sends a first message through the second port, where the first message is used for a delay request and carries a timestamp of when the first message was sent. The first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0129] Optionally, the second node may further receive a second message from the first node through the second port, where the second message is used for delay response and may be a Pdelay_Resp message.
[0130] Based on the above technical solution, after the second node sends the first message for delay request via the second port, the first node, as the receiver of the first message, can obtain the sending timestamp of the first message from the first message. In other words, the first node can obtain the sending timestamp of the first message. Thus, the receiver of the delay request message can obtain the sending timestamp, thereby enabling the receiver of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0131] It should be understood that in the fourth aspect, the second node may be a P2P node and / or the second port may be a P2P port; accordingly, the first message for the delay request may be a Pdelay_Req message defined by PTP. Alternatively, in the fourth aspect, the second node may be an E2E node or the second port may be an E2E port; accordingly, the first message for the delay request may be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message may also have other message names, which are not limited here.
[0132] In a possible implementation manner of the fourth aspect, the sending timestamp of the first message is used to determine a unidirectional link delay between the first port and the second port.
[0133] Based on the above technical solution, the first node can determine the one-way link delay between the first port and the second port based on the sending timestamp of the first message. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0134] Optionally, the sending timestamp of the first message is carried in the third field, or the sending timestamp of the first message is carried in the third field and the fourth field; wherein the accuracy of the value of the third field is 1 ns, and the accuracy of the value of the fourth field is less than 1 ns. The implementation of the third field and the fourth field can refer to the description of the first aspect and its possible implementation methods above.
[0135] In a possible implementation manner of the fourth aspect, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message.
[0136] Based on the above technical solution, the first message can also carry second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0137] In a possible implementation manner of the fourth aspect, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries a reception timestamp of the first message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0138] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0139] In a possible implementation manner of the fourth aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port for receiving the second message.
[0140] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0141] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the third and fourth fields can refer to the description of the first aspect and its possible implementation methods above.
[0142] In a possible implementation manner of the fourth aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0143] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0144] In a fifth aspect, the present application provides a communication method, which is executed by a first node, or the method is executed by some components of the first node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the first node. In the third aspect and its possible implementation, the method is described as being executed by the first node. The first node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0145] The first node includes a first port, which is a PTP port. In this method, the first node receives a first message from the second node through the first port, wherein the first message is used for a delay request and carries a sending timestamp of a third message, which is a previously transmitted message of the same type as the first message. The first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0146] Based on the above technical solution, after a first node receives a first message for a delay request via a first port, the first node can obtain the sending timestamp of the first message from the first message. In other words, the first node can obtain the sending timestamp of the first message. Consequently, the recipient of the delay request message can obtain the sending timestamp, thereby enabling the recipient of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0147] It should be understood that in the fifth aspect, the first node can be a P2P node, and / or the first port can be a P2P port (e.g., a port that supports two-step); accordingly, the first message for the delay request can be a Pdelay_Req message defined by PTP. Alternatively, in the fifth aspect, the first node can be an end-to-end (E2E) node, or the first port can be an E2E port; accordingly, the first message for the delay request can be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message can also be other message names, which are not limited here.
[0148] In a possible implementation of the fifth aspect, the method further includes: the first node determining the unidirectional link delay between the first port and the second port based on the sending timestamp of the third message, and the second port is the port through which the second node sends the first message.
[0149] Based on the above technical solution, the sending timestamp of the third message is used to determine the one-way link delay between the first port and the second port. In this way, compared to an approach that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the need for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0150] Optionally, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the third field and the fourth field can refer to the description of the first aspect and its possible implementation methods above.
[0151] In a possible implementation manner of the fifth aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0152] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0153] In a possible implementation of the fifth aspect, the first message is a point-to-point delay request Pdelay_Req message, and the method further includes: the first node sends a second message to the second node through the first port, the second message is used for delay response, and the second message carries a reception timestamp of the first message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0154] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0155] In a possible implementation manner of the fifth aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port for receiving the second message.
[0156] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0157] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the third and fourth fields can refer to the description of the first aspect and its possible implementation methods above.
[0158] In a possible implementation manner of the fifth aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0159] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0160] In a possible implementation of the fifth aspect, the first port is a PTP port supporting two-step mode A, and the method also includes: the first node sends a fourth message to the second node through the first port, the fourth message is a follow-up message of the second message, and the fourth message carries the sending timestamp of the second message.
[0161] Based on the above technical solution, if the first port of the first node is a PTP port that supports two-step mode A, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the sending timestamp of the second message. In this way, the receiver of the fourth message can obtain more time information.
[0162] In a possible implementation manner of the fifth aspect, the sending timestamp of the second message is used to determine a unidirectional link delay between the first port and the second port.
[0163] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0164] It is understandable that the second message and the fourth message received by the second port can both carry timestamps, so that the second node including the second port can determine the one-way link delay using the timestamp carried by the second message, and can also determine the one-way link delay using the timestamp carried by the fourth message. This allows the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation while also allowing the second nodes to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0165] Optionally, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the third and fourth fields can refer to the description of the first aspect and its possible implementation methods above.
[0166] In a possible implementation manner of the fifth aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0167] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0168] In a possible implementation of the fifth aspect, the method further includes: the first node receiving a fifth message from the second node through the first port, the fifth message carrying a sending timestamp of the first message, and the fifth message being a follow-up message of the first message.
[0169] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0170] In a possible implementation of the fifth aspect, the method further includes: the first node determining the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port through which the second node sends the fifth message.
[0171] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0172] In a possible implementation of the fifth aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0173] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0174] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0175] In a possible implementation manner of the fifth aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0176] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0177] In a sixth aspect, the present application provides a communication method, which is executed by a second node, or the method is executed by some components of the second node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the second node. In the sixth aspect and its possible implementations, the method is described as being executed by a second node. The second node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0178] The second node includes a second port, which is a two-step PTP port. In this method, the second node sends a first message through the second port, where the first message is used for a delay request and carries a sending timestamp of a third message, where the third message is a previously transmitted message of the same type as the first message; wherein the first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0179] Optionally, the second node may further receive a second message from the first node through the second port, where the second message is used for delay response and may be a Pdelay_Resp message or a Delay_Resp message.
[0180] Based on the above technical solution, after the second node sends the first message for delay request via the second port, the first node, as the receiver of the first message, can obtain the sending timestamp of the first message from the first message. In other words, the first node can obtain the sending timestamp of the first message. Thus, the receiver of the delay request message can obtain the sending timestamp, thereby enabling the receiver of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0181] It should be understood that in the sixth aspect, the second node may be a P2P node and / or the second port may be a P2P port; accordingly, the first message for the delay request may be a Pdelay_Req message defined by PTP. Alternatively, in the sixth aspect, the second node may be an E2E node or the second port may be an E2E port; accordingly, the first message for the delay request may be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message may also have other message names, which are not limited here.
[0182] In a possible implementation manner of the sixth aspect, the sending timestamp of the third message is used to determine a unidirectional link delay between the first port and the second port.
[0183] Based on the above technical solution, the first node can determine the one-way link delay between the first port and the second port based on the sending timestamp of the third message. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0184] Optionally, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the fifth and sixth fields can refer to the description of the first aspect and its possible implementation methods above.
[0185] In a possible implementation manner of the sixth aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0186] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0187] In a possible implementation of the sixth aspect, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries a reception timestamp of the first message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0188] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0189] In a possible implementation manner of the sixth aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and the second port.
[0190] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0191] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the first field and the second field can refer to the description of the first aspect and its possible implementation methods above.
[0192] In a possible implementation manner of the sixth aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0193] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0194] In a possible implementation of the sixth aspect, the first port is a PTP port supporting two-step mode A, and the method also includes: the second node receives a fourth message from the first node through the second port, the fourth message is a follow-up message of the second message, and the fourth message carries a sending timestamp of the second message.
[0195] Based on the above technical solution, if the first port of the first node is a PTP port supporting two-step mode A, the second node can also receive a fourth message from the first node through the second port. The fourth message carries the sending timestamp of the second message. In this way, the receiver of the fourth message can obtain more time information.
[0196] In a possible implementation manner of the sixth aspect, the sending timestamp of the second message is used to determine a unidirectional link delay between the first port and the second port.
[0197] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0198] It is understandable that the second message and the fourth message received by the second port can both carry timestamps, so that the second node including the second port can determine the one-way link delay using the timestamp carried by the second message, and can also determine the one-way link delay using the timestamp carried by the fourth message. This allows the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation while also allowing the second nodes to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0199] Optionally, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields can refer to the description of the first aspect and its possible implementation methods above.
[0200] In a possible implementation manner of the sixth aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0201] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0202] In a possible implementation of the sixth aspect, the method further includes: the second node sending a fifth message to the first node through the second port, the fifth message carrying a sending timestamp of the first message, and the fifth message being a follow-up message of the first message.
[0203] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0204] In a possible implementation manner of the sixth aspect, the sending timestamp of the first message is used to determine the unidirectional link delay between the first port and a second port, where the second port is the port through which the second node sends the fifth message.
[0205] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0206] In a possible implementation of the sixth aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0207] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0208] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0209] In a possible implementation manner of the sixth aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0210] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0211] In a seventh aspect, the present application provides a communication method, which is executed by a first node, or the method is executed by some components in the first node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the first node. In the third aspect and its possible implementation, the method is described as being executed by the first node. The first node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0212] The first node includes a first port, which is a PTP port supporting two-step mode A. In this method, the first node receives a first message from a second node via the first port, where the first message is used for a delay request; the first node sends a second message to the second node via the first port, where the second message is used for a delay response; and the first node sends a fourth message to the second node via the first port, where the fourth message is a follow-up message to the second message; the fourth message carries a reception timestamp of the first message and / or a transmission timestamp of the second message, where the first message is used for a delay request.
[0213] It should be understood that in the seventh aspect, the first node may be a P2P node, and / or the first port may be a P2P port; accordingly, the first message for the delay request may be a Pdelay_Req message defined by PTP, the second message may be a Pdelay_Resp message, and the fourth message may be a Pdelay_Resp_Follow_Up message. Optionally, as the PTP standard evolves, the first message may also have other message names, which are not limited here.
[0214] Based on the above technical solution, after the first node sends the fourth message to the second node through the first port, the second node, as the receiver of the fourth message, can obtain the receiving timestamp of the first message and / or the sending timestamp of the second message through the fourth message. In other words, the receiver of the fourth message can obtain the receiving timestamp of the first message and / or the sending timestamp of the second message. Thus, by carrying the receiving timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response follow-up message, the receiver of the delay response follow-up message can obtain the above-mentioned receiving timestamp and / or sending timestamp, and then the receiver of the delay response follow-up message can obtain the time information of the first node.
[0215] In a possible implementation manner of the seventh aspect, the reception timestamp of the first message and / or the transmission timestamp of the second message are used to determine the unidirectional link delay between the first port and the second port.
[0216] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0217] Optionally, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields can refer to the description of the first aspect and its possible implementation methods above.
[0218] In a possible implementation manner of the seventh aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0219] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0220] In a possible implementation of the seventh aspect, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries a reception timestamp of the first message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0221] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0222] In a possible implementation manner of the seventh aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port for receiving the second message.
[0223] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0224] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the first field and the second field can refer to the description of the first aspect and its possible implementation methods above.
[0225] In a possible implementation manner of the seventh aspect, the second message further carries first indication information, and the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0226] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0227] In a possible implementation of the seventh aspect, the second port is a PTP port supporting two-step mode A, the first message carries the sending timestamp of the third message, and the third message is a previously transmitted message of the same type as the first message.
[0228] Based on the above technical solution, when the second port is a PTP port that supports two-step mode A, the first message received by the first node through the first port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0229] In a possible implementation manner of the seventh aspect, the sending timestamp of the third message is used to determine a unidirectional link delay between the first port and the second port.
[0230] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0231] Optionally, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the fifth and sixth fields can refer to the description of the first aspect and its possible implementation methods above.
[0232] In a possible implementation manner of the seventh aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0233] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0234] In a possible implementation of the seventh aspect, the method further includes: the first node receives a fifth message from the second node through the first port, the fifth message carries a sending timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0235] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0236] In a possible implementation of the seventh aspect, the method further includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port through which the second node sends the fifth message.
[0237] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0238] In a possible implementation of the seventh aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0239] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0240] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0241] In a possible implementation manner of the seventh aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0242] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0243] In an eighth aspect, the present application provides a communication method, which is executed by a second node, or the method is executed by some components in the second node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the second node. In the sixth aspect and its possible implementations, the method is described as being executed by a second node. The second node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0244] In which, the second node includes a second port, which is a PTP port. In this method, the second node receives a fourth message from the first node through the second port, and the fourth message is a follow-up message of the second message, and the second message is used for delay response; wherein, the fourth message carries the reception timestamp of the first message and / or the sending timestamp of the second message, and the first message is used for delay request.
[0245] Based on the above technical solution, after the second node receives the fourth message from the first node through the second port, the second node can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message through the fourth message. In other words, the recipient of the fourth message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message) in the delay response follow-up message, the recipient of the delay response follow-up message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and thus the recipient of the delay response follow-up message can obtain the time information of the first node.
[0246] In a possible implementation of the eighth aspect, the method also includes: the second node determines the unidirectional link delay between the first port and the second port based on the reception timestamp of the first message and / or the sending timestamp of the second message, and the first port is the port through which the first node sends the fourth message.
[0247] Based on the above technical solution, the sending timestamp of the second message is used to determine the one-way link delay between the first port and the second port. In this way, compared with the method of carrying timestamp differences in messages and then only determining the average link delay based on this difference, the message receiver can determine the one-way link delay based on the timestamps carried by the messages. This meets the need for determining one-way link delay in link asymmetry scenarios and improves the accuracy of clock synchronization.
[0248] Optionally, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields can refer to the description of the first aspect and its possible implementation methods above.
[0249] In a possible implementation manner of the eighth aspect, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries a sending timestamp of the second message.
[0250] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the recipient of the fourth message can determine that the fourth message carries the sending timestamp of the second message based on the fourth indication information, and then enable the recipient to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0251] In a possible implementation of the eighth aspect, the method further includes: the second node sending a first message, the first message being a point-to-point delay request Pdelay_Req message, and the second message carrying a reception timestamp of the first message; wherein the second message is a point-to-point delay response Pdelay_Resp message.
[0252] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0253] In a possible implementation manner of the eighth aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port for receiving the second message.
[0254] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0255] Optionally, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the precision of the value of the first field is 1 ns, and the precision of the value of the second field is less than 1 ns. The implementation of the first field and the second field can refer to the description of the first aspect and its possible implementation methods above.
[0256] In a possible implementation manner of the eighth aspect, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries a receiving timestamp of the first message.
[0257] Based on the above technical solution, the second message can also carry the first indication information, so that the recipient of the second message can determine that the second message carries the receiving timestamp of the first message based on the first indication information, and then the recipient can clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0258] In a possible implementation of the eighth aspect, the second port is a PTP port supporting two-step, the first message carries a sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message.
[0259] Based on the above technical solution, when the second port is a two-step PTP port, the first message received by the first node through the first port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0260] In a possible implementation manner of the eighth aspect, the sending timestamp of the third message is used to determine a unidirectional link delay between the first port and the second port.
[0261] Based on the above technical solution, a first node, as the receiver of a first message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0262] Optionally, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the fifth and sixth fields can refer to the description of the first aspect and its possible implementation methods above.
[0263] In a possible implementation manner of the eighth aspect, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of a third message.
[0264] Based on the above technical solution, the first message can also carry third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the third message based on the third indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0265] In a possible implementation of the eighth aspect, the method further includes: the second node sending a fifth message to the first node through the second port, the fifth message carrying a sending timestamp of the first message, and the fifth message being a follow-up message of the first message.
[0266] Based on the above technical solution, when the second port is a two-step PTP port, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node of the fifth message (e.g., the first node) can obtain the time information of the other node (e.g., the second node).
[0267] In a possible implementation manner of the eighth aspect, the sending timestamp of the first message is used to determine the unidirectional link delay between the first port and a second port, where the second port is the port through which the second node sends the fifth message.
[0268] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0269] In a possible implementation of the eighth aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0270] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0271] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0272] In a possible implementation manner of the eighth aspect, the fifth message further carries fifth indication information, where the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0273] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0274] In a ninth aspect of the present application, a communication method is provided, which is executed by a first node, or the method is executed by some components of the first node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the first node. In the third aspect and its possible implementation, the method is described as being executed by the first node. The first node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0275] The first node includes a first port, which is a PTP port. In this method, the first node receives a first message from the second node through the first port, where the first message is a point-to-point delay request (Pdelay_Req) message or a delay request (Delay_Req) message, and the first message is used for a delay request; and the first node receives a fifth message from the second node through the first port, where the fifth message carries a sending timestamp of the first message and is a follow-up message to the first message.
[0276] Based on the above technical solution, after the first node receives the first message for the delay request through the first port, the first node can also receive a fifth message through the first port, and the fifth message carries the sending timestamp of the first message. The fifth message is a follow-up message of the first message. In other words, the recipient of the fifth message can obtain the sending timestamp of the first message. Thus, by carrying the receiving timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the follow-up message of the delay request message, the first node can obtain the above-mentioned sending timestamp, and thus the first node can obtain the time information of the second node.
[0277] It should be understood that in the ninth aspect, the second node can be a P2P or E2E node, and / or the second port can be a P2P or E2E port (for example, the second port can be a PTP port supporting two-step). Accordingly, the first message for the delay request can be a point-to-point delay request (Pdelay_Req) message or a delay request (Delay_Req) message defined by PTP, and the following message of the first message (i.e., the fifth message) can be a point-to-point delay request follow (Pdelay_Req_Follow_Up) message or a delay request follow (Delay_Req_Follow_Up) message. Optionally, as the PTP standard evolves, the first message and the second message can also be other message names, which are not limited here.
[0278] In a possible implementation of the ninth aspect, the method further includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port through which the second node sends the fifth message.
[0279] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0280] In a possible implementation of the ninth aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0281] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0282] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0283] In a possible implementation manner of the ninth aspect, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0284] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0285] In a possible implementation of the ninth aspect, the first message is a Pdelay_Req message, and the method further includes: the first node sending a second message to the second node through the first port, and the second message carries a reception timestamp of the first message.
[0286] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0287] In a possible implementation of the ninth aspect, the reception timestamp of the first message is used to determine a unidirectional link delay between the first port and a second port, where the second port is a port at which the second node receives the second message.
[0288] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0289] Optionally, in the second message, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the value precision of the first field is 1 ns, and the value precision of the second field is less than 1 ns. The implementation of the first field and the second field can refer to other aspects and implementation methods described above.
[0290] In a possible implementation of the ninth aspect, the first message carries the sending timestamp of the third message, and the third message is a previously transmitted message of the same type as the first message. The method also includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the third message, and the second port is the port through which the second node sends the third message.
[0291] Based on the above technical solution, the first message received by the first node through the first port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0292] Optionally, in the first message, the sending timestamp of the third message is carried in the fifth field, or the sending timestamp of the third message is carried in the fifth field and the sixth field; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. The implementation of the third and fourth fields may refer to other aspects and implementation methods described above.
[0293] In a possible implementation of the ninth aspect, the method further includes: the first node sending a fourth message to the second node through the first port, the fourth message carrying the sending timestamp of the second message; wherein the second message is a Pdelay_Resp message, and the fourth message is a Pdelay_Resp_Follow_Up message.
[0294] Based on the above technical solution, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the sending timestamp of the second message and / or the receiving timestamp of the first message. In this way, the receiver of the fourth message can obtain more time information.
[0295] In a possible implementation of the ninth aspect, the sending timestamp of the second message is used to determine the unidirectional link delay between the first port and the second port, and the second port is the port through which the second node receives the second message.
[0296] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0297] Optionally, in the fourth message, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields may refer to other aspects and implementation methods described above.
[0298] In a tenth aspect, the present application provides a communication method, which is executed by a second node, or the method is executed by some components of the second node (such as a processor, chip, or chip system), or the method can also be implemented by a logic module or software that can implement all or part of the functions of the second node. In the sixth aspect and its possible implementations, the method is described as being executed by a second node. The second node can be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, an OTN device, etc.
[0299] The second node includes a second port, which is a PTP port that supports two-step. In this method, the second node provides a communication method, characterized in that it is applied to a second node, the second node includes a second port, the second port is a PTP port that supports two-step, and the method includes: the second node sends a first message to the first node through the second port, the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for a delay request; the second node sends a fifth message to the first node through the second port, the fifth message carries a sending timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0300] Based on the above technical solution, after the second node sends the first message for the delay request through the second port, the second node can also send a fifth message through the second port, and the fifth message carries the sending timestamp of the first message. The fifth message is a follow-up message of the first message. In other words, the recipient of the fifth message can obtain the sending timestamp of the first message. Thus, by carrying the receiving timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the follow-up message of the delay request message, the first node can obtain the above-mentioned sending timestamp, and thus the first node can obtain the time information of the second node.
[0301] In a possible implementation of the tenth aspect, the sending timestamp of the first message is used to determine a unidirectional link delay between a first port and the second port, where the first port is a port through which the first node receives the first message.
[0302] Based on the above technical solution, the first node, as the receiver of the fifth message, can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of the message received by the first node. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0303] In a possible implementation of the tenth aspect, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0304] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0305] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or newly defined type-length values (TLVs) to enhance the flexibility of the solution implementation. For example, the ninth field may be the preciseOriginTimestamp field of the fifth message, and the tenth field may be the correctionField field of the fifth message.
[0306] In a possible implementation manner of the tenth aspect, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries a sending timestamp of the first message.
[0307] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, and then enable the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0308] In a possible implementation of the tenth aspect, the first message is a Pdelay_Req message, and the method also includes: the second node receives a second message from the first node through the second port, and the second message carries a reception timestamp of the first message; the second node determines the unidirectional link delay between the first port and the second port based on the reception timestamp of the first message, and the first port is the port through which the first node receives the second message.
[0309] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the sending timestamp of the second message. By carrying the reception timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above reception timestamp and / or sending timestamp, and thus the recipient of the delay response message can obtain the time information of the first node.
[0310] In a possible implementation of the tenth aspect, the first message carries a sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message; wherein the sending timestamp of the third message is used to determine the unidirectional link delay between the first port and the second port, and the first port is the port at which the first node receives the first message.
[0311] Based on the above technical solution, the receiver of the second message can receive the second message through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference between the timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0312] Optionally, in the second message, the reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein the value precision of the first field is 1 ns, and the value precision of the second field is less than 1 ns. The implementation of the first field and the second field can refer to other aspects and implementation methods described above.
[0313] In a possible implementation of the tenth aspect, the method further includes: the second node receives a fourth message from the first node through the second port, the fourth message carrying a sending timestamp of the second message; wherein the second message is a Pdelay_Resp message, and the fourth message is a Pdelay_Resp_Follow_Up message.
[0314] Based on the above technical solution, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the sending timestamp of the second message and / or the receiving timestamp of the first message. In this way, the receiver of the fourth message can obtain more time information.
[0315] In a possible implementation of the tenth aspect, the method further includes: the second node determining the unidirectional link delay between the first port and the second port based on the sending timestamp of the second message, and the first port is the port through which the first node sends the second message.
[0316] Based on the above technical solution, for the receiver of the fourth message, the fourth message can be received through the second port. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamps of its own sent / received messages. In this way, compared to the method of determining the average link delay based only on the difference in timestamps carried by the messages, the message receiver can determine the one-way link delay based on the timestamps carried by the messages, thereby meeting the need to determine the one-way link delay in link asymmetry scenarios and improving the accuracy of clock synchronization.
[0317] Optionally, in the fourth message, the sending timestamp of the second message is carried in the seventh field, or the sending timestamp of the second message is carried in the seventh field and the eighth field; wherein the precision of the value of the seventh field is 1 ns, and the precision of the value of the eighth field is less than 1 ns. The implementation of the seventh and eighth fields may refer to other aspects and implementation methods described above.
[0318] In an eleventh aspect of the present application, a communication device is provided, which can implement the method in the first aspect or any possible implementation of the first aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first node, or the device can be a component in the first node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first node.
[0319] The device includes a transceiver unit and a processing unit; the transceiver unit receives a first message from the second node through the first port, and the first message is used for a delay request; the processing unit is used to generate a second message; the transceiver unit is also used to send a second message to the second node through the first port, and the second message is used for a delay response, and the second message carries a reception timestamp of the first message and / or a sending timestamp of the second message.
[0320] In a twelfth aspect of the present application, a communication device is provided, which can implement the method in the second aspect or any possible implementation of the second aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second node, or the device can be a component in the second node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second node.
[0321] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a second message from the first node through the second port, and the second message is used for delay response; the processing unit is used to obtain a reception timestamp of the first message through the second message, the first message is used for delay request, the first message is a message sent by the second node to the first node, and the reception timestamp of the first message is the timestamp of the first node receiving the first message.
[0322] In a thirteenth aspect of the present application, a communication device is provided, which can implement the method in the third aspect or any possible implementation of the third aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first node, or the device can be a component in the first node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first node.
[0323] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from the second node through the first port, and the first message is used for delay request; the processing unit is used to obtain a sending timestamp of the first message through the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0324] In a fourteenth aspect of the present application, a communication device is provided, which can implement the method in the fourth aspect or any possible implementation of the fourth aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second node, or the device can be a component in the second node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second node.
[0325] The device includes a transceiver unit and a processing unit; the processing unit is used to generate a first message; the transceiver unit is used to send the first message through the second port, the first message is used for a delay request, and the first message carries a sending timestamp of the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0326] A fifteenth aspect of the present application provides a communication device, which can implement the method in the fifth aspect or any possible implementation of the fifth aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first node, or the device can be a component in the first node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first node.
[0327] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from the second node through the first port, and the first message is used for delay request; the processing unit is used to obtain a sending timestamp of a third message through the first message, and the third message is a previously transmitted message of the same type as the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0328] In a sixteenth aspect of the present application, a communication device is provided, which can implement the method in the sixth aspect or any possible implementation of the sixth aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second node, or the device can be a component in the second node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second node.
[0329] The device includes a transceiver unit and a processing unit; the processing unit is used to generate a first message; the transceiver unit is used to send the first message through the second port, the first message is used for a delay request, the first message carries the sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0330] A seventeenth aspect of the present application provides a communication device, which can implement the method in the seventh aspect or any possible implementation of the seventh aspect. The device includes corresponding units or modules for performing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first node, or the device can be a component in the first node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first node.
[0331] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from the second node through the first port, and the first message is used for a delay request; the processing unit is used to generate a second message and a fourth message; the transceiver unit is also used to send a second message to the second node through the first port, and the second message is used for a delay response; the transceiver unit is also used to send a fourth message to the second node through the first port, and the fourth message is a follow-up message of the second message; wherein the fourth message carries a reception timestamp of the first message and / or a sending timestamp of the second message.
[0332] In aspect 18 of the present application, a communication device is provided, which can implement the method in the above-mentioned aspect 8 or any possible implementation of aspect 8. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second node, or the device can be a component in the second node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second node.
[0333] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a fourth message from the first node through the second port, the fourth message is a follow-up message of the second message, and the second message is used for delayed response; the processing unit is used to obtain the reception timestamp of the first message and / or the sending timestamp of the second message through the fourth message.
[0334] In aspect 19 of the present application, a communication device is provided, which can implement the method in aspect 7 or any possible implementation of aspect 7. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a first node, or the device can be a component in the first node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the first node.
[0335] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from the second node through the first port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for a delay request; the transceiver unit is also used to receive a fifth message from the second node through the first port; the processing unit is used to obtain a sending timestamp of the first message based on the fifth message, where the fifth message is a follow-up message of the first message.
[0336] The twentieth aspect of the present application provides a communication device, which can implement the method in the eighth aspect or any possible implementation of the eighth aspect. The device includes corresponding units or modules for executing the above-mentioned method. The units or modules included in the device can be implemented by software and / or hardware. For example, the device can be a second node, or the device can be a component in the second node (such as a processor, a chip or a chip system, etc.), or the device can also be a logic module or software that can implement all or part of the functions of the second node.
[0337] The device includes a transceiver unit and a processing unit; the processing unit is used to determine a first message and a fifth message; the transceiver unit is used to send a first message to the first node through the second port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for a delay request; the transceiver unit is also used to send a fifth message to the first node through the second port, where the fifth message carries a sending timestamp of the first message and is a follow-up message of the first message.
[0338] In aspect 21 of the present application, a communication device is provided. The communication device includes at least one processor configured to execute a program or instruction stored in a memory, so that the device implements the method described in any one of aspects 1 to 10 and any possible implementation thereof.
[0339] In aspect 22 of the present application, a communication device is provided, comprising at least one logic circuit and an input / output interface; the logic circuit is used to execute the method described in any one of aspects 1 to 10 and any possible implementation thereof.
[0340] In aspect 23 of the present application, a computer-readable storage medium is provided for storing computer instructions; when the computer instructions are executed by a processor, the processor executes the method described in any one of aspects 1 to 10 above and any possible implementation thereof.
[0341] The twenty-fourth aspect of the present application provides a computer program product (or computer program), which includes instructions. When the instructions in the computer program product are executed by a processor, the processor executes the method described in any one of the first to tenth aspects above and any possible implementation method thereof.
[0342] In aspect 25 of the present application, a chip system is provided, which includes a communication interface and a processor, and the communication interface and the processor are coupled to support a communication device to implement the method described in any aspect from aspect 1 to aspect 10 and any possible implementation method thereof.
[0343] In one possible design, the chip system may further include a memory for storing program instructions and data necessary for the communication device. The chip system may be composed of a chip or may include a chip and other discrete components. Optionally, the chip system may further include an interface circuit for providing program instructions and / or data to the at least one processor.
[0344] In a twenty-sixth aspect of the present application, a communication system is provided, the communication system comprising a first node and a second node. The implementation process of the first node and the second node may refer to the above aspects and possible implementation methods thereof.
[0345] Among them, the technical effects brought about by any design method in aspects 11 to 26 can refer to the technical effects brought about by different implementation methods in aspects 1 to 10 above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0346] FIG1 is a schematic diagram of the 1588 synchronization network involved in this application;
[0347] Figures 2a to 2f are schematic diagrams of clock message interaction involved in this application;
[0348] 3a to 3c are schematic diagrams of clock message transmission scenarios involved in this application;
[0349] Figures 4a to 4c are schematic diagrams of message interaction in the E2E scenario involved in this application;
[0350] Figures 5a to 5c are schematic diagrams of message interaction in the P2P scenario involved in this application;
[0351] Figures 6a to 6j are schematic diagrams of message interaction of the communication method provided by this application;
[0352] Figures 7a to 7c are schematic diagrams of message interaction of the communication method provided by this application;
[0353] Figures 8a to 8c are schematic diagrams of message interaction of the communication method provided by this application;
[0354] Figures 9a and 9b are schematic diagrams of message interaction of the communication method provided by this application;
[0355] 10 to 12 are schematic diagrams of the communication device provided in this application. DETAILED DESCRIPTION
[0356] The terms "system" and "network" in the embodiments of the present application can be used interchangeably. "At least one" means one or more, and "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: the existence of A alone, the existence of A and B at the same time, and the existence of B alone, where A and B can be singular or plural. The character " / " generally indicates that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, "at least one of A, B and C" includes A, B, C, AB, AC, BC or ABC. And, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of the present application are used to distinguish multiple objects, and are not used to limit the order, timing, priority or importance of multiple objects.
[0357] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as being preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.
[0358] It should be understood that in this application, "when", "if" and "if" all mean that the device will perform corresponding processing under certain objective circumstances, and do not limit the time. It does not require that the device must perform a judgment action when it is implemented, nor does it mean that there are other limitations.
[0359] In this application, unless otherwise specified, the same or similar parts between the various embodiments or implementation methods can refer to each other. In the various embodiments in this application, and the various implementation methods / implementation methods / implementation methods in each embodiment, if there is no special explanation and logical conflict, the terms and / or descriptions between different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment are consistent and can be referenced to each other. The technical features in different embodiments and the various implementation methods / implementation methods / implementation methods in each embodiment can be combined to form new embodiments, implementation methods, implementation methods or implementation methods according to their inherent logical relationships. The implementation methods of this application described below do not constitute a limitation on the scope of protection of this application.
[0360] First, some of the terms used in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.
[0361] (1) The 1588 protocol is defined by the Institute of Electrical and Electronics Engineers (IEEE), also known as the PTP protocol, which stands for "Precision Clock Synchronization Protocol for Networked Measurement and Control Systems" and can be abbreviated as precision time protocol (PTP).
[0362] It should be noted that the 1588 protocols / standards involved in this application may include but are not limited to IEEE 1588-2008 which is the 1588v2 standard, IEEE 1588-2019 which is the 1588v2.1 standard, or other 1588 standards evolved in the future.
[0363] In communications networks, the normal operation of most telecommunications services requires that frequency or time differences between devices across the network remain within a reasonable tolerance, a process known as network clock synchronization. PTP is a time protocol for network measurement and control systems that achieves high network timing accuracy and high-precision time synchronization. PTP itself can be used for high-precision time synchronization between devices, and can also be leveraged for frequency synchronization between devices.
[0364] Figure 1 is a schematic diagram of a 1588 synchronization network, in which clock messages sent by 1588 servers (e.g., 1588 server 1 and 1588 server 2 in Figure 1 ) can be transmitted through one or more network elements (NEs), enabling wireless access devices (e.g., base station 1, base station 2, base station 3, and base station 4 in Figure 1 ) to receive the clock messages and achieve clock synchronization based on the clock messages. The embodiments hereinbelow primarily relate to the transmission process of the clock messages.
[0365] Optionally, in FIG1 , different NEs may include NEs in a core layer network, NEs in a converged access layer network, and the like.
[0366] (2) Basic concepts of PTP.
[0367] ①PTP domain: A network that applies the PTP protocol can be called a PTP domain.
[0368] Optionally, there is only one synchronous clock in the PTP domain, and all devices in the PTP domain are synchronized with the clock.
[0369] ②PTP port: The port on the device that runs the PTP protocol is called a PTP port.
[0370] Exemplarily, the roles of a PTP port may include the following three:
[0371] Master Port: The port that publishes the synchronized time, which can exist on the BC or OC.
[0372] Slave Port: A port that receives synchronized time and can exist on a boundary clock (BC) or an ordinary clock (OC).
[0373] Passive Port: A backup port for receiving synchronized time, which can exist on a BC.
[0374] (3) Clock Node: A node in a PTP domain is called a clock node. The PTP protocol defines the following three types of basic clock nodes.
[0375] OC: This clock node has only one PTP port participating in time synchronization within the same PTP domain, and synchronizes time from upstream clock nodes through this port. Additionally, when a clock node acts as a clock source, it can distribute time to downstream clock nodes through only one PTP port, also known as OC.
[0376] An implementation example is shown in Figure 2a. When the OC node is used as a clock source, the OC node may include one or more master ports (denoted as "M" in the figure), and generally does not have a slave port. Exemplarily, the OC node may be the 1588 server 1 or 1588 server 2 shown in Figure 1, that is, the OC node can track other time signals (such as satellite time signals), and then send clock messages carrying time information (such as Sync messages in the 1588 protocol and Announce messages carrying OC-related information, etc.) through the "M" port. Optionally, when the OC node is used as a clock source, the OC node can also be called a grandmaster (GM), that is, the OC node can be a 1588 source device.
[0377] Another implementation example, as shown in Figure 2b, is that when an OC node serves as an end device, the OC node can include a slave port (denoted as "S" in the figure). For example, the OC node can be the wireless access device shown in Figure 1 (e.g., base station 1, base station 2, base station 3, and base station 4 in Figure 1). Clock synchronization is achieved through clock messages received on the "S" port. Optionally, the OC node has only one slave port.
[0378] A BC: This clock node has multiple PTP ports within the same PTP domain that participate in time synchronization. It synchronizes time from an upstream clock node through one of its ports and distributes time to downstream clock nodes through the remaining ports. Furthermore, when a clock node acts as a clock source and can distribute time to downstream clock nodes through multiple PTP ports, it is also called a BC.
[0379] An implementation example is shown in FIG2c . The BC node may be a 1588 intermediate device, generally having at least two types of ports: a master port (denoted as "M"), a slave port (denoted as "S"), and a passive port (denoted as "P"). Optionally, in a BC node, the number of master ports may be 0, 1, or more, the number of slave ports may be 1, and the number of passive ports may be 0, 1, or more. Exemplarily, the BC node may be the NE shown in FIG1 (e.g., any one of NE1 to NE6). The BC node may receive clock messages from the slave port and perform time synchronization, and the BC node may also send a new clock message from the active end so that other devices perform time synchronization based on the new clock message.
[0380] Generally, each port of a BC node receives an Announce message. Then, based on the best master clock algorithm (BMC or BMCA), the BC node can determine the outbound port state of each port as "P", "S", or "M", and then send a new Announce message on the "M" port.
[0381] Transparent clock (TC): Compared to BC / OC, TC has no port status. In addition, BC / OC generally needs to maintain time synchronization with other clock nodes, while TC does not need to maintain time synchronization with other clock nodes.
[0382] For example, as shown in Figure 2d, a TC can have multiple PTP ports, but it only forwards PTP protocol messages between these ports and performs forwarding delay correction on them, without synchronizing time through any of the ports. In other words, the ports of a TC node generally do not have port status.
[0383] Optionally, TC includes the following two types.
[0384] End-to-end transparent clock (E2E TC): can forward or retransmit non-peer-to-peer (P2P) protocol packets in the network and participate in calculating the delay of the entire link.
[0385] As an implementation example of E2E TC, as shown in FIG2e , E2E TC can be used to forward or retransmit Announce messages, Sync messages, Delay_Req messages, and Delay_Resp messages.
[0386] Peer-to-peer transparent clock (P2P TC): It can forward or retransmit messages such as Sync, Follow_Up, and Announce, while terminating other PTP protocol messages and participating in the calculation of the delay of each link in the entire link.
[0387] As an example implementation of a P2P TC, as shown in Figure 2f, the P2P TC can be used to forward Announce and Sync messages. Furthermore, the P2P TC can respond to point-to-point delay request (Pdelay_Req), point-to-point delay response (Pdelay_Resp), and point-to-point delay response follow (Pdelay_Resp_Follow_Up) messages to calculate the fiber delay between two adjacent ports. For example, in Figure 2f, port 1 can send a Pdelay_Req message to port 1's peer port (referred to as the peer port). The peer port responds with a Pdelay_Resp message and a Pdelay_Resp_Follow_Up message. Alternatively, the peer port can send a Pdelay_Req message to port 1, and port 1 responds with a Pdelay_Resp message and a Pdelay_Resp_Follow_Up message. In this way, port 1 and the peer port can determine the link delay based on the messages they send and receive.
[0388] As an example of a TC node forwarding clock messages, neither the E2E TC nor the P2P TC processes the received 1588 Announce message and then sends the Announce message to other devices from the egress.
[0389] (4)One-step mode and two-step mode.
[0390] In one-step mode, a clock message sent by a port carries the timestamp of when it left the port. This means that after the clock message is forwarded by one or more nodes and received by another port, the exact time information at the moment the port sent the clock message can be obtained from the message. For example, the clock message can be a Sync message or a Delay_Req message.
[0391] In two-step mode, a port can send two clock messages sequentially, for example, sending Clock Message 1 first and then sending Clock Message 2. Clock Message 1 does not carry the timestamp of when it left the port, while Clock Message 2 carries the timestamp of when it left the port. This means that after Clock Message 1 and Clock Message 2 are forwarded by one or more nodes, another port that receives both Clock Message 1 and Clock Message 2 can obtain the exact time information of the port at the moment Clock Message 1 was sent from Clock Message 2. For example, Clock Message 1 can be a Sync message, and Clock Message 2 can be a Follow_Up message.
[0392] Generally, during the transmission of a clock message, a node can determine whether the transmission mode of the clock message is the one-step mode or the two-step mode based on information carried in the message.
[0393] For example, if the clock message is a Sync message, if the two-step flag (twoStepFlag) in the Sync message is false (FALSE), the receiver of the Sync message can determine that the transmission mode of the Sync message is one-step mode. If the twoStepFlag in the Sync message is true (TRUE), the receiver of the Sync message can determine that the transmission mode of the Sync message is two-step mode, and the sending timestamp of the Sync message is carried in the subsequent Follow_Up message.
[0394] In addition, for a node, the node can determine whether the transmission mode supported by the node or the port is the one-step mode or the two-step mode through configuration (eg, manual configuration / controller configuration / network management configuration, etc.).
[0395] As an example, the transmission mode supported by a node can be the same as the transmission mode of the clock message received by the node. For example, taking the clock message as a Sync message, if both transmission modes are one-step, the node can carry its latency information in the forwarded Sync message. If both transmission modes are two-step, the node can carry its latency information in the forwarded Follow_Up message. For this latency information, refer to the examples shown in Figures 2e and 2f above.
[0396] As an example, the transmission mode supported by a node may be different from the transmission mode of the clock message received by the node. For example, taking the clock message as a Sync message, when the transmission mode supported by the node is one-step mode but the transmission mode of the clock message received by the node is two-step mode, the node will still carry the node's delay information in the forwarded Sync message according to the transmission mode supported by itself; when the transmission mode supported by the node is two-step mode but the transmission mode of the clock message received by the node is one-step mode, the node generates a Follow_Up message carrying the node's delay information. The delay information can refer to the examples shown in Figures 2e and 2f above.
[0397] In communication networks, the normal operation of most telecommunications services requires that frequency or time differences between devices across the network remain within a reasonable error level, i.e., network clock synchronization. The Precision Time Protocol (PTP) is a time protocol for network measurement and control systems that achieves high network timing accuracy and high-precision time synchronization. Generally, a system running PTP is referred to as a PTP system or a PTP network, and nodes in a PTP system are referred to as clock nodes. However, how to implement the transmission of time information in a PTP system remains a pressing technical challenge.
[0398] The message interaction process between different clock nodes will be exemplarily described below using the examples shown in Figures 3a to 3c.
[0399] In some scenarios, the device needs to obtain the link latency of each port to select the service path with the shortest latency for the service.
[0400] As shown in Figure 3a, services can be transmitted from NE1 to NE5, but there are two paths. The first path is NE1-NE2-NE3-NE5, with a latency of 5+10+20=35 microseconds (µs); the second path is NE1-NE4-NE5, with a latency of 50+100=150µs. In terms of latency, NE1-NE2-NE3-NE5 is the shortest latency path, with a latency of 25µs. It should be understood that device latency is ignored here (i.e., it is assumed that device latency is relatively small and can be ignored). Generally, to meet the requirements of latency routing, the device needs to know the latency of each link and then report it to the network management system, which then selects the service path with the shortest latency for each service. Considering that the optical fiber link between the two ports may be asymmetric, it is also desirable to test the unidirectional link latency in the latency routing scenario.
[0401] For example, different clock nodes can communicate using the two-way active measurement protocol (TWAMP), which can be tested using a loopback method. However, this protocol can only test two-way latency, not unidirectional link latency. Furthermore, it requires establishing a User Datagram Protocol (UDP) link between two devices, which traverses other devices. Therefore, it is difficult to measure link latency between any two ports.
[0402] As shown in Figure 3b, taking the transmission process of the first path as an example, NE1 can send a TWAMP test message to NE5. NE5 carries the round-trip delay of the message, and NE1 can calculate the round-trip delay. This protocol primarily records timestamps at the Internet Protocol (IP) layer, with measurement accuracy at the microsecond or millisecond level.
[0403] Another delay measurement technology is the operations, administration, and maintenance (OAM) message delay measurement technology, which includes one-way delay measurement and two-way delay measurement. Its measurement principle is similar to TWAMP, and its measurement accuracy is also at the microsecond or millisecond level.
[0404] In addition, the 1588 protocol can also be used to measure link latency. Since current 1588 devices generally support 1588 message stamping at the medium access control (MAC) layer or the physical (PHY) layer, the latency obtained from 1588 message testing is highly accurate, reaching the nanosecond level.
[0405] Figure 3c shows a schematic diagram of a device configured in 1588BC mode, where different nodes can determine the port status (e.g., Master, Slave, or Passive) based on the BMC algorithm.
[0406] For example, the port status of port 1 and port 2 of NE1 is "M", and the port status of port 3 is "S".
[0407] For another example, among the three NEs NE2, NE3, and NE4, the port status of port 1 is "M", and the port status of port 2 is "S".
[0408] For another example, the port status of port 1 of NE5 is "M", the port status of port 2 is "S", and the port status of port 3 is "P".
[0409] Subsequently, different NEs can exchange messages to measure the link delay between two ports. The current 1588 protocol includes two delay methods: E2E and P2P mechanisms.
[0410] The E2E mechanism is described below with reference to Figures 4a to 4c. Specifically, the message interaction process of the E2E mechanism may include a one-step mode and a two-step mode depending on the message sending method.
[0411] As shown in FIG4a , in one-step mode, taking the Master port as port A and the Slave port as port B as an example, the process includes the following.
[0412] 1. Port A sends a Sync message to port B, where t1 is the sending time (or sending timestamp) of the Sync message. The correctionField of the Sync message carries the fractional nanosecond part of t1 (denoted as t1_fns, with an accuracy of 1 / 2 16 ns), originTimestamp carries the nanosecond and second parts of t1 (recorded as t1_ns, with an accuracy of 1ns). When port B receives a Sync message, it records t2, which is the reception time (or reception timestamp) of the Sync message.
[0413] 2. Port B sends a Delay_Req message to Port A. The correctionField of the Delay_Req message carries the delay value caused by fiber asymmetry (denoted as -dAsy, where dAsy = (Delay_AB - Delay_BA) / 2, where Delay_AB represents the one-way delay between Port A and Port B, and Delay_BA represents the one-way delay between Port B and Port A). The originTimestamp value of the Delay_Req message is always 0.
[0414] Optionally, port A and port B can determine the value of dAsy by swapping the fiber directions. For example, the fiber from port A to port B is denoted as Fiber 1 (with a delay of Delay_AB), and the fiber from port B to port A is denoted as Fiber 2 (with a delay of Delay_BA). Port A first sends a Sync message to port B via Fiber 1, obtaining two timestamps t1 / t2, and the following formula is used: t2–t1=Delay_AB+Offset (1)
[0415] The offset is the time difference between port A and port B, or the time difference between the node where port A is located and the node where port B is located.
[0416] Switching the fiber sending and receiving directions, port A sends a Sync message to port B via fiber 2, obtaining two timestamps t1' / t2', and the following formula is used: t2'-t1'=Delay_BA+Offset (2)
[0417] By subtracting the above two formulas, we can obtain the fiber asymmetry dAsy, dAsy = (DelayAB - DelayBA) / 2 = [(t2 - t1) - (t2' - t1')] / 2.
[0418] 3. Port A sends a Delay_Resp message to port B, where t4 is the sending time (or sending timestamp) of the Delay_Resp message. The correctionField of the Delay_Resp message carries -dAsy-t4_fns (t4_fns is the fractional nanosecond part of t4, with an accuracy of 1 / 2 16 ns), the receiveTimestamp value carries t4_ns (the nanosecond and second value portion of t4, with an accuracy of 1ns).
[0419] Afterwards, based on the process shown in Figure 4a, the slave port can calculate the bidirectional average delay Delay_mean, which satisfies: Delay_mean = [(t2–t3) + (receiveTimestamp of Delay_Resp–originTimestamp of Sync) – correctedSyncCorrectionField – correctionField of Delay_Resp] / 2 = [(t2–t3) + (t4_ns–t1_ns) – (t1_fns+dAsy) – (-dAsy–t4_fns)] / 2 = [(t2–t3) + (t4_ns+t4_fns) – (t1_ns+t1_fns)] / 2 = [(t2–t3) + t4–t1] / 2
[0420] Note 1: The above formula can be found in IEEE 1588-2019 Section 11.3.2 e)1).
[0421] Note 2: correctedSyncCorrectionField=correctionField of Sync+dAsy=t1_fns+dAsy.
[0422] As shown in Figure 4b, in the two-step mode, the Master port is Port A and the Slave port is Port B. Compared with the process shown in Figure 4a, the difference is that after sending the Sync message, Port A also sends a Follow_Up message. In addition, the time information carried by the Sync message is passed through the Follow_Up message. The correctionField and originTimestamp of the Sync message are both 0, that is, the Sync message is represented as "Sync message (0)"; the correctionField of the Follow_Up message carries t1_fns (the fractional nanosecond part of t1, with an accuracy of 1 / 2 16ns), preciseOriginTimestamp carries t1_ns (the nanosecond and second portion of t1, with an accuracy of 1 ns). Furthermore, the implementation of the Delay_Req and Delay_Resp messages is similar to that shown in Figure 4a.
[0423] Afterwards, based on the process shown in Figure 4b, the slave port can calculate the one-way delay and the two-way average delay Delay_mean, which satisfies: Delay_mean = [(t2–t3) + (receiveTimestamp of Delay_Resp–preciseOriginTimestamp of Follow_Up)–correctedSyncCorrectionField–correctionField of Follow_Up–correctionField of Delay_Resp] / 2 = [(t2–t3) + (t4_ns–t1_ns)–dAsy–t1_fns–(-dAsy–t4_fns)] / 2 = [(t2–t3) + (t4_ns + t4_fns)–(t1_ns + t1_fns)] / 2 = [(t2–t3) + t4–t1] / 2
[0424] Note 1: This formula is the existing formula of IEEE 1588-2019, see Section 11.3.2 e)2) of IEEE 1588-2019;
[0425] Note 2: correctedSyncCorrectionField=correctionField of Sync+dAsy=dAsy
[0426] In addition, in Figures 4a and 4b, it can be seen from the above process that since the "originTimestamp" field in the Delay_Req message is not involved in the calculation of the two-way average delay, the value of the originTimestamp field sent by port B is always 0. In other words, port A does not refer to the value of the originTimestamp field to calculate the delay. This leads to the following problem in the above E2E mechanism (for the convenience of reference later, it is recorded as problem 1): Port A is the receiver of the Delay_Req message and the sender of the Delay_Resp message. Port A (i.e., the Master port) cannot obtain any delay. Although Section 11.3.2 c) 2) of IEEE 1588-2019 describes that Delay_req can carry an estimated value of t3, the accuracy of the estimated value is not specified, so it cannot meet the requirements of high-precision delay measurement.
[0427] In the E2E mechanism shown in Figures 4a and 4b, if a TC device is present in the network, the E2E mechanism can only measure the end-to-end latency across the TC device and cannot measure the link latency between any two ports. For example, as shown in Figure 4c, if NE1 and NE5 are BCs and NE2 / 3 / 4 are TCs, the latency measured at NE5's S port is the sum of the fiber latency from NE1 to NE4 and the fiber latency from NE4 to NE5, but cannot measure the latency of each fiber segment. Similarly, the latency measured at NE5's P port is the sum of the fiber latency from NE1 to NE2, the fiber latency from NE2 to NE3, and the fiber latency from NE3 to NE5, but cannot measure the latency of each fiber segment.
[0428] For the network shown in Figure 4c, the 1588 P2P mechanism can solve the problem of not being able to obtain the latency of each fiber segment. For example, in the P2P mechanism, any two ports of the BC and TC devices can exchange P2P messages, allowing the latency of each fiber segment to be calculated.
[0429] The P2P mechanism will be described below with reference to Figures 5a to 5c. Similarly, the message interaction process of the P2P mechanism may include a one-step mode and a two-step mode depending on the message sending method.
[0430] As shown in Figure 5a, in one-step mode, the communication process between port A and port B is shown as an example. In the processes shown in Figures 5a through 5c, port A and port B can be ports with port states (e.g., M, P, or S ports in OC and BC nodes) or ports without port states (e.g., ports in TC nodes).
[0431] 1. Port A sends a Pdelay_Req message to port B. t1 is the sending time (or sending timestamp) of the Pdelay_Req message. The correctionField of the Pdelay_Req message carries -dAsy, and the originTimestamp value of the Pdelay_Req message is 0.
[0432] 2. After receiving the Pdelay_Req message, port B sends a Pdelay_Resp message to port A. t2 is the time (or receive timestamp) of receiving the Pdelay_Req message, and t3 is the time (or send timestamp) of sending the Pdelay_Resp message. The correctionField of the Pdelay_Resp message carries t3-t2-dAsy, and the requestReceiptTimestamp value of the Pdelay_Resp message is 0.
[0433] Afterwards, based on the process shown in FIG5 a, port A can calculate the bidirectional average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–correctedPdelayRespCorrectionField] / 2 = [(t4–t1)–(t3–t2)] / 2.
[0434] Note 1: This formula is the existing formula of IEEE 1588-2019, see IEEE 1588-2019 Section 11.4.2 d) 3);
[0435] Note 2: correctedPdelayRespCorrectionField=correctionField of Pdelay_Resp+dAsy=t3–t2
[0436] Furthermore, the one-step mode of the P2P mechanism in Figure 5a presents the following issue (referred to as Issue 2 for ease of reference later): Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message, receives the information obtained by Port A, which is the difference between t3 and t2. Therefore, Port A cannot determine the values of t2 and t3, which in turn prevents it from measuring the one-way delay. Similarly, the IEEE 1588 protocol defines that Port B can simultaneously send a Pdelay_Req message to Port A, and Port A replies with a Pdelay_Resp message to Port B. This allows Port B to measure the two-way average delay, but Port B cannot measure the one-way link delay.
[0437] Similarly, in Figure 5a, the one-step mode of the aforementioned P2P mechanism also has the following problem (referred to as Problem 3 for ease of reference later): Port B, as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, cannot obtain the one-way delay and average delay because the Pdelay_Req message received by Port B does not carry time information. Although Section 11.4.2 a) 4) of IEEE 1588-2019 states that the Pdelay_req message can carry an estimated value for t1, it does not specify the accuracy of the estimated value, thus failing to meet the requirements for high-precision delay measurement.
[0438] In addition, for the two-step mode of the P2P mechanism, the IEEE 1588-2019 standard defines two modes, namely two-step mode A and two-step mode B (two-step option A and two-step option B).
[0439] As shown in FIG5 b , in two-step mode A, taking the communication process between port A and port B as an example, the process includes the following.
[0440] 1. Port A sends a Pdelay_Req message to port B. t1 is the sending time (or sending timestamp) of the Pdelay_Req message. The correctionField of the Pdelay_Req message carries -dAsy, and the originTimestamp value of the Pdelay_Req message is 0.
[0441] 2. After receiving the Pdelay_Req message, port B sends a Pdelay_Resp message to port A. The correctionField and requestReceiptTimestamp fields of the Pdelay_Resp message are both 0.
[0442] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A. t2 is the time (or reception timestamp) of receiving the Pdelay_Req message, and t3 is the time (or transmission timestamp) of sending the Pdelay_Resp message. The correctionField of the Pdelay_Resp_Follow_Up message carries t3-t2-dAsy, and the responseOriginTimestamp value of the Pdelay_Resp_Follow_Up message is 0.
[0443] Afterwards, based on the process shown in Figure 5b, port A can calculate the bidirectional average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–(responseOriginTimestamp of Pdelay_Resp_Follow_Up - requestReceiptTimestamp of Pdelay_Resp)–correctedPdelayRespCorrectionField–correctionField of Pdelay_Resp_Follow_Up] / 2 = [(t4–t1)–(0–0)–dAsy–(t3–t2–dAsy)] / 2 = [(t4–t1)–(t3–t2)] / 2
[0444] Note 1: This formula is the existing formula of IEEE 1588-2019, see IEEE 1588-2019 Section 11.4.2 d)4);
[0445] Note 2: correctedPdelayRespCorrectionField=correctionField of Pdelay_Resp+dAsy=dAsy.
[0446] Furthermore, in Figure 5b, the two-step mode A of the P2P mechanism described above has the following problem (referred to as Problem 4 for ease of reference later): Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message (as well as the receiver of the Pdelay_Resp_Follow_Up message), receives only the difference between t3 and t2. Therefore, Port A cannot determine the values of t2 and t3, which in turn prevents it from measuring the one-way delay. Similarly, the IEEE 1588 protocol defines that Port B can simultaneously send a Pdelay_Req message to Port A, and Port A replies with a Pdelay_Resp message to Port B. This allows Port B to measure the two-way average delay, but Port B cannot measure the one-way link delay.
[0447] Similarly, in Figure 5b, the two-step mode A of the P2P mechanism described above also has the following problem (referred to as Problem 5 for ease of reference later). Port B, as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, cannot obtain the one-way delay and average delay because the Pdelay_Req message received by Port B does not carry time information. Although Section 11.4.2 a) 4) of IEEE 1588-2019 states that the Pdelay_req message can carry an estimated value for t1, it does not specify the accuracy of the estimated value, making it impossible to meet the requirements for high-precision delay measurement.
[0448] As shown in FIG5 c , in two-step mode B, taking the communication process between port A and port B as an example, the process includes the following.
[0449] 1. Port A sends a Pdelay_Req message to port B. The correctionField of the Pdelay_Req message carries -dAsy, and the originTimestamp value of the Pdelay_Req message is 0.
[0450] 2. After receiving the Pdelay_Req message, port B sends a Pdelay_Resp message to port A. The correctionField of the Pdelay_Resp message carries -t2_fns (the fractional nanosecond part of t2, with an accuracy of 1 / 2 16ns), requestReceiptTimestamp carries t2_ns (the nanosecond and second value parts of t2, with an accuracy of 1ns).
[0451] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A. The correctionField of the Pdelay_Resp_Follow_Up message carries t3_fns-dAsy, and the responseOriginTimestamp value is t3_ns.
[0452] Afterwards, based on the process shown in Figure 5c, port A can calculate the bidirectional average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–(responseOriginTimestamp of Pdelay_Resp_Follow_Up - requestReceiptTimestamp of Pdelay_Resp)–correctedPdelayRespCorrectionField–correctionField of Pdelay_Resp_Follow_Up] / 2 = [(t4–t1)–(t3_ns–t2_ns)–(-t2_fns+dAsy)–(t3_fns– dAsy)] / 2 = [(t4–t1)–(t3_ns+t3_fns)+(t2_ns+t2_fns)] / 2 = [(t4–t1)–(t3–t2)] / 2
[0453] Note 1: This formula is the existing formula of IEEE 1588-2019, see IEEE 1588-2019 Section 11.4.2 d)4);
[0454] Note 2: correctedPdelayRespCorrectionField=correctionField of Pdelay_Resp+dAsy=-t2_fns+dAsy.
[0455] Similarly, in Figure 5c, the two-step mode B of the P2P mechanism described above also has the following problem (referred to as Problem 6 for ease of reference later): because the Pdelay_Req message received by port B does not carry time information, port B cannot obtain the one-way delay and average delay. Although IEEE 1588-2019 Section 11.4.2 a) 4) states that Pdelay_req can carry an estimated value for t1, it does not specify the accuracy of the estimated value, making it impossible to meet the requirements for high-precision delay measurement.
[0456] From the above implementation process, it can be seen that although time information can be transmitted between different nodes through some clock messages, there are still some unresolved problems. In order to solve the above problems, this application provides a communication method and related equipment, which will be introduced below with more drawings.
[0457] Please refer to Figure 6a, which is a schematic diagram of the communication method provided by this application, which includes the following steps: The method includes at least step S601 and step S602 shown in Figure 6a.
[0458] It should be noted that in the following method, the first node, the second node and other network devices are used as the execution subjects of each step to illustrate the method, but this application does not limit the execution subjects of the interactive illustration. For example, in the following method (such as Figure 6a / Figure 7a / Figure 8a / Figure 9a / Figure 9b), each step can also be performed by some components of the network device (such as a processor, chip or chip system, etc.), or each step can also be performed by a logical module or software of the network device. Among them, the network device can be a router, a switch, a virtual switch, a virtual router, a smart network card, etc.
[0459] Optionally, in the methods of Figures 6a, 7a, 8a, 9a, and 9b, any of the first and second nodes may be a TC node, a BC node, or an OC node as defined by PTP. Furthermore, as the PTP standard evolves, the node may also be another type of node defined by PTP, which is not limited here.
[0460] S601. The second node sends a first message, and correspondingly, the first node receives the first message.
[0461] S602. The first node sends a second message, and correspondingly, the second node receives the second message.
[0462] It should be understood that in the method shown in Figure 6a, the first node can be a P2P node, and / or the first port can be a P2P port. Accordingly, the first message for the delay request can be a point-to-point delay request (Pdelay_Req) message defined by PTP, and the second message for the delay response can be a point-to-point delay request (Pdelay_Resp) message defined by PTP. Optionally, as the PTP standard evolves, the first message and the second message can also have other message names, which are not limited here.
[0463] In addition, in the method shown in Figure 6a, the first node includes a first port, and the second node includes a second port, and the first message and the second message can be transmitted through the first port and the second port. For example, the second node can send the first message through the second port, and the first node can receive the first message through the first port. For another example, the first node can send the second message to the second node through the first port, and the second node can receive the second message through the second port. Wherein, the first port and the second port are PTP ports supporting one-step, or, the first port and the second port are PTP ports supporting mode A of two-step.
[0464] In this application, sending a message through a port can be understood as that the port is the sending port of the message. Similarly, receiving a message through a port can be understood as that the port is the receiving port of the message.
[0465] Optionally, in the present application, the timestamp carried by the message (such as the receiving timestamp or the sending timestamp) can be the timestamp of the actual sending of the message by the port or the timestamp of the actual receiving of the message. Compared with the method of carrying the estimated value of the timestamp, the timestamp carried by the message can reflect the actual sending time or the actual receiving time of the message, so as to improve the accuracy of clock synchronization.
[0466] In this application, a message carrying a timestamp can be understood as one or more fields carried by the message taking the value of the timestamp, or the timestamp being carried by one or more fields carried by the message. For example, a second message carrying the reception timestamp of a first message can be understood as one or more fields in the second message taking the value of the reception timestamp of the first message, or the reception timestamp of the first message being carried by one or more fields in the second message. Exemplarily, the one or more fields are fields in a PTP message (or 1588 message).
[0467] Based on the technical solution shown in Figure 6a, after the first node receives the first message for the delay request through the first port in step S601, the first node can send a second message for the delay response through the first port in step S602, and the second message carries the reception timestamp of the first message and / or the transmission timestamp of the second message. In other words, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message) in the delay response message, the recipient of the delay response message can obtain the above-mentioned reception timestamp and / or transmission timestamp, thereby enabling the recipient of the delay response message to obtain the time information of the first node.
[0468] In one possible implementation, the reception timestamp of the first message and / or the transmission timestamp of the second message are used to determine the one-way link delay between the first port and the second port, and the second port is the port for receiving the second message. Specifically, for the receiver of the second message, the second message can be received through the second port, and thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the second message and the timestamp of its own sending / receiving message. In this way, compared with the method of determining the average link delay based on the difference in timestamps carried by the message, the message receiver can determine the one-way link delay based on the timestamp carried by the message, so as to meet the determination requirements of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0469] In the present application, the unidirectional link delay between one port and another port may include the unidirectional link delay in the communication direction between the one port and the other port, and / or the unidirectional link delay in the communication direction between the other port and the one port (i.e., the reverse link delay in the communication direction between the one port and the other port). For example, the unidirectional link delay between a first port and a second port may include the unidirectional link delay in the communication direction between the first port and the second port, and / or the unidirectional link delay in the communication direction between the second port and the first port (i.e., the reverse link delay in the communication direction between the first port and the second port).
[0470] Optionally, the one-way link delay can be replaced by other terms, such as one-way delay, one-way transmission delay, or one-way delay of the link.
[0471] In the present application, for the receiver of a message carrying a timestamp, the receiver can determine not only the one-way link delay based on the timestamp carried by the message, but also other information based on the timestamp carried by the message. For example, the receiver of the second message can determine whether the first node has failed based on the timestamp. Specifically, if the second message carries the reception timestamp of the first message, and the time indicated by the reception timestamp is after the time indicated by the transmission timestamp of the first message sent by the second port, the receiver can determine that the first node has failed.
[0472] In one possible implementation, the second message further carries first indication information, where the first indication information is used to indicate that the second message carries the reception timestamp of the first message. Specifically, the second message may further carry the first indication information, so that a receiver of the second message can determine, based on the first indication information, that the second message carries the reception timestamp of the first message, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0473] In one possible implementation, the first message's reception timestamp is carried in the first field, or in the first field and the second field; wherein the first field has a value precision of 1 nanosecond (ns), and the second field has a value precision of less than 1 ns. The second message can carry the first message's reception timestamp in the aforementioned multiple ways, thereby meeting different accuracy requirements.
[0474] In this application, the accuracy of less than 1ns can be achieved in many ways, such as an accuracy of 1 / 2 16 ns, 1 / 2 8 ns, etc., not limited here.
[0475] In one possible implementation, the first port is a one-step PTP port, and the first field is a requestReceiptTimestamp field; or, the first port is a two-step PTP port in mode A, and the first field is a requestReceiptTimestamp field, and the second field is a correctionField field. Specifically, under different implementations of the first port, the field used to carry the reception timestamp of the first message can be the requestReceiptTimestamp field defined by PTP, or the requestReceiptTimestamp field and the correctionField field. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0476] Optionally, the first field and / or the second field may be implemented by one or more newly defined fields or a newly defined type length value (TLV) to enhance the flexibility of solution implementation.
[0477] For ease of understanding, the implementation process of the first field and the second field will be exemplarily explained below with reference to some implementation examples.
[0478] Example 1: P2P mechanism one-step mode, the first field may be the requestReceiptTimestamp field defined by PTP, and the second field may be the nanosecond fractional part of the request reception timestamp (requestReceiptTimestampFractionalNS) field described later.
[0479] As shown in Figure 5a above, based on the implementation shown in Figure 5a, the one-step mode of the P2P mechanism has problem 2. Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message, cannot determine the values of t2 and t3 because the information obtained by Port A is the difference between t3 and t2. This also makes it impossible for Port A to measure the one-way delay.
[0480] In the technical solution shown in Figure 6a, the second port in the second node can serve as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message, and after the second node receives the second message in step S602, the second node can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message based on the second message, so that the second node can determine the unidirectional link delay between the first port and the second port based on the reception timestamp of the first message and / or the transmission timestamp of the second message to solve problem 2.
[0481] As an application example of Example 1, taking the second message carrying the sending timestamp of the second message as an example, as shown in Figure 6b, taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0482] 1. Port A sends a Pdelay_Req message to port B.
[0483] 2. Port B sends a Pdelay_Resp message to port A.
[0484] Compared to the implementation process shown in Figure 5a, in the process shown in Figure 6b, when port B can send a Pdelay_Resp message, the Pdelay_Resp message can carry the reception timestamp (t2) of the Pdelay_Req message received by port B. For example, as shown in Table 1 below, the requestReceiptTimestamp field (unit: 1 ns) of the Pdelay_Resp message carries / carries the ns portion of the t2 timestamp (abbreviated as t2_ns).
[0485] Optionally, in Table 1, the header may carry a message type (messageType), an identification field (flagField), a correction field (correctionField), and the like.
[0486] Optionally, in Table 1, the requesting port identifier (requestingPortIdentity) may be the port identifier of the port that sends the Pdelay_Req message, that is, the identifier of port A.
[0487] Table 1
[0488] It should be understood that in the tables provided in the embodiments of the present application, the names, order, and number of bytes (or bits) occupied by each field are some implementation examples. In actual applications, the names of each field can be other names, the order of different fields can be adjusted, and the number of bytes (or bits) occupied by each field can also be modified to other values.
[0489] In Table 1, the fractional ns part of the t2 timestamp (abbreviated as t2_fns) is not carried, so the accuracy of the t2 timestamp is 1ns, which generally meets the delay measurement accuracy requirement.
[0490] In addition, for port A, based on the content shown in Table 1, port A can calculate the one-way link delay.
[0491] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = requestReceiveTimestamp of Pdelay_Resp–t1 = t2_ns–t1 = t2–t1–t2_fns ≈ t2–t1.
[0492] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4–(correctedPdelayRespCorrectionField+requestReceiveTimestamp of Pdelay_Resp)=t4–[(t3–t2)+t2_ns]=t4–t3+t2_fns≈t4–t3.
[0493] In the above implementation process, since t2_fns is less than 1ns, the calculation accuracy of the unidirectional link delay is reduced by at most 1ns, which can also meet the high-precision delay measurement requirements.
[0494] It should be understood that, as described above, the second message may carry the first message's reception timestamp (t2) and / or the second message's transmission timestamp (t3). In Example 1 and Example 2 below, t2 is used as an example to illustrate the process of determining the delay for port A based on t1 and t2. If the second message carries a timestamp of t3, port A may determine the delay based on t3 and t4. The specific implementation process can refer to the process of determining the delay based on t1 and t2.
[0495] In addition, the formula for calculating the bidirectional average delay Delay_mean at port A can refer to the implementation process shown in FIG. 5a above.
[0496] Optionally, it can be seen from the above implementation process that the calculation of the one-way delays Delay_A_to_B and Delay_B_to_A in the scheme shown in Figure 6b depends on the parameters carried by the requestReceiptTimestamp in the Pdelay_Resp message. In order to be compatible with Figure 5a (the value carried by requestReceiptTimestamp is 0), for this purpose, an indication information can be carried in the message (such as the Pdelay_Resp message) to indicate which mode it is, and the indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 5a above and the embodiment shown in Figure 6b, there are two modes in total, which can be indicated by 1 bit. For example, the flagField bit in the header of the Pdelay_Resp message can be used to represent it, that is, the first indication information can be carried in the flagField bit in the header of the Pdelay_Resp message, the 0th byte, the 7th bit.
[0497] As another application example of Example 1, as shown in FIG6c , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0498] 1. Port A sends a Pdelay_Req message to port B.
[0499] 2. Port B sends a Pdelay_Resp message to port A.
[0500] Compared to the implementation process shown in FIG5a, in the process shown in FIG6c, when port B can send a Pdelay_Resp message, the Pdelay_Resp message can carry the reception timestamp (t2) of the Pdelay_Req message received by port B. For example, as shown in Table 2 below, compared to Table 1, in the example shown in Table 2, in addition to carrying t2_ns through the requestReceiptTimestamp field, the nanosecond fractional part of the request reception timestamp (requestReceiptTimestampFractionalNS) field of the Pdelay_Resp message (unit is less than 1ns, for example, 1 / 2) can also be used. 16 ns) carries the ns fraction of the t2 timestamp (abbreviated as t2_fns).
[0501] Optionally, requestReceiptTimestampFractionalNS can occupy 2 bytes and carry t2_fns. The format can refer to the format of correctionField and the unit is 1 / 2. 16 ns.
[0502] Table 2
[0503] Optionally, t2_fns can also be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 3. Compared to Table 1, in the example shown in Table 3, in addition to carrying t2_ns through the requestReceiptTimestamp field, t2_fns can also be carried through the TLV carried by the Pdelay_Resp message. That is, the Pdelay_Resp message can include the following fields:
[0504] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0505] The length field can be represented as "lengthField" and can occupy 2 bytes, and the parameter value is 2 (that is, the length value of requestReceiptTimestampFractionalNS);
[0506] The value field can be represented as "requestReceiptTimestampFractionalNS" and can occupy 2 bytes, carrying t2_fns. The format can refer to the format of correctionField, and the unit is 1 / 2. 16 ns.
[0507] Table 3
[0508] Optionally, t2_ns and t2_fns can be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 4. Compared to Table 1, in the example shown in Table 4, t2_ns and t2_fns are carried by adding fields in the TLV. That is, the Pdelay_Resp message can include the following fields:
[0509] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0510] The length field may be represented as "lengthField" and may occupy 2 bytes, and the parameter value may be 12 (i.e., the length value of requestReceiptTimestamp and requestReceiptTimestampFractionalNS);
[0511] The value field can include "requestReceiptTimestamp" and "requestReceiptTimestampFractionalNS". Among them, "requestReceiptTimestamp" can occupy 10 bytes and carry t2_ns. The format refers to the current IEEE 1588 standard Timestamp format and the accuracy is 1ns. "requestReceiptTimestampFractionalNS" can occupy 2 bytes and carry t2_fns. The format can refer to the correctionField format and the unit is 1 / 2. 16 ns.
[0512] Table 4
[0513] In addition, for port A, based on the implementation of any one of Tables 2 to 4, port A can calculate the one-way link delay.
[0514] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = requestReceiveTimestamp of Pdelay_Resp + requestReceiptTimestampFractionalNS of Pdelay_Resp–t1 = t2_ns + t2_fns–t1 = t2–t1.
[0515] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4–(correctedPdelayRespCorrectionField+requestReceiveTimestamp of Pdelay_Resp+requestReceiveTimestamp of Pdelay_Resp)=t4–[(t3–t2)+t2_ns+t2_fns]=t4–t3.
[0516] Optionally, it can be seen from the above implementation process that the calculation of the one-way delay Delay_A_to_B and Delay_B_to_A in the scheme shown in Figure 6b depends on the parameters carried by the requestReceiptTimestamp in the Pdelay_Resp message. In order to be compatible with Figure 5a (the value carried by requestReceiptTimestamp is 0), an indication information can be carried in the message (for example, the Pdelay_Resp message) to indicate which mode it is, and the indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 5a above and the embodiment shown in Figure 6c, there are two modes in total, which can be indicated by 1 bit. For example, the flagField bit in the header of the Pdelay_Resp message can be used to represent it, that is, the first indication information can be carried in the flagField bit in the header of the Pdelay_Resp message, the 0th byte, the 7th bit.
[0517] Example 2: In the two-step mode of the P2P mechanism, the first field may be the requestReceiptTimestamp field defined by PTP, and the second field may be the correctionField field described later.
[0518] As shown in Figure 5b above, based on the implementation shown in Figure 5b, the two-step mode of the P2P mechanism has problem 4. That is, port A, as the receiver of the Pdelay_Resp and Pdelay_Resp_Follow_Up messages, cannot determine the values of t2 and t3 because the information obtained by port A is the difference between t3 and t2. This also makes it impossible for port A to measure the one-way delay.
[0519] In the technical solution shown in Figure 6a, the second port in the second node can serve as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message, and after the second node receives the second message in step S602, the second node can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message based on the second message, so that the second node can determine the unidirectional link delay between the first port and the second port based on the reception timestamp of the first message and / or the transmission timestamp of the second message to solve problem 4.
[0520] As an application example of Example 2, as shown in FIG6 d , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0521] 1. Port A sends a Pdelay_Req message to port B.
[0522] 2. Port B sends a Pdelay_Resp message to port A.
[0523] Compared with the implementation process shown in FIG5b, in the process shown in FIG6d, when port B can send a Pdelay_Resp message, the Pdelay_Resp message can carry a reception timestamp (t2) of when port B receives the Pdelay_Req message.
[0524] For example, in the process shown in Figure 6d, the Pdelay_Resp message may carry t2_ns, where t2_ns may be carried by the requestReceiptTimestamp field. For details, please refer to Table 1 above and its related implementation process.
[0525] Optionally, in the process shown in Figure 6d, the Pdelay_Resp message can also carry information for determining t2_fns. The Pdelay_Resp message can carry the inverse of t2_fns (i.e., -t2_fns). For example, -t2_fns can be carried via the correctionField in the Pdelay_Resp message. The correctionField can occupy 8 bytes, and the specific implementation can refer to the correctionField format of the IEEE 1588 standard.
[0526] In addition, for port A, based on the content shown in Table 1, port A can calculate the one-way link delay.
[0527] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = (requestReceiptTimestamp of Pdelay_Resp - correctionField of Pdelay_Resp) - t1 = (t2_ns + t2_fns) - t1 = t2 - t1.
[0528] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4−correctedPdelayRespFollowUpCorrectionField−(requestReceiptTimestamp of Pdelay_Resp−correctionField of Pdelay_Resp)=t4−(t3−t2)−(t2_ns+t2_fns)=t4−t3.
[0529] Note 1: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2.
[0530] Similarly, port A can also calculate the two-way average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–correctedPdelayRespFollowUpCorrectionField] / 2 = [(t4–t1)–(t3–t2)] / 2
[0531] Note 2: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2.
[0532] Optionally, as can be seen from the above implementation process, the calculation process of "Delay_mean" in the scheme shown in Figure 6d is different from the implementation process shown in Figure 5b above. The one-way delays Delay_A_to_B and Delay_B_to_A both depend on the values carried by the requestReceiveTimestamp and correctionField of Pdelay_Resp. To this end, an indication information indicating which mode is being used can be carried in the message (e.g., Pdelay_Resp message or Pdelay_Resp_Follow_Up message). This indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with the schemes shown in Figures 5b and 5c above, as well as the embodiment shown in Figure 6d, there are a total of three modes, which can be indicated by two bits. For example, the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message can be used to represent it, that is, the first indication information can be carried in the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message.
[0533] In a possible implementation, the technical solution shown in FIG6a can be used to solve not only Problem 2 and Problem 4 described above, but also other problems, which will be described below with reference to more implementation examples.
[0534] Implementation method 1: the first port is a PTP port supporting one-step, and the first message received by the first node in step S601 carries the sending timestamp of the first message. Specifically, when the first port is a PTP port supporting one-step, the first message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the first node can obtain time information of other nodes (for example, the second node that sends the first message).
[0535] In a possible implementation of implementation method one, the sending timestamp of the first message is used to determine the one-way link delay between the first port and the second port. Specifically, the first node acts as the receiver of the first message, and the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by itself. In this way, compared to the method of not carrying any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement of determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0536] Optionally, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message. Specifically, the first message may further carry the second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0537] In one possible implementation of implementation method 1, the sending timestamp of the first message is carried in the third field, or in the third field and the fourth field; wherein the accuracy of the value of the third field is 1 ns, and the accuracy of the value of the fourth field is less than 1 ns. Specifically, the first message can carry the sending timestamp of the first message in the above-mentioned multiple ways, thereby meeting different accuracy requirements.
[0538] Optionally, the third field is an originTimestamp field. Specifically, when the first port is a one-step PTP port, the field used to carry the reception timestamp of the first message can be an originTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0539] For ease of understanding, the implementation process of the third field and the fourth field will be exemplarily explained below with reference to some implementation examples.
[0540] Example 3: The first field may be the originTimestamp field defined by PTP, and the second field may be the nanosecond fractional part (originTimestampFractionalNS) field of the original timestamp described later.
[0541] As shown in Figure 5a above, based on the implementation shown in Figure 5a, the one-step mode of the P2P mechanism has problem 3. That is, port B is the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message. Because the Pdelay_Req message received by port B does not carry time information, port B cannot obtain the one-way delay and average delay.
[0542] In the above technical solution, the first port in the first node can serve as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, and after the first node receives the first message in step S601, the first node can obtain the sending timestamp of the first message based on the first message, so that the first node can determine the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message to solve problem 3.
[0543] As an application example of Example 3, as shown in FIG6e , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0544] 1. Port A sends a Pdelay_Req message to port B.
[0545] 2. Port B sends a Pdelay_Resp message to port A.
[0546] Compared to the implementation process shown in Figure 5a, in the process shown in Figure 6e, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the reception timestamp (t1) of the Pdelay_Req message sent by port A. For example, as shown in Table 5 below, the originTimestamp field (unit: 1 ns) of the Pdelay_Resp message carries / carries the ns portion of the t1 timestamp (abbreviated as t1_ns).
[0547] Table 5
[0548] In Table 5, the fractional ns part of the t1 timestamp (abbreviated as t1_fns) is not carried, so the accuracy of the t1 timestamp is 1ns, which generally meets the delay measurement accuracy requirement.
[0549] In addition, for port B, based on the content shown in Table 5, port B can calculate the one-way link delay.
[0550] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = t2–originTimestamp of Pdelay_Req = t2–t1_ns = t2–t1+t1_fns.
[0551] Since t1_fns is less than 1ns, the calculation accuracy of the one-way delay is reduced by at most 1ns, which can also meet the requirements of high-precision delay measurement.
[0552] As another application example of Example 3, as shown in FIG6f , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0553] 1. Port A sends a Pdelay_Req message to port B.
[0554] 2. Port B sends a Pdelay_Resp message to port A.
[0555] Compared to the implementation process shown in Figure 5a, in the process shown in Figure 6f, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the reception timestamp (t1) of the Pdelay_Req message sent by port A. For example, as shown in Table 6 below, in addition to carrying t1_ns, the Pdelay_Resp message can also carry t1_fns (i.e., the fractional nanosecond portion of t2) through other fields.
[0556] Table 6
[0557] In other words, through the implementation process shown in Table 6, the originTimestamp of the pdelay_req message received by port B can carry t1_ns, and a new field originTimestampFractionalNS is added to carry t1_fns. For example, originTimestampFractionalNS can occupy 2 bytes and carry t1_fns. The format can refer to the format of correctionField, and the unit is 1 / 2. 16 ns.
[0558] Optionally, t1_fns can also be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 7. Compared to Table 5, in the example shown in Table 7, in addition to carrying t1_ns through the originTimestamp field, t1_fns can also be carried through the TLV carried by the Pdelay_Req message. That is, the Pdelay_Req message can include the following fields:
[0559] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0560] The length field can be represented as "lengthField" and can occupy 2 bytes, with a parameter value of 2 (i.e., the length value of originTimestampFractionalNS);
[0561] The value field can be represented as "originTimestampFractionalNS" and can occupy 2 bytes, carrying t2_fns. The format can refer to the format of correctionField, and the unit is 1 / 2. 16 ns.
[0562] Table 7
[0563] Optionally, t1_ns and t1_fns can be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 8. Compared to Table 5, in the example shown in Table 8, t1_ns and t1_fns are carried by adding fields in the TLV. That is, the Pdelay_Req message can include the following fields:
[0564] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0565] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (that is, the length value of originTimestamp and originTimestampFractionalNS);
[0566] The value field can include "originTimestamp" and "originTimestampFractionalNS". "originTimestamp" can occupy 10 bytes and carry t1_ns. The format refers to the current IEEE 1588 standard Timestamp format, with an accuracy of 1ns. "originTimestampFractionalNS" can occupy 2 bytes and carry t1_fns. The format can refer to the correctionField format, and the unit is 1 / 2. 16 ns.
[0567] Table 8
[0568] In addition, for port B, based on the implementation of any one of Tables 6 to 8, port B can calculate the one-way link delay.
[0569] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = t2–originTimestamp of Pdelay_Req–originTimestampFractionalNS of Pdelay_Req = t2–t1_ns–t1_fns = t2–t1.
[0570] Optionally, it can be seen from the above implementation process that the calculation of the one-way delay Delay_A_to_B in the scheme shown in Figure 6f depends on the parameters carried by the originTimestamp in the Pdelay_Req message. In order to be compatible with Figure 5a (the value carried by originTimestamp is 0), an indication information can be carried in the message (such as the Pdelay_Req message) to indicate which mode it is, and the indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 5a above and the embodiment shown in Figure 6f, there are two modes in total, which can be indicated by 1 bit. For example, the flagField bit in the header of the Pdelay_Req message can be used to represent it, that is, the first indication information can be carried in the flagField bit in the header of the Pdelay_Req message, the 0th byte, the 7th bit.
[0571] Implementation method two, the first port is a PTP port supporting two-step mode A, the first message carries the sending timestamp of the third message, and the third message is a message of the same type as the first message transmitted previously. Specifically, when the first port is a PTP port supporting two-step mode A, the first message received by the first node through the first port can also carry the sending timestamp of the third message. In this way, the receiving node of the first message (e.g., the first node) can obtain the time information of other nodes (e.g., the second node).
[0572] In this application, the previous (or pre) transmission can be replaced by other terms, such as the last transmission, the previous transmission, the previous transmission, etc.
[0573] In this application, transmission can be understood as sending or receiving. For example, if a first node is the receiver of a first message, then for the first node, the third message can be a previously received message of the same type as the first message. For another example, if a second node is the sender of a first message, then for the second node, the third message can be a previously sent message of the same type as the first message.
[0574] In a possible implementation of the second implementation, the sending timestamp of the third message is used to determine the one-way link delay between the first port and the second port. Specifically, the first node acts as the receiver of the first message, and the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried by the first message and the timestamp of the message received by itself. In this way, compared with the method of not carrying any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement of determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0575] In one possible implementation, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries the sending timestamp of the third message. Specifically, the first message may further carry the third indication information, so that a receiver of the first message (i.e., the first node) can determine, based on the third indication information, that the first message carries the sending timestamp of the third message, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0576] In one possible implementation of the second implementation, the sending timestamp of the third message is carried in the fifth field, or in the fifth and sixth fields; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. Specifically, the first message can carry the sending timestamp of the third message using the above-mentioned multiple methods, thereby meeting different accuracy requirements.
[0577] In one possible implementation, the fifth field is an originTimestamp field. Specifically, when the first port is a one-step PTP port, the field used to carry the reception timestamp of the first message can be the originTimestamp field defined by PTP. In this way, fields already defined by PTP can be reused to reduce message overhead.
[0578] For ease of understanding, the implementation process of the fifth field and the sixth field will be exemplarily described below with reference to some implementation examples.
[0579] Example 4: The fifth field may be the originTimestamp field defined by PTP, and the second field may be the nanosecond fractional part (originTimestampFractionalNS) field of the original timestamp described later.
[0580] As shown in Figures 5b and 5c above, the two-step mode of the P2P mechanism has problems 5 and 6 based on the implementation methods shown in Figures 5b and 5c. That is, port B is the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message. Because the Pdelay_Req message received by port B does not carry time information, port B cannot obtain the one-way delay and average delay.
[0581] In the above technical solution, the first port in the first node can serve as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, and after the first node receives the first message in step S601, the first node can obtain the sending timestamp of the third message based on the first message, so that the first node can determine the unidirectional link delay between the first port and the second port based on the sending timestamp of the third message, so as to solve problems 5 and 6.
[0582] As an application example of Example 4, as shown in FIG6g , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0583] 1. Port A sends a Pdelay_Req message to port B.
[0584] 2. Port B sends a Pdelay_Resp message to port A.
[0585] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0586] Compared to the implementation process shown in Figure 5b, in the process shown in Figure 6g, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the sending timestamp (t1pre) of the previous Pdelay_Req message sent by port A. For example, the originTimestamp field (unit: 1ns) of the Pdelay_Resp message carries / carries the ns portion of the t1pre timestamp (abbreviated as t1pre_ns). The implementation of the originTimestamp field can refer to Table 5 and related descriptions above.
[0587] Afterwards, for port B, port B can calculate the one-way link delay.
[0588] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = t2pre–originTimestamp of Pdelay_Req = t2pre–t1pre_ns = t2pre–t1pre+t1pre_fns ≈ t2pre–t1pre.
[0589] Here, t2pre represents the reception timestamp of the previous Pdelay_Req message received by port B. Since t1_fns is less than 1 ns, the calculation accuracy of the one-way delay is reduced by at most 1 ns, which still meets the requirement of high-precision delay measurement.
[0590] Optionally, since the improvements of the above-mentioned implementation methods 1 and 2 are both in the fields carried by the Pdelay_Req message, in order to distinguish between implementation methods 1 and 2, indication information (such as the second indication information or the third indication information) can be carried in the Pdelay_Req message to indicate whether the Pdelay_Req message sent by port A adopts the one-step mode or the two-step mode (or indicates whether the timestamp information carried by the Pdelay_Req message sent by port A is t1 or t1pre). Exemplarily, the twoStepFlag bit in the Pdelay_Req message header can be used for indication. Currently, the twoStepFlag is only meaningful for Sync messages and Pdelay_Resp messages, and can be expanded to add Pdelay_Req messages. For example, 0 represents one-step (indicating that the timestamp information carried by the Pdelay_Req message sent by port A is t1), and 1 represents two-step (indicating that the timestamp information carried by the Pdelay_Req message sent by port A is t1pre). Alternatively, to be compatible with the method of FIG5b (without carrying a timestamp), there are three modes in total, which can be indicated by using a reserved bit in the flagField in the Pdelay_Req message Header, where 0 represents no timestamp and 1 represents carrying a timestamp.
[0591] As an application example of Example 4, as shown in FIG6h , taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0592] 1. Port A sends a Pdelay_Req message to port B.
[0593] 2. Port B sends a Pdelay_Resp message to port A.
[0594] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0595] Compared to the implementation process shown in Figure 5b, in the process shown in Figure 6h, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the sending timestamp (t1pre) of the previous Pdelay_Req message sent by port A. For example, the Pdelay_Resp message carries / carries the ns portion of the t1pre timestamp (abbreviated as t1pre_ns) and the fractional nanosecond portion of the t1pre timestamp (abbreviated as t1pre_fns).
[0596] For example, t1pre_ns can be carried by the originTimestamp field in the Pdelay_Req message, and t1pre_ns can be carried by the originTimestampFractionalNS field in the Pdelay_Req message. For various implementations of these two fields, refer to any table and related description in Tables 6 to 8 above.
[0597] Afterwards, for port B, port B can calculate the one-way link delay.
[0598] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = t2pre–originTimestamp of Pdelay_Req–originTimestampFractionalNS of Pdelay_Req = t2pre–t1pre_ns–t1pre_fns = t2pre–t1pre.
[0599] Here, t2pre represents the reception timestamp of the previous Pdelay_Req message received by port B. Since t1_fns is less than 1 ns, the calculation accuracy of the one-way delay is reduced by at most 1 ns, which still meets the requirement of high-precision delay measurement.
[0600] Similarly, in order to distinguish between implementation method one and implementation method two, indication information (such as the second indication information or the third indication information) can be carried in the Pdelay_Req message to indicate whether the Pdelay_Req message sent by port A adopts the one-step mode or the two-step mode (or indicates whether the timestamp information carried by the Pdelay_Req message sent by port A is t1 or t1pre). For example, the twoStepFlag bit in the Pdelay_Req message header can be used to indicate. Currently, the twoStepFlag is only meaningful for Sync messages and Pdelay_Resp messages, and can be expanded to add Pdelay_Req messages. For example, 0 represents one-step (indicating that the timestamp information carried by the Pdelay_Req message sent by port A is t1), and 1 represents two-step (indicating that the timestamp information carried by the Pdelay_Req message sent by port A is t1pre). Alternatively, to be compatible with the method of FIG5b (not carrying a timestamp), there are a total of three modes, which can be indicated by using a reserved bit in the fflafField in the Pdelay_Req message Header, 0 representing no timestamp and 1 representing a timestamp.
[0601] Implementation method three, the first port is a PTP port supporting two-step mode A, and the method further includes: the first node sends a fourth message to the second node through the first port, the fourth message is a follow-up message of the second message, and the fourth message carries the sending timestamp of the second message. Specifically, when the first port in the first node is a PTP port supporting two-step mode A, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the sending timestamp of the second message. In this way, the recipient of the fourth message can obtain more time information.
[0602] In a possible implementation of the third implementation, the sending timestamp of the second message is used to determine the one-way link delay between the first port and the second port. Specifically, for the receiver of the fourth message, the fourth message can be received through the second port, and thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamp of its own sending / receiving message. In this way, compared with the method of carrying a timestamp difference in the message and then only determining the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement of determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0603] It is understandable that the second message and the fourth message received by the second port can both carry timestamps, so that the second node including the second port can determine the one-way link delay using the timestamp carried by the second message, and can also determine the one-way link delay using the timestamp carried by the fourth message. This allows the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation while also allowing the second nodes to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0604] Optionally, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries the sending timestamp of the second message. Specifically, the fourth message may further carry the fourth indication information, so that a receiver of the fourth message can determine, based on the fourth indication information, that the fourth message carries the sending timestamp of the second message, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0605] In one possible implementation, the second message's sending timestamp is carried in the seventh field, or in both the seventh and eighth fields; the seventh field has a value precision of 1 ns, and the eighth field has a value precision of less than 1 ns. Specifically, the second message can carry the second message's sending timestamp using the aforementioned multiple methods, thereby meeting different accuracy requirements.
[0606] In one possible implementation, the seventh field is the response origin timestamp field. Specifically, when the first port is a two-step PTP port, the field used to carry the send timestamp of the second message can be the response Origin Timestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0607] For ease of understanding, the implementation process of the seventh field and the eighth field will be exemplarily explained below with reference to some implementation examples.
[0608] Example 5: The seventh field may be the responseOriginTimestamp field defined by PTP, and the second field may be the nanosecond fractional part of the response original timestamp (responseOriginTimestampFractionalNS) field described later.
[0609] As shown in Figure 5b above, based on the implementation shown in Figure 5b, the two-step mode of the P2P mechanism has problem 4. That is, port A, as the receiver of the Pdelay_Resp_Follow_Up message, cannot determine the values of t2 and t3 because the information obtained by port A is the difference between t3 and t2. This also makes port A unable to measure the one-way delay.
[0610] In the above technical solution, the second port in the second node can serve as the receiver of the Pdelay_Resp_Follow_Up message, and after the second node receives the fourth message in step S602, the second node can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message based on the fourth message, so that the second node can determine the unidirectional link delay between the first port and the second port based on the reception timestamp of the first message and / or the transmission timestamp of the second message to solve problem 4.
[0611] As an application example of Example 5, taking the fourth message carrying the sending timestamp of the second message as an example, as shown in Figure 6i, taking the first port in the first node as port B and the second port in the second node as port A as an example, the following process is included.
[0612] 1. Port A sends a Pdelay_Req message to port B.
[0613] 2. Port B sends a Pdelay_Resp message to port A.
[0614] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0615] Compared to the implementation process shown in Figure 5b, in the process shown in Figure 6i, when port B can send a Pdelay_Resp_Follow_Up message, the Pdelay_Resp_Follow_Up message can carry the reception timestamp (t3) of the Pdelay_Resp message sent by port B. For example, as shown in Table 9 below, the ns portion of the t3 timestamp (abbreviated as t3_ns) is carried / beared via the responseOriginTimestamp field (unit: 1 ns) of the Pdelay_Resp_Follow_Up message.
[0616] Table 9
[0617] Afterwards, for port A, port A can calculate the one-way link delay.
[0618] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = (responseOriginTimestamp of Pdelay_Resp_Follow_Up–correctedPdelayRespFollowUpCorrectionField)–t1 = (t3_ns–(t3–t2))–t1 = t2–t1–t3_fns ≈ t2–t1.
[0619] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A = t4 - responseOriginTimestamp of Pdelay_Resp_Follow_Up = t4 - t3_ns = t4 - t3 + t3_fns ≈ t4 - t3.
[0620] Note 1: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2.
[0621] Here, t3_fns represents the reception timestamp of the Pdelay_Resp message sent by port B. Since t3_fns is less than 1 ns, the calculation accuracy of the one-way delay is reduced by at most 1 ns, which still meets the requirement of high-precision delay measurement.
[0622] Similarly, port A can also calculate the two-way average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–correctedPdelayRespFollowUpCorrectionField] / 2 = [(t4–t1)–(t3–t2)] / 2
[0623] Note 2: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2.
[0624] Optionally, as can be seen from the above implementation process, the calculation process of "Delay_mean" in the scheme shown in Figure 6i is different from the implementation process shown in Figure 5b above. The one-way delays Delay_A_to_B and Delay_B_to_A both depend on the values carried by the responseOriginTimestamp and correctionField of the Pdelay_Resp_Follow_Up message. To this end, an indication information indicating which mode is used can be carried in the message (e.g., the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message). This indication information is recorded as the fourth indication information described above. Exemplarily, in order to be compatible with the schemes shown in Figures 5b and 5c above, as well as the embodiment shown in Figure 6i, a total of three modes can be indicated by two bits. For example, the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message can be used to represent it, that is, the fourth indication information can be carried in the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message.
[0625] As an application example of Example 5, taking the fourth message carrying the sending timestamp of the second message as an example, as shown in Figure 6j, taking the first port in the first node as port B, and the second port in the second node as port A as an example, the following process is included.
[0626] 1. Port A sends a Pdelay_Req message to port B.
[0627] 2. Port B sends a Pdelay_Resp message to port A.
[0628] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0629] Compared to the implementation process shown in Figure 5b, in the process shown in Figure 6j, when port B can send a Pdelay_Resp_Follow_Up message, the Pdelay_Resp_Follow_Up message can carry the reception timestamp (t3) of the Pdelay_Resp message sent by port B, including the nanosecond part (t3_ns) and the fractional nanosecond part (t3_fns). For example, as shown in Table 10 below, t3_ns is carried / contained by the responseOriginTimestamp field of the Pdelay_Resp_Follow_Up message, and t3_fns is carried / contained by the responseOriginTimestampFractionalNS field.
[0630] Table 10
[0631] Optionally, t3_fns can also be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 11. Compared to Table 9, in the example shown in Table 11, in addition to carrying t1_ns through the responseOriginTimestamp field, t3_fns can also be carried through the TLV carried by the Pdelay_Resp_Follow_Up message. That is, the Pdelay_Req message can include the following fields:
[0632] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0633] The length field can be represented as "lengthField" and can occupy 2 bytes, and the parameter value is 2 (that is, the length value of responseOriginTimestampFractionalNS);
[0634] The value field can be represented as "responseOriginTimestampFractionalNS" and can occupy 2 bytes, carrying t3_fns. The format can refer to the format of correctionField, and the unit is 1 / 2. 16 ns.
[0635] Table 11
[0636] Optionally, t3_ns and t3_fns can be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 12. Compared to Table 9, in the example shown in Table 12, t3_ns and t3_fns are carried by adding fields in the TLV. That is, the Pdelay_Resp_Follow_Up message can include the following fields:
[0637] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0638] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (that is, the length value of responseOriginTimestamp and responseOriginTimestampFractionalNS);
[0639] The value field can include "responseOriginTimestamp" and "responseOriginTimestampFractionalNS". Among them, "responseOriginTimestamp" can occupy 10 bytes and carry t3_ns. The format refers to the current IEEE 1588 standard Timestamp format and the precision is 1ns. "responseOriginTimestampFractionalNS" can occupy 2 bytes and carry t3_fns. The format can refer to the correctionField format and the unit is 1 / 2. 16 ns.
[0640] Table 12
[0641] In addition, for port B, based on the implementation of any one of Tables 10 to 12, port A can calculate the one-way link delay.
[0642] For example, the unidirectional link delay Delay_A_to_B from port A to port B satisfies: Delay_A_to_B = (responseOriginTimestamp of Pdelay_Resp_Follow_Up + responseOriginTimestampFractionalNS of Pdelay_Resp_Follow_Up - correctedPdelayRespFollowUpCorrectionField) - t1 = (t3_ns + t3_fns - (t3 - t2)) - t1 = t2 - t1.
[0643] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4−responseOriginTimestamp of Pdelay_Resp_Follow_Up responseOriginTimestampFractionalNS of Pdelay_Resp_Follow_Up=t4−t3_ns−t3_fns=t4−t3.
[0644] Note 1: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2
[0645] Similarly, port A can also calculate the two-way average delay Delay_mean, which satisfies: Delay_mean = [(t4–t1)–correctedPdelayRespFollowUpCorrectionField] / 2 = [(t4–t1)–(t3–t2)] / 2.
[0646] Note 2: correctedPdelayRespFollowUpCorrectionField=correctionField of Pdelay_Resp_Follow_Up+dAsy=t3–t2–dAsy+dAsy=t3–t2.
[0647] Optionally, as can be seen from the above implementation process, the calculation process of "Delay_mean" in the scheme shown in Figure 6j is different from the implementation process shown in Figure 5b above. The one-way delays Delay_A_to_B and Delay_B_to_A both depend on the values carried by the responseOriginTimestamp and correctionField of the Pdelay_Resp_Follow_Up message. To this end, an indication information indicating which mode is used can be carried in the message (e.g., the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message). This indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with the schemes shown in Figures 5b and 5c above, as well as the embodiment shown in Figure 6d, there are a total of three modes, which can be indicated by 2 bits. For example, the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message can be used to represent it, that is, the first indication information can be carried in the flagField bit of the 0th byte, the 7th bit, and the 1st byte, the 7th bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message.
[0648] Implementation four, the first port is a PTP port supporting two-step, and the method also includes: the first node receives a fifth message from the second node through the first port, the fifth message carries the sending timestamp of the first message, and the fifth message is a follow-up message of the first message. Specifically, when the second port is a PTP port supporting two-step, the fifth message received by the first node through the first port can also carry the sending timestamp of the first message. In this way, the receiving node (e.g., the first node) of the fifth message can obtain the time information of other nodes (e.g., the second node).
[0649] In a possible implementation of implementation method four, the method further includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port through which the second node sends the fifth message. Specifically, the first node acts as the receiver of the fifth message, and the first node can determine the unidirectional link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of its own received message. In this way, compared to the method that does not carry any time information, the message receiver can determine the unidirectional link delay based on the timestamp carried by the message, so as to meet the determination requirements of the unidirectional link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0650] Optionally, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the sending timestamp of the first message. Specifically, the fifth message may further carry the fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0651] In a possible implementation of implementation method four, the sending timestamp of the second message is carried in the ninth field, or the sending timestamp of the second message is carried in the ninth field and the tenth field; wherein, the accuracy of the value of the ninth field is 1 nanosecond ns, and the accuracy of the value of the tenth field is less than 1ns.
[0652] Based on the above technical solution, the fifth message can carry the sending timestamp of the first message through the above multiple methods. In this way, different accuracy requirements can be met.
[0653] Optionally, the ninth field is the preciseOriginTimestamp field of the fifth message, and the tenth field is the correctionField field of the fifth message.
[0654] Optionally, for a PTP port that supports two-step P2P, the first message is a Pdelay_Req message, and the fifth message is a follow-up message of Pdelay_Req, which can be called a Pdelay_Req_Follow_Up message. For example, as shown in Table 13, the message format of the fifth message is as follows:
[0655] Table 13
[0656] Among them, preciseOriginTimestamp can carry the nanosecond part of the sending timestamp of the first message Pdelay_Req message, the correctionField in the header carries the fractional nanosecond part of the sending timestamp of the first message Pdelay_Req message, and the messageType value in the header can be 0xE, representing a Pdelay_Req_Follow_Up message.
[0657] Optionally, for a PTP port that supports two-step E2E, the first message is a Delay_Req message, and the fifth message is a follow-up message of the Delay_Req, which can be called a Delay_Req_Follow_Up message. For example, as shown in Table 14, the message format of the fifth message is as follows:
[0658] Table 14
[0659] Among them, preciseOriginTimestamp can carry the nanosecond part of the sending timestamp of the first message Delay_Req message, the correctionField in the header carries the fractional nanosecond part of the sending timestamp of the first message Delay_Req message, and the messageType value in the header can be 0xF, representing a Delay_Req_Follow_Up message.
[0660] It should be noted that, from the above-mentioned examples (for example, the processes shown in Figures 6b to 6i, and the processes shown in Tables 1 to 14), it can be seen that in the method shown in Figure 6a, in addition to the second message transmitted in step S602, the first message transmitted in step S601 and one or more of the fourth message and the fifth message described above can also carry a timestamp, that is, the above-mentioned examples can be combined with each other.
[0661] Please refer to Figure 7a, which is another schematic diagram of the communication method provided by this application, which includes the following steps: The method at least includes step S701 and step S702 shown in Figure 7a.
[0662] S701. The second node sends a first message, and the first node receives the first message accordingly. The first message is used for delay request and carries a sending timestamp of the first message. The first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0663] Exemplarily, the first node includes a first port, and the first port is a PTP port supporting one-step.
[0664] S702: The first node sends a second message, and correspondingly, the second node receives the second message, which is used for delay response. Step S702 is optional.
[0665] It should be understood that in the implementation shown in Figure 7a, the first node can be a P2P node, and / or the first port in the first node for receiving the first message and for sending the second message can be a P2P port; accordingly, the first message for the delay request can be a Pdelay_Req message defined by PTP. Alternatively, the first node can be an end-to-end (E2E) node, or the first port can be an E2E port; accordingly, the first message for the delay request can be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message can also have other message names, which are not limited here.
[0666] Based on the technical solution shown in Figure 7a, after the first node receives the first message for the delay request through the first port in step S701, the first node can obtain the sending timestamp of the first message from the first message in step S702. In other words, the first node can obtain the sending timestamp of the first message. As a result, the recipient of the delay request message can obtain the sending timestamp, which in turn enables the recipient of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0667] It should be noted that in the method shown in FIG7a, in addition to the first message transmitted in step S701 being able to carry a timestamp, other messages transmitted between the first node and the second node (e.g., the second message, the fourth message, etc.) may also be able to carry a timestamp. In other words, the methods of carrying timestamps in two or more messages may be combined.
[0668] For example, in the method shown in FIG7a, the second message sent by the first node in step S702 may also carry a timestamp. For specific implementation, reference may be made to FIG6a and its possible implementation methods (such as the implementation process shown in FIG6b / 6c / 6d).
[0669] For example, in the method shown in Figure 7a, when the first message can be a Pdelay_Req message, the first node can also send a fourth message after step S702 (the fourth message is a follow-up message of the second message, that is, a Pdelay_Resp_Follow_Up message), and the fourth message can also carry a timestamp. For specific implementation, please refer to Figure 6a above and its possible implementation methods (for example, the implementation process shown in Figure 6i / 6j).
[0670] In one possible implementation, in the method shown in FIG7a, after step S701, the method further includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port at which the second node receives the first message. Specifically, the sending timestamp of the first message is used to determine the unidirectional link delay between the first port and the second port. In this way, compared to the method of carrying a timestamp difference in the message and then only determining the average link delay based on the difference, the message receiver can determine the unidirectional link delay based on the timestamp carried by the message, so as to meet the determination requirement of the unidirectional link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0671] Optionally, the first message further carries second indication information, where the second indication information is used to indicate that the first message carries a sending timestamp of the first message. Specifically, the first message may further carry the second indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries the sending timestamp of the first message based on the second indication information, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0672] In one possible implementation, the first message's sending timestamp is carried in the third field, or in the third field and the fourth field; wherein the third field has a value precision of 1 ns, and the fourth field has a value precision of less than 1 ns. Specifically, the first message can carry the first message's sending timestamp using the aforementioned multiple methods, thereby meeting different accuracy requirements.
[0673] Optionally, the third field is an originTimestamp field. Specifically, when the first port is a one-step PTP port, the field used to carry the reception timestamp of the first message can be an originTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0674] It should be noted that, when the first message is a Pdelay_Req message defined by PTP, the implementation method of the first message carrying the sending timestamp of the first message can refer to the description of the above implementation method 1 and related implementations.
[0675] The following describes the implementation process of the third field and the fourth field when the first message is a Delay_Req message defined by PTP.
[0676] Example 6: The third field is the originTimestamp field defined by PTP, and the fourth field may be the nanosecond fractional part of the original timestamp (originTimestampFractionalNS) field described later.
[0677] As shown in Figure 4a above, the one-step mode of the E2E mechanism, based on the implementation shown in Figure 4a, has problem 1. Port A, as the receiver of the Delay_Req message and the sender of the Delay_Resp message, cannot obtain the one-way delay and average delay because the Delay_Req message received by port A does not carry time information.
[0678] In the above technical solution, the first port in the first node can serve as the receiver of the Delay_Req message and the sender of the Delay_Resp message, and after the first node receives the first message in step S701, the first node can obtain the sending timestamp of the first message based on the first message, so that the first node can determine the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message to solve problem 1.
[0679] As an application example of Example 6, as shown in FIG7b , taking the first port in the first node as port A and the second port in the second node as port B as an example, the following process is included.
[0680] 1. Port B sends a Delay_Req message to port A.
[0681] 2. Port A sends a Delay_Resp message to port B.
[0682] Compared to the implementation process shown in Figure 4a, in the process shown in Figure 7b, when port B can send a Delay_Req message, the Delay_Req message can carry the reception timestamp (t3) of the Delay_Req message sent by port B. For example, as shown in Table 15 below, the originTimestamp field (unit: 1 ns) of the Delay_Resp message carries / carries the ns portion of the t3 timestamp (abbreviated as t3_ns).
[0683] Table 15
[0684] In addition, for port A, based on the content shown in Table 15, port A can calculate the one-way link delay.
[0685] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4–originTimestamp of Delay_Req=t4–t3_ns=t4–t3+t3_fns≈t4–t3.
[0686] In the above implementation process, since t3_fns is less than 1ns, the calculation accuracy of the one-way link delay is reduced by at most 1ns, which can also meet the high-precision delay measurement requirements.
[0687] Optionally, it can be seen from the above implementation process that the calculation of the one-way delay Delay_B_to_A in the scheme shown in Figure 7b depends on the parameters carried by the originTimestamp in the Delay_Req message. In order to be compatible with Figure 4a (the value carried by originTimestamp is 0), an indication information can be carried in the message (such as the Delay_Req message) to indicate which mode it is, and the indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 4a above, 1 bit can be used to indicate whether the originTimestamp field of Delay_Req carries a timestamp. For example, the flagField bit in the header of the Delay_Req message can be used to indicate the 7th bit of the 0th byte, 0 represents that the originTimestamp does not carry a timestamp, and 1 represents that the originTimestamp carries a timestamp, that is, the first indication information can be carried in the flagField bit in the header of the Delay_Req message. The 7th bit of the 0th byte.
[0688] As another application example of Example 6, as shown in FIG7c , taking the first port in the first node as port A and the second port in the second node as port B as an example, the following process is included.
[0689] 1. Port B sends a Delay_Req message to port A.
[0690] 2. Port A sends a Delay_Resp message to port B.
[0691] Compared to the implementation process shown in Figure 4a, in the process shown in Figure 7c, when port B can send a Delay_Req message, the Delay_Req message can carry the reception timestamp (t3) of the Delay_Req message sent by port B. For example, as shown in Table 16 below, t3_ns is carried by the originTimestamp field of the Delay_Resp message, and t3_fns is carried by the originTimestampFractionalNS field.
[0692] Table 16
[0693] Optionally, t3_fns can also be carried by adding a new TLV, which will be explained below with reference to the example shown in Table 17. Compared to Table 15, in the example shown in Table 17, in addition to carrying t3_ns through the originTimestamp field, t3_fns can also be carried through the TLV carried by the Delay_Req message. That is, the Delay_Req message can include the following fields:
[0694] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0695] The length field can be represented as "lengthField" and can occupy 2 bytes, with a parameter value of 2 (i.e., the length value of originTimestampFractionalNS);
[0696] The value field can be represented as "originTimestampFractionalNS" and can occupy 2 bytes, carrying t3_fns. The format can refer to the format of correctionField, and the unit is 1 / 2. 16 ns.
[0697] Table 17
[0698] Optionally, t3_ns and t3_fns can be carried by adding a new TLV. This is explained below with reference to the example shown in Table 18. Compared to Table 15, in the example shown in Table 18, t3_ns and t3_fns are carried by adding fields in the TLV. That is, the Delay_Req message can include the following fields:
[0699] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A.
[0700] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (that is, the length value of originTimestamp and originTimestampFractionalNS);
[0701] The value field can include "originTimestamp" and "originTimestampFractionalNS". "originTimestamp" can occupy 10 bytes and carry t3_ns. The format refers to the current IEEE 1588 standard Timestamp format, with an accuracy of 1ns. "originTimestampFractionalNS" can occupy 2 bytes and carry t3_fns. The format can refer to the correctionField format, and the unit is 1 / 2. 16 ns.
[0702] Table 18
[0703] In addition, for port A, based on the implementation of any one of Tables 16 to 18, port B can calculate the one-way link delay.
[0704] For example, the unidirectional link delay Delay_B_to_A from port A to port B satisfies: Delay_B_to_A=t4−originTimestamp of Delay_Req−originTimestampFractionalNS of Delay_Req=t4−t3_ns−t3_fns=t4−t3.
[0705] Optionally, it can be seen from the above implementation process that the calculation of the one-way delay Delay_B_to_A in the scheme shown in Figure 7c depends on the parameters carried by the originTimestamp in the Delay_Req message. In order to be compatible with Figure 4a (the value carried by originTimestamp is 0), an indication information can be carried in the message (such as the Delay_Req message) to indicate which mode it is, and the indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 4a above, 1 bit can be used to indicate whether the originTimestamp field of Delay_Req carries a timestamp. For example, the flagField bit in the header of the Delay_Req message can be used to indicate the 7th bit of the 0th byte, 0 represents that the originTimestamp does not carry a timestamp, and 1 represents that the originTimestamp carries a timestamp, that is, the first indication information can be carried in the flagField bit in the header of the Delay_Req message, the 7th bit of the 0th byte. Please refer to Figure 8a, which is a schematic diagram of the communication method provided by the present application, and the method includes the following steps. The method at least includes step S801 and step S802 shown in FIG8 a .
[0706] S801. The second node sends a first message, and the first node receives the first message accordingly. The first message is for a delay request and carries a sending timestamp of a third message. The third message is a previously transmitted message of the same type as the first message. The first message is a point-to-point delay request (Pdelay_Req) message, or a delay request (Delay_Req) message.
[0707] S802: The first node sends a second message, and correspondingly, the second node receives the second message, and the first message is used for delay response. Step S702 is optional.
[0708] It should be understood that in the scheme shown in Figure 8a, the first node can be a P2P node, and / or the first port of the first node for receiving the first message and for sending the second message can be a P2P port; accordingly, the first message for delay request can be a Pdelay_Req message defined by PTP. Alternatively, the first node can be an end-to-end (E2E) node, or the first port can be an E2E port; accordingly, the first message for delay request can be a Delay_Req message defined by PTP. Optionally, as the PTP standard evolves, the first message can also have other message names, which are not limited here.
[0709] Based on the technical solution shown in Figure 8a, after the first node receives the first message for the delay request via the first port in step S801, the first node can obtain the sending timestamp of the third message from the first message in step S802. In other words, the first node can obtain the sending timestamp of the third message. Thus, the recipient of the delay request message can obtain the sending timestamp, thereby enabling the recipient of the delay request message to obtain time information of other nodes (e.g., the second node that sent the first message).
[0710] It should be noted that in the method shown in FIG8a, in addition to the first message transmitted in step S801 being able to carry a timestamp, other messages transmitted between the first node and the second node (e.g., the second message, the fourth message, the fifth message, etc.) may also be able to carry a timestamp. In other words, the methods of carrying timestamps in two or more messages may be combined.
[0711] For example, in the method shown in FIG8a, the second message sent by the first node in step S802 may also carry a timestamp. For specific implementation, reference may be made to FIG6a and its possible implementation methods (such as the implementation process shown in FIG6b / 6c / 6d).
[0712] For example, in the method shown in Figure 8a, when the first message can be a Pdelay_Req message, the first node can also send a fourth message after step S802 (the fourth message is a follow-up message of the second message, that is, a Pdelay_Resp_Follow_Up message), and the fourth message can also carry a timestamp. For specific implementation, please refer to Figure 6a above and its possible implementation methods (for example, the implementation process shown in Figure 6i / 6j).
[0713] For another example, in the method shown in FIG8a , after the second node sends the first message in step S801, the second node may also send a fifth message. The fifth message may be a follow-up message to the first message. Furthermore, the fifth message may carry the sending timestamp of the first message. For specific implementation, please refer to the implementation method described above.
[0714] In one possible implementation, in the method shown in FIG8a, after step S801, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the sending timestamp of the third message, the second port being the port through which the second node sends the first message, and specifically, the sending timestamp of the third message is used to determine the one-way link delay between the first port and the second port. In this way, compared to a method that does not carry any time information, the message receiver can determine the one-way link delay based on the timestamp carried by the message, thereby meeting the requirement for determining the one-way link delay in a link asymmetry scenario and improving the accuracy of clock synchronization.
[0715] Optionally, the first message further carries third indication information, where the third indication information is used to indicate that the first message carries a sending timestamp of the third message. Specifically, the first message may further carry the third indication information, so that the receiver of the first message (i.e., the first node) can determine that the first message carries a sending timestamp of the third message based on the third indication information, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0716] In one possible implementation, the sending timestamp of the third message is carried in the fifth field, or in the fifth and sixth fields; wherein the accuracy of the value of the fifth field is 1 ns, and the accuracy of the value of the sixth field is less than 1 ns. Specifically, the first message can carry the sending timestamp of the third message using the above-mentioned multiple methods, thereby meeting different accuracy requirements.
[0717] Optionally, the fifth field is an originTimestamp field. Specifically, the field used to carry the reception timestamp of the first message can be an originTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce the overhead of the message.
[0718] It should be noted that, when the first message is a Pdelay_Req message defined by PTP, the implementation method of the first message carrying the sending timestamp of the first message can refer to the description of the above implementation method 2 and related implementations.
[0719] The following describes the implementation process of the fifth field and the sixth field when the first message is a Delay_Req message defined by PTP.
[0720] Example 7: The fifth field is the originTimestamp field defined by PTP, and the sixth field may be the nanosecond fractional part of the original timestamp (originTimestampFractionalNS) field described later.
[0721] As shown in Figure 4b above, the two-step mode of the E2E mechanism, based on the implementation shown in Figure 4b, has problem 1. Port A, as the receiver of the Delay_Req message and the sender of the Delay_Resp message, cannot obtain the one-way delay and average delay because the Delay_Req message received by port A does not carry time information.
[0722] In the above technical solution, the first port in the first node can serve as the receiver of the Delay_Req message and the sender of the Delay_Resp message, and after the first node receives the first message in step S801, the first node can obtain the sending timestamp of the third message based on the first message, so that the first node can determine the unidirectional link delay between the first port and the second port based on the sending timestamp of the third message to solve problem 1.
[0723] As an application example of Example 7, as shown in FIG8b , taking the first port in the first node as port A and the second port in the second node as port B as an example, the following process is included.
[0724] 1. Port A sends a Sync message to port B.
[0725] 2. Port A sends a Follow_Up message to port B.
[0726] Among them, step 1 and step 2 can refer to the implementation methods shown in Figures 4a and 4b above.
[0727] 3. Port B sends a Delay_Req message to port A.
[0728] 4. Port A sends a Delay_Resp message to port B.
[0729] Compared to the implementation process shown in Figure 4b, in the process shown in Figure 8b, when port B can send a Delay_Req message, the Delay_Req message can carry the reception timestamp (t3pre) of the previous Delay_Req message sent by port A. For example, the originTimestamp field (unit: 1ns) of the Delay_Req message carries / carries the ns portion of the t3pre timestamp (abbreviated as t3pre_ns). The implementation of the originTimestamp field can refer to Table 15 and the related implementation process above.
[0730] In addition, for port A, based on the content shown in Table 15, port A can calculate the one-way link delay.
[0731] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A = t4pre – originTimestamp of Delay_Req = t4pre – t3pre_ns = t4 – t3 + t3pre_fns ≈ t4pre – t3pre.
[0732] In the above implementation, since t3pre_fns is less than 1ns, the calculation accuracy of the unidirectional link delay is reduced by at most 1ns, which can still meet the high-precision delay measurement requirements. As an application example of Example 7, as shown in Figure 8c, taking the first port of the first node as port A and the second port of the second node as port B as an example, the following process is included.
[0733] 1. Port A sends a Sync message to port B.
[0734] 2. Port A sends a Follow_Up message to port B.
[0735] Among them, step 1 and step 2 can refer to the implementation methods shown in Figures 4a and 4b above.
[0736] 3. Port B sends a Delay_Req message to port A.
[0737] 4. Port A sends a Delay_Resp message to port B.
[0738] Compared to the implementation process shown in Figure 4b, in the process shown in Figure 8c, when port B can send a Delay_Req message, the Delay_Req message can carry the reception timestamp (t3pre), including t3pre_ns and t3pre_fns, of the previous Delay_Req message sent by port A. For example, t3pre_ns is carried / contained by the originTimestamp field of the Delay_Resp message, and t3pre_fns is carried / contained by the originTimestampFractionalNS field. The implementation of these two fields can refer to any of Tables 16 to 18 above and the related implementation processes.
[0739] In addition, for port A, based on the contents shown in any one of Tables 16 to 18, port A can calculate the one-way link delay.
[0740] For example, the unidirectional link delay Delay_B_to_A from port B to port A satisfies: Delay_B_to_A=t4pre–originTimestamp of Delay_Req–originTimestampFractionalNS of Delay_Req=t4–t3pre_ns–t3pre_fns=t4pre–t3pre.
[0741] Optionally, similarly, since the improvements in Figures 8b and 8c above are both fields carried in the Delay_Req message, in order to distinguish between the two, indication information (such as the second indication information or the third indication information) can be carried in the Delay_Req message to indicate whether the Delay_Req message sent by port A adopts the one-step mode or the two-step mode (or indicates whether the timestamp information carried by the Delay_Req message sent by port A is t3 or t3pre). Exemplarily, the twoStepFlag bit in the Delay_Req message Header can be used to indicate. Currently, the twoStepFlag is only meaningful for Sync messages and Pdelay_Resp messages, and can be expanded to add Delay_Req messages. For example, 0 represents one-step (or 0 represents the timestamp information carried by the Delay_Req message is t3), and 1 represents two-step (or 1 represents the timestamp information carried by the Delay_Req message is t3pre). In order to be compatible with Figure 4a (the value carried by originTimestamp is 0), an indication information can be carried in the message (e.g., Delay_Req message) to indicate whether a timestamp is carried. This indication information is recorded as the first indication information described above. Exemplarily, in order to be compatible with Figure 4a above, 1 bit can be used to indicate whether the originTimestamp field of Delay_Req carries a timestamp. For example, the flagField bit in the header of the Delay_Req message can be used to indicate whether the originTimestamp field carries a timestamp. 0 represents that the originTimestamp does not carry a timestamp, and 1 represents that the originTimestamp carries a timestamp. That is, the first indication information can be carried in the flagField bit in the header of the Delay_Req message, 0 byte, 7 bit.
[0742] Please refer to Figure 9a, which is another schematic diagram of the communication method provided by this application, which includes the following steps: The method includes at least step S901 and step S902 shown in Figure 9a.
[0743] S901. The second node sends a first message. Correspondingly, the first node receives the first message, where the first message is used for a delay request.
[0744] S902. The first node sends a second message. Correspondingly, the second node receives the second message. The first message is used for delay response.
[0745] S903. The first node sends a fourth message, and the second node receives the fourth message accordingly. The fourth message is a follow-up message to the second message. The fourth message carries a reception timestamp of the first message and / or a transmission timestamp of the second message. The first message is used for a delay request.
[0746] It should be understood that in the method shown in FIG9a, the first node may be a P2P node and / or the first port may be a P2P port; accordingly, the first message for the delay request may be a Pdelay_Req message defined by PTP, the second message may be a Pdelay_Resp message, and the fourth message may be a Pdelay_Resp_Follow_Up message. Optionally, as the PTP standard evolves, the first message may also have other message names, which are not limited here.
[0747] Based on the technical solution shown in Figure 9a, after the first node sends the fourth message to the second node through the first port, the second node, as the recipient of the fourth message, can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message through the fourth message. In other words, the recipient of the fourth message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message) through the delay response follow-up message, the recipient of the delay response follow-up message can obtain the above-mentioned reception timestamp and / or transmission timestamp, thereby enabling the recipient of the delay response follow-up message to obtain the time information of the first node.
[0748] It should be noted that in the method shown in FIG9a , in addition to the fourth message transmitted in step S903 carrying a timestamp, other messages transmitted between the first node and the second node (e.g., the first message, the second message, the fifth message, etc.) may also carry a timestamp. In other words, the methods of carrying timestamps in two or more messages may be combined.
[0749] For example, in the method shown in FIG9a, the second message sent by the first node in step S902 may also carry a timestamp. For specific implementation, reference may be made to FIG6a and its possible implementation methods (such as the implementation process shown in FIG6b / 6c / 6d).
[0750] For example, in the method shown in Figure 9a, the first message sent by the second node in step S901 may also carry a timestamp. For specific implementation, please refer to Figure 6a above and its possible implementation methods (such as the implementation process shown in Figure 6g / 6h).
[0751] For another example, in the method shown in FIG9a , after the second node sends the first message in step S901, the second node may also send a fifth message. The fifth message may be a follow-up message to the first message. Furthermore, the fifth message may carry the sending timestamp of the first message. For specific implementation, please refer to the implementation method described above.
[0752] In one possible implementation, the reception timestamp of the first message and / or the transmission timestamp of the second message are used to determine the one-way link delay between the first port and the second port. For the receiver of the fourth message, the fourth message can be received through the second port, and thereafter, the receiver (i.e., the second node) can determine the one-way link delay between the first port and the second port based on the timestamp carried by the fourth message and the timestamp of its own sending / receiving message. In this way, compared to the method of carrying a timestamp difference through the message and then only determining the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried by the message, so as to meet the determination requirements of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0753] Optionally, the fourth message further carries fourth indication information, where the fourth indication information is used to indicate that the fourth message carries the sending timestamp of the second message. Specifically, the fourth message may further carry the fourth indication information, so that a receiver of the fourth message can determine, based on the fourth indication information, that the fourth message carries the sending timestamp of the second message, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0754] In one possible implementation, the second message's sending timestamp is carried in the seventh field, or in both the seventh and eighth fields; the seventh field has a value precision of 1 ns, and the eighth field has a value precision of less than 1 ns. Specifically, the second message can carry the second message's sending timestamp using the aforementioned multiple methods, thereby meeting different accuracy requirements.
[0755] Optionally, the seventh field is a responseOriginTimestamp field. Specifically, when the first port is a two-step PTP port, the field used to carry the send timestamp of the second message can be a responseOriginTimestamp field defined by PTP. In this way, the fields defined by PTP can be reused to reduce message overhead.
[0756] As shown in Figure 5b above, the two-step mode of the P2P mechanism has problem 4. Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message (as well as the receiver of the Pdelay_Resp_Follow_Up message), cannot determine the values of t2 and t3 because the information obtained by Port A is the difference between t3 and t2. This also makes it impossible for Port A to measure the one-way delay.
[0757] In the above technical solution, the second port in the second node can serve as the receiver of the Pdelay_Resp_Follow_Up message, and after the second node receives the fourth message in step S903, the second node can obtain the sending timestamp of the second message based on the fourth message, so that the first node can determine the unidirectional link delay between the first port and the second port based on the sending timestamp of the second message to solve problem 4.
[0758] It should be noted that, for the implementation of the fourth message sent by the first node in step S903, reference may be made to FIG. 6a and its possible implementations (eg, the implementation process shown in FIG. 6i / 6j).
[0759] Please refer to Figure 9b, which is another schematic diagram of the communication method provided by this application, which includes the following steps: The method at least includes step S1001 and step S1002 shown in Figure 9b.
[0760] S1001. The second node sends a first message. Correspondingly, the first node receives the first message, where the first message is used for a delay request.
[0761] S1002: The second node sends a fifth message, and the first node receives the fifth message accordingly. The fifth message is a follow-up message of the first message, and carries the sending timestamp of the first message.
[0762] It should be understood that in the method shown in Figure 9b, the second node can be a P2P or E2E node, and / or the second port can be a P2P or E2E port (for example, the second port can be a PTP port supporting two-step). Accordingly, the first message for the delay request can be a point-to-point delay request (Pdelay_Req) message or a delay request (Delay_Req) message defined by PTP, and the following message of the first message (i.e., the fifth message) can be a point-to-point delay request follow (Pdelay_Req_Follow_Up) message or a delay request follow (Delay_Req_Follow_Up) message. Optionally, as the PTP standard evolves, the first message and the second message can also be other message names, which are not limited here.
[0763] Based on the technical solution shown in Figure 9b, after the first node receives the first message for the delay request through the first port in step S1001, the first node can also receive a fifth message through the first port in step S1002, and the fifth message carries the sending timestamp of the first message. The fifth message is a follow-up message of the first message. In other words, the recipient of the fifth message can obtain the sending timestamp of the first message. Thus, by carrying the receiving timestamp of the delay request message (and / or the sending timestamp of the delay response message) in the follow-up message of the delay request message, the first node can obtain the above-mentioned sending timestamp, and thus the first node can obtain the time information of the second node.
[0764] In a possible implementation, in the method shown in FIG9b, the method further includes: the first node determines the unidirectional link delay between the first port and the second port based on the sending timestamp of the first message, and the second port is the port through which the second node sends the fifth message. Specifically, the first node acts as the receiver of the fifth message, and the first node can determine the unidirectional link delay between the first port and the second port based on the timestamp carried by the fifth message and the timestamp of its own received message. In this way, compared to a method that does not carry any time information, the message receiver can determine the unidirectional link delay based on the timestamp carried by the message, so as to meet the requirements for determining the unidirectional link delay in a link asymmetric scenario and improve the accuracy of clock synchronization.
[0765] Optionally, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the sending timestamp of the first message. Specifically, the fifth message may further carry the fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine that the fifth message carries the sending timestamp of the first message based on the fifth indication information, thereby enabling the receiver to clearly understand the meaning of the field carrying the timestamp to avoid parsing errors.
[0766] In one possible implementation, the sending timestamp of the second message is carried in the ninth field, or in both the ninth and tenth fields; wherein the value of the ninth field has an accuracy of 1 nanosecond (ns), and the value of the tenth field has an accuracy of less than 1 ns. Specifically, the fifth message can carry the sending timestamp of the first message using the aforementioned multiple methods, thereby meeting different accuracy requirements.
[0767] Optionally, the ninth field is the preciseOriginTimestamp field of the fifth message, and the tenth field is the correctionField field of the fifth message.
[0768] It should be noted that in the method shown in FIG9a , in addition to the fourth message transmitted in step S903 carrying a timestamp, other messages transmitted between the first node and the second node (e.g., the first message, the second message, the fourth message, etc.) may also carry a timestamp. In other words, the methods of carrying timestamps in two or more messages may be combined.
[0769] For example, in the method shown in FIG9b, the second message sent by the first node in step S902 may also carry a timestamp. For specific implementation, reference may be made to FIG6a and its possible implementation methods (such as the implementation process shown in FIG6b / 6c / 6d).
[0770] For example, in the method shown in Figure 9b, the first message sent by the second node in step S901 may also carry a timestamp. For specific implementation, please refer to Figure 6a above and its possible implementation methods (such as the implementation process shown in Figure 6g / 6h).
[0771] For example, in the method shown in Figure 7b, when the first message can be a Pdelay_Req message, the first node can also send a second message and a fourth message after step S902 (the fourth message is a follow-up message of the second message, for example, the second message is a Pdelay_Resp message, and the second message is a Pdelay_Resp_Follow_Up message), and the fourth message can also carry a timestamp. For specific implementation, please refer to Figure 6a above and its possible implementation methods (for example, the implementation process shown in Figure 6i / 6j).
[0772] Please refer to Figure 10, which is a schematic diagram of a communication device provided in this application. This communication device can be used to implement the functions of the communication device (i.e., the first node, the second node, etc.) in the above-mentioned method embodiments, thereby also achieving the beneficial effects of the above-mentioned method embodiments. The communication device can be a router, a PTN device, an OTN device, etc.
[0773] As shown in Figure 10, the communication device may include a 1588 message processing module and one or more circuit boards. The ports on the circuit boards and the message receiving and sending module are responsible for sending and receiving 1588 messages (e.g., 1588v2 messages). The 1588 message processing module is used to modify received 1588v2 messages, adding or modifying certain fields, before sending them. In other words, the 1588 message processing module and one or more circuit boards are used to implement the above-mentioned message reception, processing, and transmission processes.
[0774] Optionally, in FIG10 , the 1588 message processing module may be located on a main control board or a circuit board.
[0775] Please refer to Figure 11. An embodiment of the present application provides a communication device. The communication device 1100 can implement the functions of the communication device (i.e., the first node, the second node, etc.) in the above method embodiment, and thus can also achieve the beneficial effects of the above method embodiment.
[0776] When the communication device 1100 is used to implement the function of the aforementioned first node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a first message from the second node through the first port, and the first message is used for a delay request; the processing unit 1102 is used to generate a second message; the transceiver unit 1101 is also used to send a second message to the second node through the first port, and the second message is used for a delay response, and the second message carries the reception timestamp of the first message and / or the sending timestamp of the second message.
[0777] When the communication device 1100 is used to implement the function of the aforementioned second node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a second message from the first node through the second port, and the second message is used for delay response; the processing unit 1102 is used to obtain a receiving timestamp of the first message through the second message, and the first message is used for delay request.
[0778] When the communication device 1100 is used to implement the function of the aforementioned first node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a first message from the second node through the first port, and the first message is used for a delay request; the processing unit 1102 is used to obtain a sending timestamp of the first message through the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0779] When the communication device 1100 is used to implement the function of the aforementioned second node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the processing unit 1102 is used to generate a first message; the transceiver unit 1101 is used to send a first message through the second port, the first message is used for a delay request, and the first message carries a sending timestamp of the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0780] When the communication device 1100 is used to implement the function of the aforementioned first node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a first message from the second node through the first port, and the first message is used for a delay request; the processing unit 1102 is used to obtain a sending timestamp of a third message through the first message, and the third message is a previously transmitted message of the same type as the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0781] When the communication device 1100 is used to implement the function of the aforementioned second node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the processing unit 1102 is used to generate a first message; the transceiver unit 1101 is used to send a first message through the second port, the first message is used for a delay request, the first message carries the sending timestamp of a third message, and the third message is a previously transmitted message of the same type as the first message; wherein the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0782] When the communication device 1100 is used to implement the function of the aforementioned first node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a first message from the second node through the first port, and the first message is used for a delay request; the processing unit 1102 is used to generate a second message and a fourth message; the transceiver unit 1101 is also used to send a second message to the second node through the first port, and the second message is used for a delay response; the transceiver unit 1101 is also used to send a fourth message to the second node through the first port, and the fourth message is a follow-up message of the second message; wherein the fourth message carries the reception timestamp of the first message and / or the sending timestamp of the second message.
[0783] When the communication device 1100 is used to implement the function of the aforementioned second node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a fourth message from the first node through the second port, and the fourth message is a follow-up message of the second message, and the second message is used for delayed response; the processing unit 1102 is used to obtain the reception timestamp of the first message and / or the sending timestamp of the second message through the fourth message.
[0784] When the communication device 1100 is used to implement the function of the aforementioned first node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the transceiver unit 1101 is used to receive a first message from the second node through the first port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for a delay request; the transceiver unit 1101 is also used to receive a fifth message from the second node through the first port; the processing unit 1102 is used to obtain a sending timestamp of the first message based on the fifth message, where the fifth message is a follow-up message of the first message.
[0785] When the communication device 1100 is used to implement the function of the aforementioned second node, the communication device includes a transceiver unit 1101 and a processing unit 1102; the processing unit 1102 is used to determine a first message and a fifth message; the transceiver unit 1101 is used to send a first message to the first node through the second port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for a delay request; the transceiver unit 1101 is also used to send a fifth message to the first node through the second port, where the fifth message carries a sending timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0786] It should be noted that, for details on the information execution process of each unit of the above-mentioned communication device 1100, please refer to the description in the method embodiment shown above in this application, and no further details will be given here.
[0787] Please refer to Figure 12. An embodiment of the present application provides a communication device. The communication device 1200 can implement the functions of the communication device...
Claims
1. A communication method, characterized in that, Applied to a first node, the first node includes a first port, and the first port is a Precision Time Protocol (PTP) port supporting one-step or a PTP port supporting two-step mode A; the method includes: Receiving, through the first port, a first message from a second node, where the first message is a point-to-point delay request (Pdelay_Req) message and is used for delay request; Sending, through the first port, a second message to the second node, where the second message is a point-to-point delay response (Pdelay_Resp) message and is used for delay response, and the second message carries the reception timestamp of the first message.
2. The method according to claim 1, wherein: The reception timestamp of the first message is used to determine the one-way link delay between the first port and a second port, and the second port is the port of the second node for receiving the second message.
3. The method according to claim 1 or 2, wherein: The reception timestamp of the first message is carried in a first field, or the reception timestamp of the first message is carried in the first field and a second field; wherein, the precision of the value of the first field is 1 nanosecond (ns), and the precision of the value of the second field is less than 1 ns.
4. The method according to claim 3, wherein: When the first port is a PTP port supporting one-step, the first field is the requestReceiptTimestamp field; Or, When the first port is a PTP port supporting two-step mode A, the first field is the requestReceiptTimestamp field, and the second field is the correctionField field.
5. The method according to any one of claims 1 to 4, characterized in that, The second message further carries first indication information, and the first indication information is used to indicate that the second message carries the reception timestamp of the first message.
6. The method according to any one of claims 1 to 5, wherein: When the second port is a PTP port supporting one-step, the first message carries the transmission timestamp of the first message, and the method further includes: Determining the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, where the second port is the port of the second node for sending the first message.
7. The method according to any one of claims 1 to 5, wherein: When the second port is a PTP port supporting two-step, the first message carries the transmission timestamp of a third message, and the third message is the previous transmitted message of the same type as the first message, and the method further includes: Determining the one-way link delay between the first port and the second port based on the transmission timestamp of the third message, where the second port is the port of the second node for sending the first message.
8. The method according to any one of claims 1 to 7, wherein: When the first port is a PTP port supporting mode A of two-step, the method further includes: Sending a fourth message to the second node through the first port, where the fourth message is a follow-up message of the second message, the third message is a point-to-point delay response follow-up Pdelay_Resp_Follow_Up message, and the fourth message carries the transmission timestamp of the second message.
9. The method according to claim 8, wherein: The transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port, and the second port is the port of the second node for receiving the second message.
10. The method according to any one of claims 1 to 9, characterized in that, The method further includes: Receiving a fifth message from the second node through the first port, where the fifth message carries the transmission timestamp of the first message and the fifth message is a follow-up message of the first message; Determining the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, where the second port is the port of the second node for sending the fifth message.
11. A communication method, characterized in that, Applied to a second node, the second node includes a second port, and the second port is a Precision Time Protocol (PTP) port; the method includes: Receiving a second message from the first node through the second port, where the second message is a point-to-point delay response Pdelay_Resp message and is used for delay response, the second message carries the reception timestamp of the first message, the first message is a point-to-point delay request Pdelay_Req message and is used for delay request, the first message is a message sent by the second node to the first node, and the reception timestamp of the first message is the timestamp when the first node receives the first message; Determining the one-way link delay between the first port and the second port based on the reception timestamp of the first message, where the first port is the port of the first node for sending the second message.
12. The method according to claim 11, wherein: The reception timestamp of the first message is carried in the first field, or the reception timestamp of the first message is carried in the first field and the second field; wherein, the precision of the value of the first field is 1 nanosecond (ns), and the precision of the value of the second field is less than 1 ns.
13. The method according to claim 12, wherein: When the first port is a PTP port supporting one-step, the first field is the requestReceiptTimestamp field; Or, When the first port is a PTP port supporting mode A of two-step, the first field is the requestReceiptTimestamp field, and the second field is the correctionField field.
14. The method according to any one of claims 11 to 13, characterized in that The second message further carries first indication information, and the first indication information is used to indicate that the second message carries the reception timestamp of the first message.
15. The method according to any one of claims 11 to 14, characterized in that when the second port is a PTP port supporting one-step, the first message carries the transmission timestamp of the first message.
16. The method according to claim 15, characterized in that the transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port.
17. The method according to any one of claims 11 to 14, characterized in that when the second port is a PTP port supporting two-step, the first message carries the transmission timestamp of a third message, and the third message is the previous message of the same type as the first message transmitted.
18. The method according to claim 17, characterized in that the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
19. The method according to any one of claims 11 to 18, characterized in that The method further includes: receiving, through the second port, a fourth message from the first node, where the fourth message is a follow-up message of the second message, the fourth message is a point-to-point delay response follow-up Pdelay_Resp_Follow_Up message, and the fourth message carries the transmission timestamp of the second message; determining the one-way link delay between the first port and the second port based on the transmission timestamp of the second message, where the second port is the port of the second node for receiving the second message.
20. The method according to any one of claims 11 to 14, 17 to 19, characterized in that, When the second port is a PTP port supporting two-step, the method further includes: sending, through the second port, a fifth message to the first node, where the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
21. The method according to claim 20, wherein The transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port, where the first port is the port of the first node for receiving the fifth message.
22. A communication method, characterized in that, Applied to a first node, the first node includes a first port, and the first port is a PTP port. The method includes: receiving, through the first port, a first message from a second node, where the first message is for delay request, and the first message carries the transmission timestamp of the first message; wherein, the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message; determining the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, where the second port is the port of the second node for sending the first message.
23. The method according to claim 22, characterized in that the transmission timestamp of the first message is carried in a third field, or the transmission timestamp of the first message is carried in the third field and a fourth field; wherein, the accuracy of the value of the third field is 1 nanosecond (ns), and the accuracy of the value of the fourth field is less than 1 ns.
24. The method according to claim 23, characterized in that The third field is the original timestamp originTimestamp field.
25. The method according to any one of claims 22 to 24, characterized in that The first message further carries second indication information, where the second indication information is used to indicate that the first message carries the transmission timestamp of the first message.
26. The method according to any one of claims 22 to 25, characterized in that, The first port is a PTP port that supports one-step, and the method further includes: When the first message is a point-to-point delay request Pdelay_Req message, a second message is sent to the second node through the first port, where the second message is a point-to-point delay response Pdelay_Resp message and is used for delay response, and the second message carries the reception timestamp of the first message.
27. A communication method, characterized in that, Applied to a second node, the second node includes a second port, where the second port is a PTP port that supports one-step, and the method includes: Sending a first message to a first node through the second port, where the first message is used for delay request, and the first message carries the transmission timestamp of the first message; where the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
28. The method according to claim 27, wherein: The transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port, and the first port is the port of the first node for receiving the first message.
29. The method according to claim 27 or 28, wherein: The transmission timestamp of the first message is carried in the third field, or the transmission timestamp of the first message is carried in the third field and the fourth field; where the accuracy of the value of the third field is 1 nanosecond (ns), and the accuracy of the value of the fourth field is less than 1 ns.
30. The method according to claim 29, wherein: The third field is the original timestamp originTimestamp field.
31. The method according to any one of claims 27 to 30, characterized in that, The first message further carries second indication information, where the second indication information is used to indicate that the first message carries the transmission timestamp of the first message.
32. The method according to any one of claims 27 to 31, characterized in that, The method further includes: Receiving a second message from the first node through the second port, where the second message is a point-to-point delay response Pdelay_Resp message and is used for delay response, the second message carries the reception timestamp of the first message, the first message is the message sent by the second node to the first node, and the reception timestamp of the first message is the time when the first node receives the first message; Determining the one-way link delay between the first port and the second port based on the reception timestamp of the first message, where the first port is the port of the first node for receiving the first message.
33. A communication method, characterized in that, Applied to a first node, the first node includes a first port, where the first port is a PTP port, and the method includes: Receive a first message from a second node through the first port, where the first message is for latency request and carries the transmission timestamp of a third message; wherein the first message is a point-to-point latency request Pdelay_Req message, or the first message is a latency request Delay_Req message, and the third message is the previous transmitted message of the same type as the first message. Determine the one-way link latency between the first port and the second port based on the transmission timestamp of the third message, where the second port is the port through which the second node sends the first message.
34. The method according to claim 33, wherein: The transmission timestamp of the third message is carried in the fifth field, or the transmission timestamp of the third message is carried in the fifth field and the sixth field; wherein the precision of the value of the fifth field is 1 nanosecond (ns), and the precision of the value of the sixth field is less than 1 ns.
35. The method according to claim 34, wherein: The fifth field is the originTimestamp field.
36. The method according to any one of claims 33 to 35, characterized in that The first message further carries third indication information for indicating that the first message carries the transmission timestamp of the third message.
37. The method according to any one of claims 33 to 36, characterized in that, The first port is a PTP port supporting one-step, or the first port is a PTP port supporting two-step mode A. The method further includes: When the first message is a point-to-point latency request Pdelay_Req message, send a second message to the second node through the first port. The second message is a point-to-point latency response Pdelay_Resp message for latency response and carries the reception timestamp of the first message; wherein the second message is a point-to-point latency response Pdelay_Resp message.
38. The method according to any one of claims 33 to 37, characterized in that, The method further includes: When the first port is a PTP port supporting two-step mode A, send a fourth message to the second node through the first port. The fourth message is a follow-up message of the second message and carries the transmission timestamp of the second message.
39. The method according to any one of claims 33 to 38, characterized in that, The method further includes: Receive a fifth message from the second node through the first port. The fifth message carries the transmission timestamp of the first message and is a follow-up message of the first message. Determine the one-way link latency between the first port and the second port based on the transmission timestamp of the first message, where the second port is the port through which the second node sends the fifth message.
40. A communication method, characterized in that, Applied to a second node, the second node includes a second port which is a PTP port supporting two-step. The method includes: Send a first message to the first node through the second port, where the first message is for latency request and carries the transmission timestamp of a third message; wherein, the first message is a point-to-point latency request Pdelay_Req message, or the first message is a latency request Delay_Req message, and the third message is the previous transmitted message of the same type as the first message.
41. The method according to claim 40, wherein The transmission timestamp of the third message is used to determine the one-way link latency between the first port and the second port, and the first port is the port through which the first node receives the first message.
42. The method according to claim 40 or 41, wherein The transmission timestamp of the third message is carried in the fifth field, or the transmission timestamp of the third message is carried in the fifth field and the sixth field; wherein, the precision of the value of the fifth field is 1 nanosecond (ns), and the precision of the value of the sixth field is less than 1 ns.
43. The method according to claim 42, wherein The fifth field is the originTimestamp field.
44. The method according to any one of claims 40 to 43, characterized in that, The first message further carries third indication information, which is used to indicate that the first message carries the transmission timestamp of the third message.
45. The method according to any one of claims 40 to 44, characterized in that, The method further includes: Receiving a second message from the first node through the second port, where the second message carries the reception timestamp of the first message; wherein, the second message is a point-to-point latency response Pdelay_Resp message. Determine the one-way link latency between the first port and the second port based on the reception timestamp of the first message, where the first port is the port through which the first node sends the second message.
46. The method according to any one of claims 40 to 45, characterized in that, The method further includes: Receiving a fourth message from the first node through the second port, where the fourth message is a follow-up message of the second message, the second message is a point-to-point latency response Pdelay_Resp message, the fourth message is a point-to-point latency response follow-up Pdelay_Resp_Follow_Up message, and the fourth message carries the transmission timestamp of the second message. Determine the one-way link latency between the first port and the second port based on the transmission timestamp of the second message, where the first port is the port through which the first node receives the first message.
47. The method according to any one of claims 40 to 46, characterized in that, The method further includes: Sending a fifth message to the first node through the second port, where the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
48. The method according to claim 47, characterized in that, The transmission timestamp of the first message is used to determine the one-way link latency between the first port and the second port, and the first port is the port through which the first node receives the fifth message.
49. A communication method, characterized in that, Applied to a first node, the first node includes a first port, and the first port is a PTP port that supports mode A of two-step, and the method includes: Receive a first message from a second node through the first port, where the first message is a point-to-point delay request Pdelay_Req message and is used for delay request; Send a second message to the second node through the first port, where the second message is a point-to-point delay response Pdelay_Resp message and is used for delay response; Send a fourth message to the second node through the first port, where the fourth message is a point-to-point delay response follow-up Pdelay_Resp_Follow_Up message; wherein, the fourth message carries the transmission timestamp of the second message.
50. A communication method, characterized in that, Applied to a second node, the second node includes a second port, and the second port is a PTP port. The method includes: Receive a fourth message from a first node through the second port, where the fourth message is a point-to-point delay response follow-up Pdelay_Resp_Follow_Up message and is a follow-up message of the second message, and the second message is a point-to-point delay response Pdelay_Resp message and is used for delay response; wherein, the fourth message carries the transmission timestamp of the second message; Determine the one-way link delay between the first port and the second port based on the transmission timestamp of the second message, where the first port is the port through which the first node sends the fourth message.
51. A communication method, characterized in that, Applied to a first node, the first node includes a first port, and the first port is a PTP port. The method includes: Receive a first message from a second node through the first port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for delay request; Receive a fifth message from a second node through the first port, where the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message; Determine the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, where the second port is the port through which the second node sends the fifth message.
52. A communication method, characterized in that, Applied to a second node, the second node includes a second port, and the second port is a PTP port supporting two-step. The method includes: Send a first message to a first node through the second port, where the first message is a point-to-point delay request Pdelay_Req message or the first message is a delay request Delay_Req message, and the first message is used for delay request; Send a fifth message to a first node through the second port, where the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
53. A communication system, characterized in that, Includes a first node and a second node; The first node is used to execute the method according to any one of claims 1 to 10, and the first node is used to execute the method according to any one of claims 11 to 21; or, The first node is configured to execute the method according to any one of claims 22 to 26, and the first node is configured to execute the method according to any one of claims 27 to 32; or, The first node is configured to execute the method according to any one of claims 33 to 39, and the first node is configured to execute the method according to any one of claims 40 to 48; or, The first node is configured to execute the method according to claim 49, and the first node is configured to execute the method according to claim 50; or, The first node is configured to execute the method according to claim 51, and the first node is configured to execute the method according to claim 52.
54. A communication device, characterized in that, comprising at least one processor; The at least one processor is configured to execute the method according to any one of claims 1 to 52.
55. The communication device according to claim 54, wherein The communication device is a chip or a chip system.
56. A computer program product, characterized in that, The computer program product stores instructions that, when executed by a processor, implement the method according to any one of claims 1 to 52.
Citation Information
Patent Citations
LMP (Link Manager Protocol)-based network link delay measurement method and device
CN102655463A
Time difference calculation method and forwarding equipment
CN108599887A
Method for realizing network node time synchronization based on FPGA (Field Programmable Gate Array)
CN114884605A
Symmetric path / link over LAG interface using LLDP for time synchronization between two nodes using ptp
US20190356403A1