Communication method and related equipment
By transmitting packets carrying timestamps in the PTP system, the accuracy of time information transmission in the PTP system is solved, and high-precision clock synchronization is achieved.
Patent Information
- Application Number
- CN202410094568.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-22
- Publication Date
- 2025-07-22
AI Technical Summary
In PTP system, how to achieve high-precision transmission of time information to ensure the accuracy of network clock synchronization.
By carrying timestamps in messages transmitted by different nodes, time information transmission in the PTP system is realized, including receiving and sending specific types of messages, to determine the unidirectional link delay and improve the accuracy of clock synchronization.
Effectively determine the one-way link delay, improves the accuracy of clock synchronization in the PTP system, and meets the needs of link asymmetry scenarios.
Smart Images

Figure CN120357987A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communications, and in particular, to a communication method and related devices. Background Art
[0002] In a communication network, the normal operation of most telecommunication services requires that the frequency or time difference between network devices be maintained within a reasonable error level, that is, network clock synchronization. The Precision Time Protocol (PTP) is a time protocol for network measurement and control systems, which can achieve a high network time synchronization accuracy and realize high-precision time synchronization. Generally, a system running PTP can be called a PTP system or a PTP network, and the nodes in the PTP system can be called clock nodes.
[0003] However, in a PTP system, how to transmit time information is a technical problem to be solved urgently. Summary of the Invention
[0004] This application provides a communication method and related devices, which are used to realize the transmission of time information in a PTP system by carrying timestamps in the packets transmitted between different nodes.
[0005] In a first aspect of this application, a communication method is provided. This method is executed by a first node, or by some components (such as a processor, a chip, or a chip system, etc.) in the first node, or this 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 manners, taking the case where this method is executed by the first node as an example for description, 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 packet transport network (PTN) device, or an optical transport network (OTN) device.
[0006] Among them, the first node includes a first port, and the first port is a PTP port supporting one-step, or the first port is a PTP port of mode A supporting two-step. In this method, the first node receives a first packet from a second node through the first port, and the first packet is used for delay request; the first node sends a second packet to the second node through the first port, and the second packet is used for delay response, and the second packet carries the reception timestamp of the first packet and / or the transmission timestamp of the second packet.
[0007] 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 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 means of the delay response message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the recipient of the delay response message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further the recipient of the delay response message can obtain the time information of the first node.
[0008] 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. Correspondingly, 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 response (Pdelay_Resp) message defined by PTP. Optionally, with the evolution of the PTP standard, the first message and the second message can also be other message names, which are not limited herein.
[0009] In this application, a message carrying a timestamp can be understood as that the value of one or more fields carried by the message is the timestamp (or the opposite number of the timestamp), or the timestamp (or the opposite number of the timestamp) is carried by one or more fields carried by the message. For example, the second message carrying the reception timestamp of the first message can be understood as that the value of one or more fields in the second message is the reception timestamp of the first message, or the reception timestamp of the first message is 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).
[0010] 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.
[0011] Optionally, in this application, the timestamp carried by the message (such as the reception timestamp or the transmission timestamp) can be the actual transmission timestamp or the actual reception timestamp of the message by the port. Compared with the way of carrying the estimated value of the timestamp, the actual transmission moment or the actual reception moment of the message can be reflected by the timestamp carried by the message, so as to improve the accuracy of clock synchronization or delay measurement.
[0012] 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 one-way link delay between the first port and the second port, where the second port is the port that receives the second message.
[0013] Based on the above technical solution, for the receiver of the second message, the second message can be received through the second port. After that, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried in the second message and the timestamp of its own message transmission / reception. In this way, compared with the method without carrying any time information, the message receiver can determine the one-way link delay based on the timestamp carried in 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.
[0014] In this application, the one-way link delay between one port and another port may include the one-way link delay in the communication direction from the one port to the another port, and / or the one-way link delay in the communication direction from the another port to the one port (i.e., the reverse link delay in the communication direction from the one port to the another port). For example, the one-way link delay between the first port and the second port may include the one-way link delay in the communication direction from the first port to the second port, and / or the one-way link delay in the communication direction from the second port to the first port (i.e., the reverse link delay in the communication direction from the first port to the second port).
[0015] Optionally, the one-way link delay can be replaced by other terms, such as one-way delay, one-way transmission delay, or the one-way delay of the link, etc.
[0016] In this application, for the receiver of the message carrying the timestamp, in addition to determining the one-way link delay based on the timestamp carried in the message, the receiver can also determine other information based on the timestamp carried in the message. For example, the receiver of the second message can determine whether the first node fails based on the timestamp. During the process of the second node sending the first message to the first node, the sending time (e.g., t1) of the second node sending the first message must be earlier than the receiving time (e.g., t2) of the first node receiving the first message. Therefore, in the case where the second message carries the reception timestamp (t2) of the first message, if the time indicated by the reception timestamp (e.g., t2) is before the time indicated by the transmission timestamp (e.g., t1) of the second node sending the first message, the receiver can determine that the first node fails. Or, if the time indicated by the reception timestamp (e.g., t2) is before the time indicated by the reception timestamp (e.g., t2pre) of the previous first message, the receiver can confirm that the first node fails.
[0017] In a possible implementation of the first aspect, 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 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 1 ns.
[0018] Based on the above technical solution, the second message can carry the reception timestamp of the first message in the above-mentioned multiple ways. In this way, different accuracy requirements can be met.
[0019] In this application, there are various implementations for an accuracy less than 1 ns. For example, the accuracy is 1 / 2 16 ns, 1 / 2 8 ns, etc., which are not limited here.
[0020] In a possible implementation of the first aspect, the first port is a PTP port supporting one-step, and the first field is the requestReceiptTimestamp field; or the first port is a PTP port in mode A supporting two-step, the first field is the requestReceiptTimestamp field, and the second field is the correctionField field.
[0021] Based on the above technical solution, under different implementation manners of the first port, the field for carrying 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 the overhead of the message.
[0022] Optionally, the first field and / or the second field can be implemented by one or more newly defined fields (such as the fractional part of the nanosecond of the requestReceiptTimestamp) or a newly defined type length value (TLV) to improve the flexibility of the scheme implementation. For example, the name of the second field can be the fractional part of the nanosecond of the requestReceiptTimestamp, or other names.
[0023] In a possible implementation of the first aspect, 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.
[0024] Based on the above technical solution, the second message may further carry first indication information, so that the receiver of the second message can determine the reception timestamp of the first message carried by the second message based on the first indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0025] In a possible implementation manner of the first aspect, the second port is a PTP port supporting one-step, and the first message carries the transmission timestamp of the first message.
[0026] Based on the above technical solution, when the second port is a PTP port supporting one-step, the first message received by the first node through the first port may further carry the transmission timestamp of the first message. In this way, the first node can obtain the time information of other nodes (such as the second node sending the first message).
[0027] In a possible implementation manner of the first aspect, the transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port.
[0028] Based on the above technical solution, the first node is the receiver of the first message. 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 its own received message. In this way, compared with the method without carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0029] In a possible implementation manner of the first aspect, 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; 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.
[0030] Based on the above technical solution, the first message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0031] In a possible implementation manner of the first aspect, the third field is the originTimestamp field.
[0032] Based on the above technical solution, when the second port is a PTP port supporting one-step, the field for carrying the receive timestamp of the first message can be the originTimestamp field defined by PTP. In this way, the fields already defined by PTP can be reused to reduce the overhead of the message.
[0033] Optionally, the fourth field is originTimestampFractionalNS, or some other name.
[0034] In a possible implementation manner of the first aspect, the first message further carries second indication information, which is used to indicate that the first message carries the transmit timestamp of the first message.
[0035] Based on the above technical solution, the first message can also carry second indication information, enabling the receiving party of the first message (i.e., the first node) to determine, based on the second indication information, that the first message carries the transmit timestamp of the first message, and further enabling the receiving party to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0036] In a possible implementation manner of the first aspect, the second port is a PTP port supporting two-step, and the first message carries the transmit timestamp of a third message, where the third message is the previous message of the same type as the first message that was transmitted.
[0037] Based on the above technical solution, when the second port is a PTP port supporting two-step, the first message received by the first node through the first port can also carry the transmit 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).
[0038] In this application, the previous (previous or pre) transmission can be replaced with other terms, such as the last transmission, the previous transmission, the previous transmission, etc.
[0039] In this application, transmission can be understood as sending or receiving. For example, when the first node is the receiving party of the first message, for the first node, the third message can be the previous received message of the same type as the first message. Another example is that when the second node is the sending party of the first message, for the second node, the third message can be the previous sent message of the same type as the first message.
[0040] In a possible implementation manner of the first aspect, the transmit timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
[0041] Based on the above technical solution, as the receiver of the first message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the first message and the timestamp of the message received by itself. In this way, compared with the method without carrying any time information, the message receiver can determine the one-way link delay based on the timestamp carried in 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.
[0042] In a possible implementation manner of the first aspect, 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 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.
[0043] Based on the above technical solution, the first message can carry the transmission timestamp of the third message in the above multiple ways. In this way, different accuracy requirements can be met.
[0044] In a possible implementation manner of the first aspect, the fifth field is the originTimestamp field.
[0045] Based on the above technical solution, when the second port is a PTP port supporting one-step, the field used to carry the transmission timestamp of the third message can be the originTimestamp field defined by PTP. In this way, the fields already defined by PTP can be reused to reduce the overhead of the message.
[0046] Optionally, the sixth field is originTimestampFractionalNS, or other names.
[0047] In a possible implementation manner of the first aspect, the first message further carries third indication information, and the third indication information is used to indicate that the first message carries the transmission timestamp of the third message.
[0048] 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 transmission timestamp of the third message based on the third indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0049] In a possible implementation of the first aspect, the first port is a PTP port supporting mode A of two-step. The method further includes: the first node sending a fourth message to the second node through the first port, where the fourth message is a following message of the second message, and the fourth message carries the transmission timestamp of the second message.
[0050] Based on the above technical solution, when the first port in the first node is a PTP port supporting mode A of two-step, the first node can also send a fourth message to the second node through the first port, and the fourth message carries the transmission timestamp of the second message. In this way, the recipient of the fourth message can obtain more time information.
[0051] In a possible implementation of the first aspect, the transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port.
[0052] Based on the above technical solution, for the recipient of the fourth message, the fourth message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fourth message and the timestamps of its own sent / received messages. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message recipient can determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0053] It can be understood that both the second message and the fourth message received by the second port can carry timestamps, so that the second node including the second port can determine the one-way link delay through the timestamp carried in the second message and can also determine the one-way link delay through the timestamp carried in the fourth message. This enables the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the scheme implementation and also enable the second node to mutually verify based on different one-way link delays to improve the accuracy of clock synchronization.
[0054] In a possible implementation of the first aspect, the transmission timestamp of the second message is carried in the seventh field, or the transmission timestamp of the second message is carried in the seventh field and the eighth field; where the accuracy of the value of the seventh field is 1 ns, and the accuracy of the value of the eighth field is less than 1 ns.
[0055] Based on the above technical solution, the second message can carry the transmission timestamp of the second message in the above multiple ways. In this way, different accuracy requirements can be met.
[0056] In a possible implementation of the first aspect, the seventh field is a response origin timestamp (responseOriginTimestamp) field.
[0057] Based on the above technical solution, when the first port is a PTP port supporting mode A of two-step, the field for carrying the transmission timestamp of the second message can be the responseOriginTimestamp field defined by PTP. In this way, the fields already defined by PTP can be reused to reduce the overhead of the message.
[0058] Optionally, the eighth field is the fractional part of the response origin timestamp in nanoseconds (responseoriginTimestampFractionalNS), or other names.
[0059] In a possible implementation of the first aspect, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message.
[0060] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the receiving party of the fourth message can determine that the fourth message carries the transmission timestamp of the second message based on the fourth indication information, and further enable the receiving party to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0061] In a possible implementation of the first aspect, the method further includes: the first node receives a fifth message from the second node through the first port, the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0062] Based on the above technical solution, 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 transmission timestamp of the first message. In this way, the receiving node of the fifth message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0063] In a possible implementation of the first aspect, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, and the second port is the port through which the second node sends the fifth message.
[0064] Based on the above technical solution, the first node is the recipient of the fifth message. The first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth message and the timestamp of the message received by itself. In this way, compared with the method without carrying any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0065] In a possible implementation manner of the first aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns.
[0066] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0067] Optionally, in the fifth message, the ninth field and / or the tenth field can be implemented by one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the scheme implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth message, and the tenth field can be the correctionField field of the fifth message.
[0068] In a possible implementation manner of the first aspect, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the transmission timestamp of the first message.
[0069] Based on the above technical solution, the fifth message can also carry fifth indication information, so that the recipient of the fifth message (i.e., the first node) can determine that the fifth message carries the transmission timestamp of the first message based on the fifth indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0070] A second aspect of the present application provides a communication method. This method is executed by the second node, or by some components in the second node (such as a processor, a chip, or a chip system, etc.), or this 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 implementation manners, taking the example that this method is executed by the second node for description, 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, or an OTN device.
[0071] Among them, the second node includes a second port, and the second port 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 is for delay response, and the second message carries the reception timestamp of the first message. The first message is for delay request, and the first message is a message sent by the second node to the first node. The reception timestamp of the first message is the timestamp when the first node receives the first message.
[0072] Based on the above technical solution, after the second node sends the first message for delay request through the second port, the second node can receive the second message for delay response through the second port. Moreover, the second message carries the reception timestamp of the first message and / or the transmission timestamp of the second message. In other words, the receiver of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by means of the delay response message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the second node can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the second node to obtain the time information of the first node.
[0073] 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 is a PTP port of mode A supporting two-step). Correspondingly, the first message for delay request can be a point-to-point delay request (Pdelay_Req) message defined by PTP, and the second message for delay response can be a point-to-point delay request (Pdelay_Resp) message defined by PTP. Optionally, with the evolution of the PTP standard, the first message and the second message can also be other message names, which are not limited here.
[0074] In a possible implementation manner of the second aspect, the method further includes: the second node determines the one-way link delay between the first port and the second port based on the reception timestamp of the first message. The first port is the port through which the first node receives the first message.
[0075] Based on the above technical solution, the reception 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 in the message and only being able to determine the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0076] 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 accuracy of the value of the first field is 1 ns, and the accuracy of the value of the second field is less than 1 ns. The implementation of the first field and the second field may refer to the description in the foregoing first aspect and its possible implementation manners.
[0077] In a possible implementation manner of the second aspect, 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.
[0078] Based on the above technical solution, the second message may further carry first indication information, so that the 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, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0079] In a possible implementation manner of the second aspect, the second port is a PTP port supporting one-step, and the first message carries the transmission timestamp of the first message.
[0080] Based on the above technical solution, when the second port is a PTP port supporting one-step, the first message sent by the second node through the second port may further carry the transmission timestamp of the first message. In this way, the receiving node (such as the first node) of the first message can obtain the time information of other nodes (such as the second node).
[0081] In a possible implementation manner of the second aspect, the transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port.
[0082] Based on the above technical solution, as the receiver of the first message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the first message and the timestamp of its own received message. In this way, compared with the method of not carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0083] Optionally, 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; 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 may refer to the description in the foregoing first aspect and its possible implementation manners.
[0084] In a possible implementation of the second aspect, the first message further carries second indication information, and the second indication information is used to indicate that the first message carries the transmission timestamp of the first message.
[0085] Based on the above technical solution, the first message can also carry second indication information, so that the recipient of the first message (i.e., the first node) can determine based on the second indication information that the first message carries the transmission timestamp of the first message, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0086] In a possible implementation of the second aspect, the second port is a PTP port supporting two-step, and the first message carries the transmission timestamp of a third message, where the third message is the previous message of the same type as the first message transmitted.
[0087] Based on the above technical solution, when the second port is a PTP port supporting two-step, the first message sent by the second node through the second port can also carry the transmission 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).
[0088] In a possible implementation of the second aspect, the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
[0089] Based on the above technical solution, as the recipient of the first message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the first message and the timestamp of its own received message. In this way, compared with the method of not carrying any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried in 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.
[0090] Optionally, 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; where 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. Among them, the implementation of the fifth field and the sixth field can refer to the description in the first aspect and its possible implementation manners above.
[0091] In a possible implementation of the second aspect, the first message further carries third indication information, and the third indication information is used to indicate that the first message carries the transmission timestamp of the third message.
[0092] Based on the above technical solution, the first message may further carry third indication information, enabling the recipient of the first message (i.e., the first node) to determine the transmission timestamp of the third message carried by the first message based on the third indication information, and further enabling the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0093] In a possible implementation of the second aspect, the first port is a PTP port supporting two-step. The method further 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 transmission timestamp of the second message and / or the reception timestamp of the first message.
[0094] Based on the above technical solution, when the first port in the second node is a PTP port supporting two-step, the second node may further receive a fourth message from the first node through the second port, and the fourth message carries the transmission timestamp of the second message and / or the reception timestamp of the first message. In this way, the recipient of the fourth message can obtain more time information.
[0095] In a possible implementation of the second aspect, the transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port.
[0096] Based on the above technical solution, as the recipient of the fourth message, the second node can receive the fourth message through the second port. Thereafter, the recipient 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 transmitted / received message. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message recipient can determine the one-way link delay based on the timestamp carried by the message to meet the requirement of determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0097] It can be understood that both the second message and the fourth message received by the second port can carry timestamps, enabling the second node including the second port to determine the one-way link delay either through the timestamp carried by the second message or through the timestamp carried by the fourth message. This enables the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation and also enable the second node to mutually verify based on different one-way link delays to improve the accuracy of clock synchronization.
[0098] Optionally, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. The implementation of the seventh field and the eighth field can refer to the description in the first aspect and its possible implementation manners above.
[0099] In a possible implementation manner of the second aspect, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message.
[0100] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the receiving party of the fourth message can determine that the fourth message carries the transmission timestamp of the second message based on the fourth indication information, and further enables the receiving party to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0101] In a possible implementation manner of the second aspect, the method further includes: the second node sends a fifth message to the first node through the second port, and the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0102] Based on the above technical solution, 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 transmission timestamp of the first message. In this way, the receiving node of the fifth message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0103] In a possible implementation manner of the second aspect, 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 second port is the port through which the second node sends the fifth message.
[0104] Based on the above technical solution, as the receiving party of the fifth message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message receiving party to determine the one-way link delay based on the timestamp carried in 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.
[0105] In a possible implementation of the second aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns.
[0106] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0107] Optionally, in the fifth message, the ninth field and / or the tenth field can be implemented by one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the solution implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth message, and the tenth field can be the correctionField field of the fifth message.
[0108] In a possible implementation of the second aspect, the fifth message further carries fifth indication information, which is used to indicate that the fifth message carries the transmission timestamp of the first message.
[0109] Based on the above technical solution, the fifth message can also carry the fifth indication information, so that the receiver of the fifth message (i.e., the first node) can determine based on the fifth indication information that the fifth message carries the transmission timestamp of the first message, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0110] The third aspect of this application provides a communication method, which is executed by the first node, or by some components in the first node (such as a processor, a chip, or a chip system, etc.), 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, taking the method being executed by the first node as an example for description, 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, or an OTN device.
[0111] Wherein, the first node includes a first port, and the first port is a PTP port. In this method, the first node receives a first message from the second node through the first port. The first message is used for a 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.
[0112] 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 obtain the transmission timestamp of the first message through the first message. In other words, the first node can obtain the transmission timestamp of the first message. Thus, the recipient of the delay request message can obtain the above-mentioned transmission timestamp, and further enables the recipient of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0113] 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 (such as a port that supports one-step); correspondingly, 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 is an E2E port; correspondingly, the first message for the delay request can be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0114] In a possible implementation manner of the third aspect, the method further includes: the first node determines 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 first message.
[0115] Based on the above technical solution, the transmission 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 that does not carry any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0116] Optionally, 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 ns, and the accuracy of the value of the fourth field is less than 1 ns. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0117] In a possible implementation manner of the third aspect, the first message further carries second indication information, and the second indication information is used to indicate that the first message carries the transmission timestamp of the first message.
[0118] Based on the above technical solution, the first message may further carry second indication information, enabling the recipient of the first message (i.e., the first node) to determine, based on the second indication information, that the first message carries the transmission timestamp of the first message. Furthermore, the recipient can clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0119] In a possible implementation manner 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, where the second message is for delay response and carries the reception timestamp of the first message and / or the transmission timestamp of the second message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0120] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. 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 reception timestamp and / or transmission timestamp, and further enable the recipient of the delay response message to obtain the time information of the first node.
[0121] In a possible implementation manner 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 one-way link delay between the first port and the second port, where the second port is the port that receives the second message.
[0122] Based on the above technical solution, for the recipient of the second message, the second message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the second message and the timestamp of its own message sending / receiving. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message recipient can determine the one-way link delay based on the timestamp carried in the message to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0123] 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 accuracy of the value of the first field is 1 ns, and the accuracy 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 in the first aspect and its possible implementation manners above.
[0124] In a possible implementation of the third aspect, the second message further carries first indication information, which is used to indicate that the second message carries the reception timestamp of the first message.
[0125] Based on the above technical solution, the second message can also carry first indication information, so that the recipient of the second message can determine, based on the first indication information, that the second message carries the reception timestamp of the first message, and further enables the recipient to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0126] A fourth aspect of this application provides a communication method, which is executed by a second node, or by some components in the second node (such as a processor, a chip, or a chip system, etc.), 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, taking the method being executed by the second node as an example for description, 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, or an OTN device.
[0127] Among them, the second node includes a second port, and the second port is a PTP port supporting one-step. In this method, the second node sends a first message through the second port, and the first message is used for delay request, and the first message carries the transmission timestamp of the first message; among them, the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0128] Optionally, the second node can also receive a second message from the first node through the second port, and the second message is used for delay response, and the second message can be a Pdelay_Resp message.
[0129] Based on the above technical solution, after the second node sends a first message for delay request through the second port, the first node, as the recipient of the first message, can obtain the transmission timestamp of the first message through the first message. In other words, the first node can obtain the transmission timestamp of the first message. Thus, the recipient of the delay request message can obtain the above-mentioned transmission timestamp, and further enables the recipient of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0130] It should be understood that in the fourth aspect, the second node can be a P2P node, and / or the second port can be a P2P port; correspondingly, the first message for the delay request can be a Pdelay_Req message defined by PTP. Alternatively, in the fourth aspect, the second node can be an E2E node, or the second port is an E2E port; correspondingly, the first message for the delay request can be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0131] In a possible implementation of the fourth aspect, the transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port.
[0132] 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 transmission timestamp of the first message. In this way, compared with the method without carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0133] Optionally, 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; 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. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0134] In a possible implementation of the fourth aspect, the first message also carries second indication information, and the second indication information is used to indicate that the first message carries the transmission timestamp of the first message.
[0135] 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 transmission timestamp of the first message based on the second indication information, and further enables the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0136] In a possible implementation of the fourth aspect, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries the reception timestamp of the first message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0137] Based on the above technical solution, the receiver of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. 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 receiver of the delay response message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response message to obtain the time information of the first node.
[0138] In a possible implementation manner of the fourth aspect, the reception timestamp of the first message is used to determine the one-way link delay between the first port and the second port, where the second port is the port that receives the second message.
[0139] Based on the above technical solution, for the receiver of the second message, the second 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 in the second message and the timestamp of the receiver's own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried in the message to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0140] 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; where the accuracy of the value of the first field is 1 ns, and the accuracy of the value of the second field is less than 1 ns. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0141] In a possible implementation manner of the fourth aspect, 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.
[0142] Based on the above technical solution, the second message can also carry first indication information, so that the receiver of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0143] The fifth aspect of the present application provides a communication method, which is executed by a first node, or by some components in the first node (such as a processor, a chip, or a chip system, etc.), 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 manners, taking the method being executed by the first node as an example for description, 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, or an OTN device.
[0144] Wherein, the first node includes a first port, and the first port is a PTP port. In this method, the first node receives a first message from a second node through the first port, the first message is used for delay request, 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; 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.
[0145] Based on the above technical solution, after the first node receives the first message for delay request through the first port, the first node can obtain the transmission timestamp of the first message through the first message. In other words, the first node can obtain the transmission timestamp of the first message. Thus, the receiving party of the delay request message can obtain the above-mentioned transmission timestamp, and further enables the receiving party of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0146] 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 (such as a port supporting two-step); correspondingly, the first message for delay request can be a Pdelay_Req message defined by PTP. Or, in the fifth aspect, the first node can be an end-to-end (E2E) node, or the first port is an E2E port; correspondingly, the first message for delay request can be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited herein.
[0147] In a possible implementation manner of the fifth aspect, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the third message, and the second port is the port through which the second node sends the first message
[0148] Based on the above technical solution, the transmission 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 with the method without carrying any time information, the message receiver can determine the one-way link delay based on the timestamp carried in 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.
[0149] Optionally, 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 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. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0150] In a possible implementation manner of the fifth aspect, the first message further carries third indication information, and the third indication information is used to indicate that the first message carries the transmission timestamp of the third message.
[0151] 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 transmission timestamp of the third message based on the third indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0152] In a possible implementation manner 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 the reception timestamp of the first message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0153] Based on the above technical solution, the receiver of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. By means of 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 receiver of the delay response message can obtain the above reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response message to obtain the time information of the first node.
[0154] In a possible implementation manner of the fifth aspect, the reception timestamp of the first 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 that receives the second message.
[0155] Based on the above technical solution, for the receiver of the second message, the second 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 in the second message and the timestamp of its own sent / received message. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on this difference, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0156] 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 accuracy of the value of the first field is 1 ns, and the accuracy of the value of the second field is less than 1 ns. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0157] In a possible implementation manner of the fifth aspect, 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.
[0158] Based on the above technical solution, the second message can also carry first indication information, so that the receiver of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0159] In a possible implementation manner of the fifth aspect, the first port is a PTP port supporting mode A of two-step. 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 transmission timestamp of the second message.
[0160] Based on the above technical solution, when the first port in the first node is a PTP port supporting mode A of two-step, the first node can also send a fourth message to the second node through the first port and carry the transmission timestamp of the second message in the fourth message. In this way, it can enable the receiver of the fourth message to obtain more time information.
[0161] In a possible implementation manner of the fifth aspect, the transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port.
[0162] Based on the above technical solution, for the recipient of the fourth message, the fourth message can be received through the second port. Thereafter, the recipient 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 its own message sending / receiving timestamp. In this way, compared with the method of determining the average link delay only based on the timestamp difference carried by the message, the message recipient 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.
[0163] It can be understood that both the second message and the fourth message received by the second port can carry timestamps, so that the second node including the second port can determine the one-way link delay through the timestamp carried by the second message and can also determine the one-way link delay through the timestamp carried by the fourth message. This enables the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation and also enable the second node to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0164] 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 accuracy of the value of the seventh field is 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. Among them, the implementation of the third field and the fourth field can refer to the description in the first aspect and its possible implementation manners above.
[0165] In a possible implementation manner of the fifth aspect, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the sending timestamp of the second message.
[0166] 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 further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0167] In a possible implementation manner of the fifth aspect, the method further 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.
[0168] Based on the above technical solution, when the second port is a PTP port supporting two-step, the fifth packet received by the first node through the first port may also carry the transmission timestamp of the first packet. In this way, the receiving node of the fifth packet (e.g., the first node) can obtain the time information of other nodes (e.g., the second node).
[0169] In a possible implementation manner of the fifth aspect, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the first packet, where the second port is the port through which the second node sends the fifth packet.
[0170] Based on the above technical solution, as the receiving party of the fifth packet, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth packet and the timestamp of its own received packet. In this way, compared with the method without carrying any time information, it enables the packet receiving party to determine the one-way link delay based on the timestamp carried in the packet, 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.
[0171] In a possible implementation manner of the fifth aspect, the transmission timestamp of the second packet is carried in the ninth field, or, the transmission timestamp of the second packet is carried in the ninth field and the tenth field; where 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 1 ns.
[0172] Based on the above technical solution, the fifth packet can carry the transmission timestamp of the first packet in the above multiple ways, and in this way, different accuracy requirements can be met.
[0173] Optionally, in the fifth packet, the ninth field and / or the tenth field can be implemented by one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the scheme implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth packet, and the tenth field is the correctionField field of the fifth packet.
[0174] In a possible implementation manner of the fifth aspect, the fifth packet further carries fifth indication information, and the fifth indication information is used to indicate that the fifth packet carries the transmission timestamp of the first packet.
[0175] Based on the above technical solution, the fifth message may further carry fifth indication information, enabling the recipient of the fifth message (i.e., the first node) to determine, based on the fifth indication information, the transmission timestamp of the first message carried in the fifth message, and further enabling the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0176] In a sixth aspect of the present application, a communication method is provided. This method is executed by a second node, or by some components in the second node (such as a processor, a chip, or a chip system, etc.), or this 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 implementation manners, taking the case where this method is executed by the second node as an example for description, 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, or an OTN device.
[0177] Among them, the second node includes a second port, and the second port is a PTP port supporting two-step. In this method, the second node sends a first message through the second port. The first message is used for delay request, and the first message carries the transmission timestamp of a third message, where the third message is the previous message of the same type as the first message transmitted; 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.
[0178] Optionally, the second node may further receive, through the second port, a second message from the first node. The second message is used for delay response, and the second message may be a Pdelay_Resp message or a Delay_Resp message.
[0179] Based on the above technical solution, after the second node sends a first message for delay request through the second port, the first node, as the recipient of the first message, can obtain the transmission timestamp of the first message through the first message. In other words, the first node can obtain the transmission timestamp of the first message. Thus, the recipient of the delay request message can obtain the above-mentioned transmission timestamp, and further enable the recipient of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0180] It should be understood that in the sixth aspect, the second node can be a P2P node, and / or the second port can be a P2P port; correspondingly, the first message for delay request can be a Pdelay_Req message defined by PTP. Alternatively, in the sixth aspect, the second node can be an E2E node, or the second port is an E2E port; correspondingly, the first message for delay request can be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0181] In a possible implementation manner of the sixth aspect, the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
[0182] 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 transmission timestamp of the third message. In this way, compared with the method without carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried in 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.
[0183] Optionally, 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 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 field and the sixth field can refer to the description in the first aspect and its possible implementation manners above.
[0184] In a possible implementation manner of the sixth aspect, the first message further carries third indication information, and the third indication information is used to indicate that the first message carries the transmission timestamp of the third message.
[0185] 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 transmission timestamp of the third message based on the third indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0186] In a possible implementation manner of the sixth aspect, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries the reception timestamp of the first message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0187] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. By means of 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, and further enable the recipient of the delay response message to obtain the time information of the first node.
[0188] In a possible implementation manner of the sixth aspect, the reception timestamp of the first message is used to determine the one-way link delay between the first port and the second port.
[0189] Based on the above technical solution, for the recipient of the second message, the second message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the second message and the timestamp of its own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and then only being able to determine the average link delay based on the difference, it enables the message recipient to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0190] 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 accuracy of the value of the first field is 1 ns, and the accuracy 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 in the first aspect and its possible implementation manners above.
[0191] In a possible implementation manner of the sixth aspect, 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.
[0192] Based on the above technical solution, the second message can also carry first indication information, so that the recipient of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0193] In a possible implementation manner of the sixth aspect, the first port is a PTP port supporting mode A of two-step two-step, and the method further 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 transmission timestamp of the second message.
[0194] Based on the above technical solution, when the first port in the first node is a PTP port that supports mode A of two-step (two-step), the second node can also receive a fourth message from the first node through the second port, and the fourth message carries the transmission timestamp of the second message. In this way, the recipient of the fourth message can obtain more time information.
[0195] In a possible implementation manner of the sixth aspect, the transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port.
[0196] Based on the above technical solution, for the recipient of the fourth message, the fourth message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fourth message and the timestamps of its own sent / received messages. In this way, compared with the method of only being able to determine the average link delay based on the timestamp difference carried in the message, the message recipient can determine the one-way link delay based on the timestamp carried in 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.
[0197] It can be understood that both the second message and the fourth message received by the second port can carry timestamps, so that the second node including the second port can determine the one-way link delay either through the timestamp carried in the second message or through the timestamp carried in the fourth message. This enables the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation and also enable the second node to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0198] Optionally, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. The implementation of the seventh field and the eighth field can refer to the description in the first aspect and its possible implementation manners above.
[0199] In a possible implementation manner of the sixth aspect, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message.
[0200] Based on the above technical solution, the fourth message may further carry fourth indication information, enabling the recipient of the fourth message to determine, based on the fourth indication information, the transmission timestamp of the second message carried by the fourth message, and further enabling the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0201] In a possible implementation manner of the sixth aspect, the method further includes: the second node sends a fifth message to the first node through the second port, and the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0202] Based on the above technical solution, when the second port is a PTP port supporting two-step, the fifth message received by the first node through the first port may also carry the transmission timestamp of the first message. In this way, the receiving node of the fifth message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0203] In a possible implementation manner of the sixth aspect, 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 second port is the port through which the second node sends the fifth message.
[0204] Based on the above technical solution, as the recipient of the fifth message, 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 fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0205] In a possible implementation manner of the sixth aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns.
[0206] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways, and in this way, different accuracy requirements can be met.
[0207] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or a newly defined type length value (TLV) 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 is the correctionField field of the fifth message.
[0208] In a possible implementation of the sixth aspect, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the transmission timestamp of the first message.
[0209] Based on the above technical solution, the fifth message may further 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 transmission timestamp of the first message based on the fifth indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0210] A seventh aspect of the present application provides a communication method. This method is executed by the first node, or by some components in the first node (such as a processor, a chip, or a chip system, etc.), or this 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 manners, taking the example that this method is executed by the first node, the first node may be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, or an OTN device.
[0211] Among them, the first node includes a first port, and the first port is a PTP port that supports mode A of two-step. In this method, the first node receives a first message from the second node through the first port, and the first message is used for delay request; the first node sends a second message to the second node through the first port, and the second message is used for delay response; the first node sends a fourth message to the second node through the first port, and the fourth message is a following message of the second message; wherein, the fourth message carries the reception timestamp of the first message and / or the transmission timestamp of the second message, and the first message is used for delay request.
[0212] It should be understood that in the seventh aspect, the first node can be a P2P node, and / or the first port can be a P2P port; correspondingly, the first message for the delay request can be the Pdelay_Req message defined by PTP, the second message can be the Pdelay_Resp message, and the fourth message can be the Pdelay_Resp_Follow_Up message. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0213] Based on the above technical solution, after the first node sends the fourth message to the second node through the first port, as the recipient of the fourth message, 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 means of the delay response follow-up message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the recipient of the delay response follow-up message can obtain the above reception timestamp and / or transmission timestamp, and further enable the recipient of the delay response follow-up message to obtain the time information of the first node.
[0214] 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 one-way link delay between the first port and the second port.
[0215] Based on the above technical solution, for the recipient of the fourth message, the fourth message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fourth message and the timestamp of its own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, it enables the message recipient to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0216] Optionally, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. Among them, the implementation of the seventh field and the eighth field can refer to the description in the first aspect and its possible implementation manners above.
[0217] In a possible implementation of the seventh aspect, the fourth message further carries fourth indication information, which is used to indicate that the fourth message carries the transmission timestamp of the second message.
[0218] Based on the above technical solution, the fourth message can also carry fourth indication information, enabling the recipient of the fourth message to determine, based on the fourth indication information, that the fourth message carries the transmission timestamp of the second message, and further enabling the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0219] 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 the reception timestamp of the first message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0220] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. By having the delay response message carry the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the recipient of the delay response message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the recipient of the delay response message to obtain the time information of the first node.
[0221] In a possible implementation of the seventh aspect, the reception timestamp of the first message is used to determine the one-way link delay between the first port and the second port, where the second port is the port that receives the second message.
[0222] Based on the above technical solution, for the recipient of the second message, the second message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the second message and the timestamp of its own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message recipient can determine the one-way link delay based on the timestamp carried in the message to meet the requirement of determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0223] 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 value of the first field has a precision of 1 ns, and the value of the second field has a precision less than 1 ns. The implementation of the first field and the second field can refer to the description in the first aspect and its possible implementations above.
[0224] In a possible implementation of the seventh aspect, the second message further carries first indication information, which is used to indicate that the second message carries the reception timestamp of the first message.
[0225] Based on the above technical solution, the second message can also carry first indication information, so that the recipient of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0226] In a possible implementation of the seventh aspect, the second port is a PTP port supporting mode A of two-step, and the first message carries the transmission timestamp of a third message, where the third message is the previous message of the same type as the first message in terms of transmission.
[0227] Based on the above technical solution, when the second port is a PTP port supporting mode A of two-step, the first message received by the first node through the first port can also carry the transmission 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).
[0228] In a possible implementation of the seventh aspect, the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
[0229] Based on the above technical solution, as the recipient of the first message, 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 its own received message. In this way, compared with the method of not carrying any time information, it enables the message recipient to 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.
[0230] Optionally, 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; where 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. Among them, the implementation of the fifth field and the sixth field can refer to the description in the first aspect and its possible implementations above.
[0231] In a possible implementation of the seventh aspect, 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.
[0232] Based on the above technical solution, the first message may further carry third indication information, enabling the recipient of the first message (i.e., the first node) to determine the transmission timestamp of the third message carried by the first message based on the third indication information, and further enabling the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0233] In a possible implementation manner 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 the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0234] Based on the above technical solution, when the second port is a PTP port supporting two-step, the fifth message received by the first node through the first port may further carry the transmission timestamp of the first message. In this way, the receiving node of the fifth message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0235] In a possible implementation manner of the seventh aspect, the method further includes: the first node determines 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.
[0236] Based on the above technical solution, as the recipient of the fifth message, 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 fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message recipient to 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.
[0237] In a possible implementation manner of the seventh aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission timestamp of the second message is carried in the ninth field and the tenth field; where 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 1 ns.
[0238] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0239] Optionally, in the fifth message, the ninth field and / or the tenth field may be implemented by one or more newly defined fields or a newly defined type length value (TLV) 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.
[0240] In a possible implementation of the seventh aspect, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the transmission timestamp of the first message.
[0241] Based on the above technical solution, the fifth message may further carry fifth indication information, so that the recipient of the fifth message (i.e., the first node) can determine that the fifth message carries the transmission timestamp of the first message based on the fifth indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0242] In the eighth aspect of the present application, a communication method is provided. This method is executed by the second node, or by some components in the second node (such as a processor, a chip, or a chip system, etc.), or this 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 implementation manners, taking the example that this method is executed by the second node, the second node may be a communication device such as a router, a switch, a virtual switch, a virtual router, a smart network card, a PTN device, or an OTN device.
[0243] Wherein, the second node includes a second port, and the second port is a PTP port. In this method, 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 second message is used for delay response. Wherein, the fourth message carries the reception timestamp of the first message and / or the transmission timestamp of the second message, and the first message is used for delay request.
[0244] 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 receiver of the fourth message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. Thus, by means of the delay response following message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the receiver of the delay response following message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response following message to obtain the time information of the first node.
[0245] In a possible implementation manner of the eighth aspect, the method further includes: the second node determines the one-way 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, where the first port is the port through which the first node sends the fourth message.
[0246] Based on the above technical solution, the transmission 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 the timestamp difference in the message and then only being able to determine the average link delay based on the difference, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0247] Optionally, the transmission timestamp of the second message is carried in the seventh field, or the transmission timestamp of the second message is carried in the seventh field and the eighth field; where the accuracy of the value of the seventh field is 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. Among them, the implementation of the seventh field and the eighth field can refer to the description in the first aspect and its possible implementation manners above.
[0248] In a possible implementation manner of the eighth aspect, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message.
[0249] Based on the above technical solution, the fourth message can also carry fourth indication information, so that the receiver of the fourth message can determine that the fourth message carries the transmission timestamp of the second message based on the fourth indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0250] In a possible implementation of the eighth aspect, the method further includes: the second node sends a first message, the first message is a point-to-point delay request Pdelay_Req message, and the second message carries the reception timestamp of the first message; wherein, the second message is a point-to-point delay response Pdelay_Resp message.
[0251] Based on the above technical solution, the receiver of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. By means of 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 receiver of the delay response message can obtain the above reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response message to obtain the time information of the first node.
[0252] In a possible implementation of the eighth aspect, the reception timestamp of the first 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 that receives the second message.
[0253] Based on the above technical solution, for the receiver of the second message, the second 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 in the second message and the timestamp of its own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and then only being able to determine the average link delay based on the difference, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0254] 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 accuracy of the value of the first field is 1ns, and the accuracy of the value of the second field is less than 1ns. The implementation of the first field and the second field can refer to the description in the first aspect and its possible implementations above.
[0255] In a possible implementation of the eighth aspect, 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.
[0256] Based on the above technical solution, the second message can also carry first indication information, so that the receiver of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0257] In a possible implementation of the eighth aspect, the second port is a PTP port supporting two-step, the first message carries the transmission timestamp of the third message, and the third message is the previous message of the same type as the first message that was transmitted.
[0258] Based on the above technical solution, when the second port is a PTP port supporting two-step, the first message received by the first node through the first port may also carry the transmission 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).
[0259] In a possible implementation of the eighth aspect, the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port.
[0260] Based on the above technical solution, as the receiving party of the first message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the first message and the timestamp of its own received message. In this way, compared with the method of not carrying any time information, it enables the message receiving party to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0261] Optionally, 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 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 field and the sixth field can refer to the description in the first aspect and its possible implementations above.
[0262] In a possible implementation of the eighth aspect, the first message also carries third indication information, and the third indication information is used to indicate that the first message carries the transmission timestamp of the third message.
[0263] Based on the above technical solution, the first message may also carry third indication information, so that the receiving party of the first message (i.e., the first node) can determine that the first message carries the transmission timestamp of the third message based on the third indication information, and further enable the receiving party to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0264] In a possible implementation of the eighth aspect, the method further includes: the second node sends a fifth message to the first node through the second port, the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0265] Based on the above technical solution, when the second port is a PTP port supporting two-step, the fifth packet received by the first node through the first port may also carry the transmission timestamp of the first packet. In this way, the receiving node of the fifth packet (e.g., the first node) can obtain the time information of other nodes (e.g., the second node).
[0266] In a possible implementation manner of the eighth aspect, the transmission timestamp of the first packet is used to determine the one-way link delay between the first port and the second port, and the second port is the port through which the second node sends the fifth packet.
[0267] Based on the above technical solution, as the receiving party of the fifth packet, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth packet and the timestamp of its own received packet. In this way, compared with the method without carrying any time information, it enables the packet receiving party to determine the one-way link delay based on the timestamp carried in the packet, 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.
[0268] In a possible implementation manner of the eighth aspect, the transmission timestamp of the second packet is carried in the ninth field, or the transmission timestamp of the second packet 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 1 ns.
[0269] Based on the above technical solution, the fifth packet can carry the transmission timestamp of the first packet in the above multiple ways, and in this way, different accuracy requirements can be met.
[0270] Optionally, in the fifth packet, the ninth field and / or the tenth field can be implemented by one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the solution implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth packet, and the tenth field can be the correctionField field of the fifth packet.
[0271] In a possible implementation manner of the eighth aspect, the fifth packet also carries fifth indication information, and the fifth indication information is used to indicate that the fifth packet carries the transmission timestamp of the first packet.
[0272] Based on the above technical solution, the fifth message may further carry fifth indication information, enabling the receiver of the fifth message (i.e., the first node) to determine the transmission timestamp of the first message based on the fifth indication information, and further enabling the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0273] In a ninth aspect of the present application, a communication method is provided. This method is executed by the first node, or by some components in the first node (such as a processor, a chip, or a chip system, etc.), or this 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 manners, taking the example that this method is 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, or an OTN device.
[0274] Among them, the first node includes a first port, and the first port is a PTP port. In this method, the first node receives a first message from a second node through the first 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 delay request; the first node receives a fifth message from the second node through the first port. The fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0275] Based on the above technical solution, after the first node receives the first message for delay request through the first port, the first node may further receive a fifth message through the first port, and the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message. In other words, the receiver of the fifth message can obtain the transmission timestamp of the first message. Thus, by the way that the follow-up message of the delay request message carries the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the first node can obtain the above-mentioned transmission timestamp, and further enables the first node to obtain the time information of the second node.
[0276] 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). Correspondingly, 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 follow-up message of the first message (i.e., the fifth message) can be a point-to-point delay request follow-up (Pdelay_Req_Follow_Up) message or a delay request follow-up (Delay_Req_Follow_Up) message. Optionally, with the evolution of the PTP standard, the first message and the second message can also be other message names, which are not limited here.
[0277] In a possible implementation manner of the ninth aspect, the method further includes: the first node determines 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.
[0278] Based on the above technical solution, as the receiver of the fifth message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0279] In a possible implementation manner of the ninth aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission timestamp of the second message is carried in the ninth field and the tenth field; where 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 1 ns.
[0280] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0281] Optionally, in the fifth message, the ninth field and / or the tenth field can be implemented through one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the solution implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth message, and the tenth field can be the correctionField field of the fifth message.
[0282] In a possible implementation of the ninth aspect, the fifth message further carries fifth indication information, which is used to indicate that the fifth message carries the transmission timestamp of the first message.
[0283] Based on the above technical solution, the fifth message can also carry the fifth indication information, so that the recipient of the fifth message (i.e., the first node) can determine that the fifth message carries the transmission timestamp of the first message based on the fifth indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0284] In a possible implementation of the ninth 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, and the second message carries the reception timestamp of the first message.
[0285] Based on the above technical solution, the recipient of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. By means of 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 reception timestamp and / or transmission timestamp, and further enable the recipient of the delay response message to obtain the time information of the first node.
[0286] In a possible implementation of the ninth aspect, the reception timestamp of the first 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 through which the second node receives the second message.
[0287] Based on the above technical solution, for the recipient of the second message, the second message can be received through the second port. Thereafter, the recipient can determine the one-way link delay between the first port and the second port based on the timestamp carried in the second message and the timestamp of its own sending / receiving message. In this way, compared with the method of carrying the timestamp difference in the message and then only being able to determine the average link delay based on the difference, the message recipient can determine the one-way link delay based on the timestamp carried in the message to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0288] 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 accuracy of the value of the first field is 1 ns, and the accuracy 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 other aspects and their implementation manners in the previous text.
[0289] In a possible implementation of the ninth aspect, the first message carries the transmission timestamp of a third message, where the third message is the previous message of the same type as the first message that was transmitted. The method further includes: the first node determines 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 through which the second node transmitted the third message.
[0290] Based on the above technical solution, the first message received by the first node through the first port may also carry the transmission 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).
[0291] Optionally, in the first message, 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; where the precision of the value of the fifth field is 1 ns, and the precision of the value of the sixth field is less than 1 ns. Among them, the implementation of the third field and the fourth field can refer to other aspects and their implementation manners in the previous text.
[0292] In a possible implementation of the ninth aspect, the method further includes: the first node sends a fourth message to the second node through the first port, and the fourth message carries the transmission timestamp of the second message; where the second message is a Pdelay_Resp message, and the fourth message is a Pdelay_Resp_Follow_Up message.
[0293] Based on the above technical solution, the first node may also send a fourth message to the second node through the first port, and the fourth message carries the transmission timestamp of the second message and / or the reception timestamp of the first message. In this way, the receiving party of the fourth message can obtain more time information.
[0294] In a possible implementation of the ninth aspect, the transmission timestamp of the second message is used to determine the one-way link delay between the first port and the second port, where the second port is the port through which the second node received the second message.
[0295] Based on the above technical solution, for the receiving party of the fourth message, the fourth message can be received through the second port. Thereafter, the receiving party can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fourth message and the timestamp of its own transmitted / received message. In this way, compared with the method of carrying the timestamp difference in the message and then only being able to determine the average link delay based on the difference, it enables the message receiving party to determine the one-way link delay based on the timestamp carried in the message, so as to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0296] Optionally, in the fourth message, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 field and the eighth field can refer to other aspects and their implementation manners described above.
[0297] A tenth aspect of the present application provides a communication method, which is executed by a second node, or the method is executed by some components (such as a processor, a chip, or a chip system, etc.) in the second node, 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 implementation manners, taking the method being executed by the second node as an example for description, 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, or an OTN device.
[0298] Wherein, the second node includes a second port, and the second port is a PTP port supporting two-step. In this method, a communication method of the second node is characterized in that it is applied to the second node, the second node includes a second port, and the second port is a PTP port supporting two-step. 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 delay request; the second node sends a fifth message to the first node through the second port, the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0299] Based on the above technical solution, after the second node sends the first message for 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 transmission timestamp of the first message, and the fifth message is a follow-up message of the first message. In other words, the receiver of the fifth message can obtain the transmission timestamp of the first message. Thus, by means of the follow-up message of the delay request message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the first node can obtain the above-mentioned transmission timestamp, and further the first node can obtain the time information of the second node.
[0300] In a possible implementation manner of the tenth aspect, 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 through which the first node receives the first message.
[0301] Based on the above technical solution, the first node is the recipient of the fifth message. The first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0302] In a possible implementation manner of the tenth aspect, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns.
[0303] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0304] Optionally, in the fifth message, the ninth field and / or the tenth field can be implemented by one or more newly defined fields or a newly defined type length value (TLV) to improve the flexibility of the solution implementation. For example, the ninth field can be the preciseOriginTimestamp field of the fifth message, and the tenth field can be the correctionField field of the fifth message.
[0305] 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 the transmission timestamp of the first message.
[0306] Based on the above technical solution, the fifth message can also carry the fifth indication information, so that the recipient of the fifth message (i.e., the first node) can determine that the fifth message carries the transmission timestamp of the first message based on the fifth indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0307] In a possible implementation manner of the tenth aspect, the first message is a Pdelay_Req message, and the method further includes: the second node receives a second message from the first node through the second port, and the second message carries the reception timestamp of the first message; the second node determines the one-way 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.
[0308] Based on the above technical solution, the receiver of the second message can obtain the reception timestamp of the first message and / or the transmission timestamp of the second message. 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 receiver of the delay response message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response message to obtain the time information of the first node.
[0309] In a possible implementation manner of the tenth aspect, the first message carries the transmission timestamp of the third message, and the third message is the previous message of the same type as the first message transmitted; wherein, the transmission timestamp of the third 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 through which the first node receives the first message.
[0310] Based on the above technical solution, for the receiver of the second message, the second 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 in the second message and the timestamp of its own message transmission / reception. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried in the message to meet the determination requirement of the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0311] 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 accuracy of the value of the first field is 1 ns, and the accuracy 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 other aspects and their implementation manners in the previous text.
[0312] In a possible implementation manner of the tenth aspect, the method further includes: the second node receives a fourth message from the first node through the second port, and the fourth message carries the transmission 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.
[0313] Based on the above technical solution, the first node can also send a fourth message to the second node through the first port, and carry the transmission timestamp of the second message and / or the reception timestamp of the first message in the fourth message. In this way, the receiver of the fourth message can obtain more time information.
[0314] In a possible implementation of the tenth aspect, the method further includes: the second node determines 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 second message.
[0315] 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 in the fourth message and the timestamp of its own message sending / receiving. In this way, compared with the method of only being able to determine the average link delay based on the timestamp difference carried in the message, the message receiver can determine the one-way link delay based on the timestamp carried in 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.
[0316] Optionally, in the fourth message, the transmission timestamp of the second message is carried in the seventh field, or the transmission timestamp of the second message is carried in the seventh field and the eighth field; where the accuracy of the value of the seventh field is 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. The implementation of the seventh field and the eighth field can refer to other aspects and their implementation manners in the foregoing.
[0317] The eleventh aspect of the present application provides a communication device, which can implement the method in the first aspect or any possible implementation manner of the first aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware. For example, the device can be the 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.
[0318] The device includes a transceiver unit and a processing unit; the transceiver unit receives a first message from a second node through the first port, where the first message is for delay request; the processing unit is used to generate a second message; the transceiver unit is further used to send the second message to the second node through the first port, where the second message is for delay response, and the second message carries the reception timestamp of the first message and / or the transmission timestamp of the second message.
[0319] The twelfth aspect of the present application provides a communication device, which can implement the method in the second aspect or any possible implementation manner of the second aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. 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.
[0320] The device includes a transceiver unit and a processing unit; the transceiver unit is configured to receive a second message from a first node through the second port, and the second message is for delay response; the processing unit is configured to obtain a reception timestamp of a first message through the second message, the first message is 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.
[0321] The thirteenth aspect of the present application provides a communication device, which can implement the method in the third aspect or any possible implementation manner of the third aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. 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.
[0322] The device includes a transceiver unit and a processing unit; the transceiver unit is configured to receive a first message from a second node through the first port, and the first message is for delay request; the processing unit is configured to obtain a transmission 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.
[0323] The fourteenth aspect of the present application provides a communication device, which can implement the method in the fourth aspect or any possible implementation manner of the fourth aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. 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.
[0324] 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 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.
[0325] A fifteenth aspect of the present application provides a communication device, which can implement the method in the above fifth aspect or any possible implementation manner of the fifth aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. 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 logical module or software that can implement all or part of the functions of the first node.
[0326] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from a second node through the first port, the first message is used for delay request; the processing unit is used to obtain the transmission timestamp of a third message through the first message, the third message is the previous 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.
[0327] A sixteenth aspect of the present application provides a communication device, which can implement the method in the above sixth aspect or any possible implementation manner of the sixth aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. 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 logical module or software that can implement all or part of the functions of the second node.
[0328] 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 delay request, and the first message carries the transmission timestamp of a third message, the third message is the previous 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.
[0329] The seventeenth aspect of this application provides a communication device, which can implement the method in the above seventh aspect or any possible implementation manner of the seventh aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in 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 logical module or software that can implement all or part of the functions of the first node.
[0330] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive a first message from a second node through the first port, and the first message is 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 the second message to the second node through the first port, and the second message is for a delay response; the transceiver unit is also used to send the 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 transmission timestamp of the second message.
[0331] The eighteenth aspect of this application provides a communication device, which can implement the method in the above eighth aspect or any possible implementation manner of the eighth aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in 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 logical module or software that can implement all or part of the functions of the second node.
[0332] The device includes a transceiver unit and a processing unit; the transceiver unit is used to receive the 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 for a delay response; the processing unit is used to obtain the reception timestamp of the first message and / or the transmission timestamp of the second message through the fourth message.
[0333] The nineteenth aspect of this application provides a communication device, which can implement the method in the above seventh aspect or any possible implementation manner of the seventh aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in 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 logical module or software that can implement all or part of the functions of the first node.
[0334] The device includes a transceiver unit and a processing unit; the transceiver unit is configured to receive, 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 or the first message is a delay request Delay_Req message, and the first message is used for delay request; the transceiver unit is further configured to receive, through the first port, a fifth message from the second node; the processing unit is configured to obtain a transmission timestamp of the first message based on the fifth message, and the fifth message is a follow-up message of the first message.
[0335] In a twentieth aspect of the present application, a communication device is provided. The device can implement the method in the above eighth aspect or any possible implementation manner of the eighth aspect. The device includes corresponding units or modules for executing the above method. The units or modules included in the device can be implemented in software and / or hardware manners. For example, the device can be the 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 logical module or software capable of implementing all or part of the functions of the second node.
[0336] The device includes a transceiver unit and a processing unit; the processing unit is configured to determine a first message and a fifth message; the transceiver unit is configured to send, through the second port, the first message to a first node, 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; the transceiver unit is further configured to send, through the second port, the fifth message to the first node, and the fifth message carries the transmission timestamp of the first message, and the fifth message is a follow-up message of the first message.
[0337] In a twenty-first aspect of the present application, a communication device is provided. The communication device includes at least one processor, and the at least one processor is configured to execute a program or an instruction stored in a memory, so that the device implements the method described in any one of the foregoing first aspect to tenth aspect and any possible implementation manner thereof.
[0338] In a twenty-second aspect of the present application, a communication device is provided, including at least one logic circuit and an input / output interface; the logic circuit is configured to execute the method described in any one of the foregoing first aspect to tenth aspect and any possible implementation manner thereof.
[0339] In a twenty-third aspect 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 the above first aspect to tenth aspect and any possible implementation manner thereof.
[0340] 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 aspect to the tenth aspect and any possible implementation manner thereof as described above.
[0341] The twenty-fifth aspect of the present application provides a chip system, which includes a communication interface and a processor. The communication interface and the processor are coupled to support a communication device to implement the method described in any one of the first aspect to the tenth aspect and any possible implementation manner thereof as described above.
[0342] In a possible design, the chip system may further include a memory for storing necessary program instructions and data of the communication device. The chip system may be composed of chips or may include chips and other discrete devices. Optionally, the chip system further includes an interface circuit, which provides program instructions and / or data for the at least one processor.
[0343] The twenty-sixth aspect of the present application provides a communication system, which includes a first node and a second node. Among them, the implementation processes of the first node and the second node may refer to the foregoing various aspects and their possible implementation manners.
[0344] Among them, the technical effects brought by any one of the design manners from the eleventh aspect to the twenty-sixth aspect can be seen in the technical effects brought by different implementation manners of the first aspect to the tenth aspect as described above, and will not be elaborated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0345] Figure 1 It is a schematic diagram of the 1588 synchronization network related to the present application;
[0346] Figures 2a to 2f It is a schematic diagram of clock message interaction related to the present application;
[0347] Figures 3a to 3c It is a schematic diagram of the scenario of clock message transmission related to the present application;
[0348] Figures 4a to 4c It is a schematic diagram of message interaction in the E2E scenario related to the present application;
[0349] Figures 5a to 5c It is a schematic diagram of message interaction in the P2P scenario related to the present application;
[0350] Figures 6a to 6j It is a schematic diagram of message interaction of the communication method provided by the present application;
[0351] Figures 7a to 7c It is a schematic diagram of message interaction of the communication method provided by the present application;
[0352] Figures 8a to 8c Schematic diagram of message interaction for the communication method provided by this application;
[0353] Figure 9a and Figure 9b Schematic diagram of message interaction for the communication method provided by this application;
[0354] Figures 10 to 12 Schematic diagram of the communication device provided by this application. Detailed implementation manners
[0355] In the embodiments of this application, the terms "system" and "network" can be used interchangeably. "At least one" means one or more, and "a plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone, where A and B can be singular or plural. The character " / " generally represents an "or" relationship between the associated objects before and after. "At least one (item)" or its similar expression refers to any combination of these items, including any combination of single item (item) or plural items (items). For example, "at least one of A, B, and C" includes A, B, C, AB, AC, BC, or ABC. Also, unless otherwise specified, the ordinal numbers such as "first" and "second" mentioned in the embodiments of this application are used to distinguish multiple objects and are not used to limit the order, time sequence, priority, or importance of multiple objects.
[0356] It should be noted that in this application, words such as "exemplary" or "for example" are used to give examples, illustrations, or explanations. Any embodiment or design solution described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific manner.
[0357] It should be understood that in this application, "when...", "if", and "in case" all refer to the device will perform corresponding processing under certain objective circumstances, which does not limit the time, and it is not required that the device must have a judgment action when implemented, nor does it mean that there are other limitations.
[0358] In this application, unless otherwise specified, the same or similar parts among various embodiments or implementation manners can be referred to each other. In various embodiments of this application, as well as in each implementation manner / implementation method / realization method in each embodiment, if there is no special specification and logical conflict, the terms and / or descriptions among different embodiments, as well as among each implementation manner / implementation method / realization method in each embodiment, are consistent and can be referenced to each other. The technical features in different embodiments, as well as in each implementation manner / implementation method / realization method in each embodiment, can be combined to form new embodiments, implementation manners, implementation methods or realization methods according to their internal logical relationships. The following-described implementation manners of this application do not constitute a limitation on the protection scope of this application.
[0359] First, some terms in the embodiments of this application are explained to facilitate the understanding of those skilled in the art.
[0360] (1) The 1588 protocol is defined by the Institute of Electrical and Electronics Engineers (IEEE), also known as the PTP protocol, and its full name is "Precision Clock Synchronization Protocol for Networked Measurement and Control Systems", which can be abbreviated as the Precision Time Protocol (PTP).
[0361] It should be noted that the 1588 protocol / standard involved in this application may include, but is not limited to, IEEE 1588-2008 which is the 1588v2 standard, IEEE 1588-2019 which is the 1588v2.1 standard, or other future-evolved 1588 standards.
[0362] In a communication network, the normal operation of most telecommunication services requires that the frequency or time difference among network devices be kept within a reasonable error level, that is, network clock synchronization. PTP is a time protocol for networked measurement and control systems, which can achieve a relatively high network time synchronization accuracy and realize high-precision time synchronization. PTP itself can be used for high-precision time synchronization between devices, or can be borrowed for frequency synchronization between devices.
[0363] Figure 1 is a schematic diagram of a 1588 synchronization network, where the 1588 server (such as Figure 1The clock messages sent by the 1588 servers 1, 1588 servers 2, etc. can be transmitted through one or more network elements (NEs), enabling wireless access devices (such as Figure 1 base station 1, base station 2, base station 3, and base station 4, etc. in
[0364] Optionally, in Figure 1 , different NEs can include NEs in the core layer network, NEs in the aggregation access layer network, etc.
[0365] (2) Basic concepts of PTP.
[0366] ① PTP domain: The network to which the PTP protocol is applied can be called a PTP domain.
[0367] Optionally, there is one and only one synchronization clock in the PTP domain, and all devices in the PTP domain are synchronized with this clock.
[0368] ② PTP port: The port on the device where the PTP protocol runs can be called a PTP port.
[0369] Exemplarily, the roles of PTP ports can include the following three types:
[0370] Master Port: The port that publishes the synchronization time, which can exist on the BC or OC.
[0371] Slave Port: The port that receives the synchronization time, which can exist on the boundary clock (BC) or ordinary clock (OC).
[0372] Passive Port: The standby port that receives the synchronization time, which can exist on the BC.
[0373] (3) Clock node: The nodes in the PTP domain are called clock nodes, and the PTP protocol defines the following three types of basic clock nodes.
[0374] OC: This clock node has only one PTP port participating in time synchronization within the same PTP domain and synchronizes time from the upstream clock node through this port. In addition, when the clock node is used as a clock source, it can publish time to the downstream clock node only through one PTP port, and it is also called an OC.
[0375] An example of an implementation is as Figure 2aAs shown, 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 slave ports. Exemplarily, the OC node may be Figure 1 the 1588 server 1 or 1588 server 2 shown, 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 may also be referred to as a grandmaster (GM), that is, the OC node can be a 1588 source device.
[0376] Another implementation example is as Figure 2b shown. When the OC node is used as an end device, the OC node may include slave ports (denoted as "S" in the figure). Exemplarily, the OC node may be Figure 1 the wireless access device shown (such as Figure 1 base station 1, base station 2, base station 3, and base station 4 in etc.), and realizes clock synchronization through the clock messages received through the "S" port. Optionally, the OC node only has one slave port.
[0377] BC: This clock node has multiple PTP ports participating in time synchronization within the same PTP domain. It synchronizes time from the upstream clock node through one of its ports and distributes time to the downstream clock nodes through the remaining ports. In addition, when the clock node is used as a clock source and can distribute time to the downstream clock nodes through multiple PTP ports, it can also be referred to as a BC.
[0378] An implementation example is as Figure 2c shown. The BC node may be a 1588 intermediate device and generally has at least two types of ports among master ports (denoted as "M"), slave ports (denoted as "S"), and passive ports (denoted as "P"). Optionally, in a BC node, the number of master ports can be 0 or 1 or more, the number of slave ports can be 1, and the number of passive ports can be 0 or 1 or more. Exemplarily, the BC node may be Figure 1 the NE shown (such as any one of NE1 to NE6). Among them, the BC node can receive clock messages through the slave port and perform time synchronization, and the BC node can also send new clock messages from the active end so that other devices perform time synchronization based on the new clock messages.
[0379] Generally, each port of the BC node will receive an Announce message. Then, according to the best master clock algorithm (BMC or BMCA), the BC node can determine the outgoing port status of each port as "P" or "S" or "M", and then send a new Announce message on the "M" port.
[0380] Transparent clock (TC): Compared with BC / OC, TC has no port status. In addition, BC / OC generally needs to keep time synchronization with other clock nodes, while TC can be not synchronized with other clock nodes.
[0381] Exemplarily, as Figure 2d shown, TC can have multiple PTP ports, but it only forwards PTP protocol messages between these ports and corrects the forwarding delay, without synchronizing time through any port. In other words, each port of the TC node generally does not have a port status.
[0382] Optionally, TC includes the following two types.
[0383] End-to-end transparent clock (E2E TC): It can forward or retransmit non-peer-to-peer (P2P) type protocol messages in the network and participate in calculating the delay of the entire link.
[0384] As an implementation example of E2E TC, as Figure 2e shown, E2E TC can be used to forward or retransmit Announce messages, Sync messages, Delay_Req messages, and Delay_Resp messages, etc.
[0385] Peer-to-peer transparent clock (P2P TC): It can forward or retransmit messages such as Sync messages, Follow_Up messages, and Announce messages, while terminating other PTP protocol messages and participating in calculating the delay of each segment of the entire link.
[0386] As an implementation example of P2P TC, as Figure 2fAs shown, P2P TC can be used to forward Announce messages and Sync messages. Moreover, P2P TC can also respond to Point-to-Point Delay Request (Pdelay_Req) messages, Point-to-Point Delay Response (Pdelay_Resp) messages, and Point-to-Point Delay Response Follow-Up (Pdelay_Resp_Follow_Up) messages to calculate the optical fiber delay between two adjacent ports. For example: In Figure 2f , port 1 can send a Pdelay_Req message to the peer port of port 1 (referred to as the peer port for short), and the peer port responds by sending back a Pdelay_Resp message and a Pdelay_Resp_Follow_Up; alternatively, it can also be that the peer port sends a Pdelay_Req message to port 1, and port 1 responds by sending back a Pdelay_Resp message and a Pdelay_Resp_Follow_Up. In this way, port 1 and the peer port can determine the link delay based on the messages sent and received.
[0387] As an example of a TC node forwarding clock messages, for the received 1588 Announce message, neither E2E TC nor P2P TC performs any processing, and then sends the Announce message to other devices from the exit.
[0388] (4) One-step mode and two-step mode.
[0389] In one-step mode, the clock message sent by a port carries the timestamp when the clock message leaves the port. This means that after the clock message is forwarded through one or more nodes and received by another port, the accurate time information of the port at the moment of sending the clock message can be obtained from the message. For example, the clock message can be a Sync message or a Delay_Req message, etc.
[0390] In two-step mode, a port can send two clock messages successively. For example, first send clock message 1 and then send clock message 2. Among them, clock message 1 does not carry the timestamp when clock message 1 leaves the port, while clock message 2 carries the timestamp when clock message 1 leaves the port. This means that after clock message 1 and clock message 2 are forwarded through one or more nodes and received by another port, the accurate time information of the port at the moment of sending clock message 1 can be obtained from clock message 2. For example, clock message 1 can be a Sync message, and clock message 2 can be a Follow_Up message.
[0391] Generally, during the transmission of clock messages, a node can determine whether the transmission mode of the clock message is one-step mode or two-step mode based on the information carried in the message.
[0392] For example, taking the Sync message as an example of the clock message, if the two-step flag (twoStepFlag) in the Sync message is 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, the receiver of the Sync message can determine that the transmission mode of the Sync message is two-step mode, and the transmission timestamp of the Sync message is carried by the subsequent Follow_Up message.
[0393] In addition, for a node, the node can determine whether the transmission mode supported by the node or the port is one-step mode or two-step mode through configuration (such as manual configuration / controller configuration / network management configuration, etc.).
[0394] As an example, the transmission mode supported by the node can be the same as the transmission mode of the clock message received by the node. For example, taking the Sync message as an example of the clock message, when both of these transmission modes are one-step mode, the node can carry the node's delay information in the forwarded Sync message; when both of these transmission modes are two-step mode, the node can carry the node's delay information in the forwarded Follow_Up message. Among them, the delay information can refer to the examples shown in the previous text Figure 2e and Figure 2f shown examples.
[0395] As an example, the transmission mode supported by the node can be different from the transmission mode of the clock message received by the node. For example, taking the Sync message as an example of the clock 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 its own supported transmission mode; 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 and carries the node's delay information. Among them, the delay information can refer to the examples shown in the previous text Figure 2e and Figure 2f shown examples.
[0396] In communication networks, the normal operation of most telecommunications services requires that the frequency or time differences between devices in the entire network remain within a reasonable error level, that is, network clock synchronization. Precision Time Protocol (PTP) is a time protocol for network measurement and control systems that can achieve high network timing accuracy and high-precision time synchronization. Generally, a system running PTP can be called a PTP system or a PTP network, and the nodes in the PTP system can be called clock nodes. However, in the PTP system, how to realize the transmission of time information is a technical problem that needs to be solved urgently.
[0397] The following will be Figures 3a to 3c The example shown provides an exemplary description of the message interaction process between different clock nodes.
[0398] In some scenarios, the device needs to obtain the link delay of each port to select the service path with the shortest delay for the service.
[0399] like Figure 3a As shown, the service can be transmitted from NE1 to NE5, but there are two paths. The first path is NE1-NE2-NE3-NE5, with a delay of 5+10+20=35 microseconds (us); the second path is NE1-NE4-NE5, with a delay of 50+100=150us. In terms of latency, NE1-NE2-NE3-NE5 is the shortest latency path with a latency of 25us. It should be understood that the device latency is ignored here (i.e., it is assumed that the device latency is relatively small and can be ignored). Generally, in order 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, which selects the service path with the shortest latency for each service. Considering that the optical fiber link between the two ports may be asymmetric, the latency routing scenario also hopes to test the unidirectional link latency.
[0400] As an example, different clock nodes can communicate through two-way active measurement protocol (TWAMP), which can be tested in a loopback manner. However, this protocol can only test two-way delay, not one-way link delay, and this protocol requires a user datagram protocol (UDP) link to be established between two devices, and this UDP link will pass through other devices, so it is difficult to test the link delay between any two ports.
[0401] like Figure 3bAs shown in the figure, taking the transmission process of the first path as an example, NE1 can send TWAMP test packets to NE5. NE5 carries the round-trip delay of the packets, and NE1 can calculate the two-way delay. This protocol mainly records timestamps at the Internet Protocol (IP) layer, and its measurement accuracy is approximately at the microsecond (us) level or millisecond (ms) level.
[0402] Another delay measurement technology is the delay measurement technology of Operations, Administration and Maintenance (OAM) packets, including one-way delay measurement and two-way delay measurement. Its measurement principle is similar to that of TWAMP, and the measurement accuracy is also at the us level or ms level.
[0403] In addition, the 1588 protocol can also be used to measure link delay. Moreover, since current 1588 devices basically support stamping 1588 packets at the Medium Access Control (MAC) layer or Physical (PHY) layer, the delay accuracy obtained from 1588 packet tests is relatively high and can reach the nanosecond (ns) level.
[0404] As Figure 3c shown, it is a schematic diagram of the device configured in the 1588 BC mode. Among them, different nodes can make decisions according to the BMC algorithm to obtain the port status (such as Master, Slave, or Passive).
[0405] For example, the port statuses of port 1 and port 2 of NE1 are both "M", and the port status of port 3 is "S".
[0406] Another example is that among the three NEs of NE2, NE3, and NE4, the port statuses of port 1 are all "M", and the port status of port 2 is "S".
[0407] Another example is that 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".
[0408] Subsequently, different NEs can measure the link delay between two ports through packet interaction. The current 1588 protocol includes two delay methods, the E2E and P2P mechanisms.
[0409] Next, the E2E mechanism will be introduced through Figures 4a to 4c Specifically, in the packet interaction process of the E2E mechanism, according to the packet sending method, it can include the one-step mode and the two-step mode.
[0410] As Figure 4aAs shown, in the one-step mode, taking the Master port as port A and the Slave port as port B as an example, the following process is included.
[0411] 1. Port A sends a Sync message to port B, and t1 is the sending time (or sending timestamp) of the Sync message. Among them, the correctionField of the Sync message carries the fractional nanosecond part of t1 (denoted as t1_fns, with a precision of 1 / 2 16 ns), and the originTimestamp carries the nanosecond and second value parts of t1 (denoted as t1_ns, with a precision of 1ns). When port B receives the Sync message, it records t2, and t2 is the receiving time (or receiving timestamp) of the Sync message.
[0412] 2. Port B sends a Delay_Req message to port A. Among them, the correctionField of the Delay_Req message carries the time delay value caused by fiber asymmetry (denoted as -dAsy, satisfying dAsy = (Delay_AB - Delay_BA) / 2, where Delay_AB represents the one-way time delay from port A to port B, and Delay_BA represents the one-way time delay from port B to port A), and the originTimestamp value of the Delay_Req message is always 0.
[0413] 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 time delay of Delay_AB), and the fiber from port B to port A is denoted as Fiber 2 (with a time delay of Delay_BA). Port A first sends a Sync message to port B through Fiber 1, obtaining two timestamps t1 / t2, and there is the following formula:
[0414] t2 – t1 = Delay_AB + Offset (1)
[0415] Where Offset is the time deviation between port A and port B, or the time deviation between the node where port A is located and the node where port B is located. Swap the sending and receiving directions of the fiber, and port A sends a Sync message to port B through Fiber 2, obtaining two timestamps t1’ / t2’, and there is the following formula:
[0416] t2’- t1’= Delay_BA + Offset (2)
[0417] By subtracting the above two formulas, the fiber asymmetry dAsy can be obtained.
[0418] dAsy = (DelayAB - DelayBA) / 2 = [(t2 – t1) - (t2’ - t1’)] / 2.
[0419] 3. The port A sends a Delay_Resp message to port B, and t4 is the sending time (or sending timestamp) of the Delay_Resp message. Among them, the correctionField of the Delay_Resp message carries -dAsy - t4_fns (t4_fns is the fractional nanosecond part of t4, with a precision of 1 / 2 16 ns), and the receiveTimestamp value carries t4_ns (the nanosecond and second value parts of t4, with a precision of 1ns).
[0420] After that, based on Figure 4a the process shown, the Slave port can calculate the two-way average delay Delay_mean, which satisfies:
[0421] Delay_mean = [(t2 – t3) + (receiveTimestamp of Delay_Resp – originTimestampof Sync) – correctedSyncCorrectionField – correctionField of Delay_Resp] / 2
[0422] = [(t2 – t3) + (t4_ns – t1_ns) – (t1_fns + dAsy) – (-dAsy – t4_fns)] / 2
[0423] = [(t2 – t3) + (t4_ns + t4_fns) – (t1_ns + t1_fns)] / 2
[0424] = [(t2 – t3) + t4 – t1] / 2
[0425] Note 1: The above formula can refer to Section 11.3.2 e) 1) of IEEE 1588-2019.
[0426] Note 2: correctedSyncCorrectionField = correctionField of Sync + dAsy = t1_fns + dAsy.
[0427] As Figure 4b shown, in the two-step mode, taking the Master port as port A and the Slave port as port B as an example. And Figure 4aCompared with the process shown, the difference is that after port A sends a Sync message, it also sends a Follow_Up message. Moreover, the time information carried in the Sync message is transmitted 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 a precision of 1 / 2 16 ns), and the preciseOriginTimestamp carries t1_ns (the nanosecond and second value parts of t1, with a precision of 1ns). In addition, the implementation of the Delay_Req message and the Delay_Resp message is similar to that of Figure 4a the implementation shown.
[0428] After that, based on the Figure 4b process shown, the Slave port can calculate the one-way delay and the two-way average delay Delay_mean, satisfying:
[0429] Delay_mean = [(t2 – t3) + (receiveTimestamp of Delay_Resp – preciseOriginTimestamp of Follow_Up) – correctedSyncCorrectionField – correctionField of Follow_Up – correctionField of Delay_Resp] / 2
[0430] = [(t2 – t3) + (t4_ns – t1_ns) – dAsy – t1_fns – (-dAsy – t4_fns)] / 2
[0431] = [(t2 – t3) + (t4_ns + t4_fns) – (t1_ns + t1_fns)] / 2
[0432] = [(t2 – t3) + t4 – t1] / 2
[0433] Note 1: This formula is the existing formula in IEEE 1588-2019. See Section 11.3.2 e) 2) of IEEE 1588-2019;
[0434] Note 2: correctedSyncCorrectionField = correctionField of Sync + dAsy = dAsy
[0435] In addition, Figure 4aand Figure 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 later reference, it is recorded as problem 1): Port A is the receiver of the Delay_Req message and the sender of the Delay_Resp message, and port A (that is, the Master port) cannot obtain any delay. Although IEEE1588-2019 Section 11.3.2 c) 2) 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.
[0436] exist Figure 4a and Figure 4b In the E2E mechanism shown in Figure 1, if there is a TC device in the network, the E2E mechanism can only test the end-to-end delay through the TC device, and cannot test the link delay between any two ports. Figure 4c As shown in the figure, if NE1 and NE5 are BC and NE2 / 3 / 4 are TC, then the delay measured by the S port of NE5 is the sum of the fiber delay from NE1 to NE4 and the fiber delay from NE4 to NE5, but the delay of each fiber segment cannot be measured. Similarly, the delay measured by the P port of NE5 is the sum of the fiber delay from NE1 to NE2, the fiber delay from NE2 to NE3, and the fiber delay from NE3 to NE5, but the delay of each fiber segment cannot be measured.
[0437] for Figure 4c In the network shown in the figure, the P2P mechanism of 1588 can solve the problem of not being able to obtain the delay of each fiber segment. For example, in the P2P mechanism, any two ports of the BC and TC devices can exchange P2P mechanism messages, so that the delay of each fiber segment can be calculated.
[0438] The following will be Figures 5a to 5c Similarly, in the message interaction process of the P2P mechanism, the message sending mode may include a one-step mode and a two-step mode.
[0439] like Figure 5a As shown, in the one-step mode, taking the communication process between port A and port B as an example, the process includes the following. Figures 5a to 5cDuring the process shown, Port A and Port B can be ports with port status (such as the M\P\S ports in OC and BC nodes), or can be ports without port status (such as the ports in TC nodes).
[0440] 1. Port A sends a Pdelay_Req message to Port B, and t1 is the sending time (or sending timestamp) of the Pdelay_Req message. Among them, 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. t2 is the receiving time (or receiving timestamp) of the Pdelay_Req message, and t3 is the sending time (or sending timestamp) of the Pdelay_Resp message. Among them, the correctionField of the Pdelay_Resp message carries t3 - t2 - dAsy, and the requestReceiptTimestamp value of the Pdelay_Resp message is 0.
[0442] After that, based on Figure 5a the process shown, Port A can calculate the two-way average delay Delay_mean, which satisfies:
[0443] Delay_mean = [(t4 – t1) – correctedPdelayRespCorrectionField] / 2
[0444] = [(t4 – t1) – (t3 – t2)] / 2.
[0445] Note 1: This formula is an existing formula in IEEE 1588-2019. See Section 11.4.2 d) 3) of IEEE 1588-2019;
[0446] Note 2: correctedPdelayRespCorrectionField = correctionField of Pdelay_Resp + dAsy = t3 – t2
[0447] In addition, in Figure 5aIn the above, there are the following problems with the one-step mode of the P2P mechanism (for easy reference later, denoted as Problem 2). Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message, since the information obtained by Port A is the difference between t3 and t2, it causes Port A to be unable to determine the values of t2 and t3, which also leads to Port A being unable to measure the one-way delay. Similarly, the IEEE 1588 protocol defines that Port B can also send a Pdelay_Req message to Port A at the same time, and Port A replies with a Pdelay_Resp message to Port B, so that Port B can also measure the two-way average delay, but Port B is also unable to obtain the one-way link delay.
[0448] Similarly, in Figure 5a there are also the following problems with the one-step mode of the above P2P mechanism (for easy reference later, denoted as Problem 3). Port B, as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, since the Pdelay_Req message received by Port B does not carry time information, Port B is unable to obtain the one-way delay and the average delay. Although Section 11.4.2 a) 4) of IEEE 1588-2019 writes that Pdelay_req can carry an estimated value of t1, but does not specify the accuracy of the estimated value, so it cannot meet the requirements of high-precision delay measurement.
[0449] 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).
[0450] As Figure 5b shown, in two-step mode A, taking the communication process between Port A and Port B as an example, it includes the following process.
[0451] 1. Port A sends a Pdelay_Req message to Port B, and t1 is the sending time (or sending timestamp) of the Pdelay_Req message. Among them, the correctionField of the Pdelay_Req message carries -dAsy, and the originTimestamp value of the Pdelay_Req message is 0.
[0452] 2. After receiving the Pdelay_Req message, Port B sends a Pdelay_Resp message to Port A. Among them, the correctionField and requestReceiptTimestamp of the Pdelay_Resp message are both 0.
[0453] 3. Port B sends a Pdelay_Resp_Follow_Up message to Port A. t2 is the reception time (or reception timestamp) of the Pdelay_Req message, and t3 is the transmission time (or transmission timestamp) of the Pdelay_Resp message. Among them, 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.
[0454] After that, based on Figure 5b the process shown, Port A can calculate the two-way average delay Delay_mean, which satisfies:
[0455] Delay_mean = [(t4 – t1) – (responseOriginTimestamp of Pdelay_Resp_Follow_Up - requestReceiptTimestamp of Pdelay_Resp) – correctedPdelayRespCorrectionField – correctionField of Pdelay_Resp_Follow_Up] / 2
[0456] = [(t4 – t1) – (0 – 0) – dAsy – (t3 – t2 – dAsy)] / 2
[0457] = [(t4 – t1) – (t3 – t2)] / 2
[0458] Note 1: This formula is the existing formula in IEEE 1588 - 2019. See Section 11.4.2 d) 4) of IEEE 1588 - 2019;
[0459] Note 2: correctedPdelayRespCorrectionField = correctionField of Pdelay_Resp + dAsy = dAsy.
[0460] In addition, in Figure 5bIn the above, the two-step mode A of the P2P mechanism has the following problems (for the convenience of later reference, denoted as Problem 4). Port A, as the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message (and the receiver of the Pdelay_Resp_Follow_Up message), since the information obtained by Port A is the difference between t3 and t2, it causes Port A to be unable to determine the values of t2 and t3, which also results in Port A being unable to measure the one-way delay. Similarly, the IEEE 1588 protocol defines that Port B can also send a Pdelay_Req message to Port A at the same time, and Port A replies with a Pdelay_Resp message to Port B, so that Port B can also measure the two-way average delay, but Port B is also unable to obtain the one-way link delay.
[0461] Similarly, in Figure 5b In the above, the two-step mode A of the P2P mechanism also has the following problems (for the convenience of later reference, denoted as Problem 5). Port B, as the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message, since the Pdelay_Req message received by Port B does not carry time information, Port B is unable to obtain the one-way delay and the average delay. Although Section 11.4.2 a) 4) of IEEE 1588-2019 states that Pdelay_req can carry an estimated value of t1, it does not specify the accuracy of the estimated value, so it cannot meet the requirements of high-precision delay measurement.
[0462] As Figure 5c shown, in the two-step mode B, taking the communication process between Port A and Port B as an example, it includes the following process.
[0463] 1. Port A sends a Pdelay_Req message to Port B. Among them, the correctionField of the Pdelay_Req message carries -dAsy, and the originTimestamp value of the Pdelay_Req message is 0.
[0464] 2. After receiving the Pdelay_Req message, Port B sends a Pdelay_Resp message to Port A. Among them, the correctionField of the Pdelay_Resp message carries -t2_fns (the fractional nanosecond part of t2, with an accuracy of 1 / 2 16 ns), and the requestReceiptTimestamp carries t2_ns (the nanosecond and second value parts of t2, with an accuracy of 1 ns).
[0465] 3. Port B sends a Pdelay_Resp_Follow_Up message to Port A. Among them, the correctionField of the Pdelay_Resp_Follow_Up message carries t3_fns - dAsy, and the value of responseOriginTimestamp is t3_ns.
[0466] After that, based on Figure 5c the process shown, Port A can calculate the two-way average delay Delay_mean, satisfying:
[0467] Delay_mean = [(t4 – t1) – (responseOriginTimestamp of Pdelay_Resp_Follow_Up - requestReceiptTimestamp of Pdelay_Resp) – correctedPdelayRespCorrectionField – correctionField of Pdelay_Resp_Follow_Up] / 2
[0468] = [(t4 – t1) – (t3_ns – t2_ns) – (-t2_fns + dAsy) – (t3_fns – dAsy)] / 2
[0469] = [(t4 – t1) – (t3_ns + t3_fns) + (t2_ns + t2_fns)] / 2
[0470] = [(t4 – t1) – (t3 – t2)] / 2
[0471] Note 1: This formula is the existing formula in IEEE 1588 - 2019. See Section 11.4.2 d) 4) of IEEE 1588 - 2019;
[0472] Note 2: correctedPdelayRespCorrectionField = correctionField of Pdelay_Resp + dAsy = -t2_fns + dAsy.
[0473] Similarly, in Figure 5cIn the above, there are still the following problems with the two-step mode B of the above P2P mechanism (denoted as Problem 6 for easy reference in the following text). Since the Pdelay_Req message received by port B does not carry time information, port B cannot obtain the one-way delay and the average delay. Although Section 11.4.2 a) 4) of IEEE 1588-2019 states that Pdelay_req can carry an estimated value of t1, the accuracy of the estimated value is not specified, so the requirement for high-precision delay measurement cannot be met.
[0474] As can be seen from the above implementation process, although time information can be transmitted between different nodes through some clock messages, there are still some unsolved problems. To solve the above problems, a communication method and related devices provided by this application will be introduced below with more drawings.
[0475] Please refer to Figure 6a , which is a schematic diagram of the communication method provided by this application. The method includes the following steps. The method at least includes Figure 6a the steps S601 and S602 shown in
[0476] It should be noted that in the following method, network devices such as the first node and the second node are used as the execution subjects of each step to illustrate the method, but this application does not limit the execution subjects of this interaction illustration. For example, in the following methods (such as Figure 6a / Figure 7a / Figure 8a / Figure 9a / Figure 9b and other methods), each step can also be executed by some components of the network device (such as a processor, a chip, or a chip system, etc.), or each step can also be executed 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.
[0477] Optionally, in Figure 6a / Figure 7a / Figure 8a / Figure 9a / Figure 9b and other methods, any node among the first node and the second node can be a TC node, a BC node, or an OC node defined by PTP. In addition, with the evolution of the PTP standard, any node can also be other types of nodes defined by PTP, which are not limited here.
[0478] S601. The second node sends a first message. Correspondingly, the first node receives the first message.
[0479] S602. The first node sends a second message. Correspondingly, the second node receives the second message.
[0480] It should be understood that in Figure 6a the method shown, the first node may be a P2P node, and / or the first port may be a P2P port. Correspondingly, the first message for the delay request may be a peer-to-peer delay request (Pdelay_Req) message defined by PTP, and the second message for the delay response may be a peer-to-peer delay response (Pdelay_Resp) message defined by PTP. Optionally, with the evolution of the PTP standard, the first message and the second message may also have other message names, which are not limited here.
[0481] In addition, in Figure 6a the method shown, the first node includes a first port, 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. Also, 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. Among them, the first port and the second port are PTP ports supporting one-step, or the first port and the second port are PTP ports of mode A supporting two-step.
[0482] 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.
[0483] Optionally, in this application, the timestamp carried by the message (such as the receive timestamp or the send timestamp) can be the actual send timestamp or the actual receive timestamp of the message by the port. Compared with the way of carrying the estimated value of the timestamp, it can reflect the actual send time or the actual receive time of the message through the timestamp carried by the message, so as to improve the accuracy of clock synchronization.
[0484] In this application, a message carrying a timestamp can be understood as that the value of one or more fields carried by the message is the timestamp, or the timestamp is carried by one or more fields carried by the message. For example, the second message carries the receive timestamp of the first message, which can be understood as that the value of one or more fields in the second message is the receive timestamp of the first message, or the receive timestamp of the first message is 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).
[0485] Based on Figure 6aIn the technical solution shown, after the first node receives a first packet for delay request through a first port in step S601, the first node may send a second packet for delay response through the first port in step S602, and the second packet carries the reception timestamp of the first packet and / or the transmission timestamp of the second packet. In other words, the receiver of the second packet can obtain the reception timestamp of the first packet and / or the transmission timestamp of the second packet. Thus, by means of the delay response packet carrying the reception timestamp of the delay request packet (and / or the transmission timestamp of the delay response packet), the receiver of the delay response packet can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further enable the receiver of the delay response packet to obtain the time information of the first node.
[0486] In a possible implementation manner, the reception timestamp of the first packet and / or the transmission timestamp of the second packet are used to determine the one-way link delay between the first port and the second port, where the second port is the port that receives the second packet. Specifically, for the receiver of the second packet, the second packet 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 timestamps carried in the second packet and the timestamps of its own sent / received packets. In this way, compared with the method of carrying the timestamp difference in the packet and then only being able to determine the average link delay based on the difference, it enables the packet receiver to determine the one-way link delay based on the timestamps carried in the packet, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0487] In this application, the one-way link delay between one port and another port may include the one-way link delay in the communication direction from the one port to the other port, and / or the one-way link delay in the communication direction from the other port to the one port (i.e., the reverse link delay in the communication direction from the one port to the other port). For example, the one-way link delay between the first port and the second port may include the one-way link delay in the communication direction from the first port to the second port, and / or the one-way link delay in the communication direction from the second port to the first port (i.e., the reverse link delay in the communication direction from the first port to the second port).
[0488] Optionally, the one-way link delay can be replaced by other terms, such as one-way delay, one-way transmission delay, or the one-way delay of the link, etc.
[0489] In this application, for the receiver of the message carrying a timestamp, in addition to determining the one-way link delay based on the timestamp carried by the message, 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 failed based on the timestamp. Wherein, when the second message carries the reception timestamp of the first message, and the moment indicated by the reception timestamp is after the moment indicated by the transmission timestamp of the first message sent by the second port, the receiver can determine that the first node has failed.
[0490] In a possible implementation, 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. Specifically, the second message can further carry first indication information, so that the receiver of the second message can determine that the second message carries the reception timestamp of the first message based on the first indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0491] In a possible implementation, 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 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 1 ns. The second message can carry the reception timestamp of the first message in the above-mentioned multiple ways. In this way, different accuracy requirements can be met.
[0492] In this application, there are multiple implementations for an accuracy less than 1 ns. For example, the accuracy is 1 / 2 16 ns, 1 / 2 8 ns, etc., which are not limited here.
[0493] In a possible implementation, the first port is a PTP port supporting one-step, and the first field is the requestReceiptTimestamp field; or, 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. Specifically, under different implementation modes 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 the overhead of the message.
[0494] 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 scheme implementation.
[0495] For ease of understanding, the implementation processes of the first field and the second field will be exemplarily described below in combination with some implementation examples.
[0496] Example 1: In the one-step mode of the P2P mechanism, the first field may be the requestReceiptTimestamp field defined by PTP, and the second field may be the fractional part of the nanoseconds of the request receipt timestamp (requestReceiptTimestampFractionalNS) field described later.
[0497] As described above Figure 5a , based on Figure 5a the implementation method shown, there is Problem 2 in the one-step mode of the P2P mechanism, that is, Port A is the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message. Since the information obtained by Port A is the difference between t3 and t2, Port A cannot determine the values of t2 and t3, which also causes Port A to be unable to measure the one-way delay.
[0498] In Figure 6a the technical solution shown, the second port in the second node may be 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 may obtain the receipt timestamp of the first message and / or the transmission timestamp of the second message based on the second message, so that the second node determines the one-way link delay between the first port and the second port based on the receipt timestamp of the first message and / or the transmission timestamp of the second message to solve this Problem 2.
[0499] As an application example of Example 1, taking the second message carrying the transmission timestamp of the second message as an example, as Figure 6b shown, 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.
[0500] 1. Port A sends a Pdelay_Req message to Port B.
[0501] 2. Port B sends a Pdelay_Resp message to Port A.
[0502] Compared with Figure 5a the implementation process shown, in Figure 6bDuring the process shown, 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 ns part (abbreviated as t2_ns) of the t2 timestamp is carried / borne through the requestReceiptTimestamp field (in units of 1 ns) of the Pdelay_Resp message.
[0503] Optionally, in Table 1, the header can carry the message type (messageType), flag field (flagField), correction field (correctionField), etc.
[0504] Optionally, in Table 1, the requesting port identity can be the port identity of the port that sends the Pdelay_Req message, that is, the identity of port A.
[0505] Table 1
[0506] Bits Octets Offset header 34 0 requestReceiptTimestamp 10 34 requestingPortIdentity 10 44
[0507] It should be understood that in the tables provided by the embodiments of the present application, the names, orders, and occupied byte counts (or bit counts) of each field are some implementation examples. In actual applications, the names of each field can be other names, the orders of different fields can be adjusted, and the byte counts (or bit counts) occupied by each field can also be modified to other values.
[0508] In Table 1, the fractional ns part (abbreviated as t2_fns) of the t2 timestamp is not carried, so the accuracy of the t2 timestamp is 1 ns, which generally can also meet the requirements of delay measurement accuracy.
[0509] In addition, for port A, based on the content shown in Table 1, port A can calculate the one-way link delay.
[0510] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0511] Delay_A_to_B = requestReceiveTimestamp of Pdelay_Resp – t1
[0512] = t2_ns – t1
[0513] = t2 – t1 – t2_fns
[0514] ≈ t2 – t1.
[0515] For example, for the one-way link delay Delay_B_to_A from port B to port A, it satisfies:
[0516] Delay_B_to_A = t4 – (correctedPdelayRespCorrectionField + requestReceiveTimestamp of Pdelay_Resp)
[0517] = t4 – [(t3 – t2) + t2_ns]
[0518] = t4 – t3 + t2_fns
[0519] ≈ t4 – t3.
[0520] In the above implementation process, since t2_fns is less than 1 ns, the calculation accuracy of the one-way link delay is at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement.
[0521] It should be understood that, as described above, the second message can carry the reception timestamp (t2) of the first message and / or the transmission timestamp (t3) of the second message. In Example 1 and Example 2 below, taking t2 as an example, the process of port A determining the delay based on t1 and t2 is described. If the timestamp carried by the second message is t3, port A can 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.
[0522] In addition, the formula for port A to calculate the two-way average delay Delay_mean can refer to the above Figure 5a shown implementation process.
[0523] Optionally, from the above implementation process, it can be seen that in Figure 6b the calculation of the one-way delays Delay_A_to_B and Delay_B_to_A in the shown scheme depends on the parameters carried by requestReceiptTimestamp in the Pdelay_Resp message. To be compatible with Figure 5a (the value carried by requestReceiptTimestamp is 0), for this reason, indication information can be carried in the message (such as the Pdelay_Resp message) to indicate which mode it is. This indication information is denoted as the first indication information described above. Exemplarily, to be compatible with the above Figure 5a , and Figure 6bIn the illustrated embodiment, there are two modes in total, which can be indicated by 1 bit. For example, it can be represented by the 7th bit of the 0th byte of the flagField in the header of the Pdelay_Resp message, that is, the first indication information can be carried in the 7th bit of the 0th byte of the flagField in the header of the Pdelay_Resp message.
[0524] As another application example of Example 1, as Figure 6c shown, 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.
[0525] 1. Port A sends a Pdelay_Req message to Port B.
[0526] 2. Port B sends a Pdelay_Resp message to Port A.
[0527] Compared with Figure 5a the implementation process shown, in the Figure 6c process shown, when Port B can send a Pdelay_Resp message, the Pdelay_Resp message can carry the reception timestamp (t2) when Port B receives the Pdelay_Req message. For example, as shown in Table 2 below, compared with Table 1, in the example shown in Table 2, in addition to carrying t2_ns through the requestReceiptTimestamp field, the fractional nanosecond part (requestReceiptTimestampFractionalNS) field of the request reception timestamp of the Pdelay_Resp message (the unit is less than 1 ns, such as 1 / 2 16 ns) can also carry the ns fractional part of the t2 timestamp (abbreviated as t2_fns).
[0528] Optionally, requestReceiptTimestampFractionalNS can occupy 2 bytes to carry t2_fns, and the format can refer to the format of the correctionField, with the unit of 1 / 2 16 ns.
[0529] Table 2
[0530] Bits Octets Offset header 34 0 requestReceiptTimestamp 10 34 requestingPortIdentity 10 44 requestReceiptTimestampFractionalNS 2 54
[0531] Optionally, t2_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 3. Compared with 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 by the TLV carried in the Pdelay_Resp message. That is, the Pdelay_Resp message can include the following fields:
[0532] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0533] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 2 (i.e., the length value of requestReceiptTimestampFractionalNS);
[0534] The value field can be represented as "requestReceiptTimestampFractionalNS" and can occupy 2 bytes, carrying t2_fns. The format can refer to the format of the correctionField, and the unit is 1 / 2 16 ns.
[0535] Table 3
[0536] Bits Octets Offset header 34 0 requestReceiptTimestamp 10 34 requestingPortIdentity 10 44 tlvType 2 54 lengthField 2 56 requestReceiptTimestampFractionalNS 2 58
[0537] Optionally, t2_ns and t2_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 4. Compared with Table 1, in the example shown in Table 4, t2_ns and t2_fns are carried by the fields in the newly added TLV. That is, the Pdelay_Resp message can include the following fields:
[0538] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0539] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (i.e., the length value of requestReceiptTimestamp and requestReceiptTimestampFractionalNS);
[0540] The value field can represent including "requestReceiptTimestamp" and
[0541] "requestReceiptTimestampFractionalNS". Among them, "requestReceiptTimestamp" can occupy 10 bytes, carry t2_ns, and its format refers to the Timestamp format of the current IEEE 1588 standard, with a precision of 1 ns;
[0542] "requestReceiptTimestampFractionalNS" can occupy 2 bytes, carry t2_fns, and its format can refer to the format of the correctionField, with the unit of 1 / 2 16 ns.
[0543] Table 4
[0544] Bits Octets Offset header 34 0 requestReceiptTimestamp 10 34 requestingPortIdentity 10 44 tlvType 2 54 lengthField 2 56 requestReceiptTimestamp 10 58 requestReceiptTimestampFractionalNS 2 68
[0545] In addition, for port A, based on the implementation method through any one of Tables 2 to 4, port A can calculate the one-way link delay.
[0546] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0547] Delay_A_to_B = requestReceiveTimestamp of Pdelay_Resp +
[0548] requestReceiptTimestampFractionalNS of Pdelay_Resp – t1
[0549] = t2_ns + t2_fns – t1
[0550] = t2 – t1.
[0551] For example, for the one-way link delay Delay_B_to_A from port B to port A, it satisfies:
[0552] Delay_B_to_A = t4 – (correctedPdelayRespCorrectionField + requestReceiveTimestamp of
[0553] Pdelay_Resp + requestReceiveTimestamp of Pdelay_Resp)
[0554] = t4 – [(t3 – t2) + t2_ns + t2_fns]
[0555] = t4 – t3.
[0556] Optionally, as can be seen from the above implementation process, in Figure 6b the calculation of the one-way delays Delay_A_to_B and Delay_B_to_A in the shown solution depends on the parameter carried by requestReceiptTimestamp in the Pdelay_Resp message. To be compatible with Figure 5a (the value carried by requestReceiptTimestamp is 0), for this reason, indication information can be carried in the message (such as the Pdelay_Resp message) to indicate which mode it is, and this indication information is denoted as the first indication information described above. Exemplarily, to be compatible with the Figure 5a , as well as Figure 6c shown embodiments, there are a total of two modes, and 1 bit can be used to indicate. For example, it can be represented by the 7th bit of the 0th byte of the flagField bit in the header of the Pdelay_Resp message, that is, the first indication information can be carried in the 7th bit of the 0th byte of the flagField bit in the header of the Pdelay_Resp message.
[0557] Example 2: The two-step mode of the P2P mechanism. The first field can be the requestReceiptTimestamp field defined by PTP, and the second field can be the correctionField field described later.
[0558] As described above Figure 5b , based on Figure 5b the shown implementation method, there is a problem 4 in the two-step mode of the P2P mechanism, that is, port A is the receiver of the Pdelay_Resp message and the Pdelay_Resp_Follow_Up message. Since the information obtained by port A is the difference between t3 and t2, port A cannot determine the values of t2 and t3, which also causes port A unable to measure the one-way delay.
[0559] However, in Figure 6a the shown technical solution, the second port in the second node can be 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 this second message, so that the second node determines the one-way 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 this problem 4.
[0560] As an application example of Example 2, such asFigure 6d As shown, 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.
[0561] 1. Port A sends a Pdelay_Req message to port B.
[0562] 2. Port B sends a Pdelay_Resp message to port A.
[0563] Compared with Figure 5b the implementation process shown, in the process shown in Figure 6d when port B can send a Pdelay_Resp message, the Pdelay_Resp message can carry the reception timestamp (t2) of port B receiving the Pdelay_Req message.
[0564] Exemplarily, in the process shown in Figure 6d the Pdelay_Resp message can carry t2_ns. Among them, t2_ns can be carried by the requestReceiptTimestamp field, and specific reference can be made to Table 1 and its related implementation process in the previous text.
[0565] Optionally, in the process shown in Figure 6d the Pdelay_Resp message can also carry information for determining t2_fns. Among them, the Pdelay_Resp message can carry the opposite number of t2_fns (i.e., -t2_fns). For example, -t2_fns can be carried by the correctionField in the Pdelay_Resp message. Among them, the correctionField can occupy 8 bytes, and the specific implementation can refer to the correctionField format of the IEEE 1588 standard.
[0566] In addition, for port A, based on the content shown in Table 1, port A can calculate the one-way link delay.
[0567] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0568] Delay_A_to_B = (requestReceiptTimestamp of Pdelay_Resp – correctionField of Pdelay_Resp) – t1
[0569] = (t2_ns + t2_fns) – t1
[0570] = t2 – t1.
[0571] For example, for the one-way link delay Delay_B_to_A from port B to port A, it satisfies:
[0572] Delay_B_to_A = t4 – correctedPdelayRespFollowUpCorrectionField – (requestReceiptTimestamp of Pdelay_Resp – correctionField of Pdelay_Resp)
[0573] = t4 – (t3 – t2) – (t2_ns + t2_fns)
[0574] = t4 – t3.
[0575] Note 1: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2.
[0576] Similarly, port A can also calculate the two-way average delay Delay_mean, which satisfies:
[0577] Delay_mean = [(t4 – t1) – correctedPdelayRespFollowUpCorrectionField] / 2
[0578] = [(t4 – t1) – (t3 – t2)] / 2
[0579] Note 2: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2.
[0580] Optionally, from the above implementation process, it can be seen that in Figure 6d the calculation process of "Delay_mean" in the shown scheme is different from that in the previous text Figure 5bIn the implementation process shown above, both the one-way delays Delay_A_to_B and Delay_B_to_A rely on the values carried by the requestReceiveTimestamp and correctionField of Pdelay_Resp. Therefore, an indication information can be carried in the message (such as Pdelay_Resp message or Pdelay_Resp_Follow_Up message) to indicate which mode it is, and this indication information is denoted as the first indication information described above. Exemplarily, to be compatible with the Figure 5b and Figure 5c solutions shown above, as well as Figure 6d the embodiments shown above, there are a total of three modes, which can be indicated by 2 bits. For example, it can be represented by the 7th bit of the 0th byte and the 7th bit of the 1st byte of the flagField in the header of the Pdelay_Resp message or Pdelay_Resp_Follow_Up message, that is, the first indication information can be carried in the 7th bit of the 0th byte and the 7th bit of the 1st byte of the flagField in the header of the Pdelay_Resp message or Pdelay_Resp_Follow_Up message.
[0581] In a possible implementation manner, Figure 6a the technical solution shown above can be used to solve other problems in addition to solving the above problems 2 and 4, which will be described below in combination with more implementation examples.
[0582] Implementation manner 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 transmission 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 transmission 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 sends the first message).
[0583] In a possible implementation manner of implementation manner 1, the transmission timestamp of the first message is used to determine the one-way link delay between the first port and the second port. Specifically, as the receiver of the first message, 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 its own received message. In this way, compared with the method without carrying any time information, it enables the message receiver to 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.
[0584] Optionally, the first message further carries second indication information, which is used to indicate that the first message carries the transmission timestamp of the first message. Specifically, the first message may further carry second indication information, so that the recipient of the first message (i.e., the first node) can determine, based on the second indication information, that the first message carries the transmission timestamp of the first message, and further enable the recipient to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0585] In a possible implementation of Implementation Mode 1, 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 precision of the value of the third field is 1 ns, and the precision of the value of the fourth field is less than 1 ns. Specifically, the first message can carry the transmission timestamp of the first message in the above-mentioned multiple ways. In this way, different precision requirements can be met.
[0586] Optionally, the third field is an originTimestamp field. Specifically, when the first port is a PTP port that supports one-step, 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 already defined by PTP can be reused to reduce the overhead of the message.
[0587] For the sake of easy understanding, the implementation processes of the third field and the fourth field will be exemplarily described below in combination with some implementation examples.
[0588] Example 3: The first field can be the originTimestamp field defined by PTP, and the second field can be the originTimestampFractionalNS field of the fractional part of the nanoseconds of the original timestamp described later.
[0589] As described above Figure 5a , based on Figure 5a the implementation mode shown, there is Problem 3 in the one-step mode of the P2P mechanism, that is, Port B, as the recipient of the Pdelay_Req message and the sender of the Pdelay_Resp message, since the Pdelay_Req message received by Port B does not carry time information, Port B cannot obtain the one-way delay and the average delay.
[0590] In the above technical solution, the first port in the first node can be the receiver of the Pdelay_Req message and the sender of the Pdelay_Resp message. Moreover, after the first node receives the first message in step S601, the first node can obtain the transmission timestamp of the first message based on the first message, and further enable the first node to determine the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, so as to solve problem 3.
[0591] As an application example of Example 3, as Figure 6e shown, 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] Compared with Figure 5a the implementation process shown, in Figure 6e the process shown, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the reception timestamp (t1) of port A sending the Pdelay_Req message. For example, as shown in Table 5 below, the ns part (abbreviated as t1_ns) of the t1 timestamp is carried / borne through the originTimestamp field (unit: 1 ns) of the Pdelay_Resp message.
[0595] Table 5
[0596] Bits Octets Offset header 34 0 originTimestamp 10 34 reserved 10 44
[0597] In Table 5, the fractional ns part (abbreviated as t1_fns) of the t1 timestamp is not carried, so the accuracy of the t1 timestamp is 1 ns, which generally can also meet the requirements of delay measurement accuracy.
[0598] In addition, for port B, based on the content shown in Table 5, port B can calculate the one-way link delay.
[0599] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0600] Delay_A_to_B = t2 – originTimestamp of Pdelay_Req
[0601] = t2 – t1_ns
[0602] = t2 – t1 + t1_fns.
[0603] Since t1_fns is less than 1 ns, the calculation accuracy of the one-way delay is at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement.
[0604] As another application example of Example 3, as Figure 6f shown, 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.
[0605] 1. Port A sends a Pdelay_Req message to port B.
[0606] 2. Port B sends a Pdelay_Resp message to port A.
[0607] Compared with Figure 5a the implementation process shown, in the Figure 6f process shown, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the reception timestamp (t1) of port A sending the Pdelay_Req message. 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 part of t2) through other fields.
[0608] Table 6
[0609]
[0610]
[0611] 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 to carry t1_fns, and the format can refer to the format of correctionField, with the unit of 1 / 2 16 ns.
[0612] Optionally, t1_fns can also be carried by adding a TLV. The following will be described in combination with the example shown in Table 7. Compared with 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 by the TLV carried by the Pdelay_Req message. That is, the Pdelay_Req message can include the following fields:
[0613] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0614] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 2 (i.e., the length value of originTimestampFractionalNS);
[0615] 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.
[0616] Table 7
[0617]
[0618] Optionally, t1_ns and t1_fns can also be carried by adding a new TLV. The following will be described in combination with the example shown in Table 8. Compared with 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:
[0619] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0620] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (i.e., the length value of originTimestamp and originTimestampFractionalNS);
[0621] The value field can include "originTimestamp" and "originTimestampFractionalNS". Among them, "originTimestamp" can occupy 10 bytes, carrying t1_ns. The format refers to the Timestamp format of the current IEEE 1588 standard, with a precision of 1ns; "originTimestampFractionalNS" can occupy 2 bytes, carrying t1_fns. The format can refer to the format of correctionField, and the unit is 1 / 2 16 ns.
[0622] Table 8
[0623] Bits Octets Offset header 34 0 originTimestamp 10 34 requestingPortIdentity 10 44 tlvType 2 54 lengthField 2 56 originTimestamp 10 58 originTimestampFractionalNS 2 68
[0624] In addition, for Port B, based on the implementation methods in any of Tables 6 to 8, Port B can calculate the one-way link delay.
[0625] For example, for the one-way link delay Delay_A_to_B from Port A to Port B, it satisfies:
[0626] Delay_A_to_B = t2 – originTimestamp of Pdelay_Req – originTimestampFractionalNS of Pdelay_Req
[0627] = t2 – t1_ns – t1_fns
[0628] = t2 – t1.
[0629] Optionally, as can be seen from the above implementation process, in Figure 6f the calculation of the one-way delay Delay_A_to_B in the shown solution depends on the parameters carried in the originTimestamp in the Pdelay_Req message. To be compatible with Figure 5a (the value carried in originTimestamp is 0), for this purpose, indication information can be carried in the message (such as the Pdelay_Req message) to indicate which mode it is. This indication information is denoted as the first indication information described above. Exemplarily, to be compatible with the above Figure 5a , and Figure 6f shown embodiments, there are a total of two modes, and 1 bit can be used to indicate. For example, it can be represented by the 7th bit of the 0th byte of the flagField in the header of the Pdelay_Req message, that is, the first indication information can be carried in the 7th bit of the 0th byte of the flagField in the header of the Pdelay_Req message.
[0630] Implementation method 2: The first port is a PTP port supporting mode A of two-step, and the first message carries the transmission timestamp of the third message, where the third message is the previous message of the same type as the first message transmitted. Specifically, when the first port is a PTP port supporting mode A of two-step, the first message received by the first node through the first port can also carry the transmission 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).
[0631] In this application, the previous (previous or pre) transmission can be replaced by other terms, such as the last transmission, the previous transmission, the previous transmission, etc.
[0632] In this application, "transmission" can be understood as "sending or receiving". For example, if the first node is the recipient of the first message, then for the first node, the third message can be the previous received message of the same type as the first message. Another example is that if the second node is the sender of the first message, then for the second node, the third message can be the previous sent message of the same type as the first message.
[0633] In a possible implementation of Implementation Mode 2, the transmission timestamp of the third message is used to determine the one-way link delay between the first port and the second port. Specifically, when the first node is the recipient of the first message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the first message and the timestamp of its own message reception. In this way, compared with the method without carrying any time information, it enables the message recipient to determine the one-way link delay based on the timestamp carried in 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.
[0634] In a possible implementation, the first message also carries third indication information, which is used to indicate that the first message carries the transmission timestamp of the third message. Specifically, the first message can also carry the third indication information, so that the recipient of the first message (i.e., the first node) can determine that the first message carries the transmission timestamp of the third message based on the third indication information, and further enable the recipient to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0635] In a possible implementation of Implementation Mode 2, 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; where 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 transmission timestamp of the third message in the above multiple ways. In this way, different accuracy requirements can be met.
[0636] In a possible implementation, the fifth field is the originTimestamp field. Specifically, when the first port is a PTP port supporting one-step, 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 overhead of the message.
[0637] For ease of understanding, the implementation processes of the fifth field and the sixth field will be exemplarily described below in combination with some implementation examples.
[0638] Example 4: The fifth field may be the originTimestamp field defined by PTP, and the second field may be the fractional nanosecond part (originTimestampFractionalNS) field of the original timestamp described later.
[0639] As described above Figure 5b and Figure 5c , based on Figure 5b and Figure 5c the implementation shown, there are problems 5 and 6 in the two-step mode of the P2P mechanism. That is, port B is the recipient of the Pdelay_Req message and the sender of the Pdelay_Resp message. Since the Pdelay_Req message received by port B does not carry time information, port B cannot obtain the one-way delay and the average delay.
[0640] In the above technical solution, the first port in the first node can be the recipient 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 transmission timestamp of the third message based on the first message, so that the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the third message to solve problems 5 and 6.
[0641] As an application example of Example 4, as Figure 6g shown, 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.
[0642] 1. Port A sends a Pdelay_Req message to port B.
[0643] 2. Port B sends a Pdelay_Resp message to port A.
[0644] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0645] Compared with Figure 5b the implementation process shown, in Figure 6g the process shown, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the transmission timestamp (t1pre) of the previous Pdelay_Req message sent by port A. For example, the ns part (abbreviated as t1pre_ns) of the t1pre timestamp is carried / borne through the originTimestamp field (unit: 1ns) of the Pdelay_Resp message. The implementation of the originTimestamp field can refer to Table 5 and related descriptions above.
[0646] After that, for port B, port B can calculate the one-way link delay.
[0647] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0648] Delay_A_to_B = t2pre – originTimestamp of Pdelay_Req
[0649] = t2pre – t1pre_ns
[0650] = t2pre – t1pre + t1pre_fns
[0651] ≈ t2pre – t1pre.
[0652] Among them, t2pre represents the reception timestamp of the Pdelay_Req message received by port B last time. Since t1_fns is less than 1 ns, the calculation accuracy of the one-way delay is at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement.
[0653] Optionally, since the improvements of the above implementation method 1 and implementation method 2 are both in the fields carried in the Pdelay_Req message, in order to distinguish between implementation method 1 and implementation method 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 indicate whether the timestamp information carried in 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 to indicate. Currently, twoStepFlag only has meaning for Sync messages and Pdelay_Resp messages, and the Pdelay_Req message can be extended. For example, 0 represents one-step (indicating that the timestamp information carried in the Pdelay_Req message sent by port A is t1), and 1 represents two-step (indicating that the timestamp information carried in the Pdelay_Req message sent by port A is t1pre). Or, in order to be compatible Figure 5b with the method of (not carrying timestamps), there are a total of 3 modes, and 1 reserved bit in the flagField in the Pdelay_Req message Header can be used to indicate. 0 represents not carrying timestamps, and 1 represents carrying timestamps.
[0654] As an application example of Example 4, such as Figure 6hAs shown, 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.
[0655] 1. Port A sends a Pdelay_Req message to port B.
[0656] 2. Port B sends a Pdelay_Resp message to port A.
[0657] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0658] Compared with Figure 5b the implementation process shown, in the Figure 6h process shown, when port A can send a Pdelay_Req message, the Pdelay_Req message can carry the transmission timestamp (t1pre) of the Pdelay_Req message sent by port A last time. For example, the ns part (abbreviated as t1pre_ns) of the t1pre timestamp and the fractional nanosecond part (abbreviated as t1pre_fns) of the t1pre timestamp are carried / borne by the Pdelay_Resp message.
[0659] Exemplarily, t1pre_ns can be borne by the originTimestamp field in the Pdelay_Req message, and t1pre_ns can be borne by the originTimestampFractionalNS field in the Pdelay_Req message. Among them, various implementations of these two fields can refer to any one of Tables 6 to 8 and related descriptions in the previous text.
[0660] After that, for port B, port B can calculate the one-way link delay.
[0661] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0662] Delay_A_to_B = t2pre – originTimestamp of Pdelay_Req – originTimestampFractionalNS of Pdelay_Req
[0663] = t2pre – t1pre_ns – t1pre_fns
[0664] = t2pre – t1pre.
[0665] Among them, 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 at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement.
[0666] Similarly, in order to distinguish between Implementation Method 1 and Implementation Method 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 in 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, twoStepFlag only has meaning for Sync messages and Pdelay_Resp messages, and the Pdelay_Req message can be extended. For example, 0 represents one-step (indicating that the timestamp information carried in the Pdelay_Req message sent by port A is t1), and 1 represents two-step (indicating that the timestamp information carried in the Pdelay_Req message sent by port A is t1pre). Or, in order to be compatible with Figure 5b the method of (not carrying timestamps), there are a total of 3 modes, and 1 reserved bit in the flafField in the Pdelay_Req message Header can be used for indication. 0 represents not carrying timestamps, and 1 represents carrying timestamps.
[0667] Implementation Method 3: The first port is a PTP port supporting the two-step mode A. The method further includes: the first node sends a fourth message to the second node through the first port, the fourth message is a following message of the second message, and the fourth message carries the transmission timestamp of the second message. Specifically, when the first port in the first node is a PTP port supporting the two-step mode A, the first node can also send a fourth message to the second node through the first port and carry the transmission timestamp of the second message in the fourth message. In this way, the receiver of the fourth message can obtain more time information.
[0668] In a possible implementation of Implementation Mode 3, the transmission 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. Thereafter, the receiver can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fourth message and the timestamps of its own transmitted / received messages. In this way, compared with the method of carrying the timestamp difference in the message and only being able to determine the average link delay based on the difference, the message receiver can determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0669] It can be understood that both the second message and the fourth message received by the second port can carry timestamps, so that the second node including the second port can determine the one-way link delay through the timestamp carried in the second message and can also determine the one-way link delay through the timestamp carried in the fourth message. This enables the second node to obtain the one-way link delay in multiple ways, which can improve the flexibility of the solution implementation and also enable the second node to perform mutual verification based on different one-way link delays to improve the accuracy of clock synchronization.
[0670] Optionally, the fourth message also carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message. Specifically, the fourth message can also carry the fourth indication information, so that the receiver of the fourth message can determine that the fourth message carries the transmission timestamp of the second message based on the fourth indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp to avoid parsing errors.
[0671] In a possible implementation mode, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. Specifically, the second message can carry the transmission timestamp of the second message in the above multiple ways. In this way, different accuracy requirements can be met.
[0672] In a possible implementation mode, the seventh field is the response origin timestamp field. Specifically, when the first port is a PTP port supporting two-step, the field used to carry the transmission 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 the overhead of the message.
[0673] For the sake of easy understanding, the implementation processes of the seventh field and the eighth field will be exemplarily described below in combination with some implementation examples.
[0674] Example 5: The seventh field can be the responseOriginTimestamp field defined by PTP, and the second field can be the responseOriginTimestampFractionalNS field of the response original timestamp described later.
[0675] As described above Figure 5b , based on Figure 5b the implementation method shown, there is problem 4 in the two-step mode of the P2P mechanism, that is, port A is the receiver of the Pdelay_Resp_Follow_Up message. Since the information obtained by port A is the difference between t3 and t2, port A cannot determine the values of t2 and t3, which also causes port A to be unable to measure the one-way delay.
[0676] In the above technical solution, the second port in the second node can be 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 determines the one-way 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, so as to solve this problem 4.
[0677] As an application example of Example 5, taking the fourth message carrying the transmission timestamp of the second message as an example, as Figure 6i shown, 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.
[0678] 1. Port A sends a Pdelay_Req message to port B.
[0679] 2. Port B sends a Pdelay_Resp message to port A.
[0680] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0681] Compared with Figure 5b the implementation process shown, in Figure 6iDuring the process shown, when Port B can send a Pdelay_Resp_Follow_Up message, the Pdelay_Resp_Follow_Up message can carry the receive timestamp (t3) of Port B sending the Pdelay_Resp message. For example, as shown in Table 9 below, the ns part (abbreviated as t3_ns) of the t3 timestamp is carried / borne through the responseOriginTimestamp field (in units of 1 ns) of the Pdelay_Resp_Follow_Up message.
[0682] Table 9
[0683] Bits Octets Offset header 34 0 responseOriginTimestamp 10 34 requestingPortIdentity 10 44
[0684] Thereafter, for Port A, Port A can calculate the one-way link delay.
[0685] For example, for the one-way link delay Delay_A_to_B from Port A to Port B, it satisfies:
[0686] Delay_A_to_B = (responseOriginTimestamp of Pdelay_Resp_Follow_Up – correctedPdelayRespFollowUpCorrectionField) – t1
[0687] = (t3_ns – (t3 – t2)) – t1
[0688] = t2 – t1 – t3_fns
[0689] ≈ t2 – t1.
[0690] For example, for the one-way link delay Delay_B_to_A from Port B to Port A, it satisfies:
[0691] Delay_B_to_A = t4 – responseOriginTimestamp of Pdelay_Resp_Follow_Up
[0692] = t4 – t3_ns
[0693] = t4 – t3 + t3_fns
[0694] ≈ t4 – t3.
[0695] Note 1: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2.
[0696] Among them, 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 lost by at most 1 ns, which can also meet the requirements of high-precision delay measurement.
[0697] Similarly, port A can also calculate the two-way average delay Delay_mean, which satisfies:
[0698] Delay_mean = [(t4 – t1) – correctedPdelayRespFollowUpCorrectionField] / 2
[0699] = [(t4 – t1) – (t3 – t2)] / 2
[0700] Note 2: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2.
[0701] Optionally, from the above implementation process, it can be seen that in Figure 6i the calculation process of "Delay_mean" in the shown scheme is different from the previous Figure 5b shown implementation process. Both the one-way delays Delay_A_to_B and Delay_B_to_A depend on the values carried by the responseOriginTimestamp and correctionField of the Pdelay_Resp_Follow_Up message. Therefore, indication information can be carried in the message (such as the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message) to indicate which mode it is. This indication information is recorded as the fourth indication information described above. Exemplarily, in order to be compatible with the previous Figure 5b and Figure 5c shown schemes, as well as Figure 6iIn the illustrated embodiment, there are a total of three modes, which can be indicated by 2 bits. For example, it can be represented by the 7th bit of the 0th byte and the 7th bit of the 1st byte in the flagField bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message, that is, the fourth indication information can be carried in the 7th bit of the 0th byte and the 7th bit of the 1st byte in the flagField bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message.
[0702] As an application example of Example 5, taking the fourth message carrying the transmission timestamp of the second message as an example, as Figure 6j shown, 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.
[0703] 1. Port A sends a Pdelay_Req message to port B.
[0704] 2. Port B sends a Pdelay_Resp message to port A.
[0705] 3. Port B sends a Pdelay_Resp_Follow_Up message to port A.
[0706] Compared with Figure 5b the implementation process shown, in the Figure 6j process shown, 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 / borne through the responseOriginTimestamp field of the Pdelay_Resp_Follow_Up message, and t3_fns is carried / borne through the responseOriginTimestampFractionalNS field.
[0707] Table 10
[0708]
[0709] Optionally, t3_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 11. Compared with 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 by the TLV carried by the Pdelay_Resp_Follow_Up message. That is, the Pdelay_Req message can include the following fields:
[0710] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0711] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 2 (i.e., the length value of responseOriginTimestampFractionalNS);
[0712] The value field can be represented as "responseOriginTimestampFractionalNS" and can occupy 2 bytes, carrying t3_fns. The format can refer to the format of the correctionField, and the unit is 1 / 2 16 ns.
[0713] Table 11
[0714] Bits Octets Offset header 34 0 responseOriginTimestamp 10 34 reserved 10 44 tlvType 2 54 lengthField 2 56 responseOriginTimestampFractionalNS 2 58
[0715] Optionally, t3_ns and t3_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 12. Compared with 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:
[0716] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0717] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (i.e., the length value of responseOriginTimestamp and responseOriginTimestampFractionalNS);
[0718] The value field can represent including "responseOriginTimestamp" and "responseOriginTimestampFractionalNS". Among them, "responseOriginTimestamp" can occupy 10 bytes, carrying t3_ns, with the format referring to the Timestamp format of the current IEEE 1588 standard, and the precision is 1 ns; "responseOriginTimestampFractionalNS" can occupy 2 bytes, carrying t3_fns, and the format can refer to the format of the correctionField, with the unit of 1 / 2 16 ns.
[0719] Table 12
[0720]
[0721]
[0722] In addition, for port B, based on the implementation method through any one of Tables 10 to 12, port A can calculate the one-way link delay.
[0723] For example, for the one-way link delay Delay_A_to_B from port A to port B, it satisfies:
[0724] Delay_A_to_B = (responseOriginTimestamp of Pdelay_Resp_Follow_Up +
[0725] responseOriginTimestampFractionalNS of Pdelay_Resp_Follow_Up – correctedPdelayRespFollowUpCorrectionField) – t1
[0726] = (t3_ns + t3_fns – (t3 – t2)) – t1
[0727] = t2 – t1.
[0728] For example, for the one-way link delay Delay_B_to_A from port B to port A, it satisfies:
[0729] Delay_B_to_A = t4 – responseOriginTimestamp of Pdelay_Resp_Follow_Up
[0730] responseOriginTimestampFractionalNS of Pdelay_Resp_Follow_Up
[0731] = t4 – t3_ns – t3_fns
[0732] = t4 – t3
[0733] Note 1: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2
[0734] Similarly, port A can also calculate the two-way average delay Delay_mean, satisfying:
[0735] Delay_mean = [(t4 – t1) – correctedPdelayRespFollowUpCorrectionField] / 2
[0736] = [(t4 – t1) – (t3 – t2)] / 2
[0737] Note 2: correctedPdelayRespFollowUpCorrectionField = correctionField of Pdelay_Resp_Follow_Up + dAsy = t3 – t2 – dAsy + dAsy = t3 – t2
[0738] Optionally, from the above implementation process, it can be seen that in Figure 6j the calculation process of "Delay_mean" in the shown scheme is different from the previous Figure 5b shown implementation process. 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. Therefore, indication information can be carried in the message (such as the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message) to indicate which mode it is. This indication information is denoted as the first indication information described above. Exemplarily, for compatibility with the previous Figure 5b and Figure 5c shown schemes, and Figure 6dIn the illustrated embodiment, there are three modes in total, which can be indicated by 2 bits. For example, it can be represented by the 7th bit of the 0th byte and the 7th bit of the 1st byte in the flagField bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message. That is, the first indication information can be carried in the 7th bit of the 0th byte and the 7th bit of the 1st byte in the flagField bit in the header of the Pdelay_Resp message or the Pdelay_Resp_Follow_Up message.
[0739] Implementation method four: The first port is a PTP port that supports two-step. The method further includes: The first node receives a fifth message from the second node through the first port. The fifth message carries the transmission 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 that supports two-step, the fifth message received by the first node through the first port can also carry the transmission timestamp of the first message. In this way, the receiving node of the fifth message (such as the first node) can obtain the time information of other nodes (such as the second node).
[0740] In a possible implementation of implementation method four, the method further includes: The first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the first message. The second port is the port through which the second node sends the fifth message. Specifically, as the receiving party of the fifth message, the first node can determine the one-way link delay between the first port and the second port based on the timestamp carried in the fifth message and the timestamp of its own received message. In this way, compared with the method without carrying any time information, it enables the message receiving party to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0741] Optionally, the fifth message further carries fifth indication information, which is used to indicate that the fifth message carries the transmission timestamp of the first message. Specifically, the fifth message can also carry the fifth indication information, so that the receiving party of the fifth message (i.e., the first node) can determine that the fifth message carries the transmission timestamp of the first message based on the fifth indication information, and further enable the receiving party to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0742] In a possible implementation of Implementation Mode 4, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns.
[0743] Based on the above technical solution, the fifth message can carry the transmission timestamp of the first message in the above multiple ways. In this way, different accuracy requirements can be met.
[0744] Optionally, the ninth field is the preciseOriginTimestamp field of the fifth message, and the tenth field is the correctionField field of the fifth message.
[0745] Optionally, for a PTP port of the first port that supports two-step P2P, the first message is a Pdelay_Req message, and the fifth message is a following message of the Pdelay_Req, which can be called a Pdelay_Req_Follow_Up message. Exemplarily, as shown in Table 13, the message format of the fifth message is as follows:
[0746] Table 13
[0747] Bits Octets Offset header 34 0 preciseOriginTimestamp 10 34
[0748] Among them, preciseOriginTimestamp can carry the nanosecond part of the transmission timestamp of the first Pdelay_Req message, the correctionField in the header carries the fractional nanosecond part of the transmission timestamp of the first Pdelay_Req message, and the value of the messageType in the header can be 0xE, representing the Pdelay_Req_Follow_Up message.
[0749] Optionally, for a PTP port of the first port that supports two-step E2E, the first message is a Delay_Req message, and the fifth message is a following message of the Delay_Req, which can be called a Delay_Req_Follow_Up message. Exemplarily, as shown in Table 14, the message format of the fifth message is as follows:
[0750] Table 14
[0751] Bits Octets Offset header 34 0 preciseOriginTimestamp 10 34
[0752] Among them, preciseOriginTimestamp can carry the nanosecond part of the transmission timestamp of the first message Delay_Req message, the correctionField in the header carries the fractional nanosecond part of the transmission timestamp of the first message Delay_Req message, and the value of messageType in the header can be 0xF, representing the Delay_Req_Follow_Up message.
[0753] It should be noted that from the above various examples (such as Figures 6b to 6i the processes shown, the processes shown in Tables 1 to 14), it can be seen that in Figure 6a the method shown, in addition to the second message transmitted in step S602 can carry a timestamp, one or more of the first message transmitted in step S601, and the fourth and fifth messages described above can also carry timestamps, that is, the above various examples can be combined with each other.
[0754] Please refer to Figure 7a , which is another schematic diagram of the communication method provided by this application. The method includes the following steps. The method at least includes Figure 7a the steps S701 and S702 shown.
[0755] S701. The second node sends a first message. Correspondingly, the first node receives the first message. The first message is used for delay request, and the first message carries the transmission timestamp of the first message. Among them, the first message is a point-to-point delay request Pdelay_Req message, or the first message is a delay request Delay_Req message.
[0756] Exemplarily, the first node includes a first port, and the first port is a PTP port that supports one-step.
[0757] S702. The first node sends a second message. Correspondingly, the second node receives the second message. The second message is used for delay response. Among them, step S702 is an optional step.
[0758] It should be understood that in Figure 7aIn the implementation manner shown, the first node may be a P2P node, and / or, the first port in the first node for receiving the first message and for sending the second message may be a P2P port; correspondingly, the first message for delay request may be a Pdelay_Req message defined by PTP. Alternatively, the first node may be an end-to-end (E2E) node, or the first port is an E2E port; correspondingly, the first message for delay request may be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message may also be other message names, which are not limited herein.
[0759] Based on Figure 7a In the technical solution shown, after the first node receives the first message for delay request through the first port in step S701, the first node may obtain the transmission timestamp of the first message through the first message in step S702. In other words, the first node can obtain the transmission timestamp of the first message. Thus, the receiver of the delay request message can obtain the above-mentioned transmission timestamp, and further enables the receiver of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0760] It should be noted that in Figure 7a the method shown, in addition to the first message transmitted in step S701 that may carry a timestamp, other messages (such as the second message, the fourth message, etc.) transmitted between the first node and the second node may also carry a timestamp. In other words, the ways of carrying timestamps in two or more messages can be combined with each other.
[0761] For example, in Figure 7a the method shown, the second message sent by the first node in step S702 may also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation manners (such as Figure 6b the implementation process shown in / 6c / 6d).
[0762] Another example is that in Figure 7a the method shown, when the first message may be a Pdelay_Req message, the first node may also send a fourth message (the fourth message is a follow-up message of the second message, that is, a Pdelay_Resp_Follow_Up message) after step S702, and the fourth message may also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation manners (such as Figure 6i the implementation process shown in / 6j).
[0763] In a possible implementation manner, in Figure 7aIn the method shown above, after step S701, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the first packet, where the second port is the port through which the second node receives the first packet. Specifically, the transmission timestamp of the first packet 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 in the packet and only being able to determine the average link delay based on the difference, the packet receiver can determine the one-way link delay based on the timestamp carried in the packet, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0764] Optionally, the first packet further carries second indication information, which is used to indicate that the first packet carries the transmission timestamp of the first packet. Specifically, the first packet may further carry second indication information, so that the receiver of the first packet (i.e., the first node) can determine that the first packet carries the transmission timestamp of the first packet based on the second indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0765] In a possible implementation, the transmission timestamp of the first packet is carried in the third field, or the transmission timestamp of the first packet is carried in the third field and the fourth field; where the precision of the value of the third field is 1 ns, and the precision of the value of the fourth field is less than 1 ns. Specifically, the first packet can carry the transmission timestamp of the first packet in the above-mentioned multiple ways. In this way, different precision requirements can be met.
[0766] Optionally, the third field is the originTimestamp field. Specifically, when the first port is a PTP port supporting one-step, the field used to carry the reception timestamp of the first packet 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 packet.
[0767] It should be noted that when the first packet is a Pdelay_Req packet defined by PTP, the implementation method of the first packet carrying the transmission timestamp of the first packet can refer to the description of Implementation Method 1 and related implementations above.
[0768] Next, the implementation process of the third field and the fourth field will be described in the case where the first packet is a Delay_Req packet defined by PTP.
[0769] Example 6: The third field is the originTimestamp field defined by PTP, and the fourth field can be the fractional part of nanoseconds (originTimestampFractionalNS) field of the original timestamp described later.
[0770] As described above Figure 4a it can be seen that based on Figure 4a the implementation shown, there is a problem 1 in the one-step mode of the E2E mechanism, that is, port A is the receiver of the Delay_Req message and the sender of the Delay_Resp message. Since the Delay_Req message received by port A does not carry time information, port A cannot obtain the one-way delay and the average delay.
[0771] In the above technical solution, the first port in the first node can be the receiver of the Delay_Req message and the sender of the Delay_Resp message. Moreover, 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, and then 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 to solve the problem 1.
[0772] As an application example of Example 6, as Figure 7b shown, 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.
[0773] 1. Port B sends a Delay_Req message to port A.
[0774] 2. Port A sends a Delay_Resp message to port B.
[0775] Compared with Figure 4a the implementation process shown, in the Figure 7b process shown, when port B can send a Delay_Req message, the Delay_Req message can carry the reception timestamp (t3) of port B sending the Delay_Req message. For example, as shown in Table 15 below, the ns part (abbreviated as t3_ns) of the t3 timestamp is carried / borne through the originTimestamp field (in units of 1 ns) of the Delay_Resp message.
[0776] Table 15
[0777] Bits Octets Offset header 34 0 originTimestamp 10 34
[0778] In addition, for port A, based on the content shown in Table 15, port A can calculate the one-way link delay.
[0779] For example, for the one-way link delay Delay_B_to_A from port B to port A, it satisfies:
[0780] Delay_B_to_A = t4 – originTimestamp of Delay_Req
[0781] = t4 – t3_ns
[0782] = t4 – t3 + t3_fns
[0783] ≈ t4 – t3.
[0784] In the above implementation process, since t3_fns is less than 1 ns, the calculation accuracy of the one-way link delay is at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement.
[0785] Optionally, it can be seen from the above implementation process that in Figure 7b the calculation of the one-way delay Delay_B_to_A in the shown scheme depends on the parameter carried by originTimestamp in the Delay_Req message. To be compatible with Figure 4a (the value carried by originTimestamp is 0), for this purpose, indication information can be carried in the message (such as the Delay_Req message) to indicate which mode it is, and this indication information is recorded as the first indication information described above. Exemplarily, to be compatible with the above Figure 4a , 1 bit can be used to indicate whether the originTimestamp field of Delay_Req carries a timestamp. For example, it can be represented by the 7th bit of the 0th byte of the flagField in the header of the Delay_Req message. 0 represents that originTimestamp does not carry a timestamp, and 1 represents that originTimestamp carries a timestamp, that is, the first indication information can be carried in the 7th bit of the 0th byte of the flagField in the header of the Delay_Req message.
[0786] As another application example of Example 6, as Figure 7c shown, 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.
[0787] 1. Port B sends a Delay_Req message to port A.
[0788] 2. Port A sends a Delay_Resp message to port B.
[0789] Compared with the Figure 4a shown implementation process, in Figure 7cDuring the process shown, when Port B can send Delay_Req messages, the Delay_Req messages can carry the reception timestamp (t3) of Port B for sending Delay_Req messages. For example, as shown in Table 16 below, t3_ns is carried / borne through the originTimestamp field of the Delay_Resp message, and t3_fns is carried / borne through originTimestampFractionalNS.
[0790] Table 16
[0791] Bits Octets Offset header 34 0 originTimestamp 10 34 originTimestampFractionalNS 2 44
[0792] Optionally, t3_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 17. Compared with 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 by the TLV carried by the Delay_Req message. That is, the Delay_Req message can include the following fields:
[0793] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0794] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 2 (i.e., the length value of originTimestampFractionalNS);
[0795] The value field can be represented as "originTimestampFractionalNS" and can occupy 2 bytes, carrying t3_fns. The format can refer to the format of the correctionField, and the unit is 1 / 2 16 ns.
[0796] Table 17
[0797]
[0798]
[0799] Optionally, t3_ns and t3_fns can also be carried by adding a new TLV. The following will be described in conjunction with the example shown in Table 18. Compared with Table 15, in the example shown in Table 18, t3_ns and t3_fns are carried by the fields in the newly added TLV. That is, the Delay_Req message can include the following fields:
[0800] The type field is represented as "tlvType" and can occupy 2 bytes. For example, the parameter value can be 0x800A;
[0801] The length field can be represented as "lengthField" and can occupy 2 bytes. The parameter value is 12 (i.e., the length value of originTimestamp and originTimestampFractionalNS);
[0802] The value field can be represented as including "originTimestamp" and "originTimestampFractionalNS". Among them, "originTimestamp" can occupy 10 bytes, carrying t3_ns. The format refers to the Timestamp format of the current IEEE 1588 standard, with a precision of 1 ns; "originTimestampFractionalNS" can occupy 2 bytes, carrying t3_fns. The format can refer to the format of the correctionField, and the unit is 1 / 2 16 ns.
[0803] Table 18
[0804] Bits Octets Offset header 34 0 originTimestamp 10 34 tlvType 2 54 lengthField 2 56 originTimestamp 10 58 originTimestampFractionalNS 2 68
[0805] In addition, for port A, based on the implementation method through any one of Tables 16 to 18, port B can calculate the one-way link delay.
[0806] For example, for the one-way link delay Delay_B_to_A from port A to port B, it satisfies:
[0807] Delay_B_to_A = t4 – originTimestamp of Delay_Req – originTimestampFractionalNS of Delay_Req
[0808] = t4 – t3_ns – t3_fns
[0809] = t4 – t3.
[0810] Optionally, from the above implementation process, it can be seen that in Figure 7c the calculation of the one-way delay Delay_B_to_A in the shown scheme depends on the parameters carried by originTimestamp in the Delay_Req message. To be compatible with Figure 4a(The value carried by originTimestamp is 0). For this reason, indication information can be carried in a message (such as a Delay_Req message) to indicate which mode it is, and this indication information is denoted as the first indication information described above. Exemplarily, in order to be compatible with the above Figure 4a , 1 bit can be used to indicate whether the originTimestamp field of Delay_Req carries a timestamp. For example, it can be represented by the 7th bit of the 0th byte of the flagField in the header of the Delay_Req message. 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 7th bit of the 0th byte of the flagField in the header of the Delay_Req message. Please refer to Figure 8a , which is a schematic diagram of the communication method provided by this application. This method includes the following steps. This method at least includes Figure 8a the steps S801 and S802 shown.
[0811] S801. The second node sends a first message. Correspondingly, the first node receives the first message. The first message is used for delay request, and the first message carries the transmission timestamp of the third message. The third message is the previous message of the same type as the first message transmitted. 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.
[0812] S802. The first node sends a second message. Correspondingly, the second node receives the second message. The first message is used for delay response. Wherein, step S702 is an optional step.
[0813] It should be understood that in Figure 8a the scheme shown, 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; correspondingly, the first message for delay request can be a Pdelay_Req message defined by PTP. Or, the first node can be an end-to-end (E2E) node, or, the first port is an E2E port; correspondingly, the first message for delay request can be a Delay_Req message defined by PTP. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0814] Based on Figure 8aIn the technical solution shown, after the first node receives the first message for the delay request through the first port in step S801, the first node can obtain the transmission timestamp of the third message through the first message in step S802. In other words, the first node can obtain the transmission timestamp of the third message. Thus, the receiver of the delay request message can obtain the above-mentioned transmission timestamp, and further enables the receiver of the delay request message to obtain the time information of other nodes (such as the second node that sends the first message).
[0815] It should be noted that, in Figure 8a the method shown, in addition to the first message transmitted in step S801 that can carry a timestamp, among other messages transmitted between the first node and the second node (such as the second message, the fourth message, the fifth message, etc.), timestamps can also be carried. In other words, the ways of carrying timestamps in two or more messages can be combined with each other.
[0816] For example, in Figure 8a the method shown, the second message sent by the first node in step S802 can also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation methods (such as Figure 6b the implementation process shown in / 6c / 6d).
[0817] Another example is that in Figure 8a the method shown, when the first message can be a Pdelay_Req message, the first node can also send a fourth message (the fourth message is a follow-up message of the second message, that is, a Pdelay_Resp_Follow_Up message) after step S802, and the fourth message can also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation methods (such as Figure 6i the implementation process shown in / 6j).
[0818] Another example is that in Figure 8a the method shown, after the second node sends the first message in step S801, the second node can also send a fifth message, and the fifth message can be a follow-up message of the first message. And the fifth message can carry the transmission timestamp of the first message, and the specific implementation can refer to the implementation method of the foregoing.
[0819] In a possible implementation method, in Figure 8aIn the method shown above, 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 transmission timestamp of the third message, where the second port is the port through which the second node sends the first message. Specifically, the transmission 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 with the method without carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried in the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0820] Optionally, 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. Specifically, the first message can also 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 the transmission timestamp of the third message based on the third indication information, and further enables the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0821] In a possible implementation, 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; where 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 transmission timestamp of the third message in the above multiple ways. In this way, different accuracy requirements can be met.
[0822] Optionally, the fifth field is the originTimestamp field. Specifically, 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 already defined by PTP can be reused to reduce the overhead of the message.
[0823] It should be noted that in the case where the first message is the Pdelay_Req message defined by PTP, the implementation method for the first message to carry the transmission timestamp of the first message can refer to the description of Implementation Method 2 and related implementations above.
[0824] Next, the implementation process of the fifth field and the sixth field will be described in the case where the first message is the Delay_Req message defined by PTP.
[0825] Example 7: The fifth field is the originTimestamp field defined by PTP, and the sixth field can be the fractional nanosecond part (originTimestampFractionalNS) field of the raw timestamp described later.
[0826] As described above Figure 4b it can be known that, based on Figure 4b the implementation method shown, there is a problem 1 in the two-step mode of the E2E mechanism, that is, port A is the receiver of the Delay_Req message and the sender of the Delay_Resp message. Since the Delay_Req message received by port A does not carry time information, port A cannot obtain the one-way delay and the average delay.
[0827] In the above technical solution, the first port in the first node can be the receiver of the Delay_Req message and the sender of the Delay_Resp message. Moreover, after the first node receives the first message in step S801, the first node can obtain the transmission timestamp of the third message based on the first message, and then the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the third message to solve the problem 1.
[0828] As an application example of Example Seven, as Figure 8b shown, 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.
[0829] 1. Port A sends a Sync message to port B.
[0830] 2. Port A sends a Follow_Up message to port B.
[0831] Among them, steps 1 and 2 can refer to the implementation methods shown above Figure 4a and Figure 4b shown.
[0832] 3. Port B sends a Delay_Req message to port A.
[0833] 4. Port A sends a Delay_Resp message to port B.
[0834] Compared with Figure 4b the implementation process shown, in Figure 8b the process shown, 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 ns part (abbreviated as t3pre_ns) of the t3pre timestamp is carried / borne through the originTimestamp field (unit: 1 ns) of the Delay_Req message. Among them, the implementation of the originTimestamp field can refer to Table 15 above and the related implementation process.
[0835] In addition, for Port A, based on the content shown in Table 15, Port A can calculate the one-way link delay.
[0836] For example, for the one-way link delay Delay_B_to_A from Port B to Port A, it satisfies:
[0837] Delay_B_to_A = t4pre – originTimestamp of Delay_Req
[0838] = t4pre – t3pre_ns
[0839] = t4 – t3 + t3pre_fns
[0840] ≈ t4pre – t3pre.
[0841] In the above implementation process, since t3pre_fns is less than 1 ns, the calculation accuracy of the one-way link delay is at most lost by 1 ns, which can also meet the requirements of high-precision delay measurement. As an application example of Example Seven, as Figure 8c shown, 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.
[0842] 1. Port A sends a Sync message to Port B.
[0843] 2. Port A sends a Follow_Up message to Port B.
[0844] Among them, steps 1 and 2 can refer to the implementation methods shown in the previous text Figure 4a and Figure 4b shown.
[0845] 3. Port B sends a Delay_Req message to Port A.
[0846] 4. Port A sends a Delay_Resp message to Port B.
[0847] Compared with the Figure 4b shown implementation process, in Figure 8cDuring the process shown, when Port B can send Delay_Req messages, the Delay_Req messages can carry the reception timestamp (t3pre) of the previous Delay_Req message sent by Port A, including t3pre_ns and t3pre_fns. For example, carry / bear t3pre_ns through the originTimestamp field of the Delay_Resp message, and carry / bear t3pre_fns through originTimestampFractionalNS. Among them, the implementation of these two fields can refer to any of the tables from Table 16 to Table 18 in the previous text and the relevant implementation process.
[0848] In addition, for Port A, based on the content shown in any of the tables from Table 16 to Table 18, Port A can calculate the one-way link delay.
[0849] For example, for the one-way link delay Delay_B_to_A from Port B to Port A, it satisfies:
[0850] Delay_B_to_A = t4pre – originTimestamp of Delay_Req – originTimestampFractionalNS of Delay_Req
[0851] = t4 – t3pre_ns – t3pre_fns
[0852] = t4pre – t3pre.
[0853] Optionally, similarly, since the above Figure 8b and Figure 8c improvements are all in the fields carried by 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 indicate 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 for indication. Currently, twoStepFlag only has meaning for Sync messages and Pdelay_Resp messages, and the Delay_Req message can be extended. For example, 0 represents one-step (or 0 represents that the timestamp information carried by the Delay_Req message is t3), and 1 represents two-step (or 1 represents that 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). For this reason, indication information can be carried in a message (such as a Delay_Req message) to indicate whether a timestamp is carried. This indication information is denoted as the first indication information described above. Exemplarily, in order to be compatible with the above Figure 4a , 1 bit can be used to indicate whether the originTimestamp field of the Delay_Req carries a timestamp. For example, it can be represented by the 7th bit of the 0th byte of the flagField bit in the header of the Delay_Req message. 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 7th bit of the 0th byte of the flagField bit in the header of the Delay_Req message.
[0854] Please refer to Figure 9a , which is another schematic diagram of the communication method provided by this application. The method includes the following steps. The method at least includes Figure 9a the steps S901 and S902 shown in the figure.
[0855] S901. The second node sends a first message. Correspondingly, the first node receives the first message, and the first message is used for delay request.
[0856] S902. The first node sends a second message. Correspondingly, the second node receives the second message, and the first message is used for delay response.
[0857] S903. The first node sends a fourth message. Correspondingly, the second node receives the fourth message, and the fourth message is a follow-up message of the second message. Among them, the fourth message carries the reception timestamp of the first message and / or the transmission timestamp of the second message, and the first message is used for delay request.
[0858] It should be understood that in the Figure 9a shown method, the first node can be a P2P node, and / or, the first port can be a P2P port; correspondingly, the first message for delay request can be a Pdelay_Req message defined by PTP, the second message can be a Pdelay_Resp message, and the fourth message can be a Pdelay_Resp_Follow_Up message. Optionally, with the evolution of the PTP standard, the first message can also be other message names, which are not limited here.
[0859] Based on Figure 9aIn the technical solution shown, after the first node sends a 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 means of the delay response follow-up message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the recipient of the delay response follow-up message can obtain the above-mentioned reception timestamp and / or transmission timestamp, and further the recipient of the delay response follow-up message can obtain the time information of the first node.
[0860] It should be noted that in Figure 9a the method shown, in addition to the fourth message transmitted in step S903 being able to carry a timestamp, other messages (such as the first message, the second message, the fifth message, etc.) transmitted between the first node and the second node can also carry timestamps. In other words, the ways of carrying timestamps in two or more messages can be combined with each other.
[0861] For example, in Figure 9a the method shown, the second message sent by the first node in step S902 can also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation manners (such as Figure 6b the implementation process shown in / 6c / 6d).
[0862] Another example is that in Figure 9a the method shown, the first message sent by the second node in step S901 can also carry a timestamp, and the specific implementation can refer to the foregoing Figure 6a and its possible implementation manners (such as Figure 6g the implementation process shown in / 6h).
[0863] Another example is that in Figure 9a the method shown, after the second node sends the first message in step S901, the second node can further send a fifth message, and the fifth message can be a follow-up message of the first message. Moreover, the fifth message can carry the transmission timestamp of the first message, and the specific implementation can refer to the implementation manners of the foregoing.
[0864] In a 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. After that, 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 in the fourth message and the timestamps of its own transmitted / received messages. In this way, compared with the method of only being able to determine the average link delay based on the difference of the timestamps carried in the message, the message receiver can determine the one-way link delay based on the timestamp carried in 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.
[0865] Optionally, the fourth message further carries fourth indication information, and the fourth indication information is used to indicate that the fourth message carries the transmission timestamp of the second message. Specifically, the fourth message can also carry fourth indication information, so that the receiver of the fourth message can determine that the fourth message carries the transmission timestamp of the second message based on the fourth indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0866] In a possible implementation, the transmission timestamp of the second message is carried in the seventh field, or the transmission 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 1 ns, and the accuracy of the value of the eighth field is less than 1 ns. Specifically, the second message can carry the transmission timestamp of the second message in the above multiple ways. In this way, different accuracy requirements can be met.
[0867] Optionally, the seventh field is the responseOriginTimestamp field. Specifically, when the first port is a PTP port supporting two-step, the field used to carry the transmission timestamp of the second message can be the responseOriginTimestamp field defined by PTP. In this way, the defined fields of PTP can be reused to reduce the overhead of the message.
[0868] As described above Figure 5b it can be seen that in Figure 5b , there is a problem 4 in the two-step mode of the P2P mechanism, that is, port A is the sender of the Pdelay_Req message and the receiver of the Pdelay_Resp message (and the receiver of the Pdelay_Resp_Follow_Up message). Since the information obtained by port A is the difference between t3 and t2, port A cannot determine the values of t2 and t3, which also causes port A to be unable to measure the one-way delay.
[0869] In the above technical solution, the second port in the second node can be the receiver of the Pdelay_Resp_Follow_Up message. Moreover, after the second node receives the fourth message in step S903, the second node can obtain the transmission timestamp of the second message based on the fourth message, so that the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the second message, thereby solving problem 4.
[0870] It should be noted that the implementation method of the fourth message sent by the first node in step S903 can refer to the foregoing Figure 6a and its possible implementation methods (for example Figure 6i the implementation process shown in / 6j).
[0871] Please refer to Figure 9b , another schematic diagram of the communication method provided by this application. The method includes the following steps. The method at least includes Figure 9b the steps S1001 and S1002 shown in
[0872] S1001. The second node sends a first message. Correspondingly, the first node receives the first message, and the first message is used for delay request.
[0873] S1002. The second node sends a fifth message. Correspondingly, the first node receives the fifth message, and the fifth message is a follow-up message of the first message. Among them, the fifth message carries the transmission timestamp of the first message.
[0874] It should be understood that in the Figure 9b shown method, 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). Correspondingly, the first message for 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 follow-up message of the first message (i.e., the fifth message) can be a point-to-point delay request follow-up (Pdelay_Req_Follow_Up) message or a delay request follow-up (Delay_Req_Follow_Up) message. Optionally, with the evolution of the PTP standard, the first message and the second message can also be other message names, which are not limited here.
[0875] Based on Figure 9bIn the technical solution shown, after the first node receives the first message for the delay request through the first port in step S1001, the first node may further receive a fifth message through the first port in step S1002, and the fifth message carries the transmission timestamp of the first message, and the fifth message is a following message of the first message. In other words, the receiver of the fifth message can obtain the transmission timestamp of the first message. Thus, by means of the following message of the delay request message carrying the reception timestamp of the delay request message (and / or the transmission timestamp of the delay response message), the first node can obtain the above-mentioned transmission timestamp, and further the first node can obtain the time information of the second node.
[0876] In a possible implementation, in Figure 9b In the method shown, the method further includes: the first node determines the one-way link delay between the first port and the second port based on the transmission timestamp of the first message, and the second port is the port through which the second node sends the fifth message. Specifically, as the receiver of the fifth message, 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 fifth message and the timestamp of its own received message. In this way, compared with the method of not carrying any time information, it enables the message receiver to determine the one-way link delay based on the timestamp carried by the message, so as to meet the requirement for determining the one-way link delay in the link asymmetry scenario and improve the accuracy of clock synchronization.
[0877] Optionally, the fifth message further carries fifth indication information, and the fifth indication information is used to indicate that the fifth message carries the transmission 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 transmission timestamp of the first message based on the fifth indication information, and further enable the receiver to clarify the meaning of the field carrying the timestamp, so as to avoid parsing errors.
[0878] In a possible implementation, the transmission timestamp of the second message is carried in the ninth field, or the transmission 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 1 ns. Specifically, the fifth message can carry the transmission timestamp of the first message in the above-mentioned multiple ways. In this way, different accuracy requirements can be met.
[0879] Optionally, the ninth field is the preciseOriginTimestamp field of the fifth message, and the tenth field is the correctionField field of the fifth message.
[0880] It should be noted that inFigure 9a In the method shown, in addition to the fourth message transmitted in step S903 that may carry a timestamp, other messages (such as the first message, the second message, the fourth message, etc.) transmitted between the first node and the second node may also carry a timestamp. In other words, the ways in which two or more messages carry timestamps can be combined with each other.
[0881] For example, in Figure 9b the method shown, the second message sent by the first node in step S902 ma...
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 that supports one-step or a PTP port that supports 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 that supports one-step, the first field is the requestReceiptTimestamp field; Or, When the first port is a PTP port that supports 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 that supports 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, and 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 that supports 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 that was transmitted, 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, and 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 two-step mode A, 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, the fourth message being a following message of the second message, the fourth message being a point-to-point delay response following Pdelay_Resp_Follow_Up message, and the fourth message carrying 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, the fifth message carrying the transmission timestamp of the first message, and the fifth message being a following 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, the first message being for delay request, and the first message carrying 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, and 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 supporting 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, 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, the second port is a PTP port supporting one-step, and the method includes: Sending a first message to a first node through the second port, the first message is used 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.
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 through which the first node receives 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; wherein, the precision of the value of the third field is 1 nanosecond (ns), and the precision 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, and 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, 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, and the first port is the port through which the first node receives the first message.
33. A communication method, characterized in that, Applied to a first node, the first node includes a first port, the first port is a PTP port, and the method includes: Receive a first packet from a second node through the first port, where the first packet is for a delay request and carries a transmission timestamp of a third packet; wherein, the first packet is a point-to-point delay request Pdelay_Req packet, or the first packet is a delay request Delay_Req packet, and the third packet is the previous transmitted packet of the same type as the first packet. Determine the one-way link delay between the first port and the second port based on the transmission timestamp of the third packet, where the second port is the port through which the second node transmits the first packet.
34. The method according to claim 33, wherein The transmission timestamp of the third packet is carried in the fifth field, or the transmission timestamp of the third packet is carried in the fifth field and the sixth field; wherein, the accuracy of the value of the fifth field is 1 nanosecond (ns), and the accuracy 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 packet further carries third indication information for indicating that the first packet carries the transmission timestamp of the third packet.
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, and the method further includes: In the case where the first packet is a point-to-point delay request Pdelay_Req packet, send a second packet to the second node through the first port, where the second packet is a point-to-point delay response Pdelay_Resp packet for delay response and carries the reception timestamp of the first packet; wherein, the second packet is a point-to-point delay response Pdelay_Resp packet.
38. The method according to any one of claims 33 to 37, characterized in that The method further includes: In the case where the first port is a PTP port supporting two-step mode A, send a fourth packet to the second node through the first port, where the fourth packet is a follow-up packet of the second packet and carries the transmission timestamp of the second packet.
39. The method according to any one of claims 33 to 38, characterized in that, The method further includes: Receive a fifth packet from the second node through the first port, where the fifth packet carries the transmission timestamp of the first packet and the fifth packet is a follow-up packet of the first packet; Determine the one-way link delay between the first port and the second port based on the transmission timestamp of the first packet, where the second port is the port through which the second node transmits the fifth packet.
40. 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, and 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, through the second port, a second message from the first node, 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. Determining 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, 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 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. Determining 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, 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.
48. The method according to claim 47, wherein 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 supporting 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, characterized in that, 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.