PTP message processing method, sending method, communication system, and apparatus

By adding identification to PTP messages, the delay measurement problem in the communication network is solved, and the accuracy and efficiency of time synchronization are improved.

WO2025152886A1PCT designated stage expired Publication Date: 2025-07-24HUAWEI TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2025/071997
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-01-18
Filing Date
2025-01-13
Publication Date
2025-07-24

AI Technical Summary

Technical Problem

When performing time synchronization, existing communication networks are difficult to effectively perform delay measurement, especially in link transmission delay measurement between different communication devices, resulting in limited synchronization accuracy and efficiency.

Method used

By adding an identification to the PTP message, distinguishing the delay measurement function message and the synchronization function message, the processing and sending method of the PTP message is realized, so that the communication device can identify and process the delay measurement function message, thereby performing effective delay measurement in the communication network.

Benefits of technology

The link transmission delay measurement between communication devices is realized, the accuracy and efficiency of time synchronization are improved, and the efficient operation of the communication network is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025071997_24072025_PF_FP_ABST
    Figure CN2025071997_24072025_PF_FP_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of communications. Disclosed are a PTP message processing method, a sending method, a communication system and an apparatus. In the processing method, an identifier in a PTP message is used to indicate whether the PTP message is a time delay measurement function message, such that a communication apparatus having received the PTP message can process the PTP message on the basis of the indication of the identifier, and since the communication apparatus can process the time delay measurement function message, the communication apparatus can support the time delay measurement function.
Need to check novelty before this filing date? Find Prior Art

Description

PTP message processing method, sending method, communication system and device

[0001] This application claims priority to Chinese patent application No. 202410080065.5, filed on January 18, 2024, entitled “PTP message processing method, sending method, communication system and device”, the entire contents of which are incorporated by reference into this application. Technical Field

[0002] The present application relates to the field of communication technology, and in particular to a PTP message processing method, a sending method, a communication system, and a device. Background Art

[0003] With the development of 4th Generation (4G) and 5th Generation (5G) mobile communication technologies, the requirements for time synchronization in communication networks are becoming increasingly stringent. Therefore, time synchronization in communication networks is necessary. The Precision Time Protocol (PTP), also known as the Institute of Electrical and Electronics Engineers (IEEE) 1588 synchronization technology, is a technology for synchronizing time on standard Ethernet devices. It is also known as 1588 synchronization technology.

[0004] At present, for a communication network that supports the operation of the PTP protocol, different communication devices in the communication network can perform time synchronization with the help of PTP messages. Taking communication device 1 and communication device 2 in the communication network as an example, assuming that communication device 1 is the master clock device of communication device 2 and communication device 2 is the slave clock device of communication device 1, communication device 1 can send a PTP message to communication device 2, and communication device 2 performs time synchronization with communication device 1 based on the PTP message. Summary of the Invention

[0005] This application provides a PTP message processing method, a transmission method, a communication system, and a device, which enable a communication device to support delay measurement based on the PTP protocol. The technical solution is as follows:

[0006] In a first aspect, a method for processing a PTP message is provided. The method is performed by a communication device (referred to as a first communication device) in a communication system supporting the PTP protocol. The method includes: first obtaining a PTP message from another communication device (referred to as a second communication device), and processing the PTP message based on an identifier in the PTP message, wherein the identifier indicates whether the PTP message is a delay measurement function message;

[0007] The method indicates whether the PTP message is a delay measurement function message through an identifier in the PTP message, so that a communication device that receives the PTP message can process the PTP message based on the indication of the identifier. Since the communication device can process the delay measurement function message, the communication device can support the delay measurement function.

[0008] In one possible implementation, when the first communication device is a service bearer device, the above-mentioned processing of the PTP message based on the identifier includes: if the identifier indicates that the PTP message is not a delay measurement function message, terminating the PTP message; if the identifier indicates that the PTP message is a delay measurement function message, sending the PTP message.

[0009] Based on the above possible implementation, the service bearer device in the communication system will transmit the received delay measurement function message so that the delay measurement function message can be sent to non-service bearer devices in the communication network, which will then perform delay measurement based on the delay measurement function message. A non-service bearer device refers to a communication device in the communication network that is not a service bearer device, such as communication device 101 and communication device 102 in Figures 1 to 3.

[0010] In one possible implementation, when the first communication device is not a service bearer device, the above-mentioned processing of the PTP message based on the identifier includes: if the identifier indicates that the PTP message is not a delay measurement function message, terminating the PTP message; if the identifier indicates that the PTP message is a delay measurement function message, performing delay measurement based on the PTP message.

[0011] Based on the above possible implementation manner, the non-service bearing device in the communication system can perform delay measurement with the help of the PTP message.

[0012] In one possible implementation, the PTP message is a synchronization message involved in a delay request response mechanism and including an identifier. Based on this, the above-mentioned step of performing delay measurement based on the PTP message includes: in response to the PTP message, first sending a first delay measurement request message, then obtaining a first delay measurement response message for the first delay measurement request message, and then determining the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the first delay measurement request message, wherein the first delay measurement request message refers to a delay request message involved in the delay request response mechanism and including an identifier, the first delay measurement response message refers to a delay response message involved in the delay request response mechanism and including an identifier, and the first delay measurement response message includes the timestamp of the first delay measurement request message.

[0013] Based on the above possible implementation manner, the link transmission delay between the first communication device and the second communication device can be measured.

[0014] In one possible implementation, before sending the first delay measurement request message in response to the PTP message, the method further includes: obtaining a delay measurement follow-up message of the PTP, wherein the delay measurement follow-up message is a follow-up message involved in the delay request response mechanism and includes an identifier, and the delay measurement follow-up message includes a timestamp of the PTP message.

[0015] Based on the above possible implementation manner, the first communication device can obtain the timestamp of the PTP message, and then the first communication device measures the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message.

[0016] In one possible implementation, the PTP message is a delay request message involved in a peer-to-peer delay mechanism and including an identifier. Based on this, the step of performing delay measurement based on the PTP message includes: sending a second delay measurement response message in response to the PTP message, where the second delay measurement response message is a delay response message involved in the peer-to-peer delay mechanism and including an identifier.

[0017] Based on the above possible implementation methods, the device for delay measurement based on the PTP message can measure the link transmission delay between the first communication device and the second communication device based on the timestamp of the second delay measurement response message and / or the timestamp of the PTP message.

[0018] In a possible implementation, after sending the second delay measurement response message, the method includes:

[0019] a delay measurement response follow-up message to the second delay measurement response message, wherein the delay measurement response follow-up message refers to a delay response follow-up message involved in the peer delay mechanism and including an identifier, and the delay measurement response follow-up message includes a timestamp of the second delay measurement response message.

[0020] Based on the above possible implementation methods, a device that performs delay measurement based on a PTP message can obtain the timestamp of the second delay measurement response message, so that the device can measure the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the second delay measurement response message.

[0021] In a possible implementation, the PTP message includes a domain number field, a message type field, and an identification field field, and the identification field is located in any one of the domain number field, the message type field, or the identification field field.

[0022] In one possible implementation, the PTP message includes a message type field and multiple timestamp fields, the identifier is located in the message type field, the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

[0023] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, the identification includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are respectively located in different fields in the domain number field, the message type field, and the identification domain field; if any sub-identifier of the first sub-identifier and the second sub-identifier is located in the domain number field, any sub-identifier indicates whether the PTP message is a delay measurement function message; if any sub-identifier is located in the message type field, any sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; if any sub-identifier is located in the identification domain field, any sub-identifier indicates whether the PTP message is a delay measurement function message.

[0024] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, and the identification includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; the first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; the second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and whether the PTP message is a delay measurement function message; the third sub-identifier is located in the identification domain field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

[0025] In a possible implementation, the PTP message includes a delay measurement type length value TLV, which identifies a type field in the delay measurement TLV.

[0026] In a possible implementation, the delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

[0027] Based on the above multiple possible implementations, multiple situations in which the PTP message carries the identifier are provided to meet the needs of various application scenarios.

[0028] In a possible implementation, the identifier is a reserved value of the aforementioned field.

[0029] Based on the above possible implementation methods, it is possible to avoid the identifier occupying the value of the field where it is already occupied, and to avoid the communication device receiving the PTP message mistaking the PTP message for other messages indicated by the occupied value of the field, resulting in the device being unable to perform delay measurement based on the identifier.

[0030] In a second aspect, a method for sending a PTP message is provided, which is executed by a second communication device. The method includes: first obtaining a PTP message, and then sending the PTP message, wherein the PTP message includes an identifier, and the identifier indicates whether the PTP message is a delay measurement function message.

[0031] In one possible implementation, the above-mentioned identifier indicates that the PTP message is a delay measurement function message. The PTP message is a synchronization message involved in a delay request response mechanism and includes an identifier. Based on this, after sending the PTP message, the method further includes: obtaining a first delay measurement request message of the PTP message, and sending a second delay measurement response message in response to the first delay measurement request message, wherein the first delay measurement request message refers to a delay request message involved in a delay request response mechanism and includes an identifier, and the second delay measurement response message refers to a delay response message involved in a delay request response mechanism and includes an identifier.

[0032] In a possible implementation, after sending the PTP message, the method further includes: sending a delay measurement follow-up message of the delay measurement synchronization message, where the delay measurement follow-up message is a follow-up message involved in a delay request response mechanism and includes an identifier.

[0033] In one possible implementation, the above-mentioned identifier indicates that the PTP message is a delay measurement function message, and the PTP message is a delay request message involved in the peer delay mechanism and includes the identifier. Based on this, after sending the PTP message, the method also includes: obtaining a second delay measurement response message of the PTP message, the second delay measurement response message refers to a delay response message involved in the peer delay mechanism and includes the identifier; and determining the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the second delay measurement response message.

[0034] In one possible implementation, after obtaining the second delay measurement response message of the PTP message, the method further includes: obtaining a delay measurement response follow-up message of the second delay measurement response message, where the delay measurement response follow-up message refers to a delay response follow-up message involved in the peer delay mechanism and including an identifier, and the delay measurement response follow-up message includes a timestamp of the second delay measurement response message.

[0035] In a possible implementation, the PTP message includes a domain number field, a message type field, and an identification field field, and the identification field is located in any one of the domain number field, the message type field, or the identification field field.

[0036] In one possible implementation, the PTP message includes a message type field and multiple timestamp fields, the identifier is located in the message type field, the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

[0037] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, the identification includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are respectively located in different fields in the domain number field, the message type field, and the identification domain field; if any sub-identifier of the first sub-identifier and the second sub-identifier is located in the domain number field, any sub-identifier indicates whether the PTP message is a delay measurement function message; if any sub-identifier is located in the message type field, any sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; if any sub-identifier is located in the identification domain field, any sub-identifier indicates whether the PTP message is a delay measurement function message.

[0038] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, and the identification includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; the first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; the second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and whether the PTP message is a delay measurement function message; the third sub-identifier is located in the identification domain field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

[0039] In a possible implementation, the PTP message includes a delay measurement type length value TLV, which identifies a type field in the delay measurement TLV.

[0040] In a possible implementation, the delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

[0041] In a possible implementation, the identifier is a reserved value of the field.

[0042] The beneficial effects achieved by the above-mentioned second aspect or any possible implementation of the second aspect can refer to the beneficial effects achieved by the above-mentioned first aspect or the corresponding implementation of the first aspect, and will not be repeated here.

[0043] In a third aspect, a communication system is provided, which includes the first communication device in the first aspect and the second communication device in the second aspect, wherein the first communication device is used to execute the method provided by the first aspect or any optional method of the first aspect, and the second communication device is used to execute the method provided by the second aspect or any optional method of the second aspect.

[0044] In a fourth aspect, a PTP message processing device is provided, which is used to execute the method provided in the first aspect or any optional manner of the first aspect.

[0045] In a fifth aspect, a device for sending a PTP message is provided, which is used to execute the method provided in the second aspect or any optional manner of the second aspect.

[0046] In a sixth aspect, a communication device is provided, which includes a processor, and the processor is used to execute program code so that the communication device executes a method provided as provided in the first aspect or any optional manner of the first aspect, or implements a method provided in the second aspect or any optional manner of the second aspect.

[0047] In the seventh aspect, a computer-readable storage medium is provided, which stores at least one program code, and the program code is read by a processor to enable a communication device to execute a method as provided in the first aspect or any optional manner of the first aspect, or to implement a method as provided in the second aspect or any optional manner of the second aspect.

[0048] In an eighth aspect, a computer program product or a computer program is provided, which includes a program code, and the program code is stored in a computer-readable storage medium. A processor reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the communication device executes the method provided in the above-mentioned first aspect or various optional implementations of the first aspect, or executes the method provided in the above-mentioned second aspect or any optional implementation of the above-mentioned second aspect.

[0049] Based on the implementation methods provided in the above aspects, this application can also be further combined to provide more implementation methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] FIG1 is a schematic diagram of the architecture of a communication system provided in an embodiment of the present application;

[0051] FIG2 is a schematic diagram of the architecture of another communication system provided in an embodiment of the present application;

[0052] FIG3 is a schematic diagram of the architecture of another communication system provided in an embodiment of the present application;

[0053] FIG4 is a schematic diagram of a PTP message having a first message format provided in an embodiment of the present application;

[0054] FIG5 is a schematic structural diagram of a message header 401 provided in an embodiment of the present application;

[0055] FIG6 is a schematic diagram of a message type identifier value in a message type field provided in an embodiment of the present application;

[0056] FIG7 is a schematic diagram of a value of a domain number in a domain number field provided in an embodiment of the present application;

[0057] FIG8 is a schematic diagram of a value of an identification domain in an identification domain field provided in an embodiment of the present application;

[0058] 9 is a schematic structural diagram of each delay measurement message involved in a PTP mechanism provided in an embodiment of the present application;

[0059] FIG10 is a schematic structural diagram of each delay measurement message involved in an ETE mechanism provided in an embodiment of the present application;

[0060] FIG11 is a schematic diagram of a tlv type as a suffix 403 provided in an embodiment of the present application;

[0061] FIG12 is a schematic diagram of the structure of a delay measurement TLV provided in an embodiment of the present application;

[0062] FIG13 is a schematic diagram of the structure of another delay measurement TLV provided in an embodiment of the present application;

[0063] 14 is a schematic diagram of a PTP message having a second message format provided in an embodiment of the present application;

[0064] 15 is a flow chart of a method for processing a PTP message according to an embodiment of the present application;

[0065] FIG16 is a flow chart of another method for processing a PTP message according to an embodiment of the present application;

[0066] 17 is a flowchart of PTP message interaction in a single-step mode of a PTP mechanism provided in an embodiment of the present application;

[0067] 18 is a flowchart of PTP message interaction in a two-step mode of a PTP mechanism provided in an embodiment of the present application;

[0068] 19 is a flowchart of PTP message interaction in a single-step mode of an ETE mechanism provided in an embodiment of the present application;

[0069] 20 is a flowchart of PTP message interaction in a two-step mode of an ETE mechanism provided in an embodiment of the present application;

[0070] FIG21 is a schematic structural diagram of a PTP message processing device provided in an embodiment of the present application;

[0071] FIG22 is a schematic structural diagram of a device for sending a PTP message according to an embodiment of the present application;

[0072] FIG23 is a schematic structural diagram of a communication device provided in an embodiment of the present application;

[0073] Figure 24 is a structural diagram of another communication device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0074] In order to facilitate understanding of the specific implementation methods of the present application, the specific implementation methods of the present application are introduced as follows in conjunction with the accompanying drawings.

[0075] The present application provides a method for processing PTP messages. The application environment of the method is introduced as follows with reference to the accompanying drawings.

[0076] Figure 1 is a schematic diagram of the architecture of a communication system provided by the present application. The communication system 100 shown in Figure 1 is a clock synchronization network that supports the PTP protocol. The communication system 100 includes multiple communication devices. The multiple communication devices are networked into a peer-to-peer (P2P) network in the communication system 100 in a peer-to-peer networking manner. As shown in Figure 1, the communication device 101 and the communication device 102 in the communication system are networked into a P2P network. In another possible implementation, the P2P network may also include more than two communication devices. Here, there is no limit on the number of communication devices used to form the P2P network in the communication system 100.

[0077] Different communication devices in a P2P network can be directly connected. Any two directly connected communication devices are considered adjacent communication devices in the P2P network, and adjacent communication devices can send PTP messages to each other, such as communication device 101 and communication device 102 in FIG1 .

[0078] Adjacent communication devices in a P2P network can also be indirectly connected through at least one service carrying device. A service carrying device refers to a communication device that provides service carrying services for the communication devices in the P2P network. For example, a service carrying device can provide an information transmission channel for the communication devices in the P2P network, and forward or transparently transmit the PTP message sent by a communication device in the P2P network to another communication device in the P2P network.

[0079] When any adjacent communication devices in a P2P network are indirectly connected through a service bearer device, the adjacent communication devices send PTP messages to each other through the connected service bearer device. As shown in Figures 2 and 3, the communication system 100 also includes a service bearer device 110 and a service bearer device 120. The communication device 101 is indirectly connected to the communication device 102 through the service bearer device 110 and the service bearer device 120. The communication device 101 can send PTP messages to the communication device 102 through the service bearer device 110 and the service bearer device 120, and the communication device 102 can send PTP messages to the communication device 101 through the service bearer device 120 and the service bearer device 110.

[0080] Figures 2 and 3 both illustrate an example where communication devices 101 and 102 are indirectly connected via two service bearer devices. In another possible implementation, adjacent communication devices in a P2P network may also be indirectly connected via a single service bearer device. When communication system 100 includes a service bearer device, the service bearer device in communication system 100 may be networked as the underlying physical (underlay) network of the P2P network to provide service bearer services to the communication devices in the P2P network.

[0081] In summary, communication system 100 includes a P2P network, which includes multiple communication devices, and multiple communication devices are directly connected. In another possible implementation, communication system 100 also includes an underlay network, which includes multiple service bearer devices. The underlay network may also include a service bearer device. Any adjacent communication devices in the P2P network are indirectly connected through at least one service bearer device in the underlay network. Of course, the adjacent communication devices may also be directly connected rather than indirectly connected through the service bearer device. There is no limit on the number of communication devices in the P2P network or the number of service bearer devices in the underlay network.

[0082] For any communication device in a P2P network or an underlay network, the communication device may be a network device. For example, the network device may be a packet forwarding device, such as a switch, a router, an Internet protocol radio access network (IPRAN), a packet transport network (PTN) device, a slicing packet network (SPN) device, and a metropolitan area transport network (MTN) device. The network device may also be a network device with an optical signal transmission function, such as an optical transport network (OTN) device. The communication device may also be an end-side device. For example, a network processing module supporting the PTP protocol is installed in the end-side device, and the end-side device can exchange PTP messages with other communication devices through the network processing module, such as servers, computer equipment, etc. Figures 1 and 2 both illustrate the communication device in the P2P network as a router as an example, and Figure 3 illustrates the communication device in the P2P network as a switch as an example. Figure 2 illustrates the communication device (i.e., service carrying device) in the underlay network as an OTN device as an example, and Figure 3 illustrates the communication device in the underlay network as a router as an example. Here, there is no limitation on the device type of the communication device in the P2P network and the device type of the communication device in the underlay network.

[0083] Each communication device in the communication system 100 (including communication devices in the P2P network and service-carrying devices in the underlay network) has the time synchronization function (referred to as the synchronization function) of the PTP protocol by running the PTP protocol. Adjacent communication devices in the communication system 100 (i.e., two directly connected communication devices) send PTP messages to each other to complete time synchronization. Exemplarily, in a scenario where different communication devices in the P2P network are directly connected, using Figure 1 as an example, communication device 101 sends a PTP message with the synchronization function to communication device 102. Communication device 102 then synchronizes time with communication device 101 based on the PTP message to synchronize the clock of communication device 102. In the scenario where adjacent communication devices in a P2P network are indirectly connected, taking the communication devices in Figures 2 and 3 as an example, the communication device 101 sends a PTP message with a synchronization function to the service carrying device 110, and the service carrying device 110 performs time synchronization with the communication device 101 based on the PTP message. The service carrying device 110 sends another PTP message with a synchronization function to the service carrying device 120, and the service carrying device 120 performs time synchronization with the service carrying device 110 based on the PTP message of the service carrying device 110; the service carrying device 120 sends another PTP message with a clock synchronization function to the communication device 102, and the communication device 102 performs time synchronization with the service carrying device 120 based on the PTP message of the service carrying device 120.

[0084] The clock of a communication device that publishes a clock signal via PTP messages is a master clock, and the clock of a communication device that synchronizes time based on these PTP messages is a slave clock. The communication device to which the master clock belongs is a master clock device, and the communication device to which the slave clock belongs is a slave clock device. Taking Figure 1 as an example, communication device 101 is the master clock device of communication device 102, and communication device 102 is the slave clock device of communication device 101. Taking Figures 2 and 3 as another example, communication device 101 is the master clock device of service bearer device 110, and service bearer device 110 is the slave clock device of communication device 101 and the master clock device of service bearer device 120.

[0085] As shown in Figures 2 and 3, since the PTP message with synchronization function of the communication device 101 will not be sent to other communication devices by the service carrying device 110, it is equivalent to that the service carrying device 110 terminates the PTP message of the communication device 101, and the PTP message of the communication device 101 is terminated in the service carrying device 110. Accordingly, the PTP message with synchronization function sent by the service carrying device 110 to the service carrying device 120 is terminated in the service carrying device 120, and the PTP message with synchronization function sent by the service carrying device 120 to the communication device 102 is terminated in the communication device 102.

[0086] When any adjacent communication device in a P2P network has a delay measurement requirement, the adjacent communication device can measure the link transmission delay between the adjacent communication devices by sending PTP messages with a delay measurement function to each other. The link transmission delay refers to the transmission time length of the PTP message between the adjacent communication devices. Exemplarily, in a scenario where adjacent communication devices in a P2P network are directly connected, taking Figure 1 as an example, communication device 101 sends a PTP message with a delay measurement function to communication device 102, and communication device 102 performs delay measurement based on the PTP message. Alternatively, communication device 102 sends a PTP message with a delay measurement function to communication device 101, and communication device 101 performs delay measurement based on the PTP message. In the scenario where adjacent communication devices in a P2P network are indirectly connected, the service bearer device is also responsible for forwarding service messages of the adjacent communication devices between the adjacent communication devices in the P2P network. The PTP message with delay measurement function is the service message of the P2P network in the delay measurement scenario. Therefore, in this delay measurement scenario, the service bearer device is responsible for forwarding the PTP messages with delay measurement function sent between adjacent communication devices in the P2P network. Taking the communication devices in Figures 2 and 3 as an example, the communication device 101 sends the PTP message with delay measurement function to the service bearer device 110, the service bearer device 110 sends the PTP message to the service bearer device 120, and the service bearer device 120 sends the PTP message to the communication device 102. The communication device 102 performs delay measurement based on the PTP message.

[0087] Next, the PTP messages involved in this application are introduced.

[0088] From a functional perspective, this application divides PTP messages into PTP messages with a delay measurement function and PTP messages with a synchronization function. For the convenience of description, the PTP message with a delay measurement function is referred to as a delay measurement function message, and the PTP message with a synchronization function is referred to as a synchronization function message. In other words, the PTP message without a delay measurement function is referred to as a synchronization function message.

[0089] The present application adds an identifier to the PTP message so that the PTP message has a delay measurement function or a time synchronization function. The identifier indicates whether the PTP message is a delay measurement function message. For example, if the identifier indicates that the PTP message is a delay measurement function message, then the PTP message has a delay measurement function. If the identifier indicates that the PTP message is not a delay measurement function message, then the PTP message does not have a delay measurement function and the PTP message is a synchronization function message. The PTP message also includes other identifiers in addition to the identifier. In order to distinguish it from other identifiers and for the convenience of description, the identifier indicating whether the PTP message is a delay measurement function message is referred to as a delay measurement identifier.

[0090] The PTP message including the delay measurement identifier may have a first message format or a second message format. Next, these two message formats are introduced respectively with reference to the accompanying drawings.

[0091] 1. The first message format of PTP message

[0092] FIG4 is a schematic diagram of a PTP message having a first message format provided by an embodiment of the present application. As shown in FIG4 , PTP message 400 includes a message header 401, a message body 402, and a suffix 403. The delay measurement identifier is located in the message header 401 or the suffix 403. The message header 401, the message body 402, and the suffix 403 are respectively introduced in Sections 1.1 to 1.3 below.

[0093] 1.1. Message Header 401

[0094] Among them, the message header 401 is used to define the version of the PTP protocol and the message type of the PTP message, and is also used to define other contents of the PTP message. For example, Figure 5 is a structural diagram of a message header 401 provided in an embodiment of the present application. As shown in Figure 5, the message header 401 occupies 34 bytes and includes:

[0095] Major Standards Development Organization Identification (majorSdoId) field: occupies 4 bits and is used to store the major standards development organization identification of the domain where the PTP message generation device is located. A domain consists of one or more PTP instances (such as a communication device running the PTP protocol). A domain has two attribute identifiers: standards development organization identification (SdoId) and domain number (domainNumber). SdoId is the identifier of the standards organization that specifies the PTP protocol. SdoId ranges from 0 to 4095. The value of SdoId is a 12-bit integer. The highest 4 bits of the 12-bit integer are called majorSdoId, and the last 8 bits of the 12-bit integer are called minor standards development organization identification (minorSdoId).

[0096] Message Type field: occupies 4 bits and is used to store the message type identifier of the PTP message. As shown in Figure 6, the message type identifier indicates the message type of the PTP message. Different values ​​of the message type identifier represent different message types. The highest bit of the message type field indicates whether the PTP message is an important (Event) message or a general (General) message.

[0097] Minor PTP version (minorVersionPTP) field: occupies 4 bits and is used to store the minor version number. This minor version number, together with the major PTP version number in the PTP version field, indicates the version of the PTP protocol running on the PTP instance that publishes the PTP message.

[0098] PTP version (versionPTP) field: occupies 4 bits and is used to store the major version number of the PTP protocol;

[0099] Message Length field: occupies 8 bits and is used to store the message length, which is the length of the PTP message;

[0100] Domain Number field: occupies 8 bits and is used to store the domain number. The domain number indicates the domain to which the communication device sending the PTP message belongs. The values ​​of the domain number are shown in Figure 7.

[0101] minorSdoId field: occupies 8 bits and is used to store minorSdoId;

[0102] FlagField: occupies 8 bits and is used to store the flag field. As shown in Figure 8, different values ​​of the flag field have different meanings.

[0103] Correction Field: occupies 8 bits and is used to store the correction field, which is used to compensate for the link transmission delay between adjacent transmission devices in the P2P network;

[0104] Specific message type (messageTypeSpecific) field: occupies 8 bits and is used to store a specific message type identifier. The value of the specific message type identifier depends on the message type of the PTP message.

[0105] Source Port Identity field: occupies 8 bits and is used to store the source port identifier, which indicates the device identifier (Identity, ID) of the communication device that sends the PTP message and the port number of the port in the communication device that sends the PTP message;

[0106] Sequence ID (sequenceId) field: occupies 8 bits and is used to store the sequence ID, which indicates the sequence number of the PTP message and the corresponding relationship between the PTP message and the associated message;

[0107] Control Field: occupies 8 bits and is used to store the control field. The value of the control field depends on the message type of the PTP message.

[0108] Log Message Interval field: occupies 8 bits and is used to store the log message period. The log message period refers to the time interval for sending PTP messages. The size of the log message period depends on the message type of the PTP message.

[0109] In one possible implementation, the latency measurement flag is located in the message header 401, not in the suffix 403. For this implementation, the latency measurement flag is located in any of the message type field, domain number field, or identifier field in the message header 401. The following sections 1.1.1 to 1.1.3 describe the values ​​of the latency measurement flag when located in these three fields.

[0110] 1.1.1. The delay measurement identifier is located in the message type field

[0111] As shown in Figure 6, from the message type, the PTP protocol divides PTP messages into synchronization (Sync) messages, delay request (Delay Request, Delay_Req) ​​messages, delay request (Peer to Peer Delay Request, Pdelay_Req) ​​messages under the peer delay mechanism, delay response (Peer to Peer Delay Response, Pdelay_Resp) requests under the peer delay mechanism, follow (Follow_Up) messages, delay response based on the peer delay mechanism follows (Peer to Peer Delay Response Follow Up, Pdelay_Resp_Follow_Up) requests, delay response (Delay Response, Delay_Resp) messages, announcement (Announce) messages, signaling (Signaling), management (Management) messages and reserved (Reserved) messages. Among them, reserved messages refer to PTP messages of message types that have not yet been used. These are all PTP messages that do not include delay measurement identifiers.

[0112] The PTP protocol supports two delay measurement mechanisms, namely the delay request response mechanism and the peer delay mechanism. These two delay measurement mechanisms involve PTP messages of different message types. Among them, the delay request response mechanism is also called the end-to-end (ETE) mechanism. The PTP messages involved in the ETE mechanism include Sync messages, Delay_Req messages, Delay_Resp messages, and Follow_Up messages. The peer delay mechanism is referred to as the peer to peer (PTP) mechanism. The PTP messages involved in the PTP mechanism include Pdelay_Req messages, Pdelay_Resp messages, and Pdelay_Resp_Follow_Up messages. Adjacent communication devices in the P2P network of the communication system 100 can measure the link transmission delay between adjacent PTP ports through any of the two delay measurement mechanisms. Adjacent PTP ports are port pairs that send and receive the same PTP message by the adjacent communication devices.

[0113] When the delay measurement identifier is located in the message type field, the delay measurement identifier can also serve as a message type identifier. In this case, the delay measurement identifier indicates that the PTP message is a delay measurement function message and the message type of the PTP message. In one possible implementation, the delay measurement identifier corresponds to multiple values, and the multiple values ​​are different. When the delay measurement identifier takes any value among these multiple values, the delay measurement identifier indicates that the PTP message is a delay measurement function message.

[0114] The multiple values ​​may all be reserved values ​​of the message type field (ie, reserved values ​​of the message type identifier). As shown in FIG6 , the reserved values ​​of the message type field include 4-7 and EF, and the multiple values ​​are values ​​among 4-7 and EF.

[0115] Alternatively, the multiple values ​​may also be customized values ​​in addition to the values ​​already occupied by the message type field, wherein the values ​​already occupied by the message type field refer to the values ​​already used and reserved values ​​of the message type identifier in the related technology, such as 0-F shown in Figure 6 are the values ​​already occupied by the message type field.

[0116] Alternatively, at least one of the multiple values ​​is a reserved value of the message type field, and the remaining values ​​are the custom values. Here, this application does not limit the value of the delay measurement identifier in the message type field.

[0117] When the value of the delay measurement identifier is a reserved value or a customized value of the message type field, it is possible to avoid occupying the message type value of the synchronization function message, so that the communication device can distinguish whether the PTP message containing the delay measurement identifier is a delay measurement function message or a synchronization function message based on the value of the delay measurement identifier.

[0118] In a possible implementation, the multiple values ​​correspond to different message types, and the message types corresponding to the multiple values ​​are message types of PTP messages involved in the same delay measurement mechanism. Taking the PTP mechanism as an example, the message types of the PTP messages involved in the PTP mechanism include Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up. Assume that the multiple values ​​are the reserved values ​​{4, 5, 6} of the message type field, wherein the message types corresponding to 4, 5, and 6 are Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up, respectively. If the delay measurement identifier is 4, then the PTP message 400 is a delay measurement function message and a Pdelay_Req message involved in the PTP mechanism. If the delay measurement identifier is 5, then the PTP message 400 is a delay measurement function message and a Pdelay_Resp message involved in the PTP mechanism. If the delay measurement identifier is 6, then the PTP message 400 is a delay measurement function message and a Pdelay_Resp_Follow_Up message involved in the PTP mechanism. Taking the ETE mechanism as an example, the message types of PTP messages involved in the ETE mechanism include Sync, Delay_Req, Delay_Resp, and Follow_Up. Assume that these multiple values ​​are the reserved values ​​{4, 5, 6, 7} of the message type field, where 4, 5, 6, and 7 correspond to the message types Sync, Delay_Req, Delay_Resp, and Follow_Up, respectively. If the delay measurement identifier is 4, the PTP message is a delay measurement function message and a Sync message involved in the ETE mechanism. If the delay measurement identifier is 5, PTP message 400 is a delay measurement function message and a Delay_Req message involved in the ETE mechanism. If the delay measurement identifier is 6, PTP message 400 is a delay measurement function message and a Delay_Resp message involved in the ETE mechanism. If the delay measurement identifier is 7, PTP message 400 is a delay measurement function message and a Follow_Up message involved in the ETE mechanism.

[0119] To distinguish the delay measurement function messages involved in different delay measurement mechanisms, for the ETE mechanism, the synchronization message involved in the ETE mechanism and including the delay measurement identifier is called a delay measurement synchronization message, that is, a Sync message including the delay measurement identifier; the delay request message involved in the ETE mechanism and including the delay measurement identifier is called a first delay measurement request message, that is, a Delay_Req message including the delay measurement identifier; the delay response message involved in the ETE mechanism and including the delay measurement identifier is called a first delay measurement response message, that is, a Delay_Resp message including the delay measurement identifier; and the follow-up message involved in the ETE mechanism and including the delay measurement identifier is called a delay measurement follow-up message, that is, a Follow_Up message including the delay measurement identifier. To distinguish them from the Sync message, Delay_Req message, Delay_Resp message, Delay_Resp message, and Follow_Up message, the delay measurement synchronization message, the first delay measurement request message, the first delay measurement response message, and the delay measurement follow message are respectively expressed as: Sync_dm message, Delay_Req_dm message, Delay_Resp_dm message, and Follow_Up_dm message, where dm stands for delay measurement.

[0120] For the PTP mechanism, the delay request message involved in the PTP mechanism and including the delay measurement identifier is called the second delay measurement request message, that is, the Pdelay_Req message including the delay measurement identifier; the delay response message involved in the PTP mechanism and including the delay measurement identifier is called the second delay measurement response message, that is, the Pdelay_Resp message including the delay measurement identifier; the delay response follow message involved in the PTP mechanism and including the delay measurement identifier is called the delay measurement response follow message, that is, the Pdelay_Resp_Follow_Up message including the delay measurement identifier. To distinguish them from the Pdelay_Resp message, the Pdelay_Resp message, and the Pdelay_Resp_Follow_Up message, the second delay measurement request message, the second delay measurement response message, and the delay measurement response follow message are respectively represented as: Pdelay_Req_dm message, Pdelay_Resp_dm message, and Pdelay_Resp_Follow_Up_dm message, where dm represents delay measurement.

[0121] 1.1.2. The delay measurement identifier is located in the domain number field

[0122] When the delay measurement identifier is located in the domain number field, the delay measurement identifier indicates whether the PTP message is a delay measurement function message. In this case, the delay measurement identifier corresponds to two values, and these two values ​​are different. One of the two values ​​represents that the PTP message is a delay measurement function message, and the other value represents that the PTP message is not a delay measurement function message. The delay measurement identifier can take a value from these two values.

[0123] These two values ​​can both be reserved values ​​of the domain number field (i.e., reserved values ​​of the domain number). As shown in Figure 7, the reserved values ​​of the domain number field include 201-2FF. These two values ​​can be any two values ​​in 201-2FF. For example, if the delay measurement identifier is 201, the delay measurement identifier indicates that the PTP message is a delay measurement function message. If the delay measurement identifier is 202, the delay measurement identifier indicates that the PTP message is not a delay measurement function message.

[0124] Alternatively, these two values ​​can also be customized values ​​other than the values ​​already occupied by the domain number field, where the values ​​already occupied by the domain number field refer to the values ​​already used and reserved values ​​of the domain number in the related technology, such as the allowed domain number values ​​and reserved values ​​shown in Figure 7.

[0125] Alternatively, one of the two values ​​is a reserved value of the domain number field, and the other value is the custom value. Here, this application does not limit the value of the delay measurement identifier in the domain number field.

[0126] In another possible implementation, the latency measurement identifier in the domain number field has only one value, which is a reserved value or a custom value. Taking the reserved value as an example, if the value in the domain number field is 201, then 201 is the latency measurement identifier, indicating that the PTP message is a latency measurement synchronization message. If the value in the domain number field is not 201, then the value in the domain number field is the domain number, not the latency measurement identifier. In this case, the PTP message does not include the latency measurement identifier, and the PTP message is not a latency measurement function message.

[0127] When the value of the delay measurement identifier is a reserved value or a customized value of the domain number field, it is possible to avoid occupying a known domain number value, so that the communication device can distinguish whether the value in the domain number is a domain number or a delay measurement identifier based on the value in the domain number. When the value in the domain number is the delay measurement identifier, the communication device can determine whether the PTP message is a delay measurement function message based on the value of the delay measurement identifier. When the PTP message is a delay measurement function message, the communication device can also determine which delay measurement mechanism the PTP message involves based on the value of the message type identifier in the message type field.

[0128] 1.1.3. The delay measurement identifier is located in the identifier field

[0129] When the delay measurement flag is located in the Identification field, the delay measurement flag indicates whether the PTP message is a delay measurement function message. The delay measurement flag is the value of any reserved bit in the Identification field. Reserved bits are bits that have not been defined in the Identification field in the related art. Taking Figure 8 as an example, bits 7 and 15 of the Identification field are both reserved bits. Assuming that bit 7 of the Identification field is the delay measurement flag, a value of 1 for the 7th bit indicates that the PTP message is a delay measurement function message. A value of 0 for the 7th bit indicates that the PTP message is not a delay measurement function message.

[0130] Alternatively, the delay measurement identifier includes the values ​​of two reserved bits in the identification field. The values ​​of these two reserved bits can be combined into four values, namely 00, 01, 10, and 11. Any two of these four values ​​are used as the delay measurement identifier. One of these two values ​​indicates that the PTP message is a delay measurement function message, and the other value indicates that the PTP message is not a delay measurement function message. Taking Figure 8 as an example, assuming that the values ​​of the 7th and 15th bits of the identification field constitute the delay measurement identifier, when the value of the 7th bit is 1 and the value of the 15th bit is 1, it indicates that the PTP message is a delay measurement function message. When the value of the 7th bit is 1 and the value of the 15th bit is 0, it indicates that the PTP message is not a delay measurement function message.

[0131] When the delay measurement identifier is a specific value of the reserved field in the identification field, the delay measurement identifier can be prevented from occupying the already defined bits in the identification field, so that the communication device can determine whether the PTP message is a delay measurement function message based on whether the reserved bit in the identification field is a specific value. When the PTP message is a delay measurement function message, the communication device can also determine which delay measurement mechanism the PTP message involves based on the value of the message type identifier in the message type field. The value of the reserved field in the identification field is a reserved value of the identification field. When the delay measurement identifier is a specific value of the reserved field in the identification field, the delay measurement identifier is the reserved value of the identification field.

[0132] The above 1.1.1 is based on the example of the delay measurement identifier occupying all bits of the message type field, and the above 1.1.2 is based on the example of the delay measurement identifier occupying all bits of the domain number field. In another possible implementation, when the delay measurement identifier is located in any field of the message type field and the domain number field, the field is extended by 1 or 2 bits, and the extended bits are called extended bits. The extended bits can be located at the end of the field. The delay measurement identifier is represented by the value of the extended bit. The value of the extended bit can refer to the case in 1.1.3 above where the delay measurement identifier is located in the identifier domain field and the value of the reserved bit is the delay measurement identifier, which will not be repeated here. In the case where the value of the extended bit is used as the delay measurement identifier, if the delay measurement identifier indicates that the PTP message is a delay measurement function message, the communication device can also determine which delay measurement mechanism the PTP message is related to by combining the value of the message type identifier in the message type field.

[0133] The above 1.1.1 to 1.1.3 are all introduced by taking the example of the delay measurement identifier being located in one field of the message header. In another possible implementation, the delay measurement identifier may also be located in multiple fields of the message header, such as the following 1.1.4.

[0134] 1.1.4. The delay measurement identifier includes multiple sub-identifiers, which are located in at least two fields of the message type field, the domain number field, and the identifier field field.

[0135] In one possible implementation, the latency measurement identifier includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are respectively located in different fields of the domain number field, the message type field, and the identifier field field. For example, the first sub-identifier and the second sub-identifier are respectively located in the domain number field and the message type field, or the first sub-identifier and the second sub-identifier are respectively located in the identifier field field and the message type field, or the first sub-identifier and the second sub-identifier are respectively located in the domain number field and the identifier field field.

[0136] If any of the first sub-identifier and the second sub-identifier is located in the domain number field, the sub-identifier indicates whether the PTP message is a delay measurement function message. In this case, the value of the sub-identifier and the meanings represented by different values ​​can refer to the value of the delay measurement identifier in the domain number field and the meanings represented by different values ​​in 1.1.2 above. Alternatively, the value of the sub-identifier can also be the value of the extended bit of the domain number field, which will not be repeated here. For example, assuming that the sub-identifier is located in the domain number field and the sub-identifier is the reserved value 201 of the domain number field, the sub-identifier indicates that the PTP message is a delay measurement function message.

[0137] If any of the sub-identifiers is located in the message type field, the any of the sub-identifiers indicates the message type of the PTP message and that the PTP message is a delay measurement function message. At this time, the value of the any of the sub-identifiers and the meanings represented by different values ​​can refer to the value of the delay measurement identifier in the message type field and the meanings represented by different values ​​in 1.1.1 above. Alternatively, the value of the any of the sub-identifiers can be the value of the extended bit of the message type field, which will not be repeated here. For example, assuming that the any of the sub-identifiers is the reserved value 4, 5, or 6 of the message type field, the second sub-identifier indicates that the PTP message is a Pdelay_Req_dm message, a Pdelay_Resp_dm message, or a Pdelay_Resp_Follow_Up_dm message, respectively. Although the any of the sub-identifiers indicates that the PTP message is a delay measurement type identifier at this time, whether the PTP message is a delay measurement type identifier depends on another sub-identifier.

[0138] If any of the sub-identifiers is in the identification field, the sub-identifier indicates whether the PTP message is a delay measurement function message. In this case, the value of the sub-identifier and the meaning of different values ​​can be referred to in the above 1.1.3 on the value of the delay measurement identifier in the identification field and the meaning of different values, which will not be repeated here. For example, assuming that the 7th bit of the identification field is any of the sub-identifiers, when the value of the 7th bit is 1, it indicates that the PTP message is a delay measurement function message, and when the value of the 7th bit is 0, it indicates that the PTP message is not a delay measurement function message.

[0139] For this implementation, if both the first sub-identifier and the second sub-identifier indicate that the PTP message is a delay measurement function message, the delay measurement identifier indicates that the PTP message is a delay measurement function message. For example, assuming that the first sub-identifier is in the domain number field and the second sub-identifier is in the message type field, when the first sub-identifier is the reserved value 201 in the domain number field and the second sub-identifier is the reserved value 4 in the message type field, the delay measurement identifier indicates that the PTP message is a delay measurement function message. If at least one of the first sub-identifier and the second sub-identifier both indicate that the PTP message is not a delay measurement function message, the delay measurement identifier indicates that the PTP message is not a delay measurement function message. For example, assuming that the reserved value 201 of the domain number field is the first sub-identifier, the reserved value 201 indicates that the PTP message is a delay measurement function message. assuming that the reserved value 4 of the message type field is the second sub-identifier, the reserved value 4 indicates that the PTP message is a delay measurement function message and the message type of the PTP message is Pdelay_Req. Based on this, when the value in the domain number field is not the reserved value 201 and the value in the message type field is the reserved value 4, since the value in the domain number field is not the reserved value 201, the delay measurement identifier jointly represented by the first sub-identifier and the second sub-identifier indicates: the PTP message is not a delay measurement function message, and based on the indication of the reserved value 4 in the message type field, it can be known that the PTP message is a Pdelay_Req message.

[0140] In another possible implementation, the delay measurement identifier includes a first sub-identifier, a second sub-identifier, and a third sub-identifier. Among them, the first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message. At this time, the value of the first sub-identifier and the meaning represented by different values ​​can refer to the value of the delay measurement identifier in the domain number field in 1.1.2 above and the meaning represented by different values, or the value of the first sub-identifier can also be the value of the extended bit of the domain number field, which will not be repeated here. The second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and whether the PTP message is a delay measurement function message. At this time, the value of the second sub-identifier and the meaning represented by different values ​​can refer to the value of any sub-identifier when any of the above sub-identifiers is located in the message type field and the meaning represented by it, which will not be repeated here. The third sub-identifier is located in the identification field. The third sub-identifier indicates whether the PTP message is a delay measurement function message. In this case, the value of the third sub-identifier and the meaning of different values ​​can be referred to the value of the delay measurement identifier in the identification field and the meaning of different values ​​in 1.1.3 above. It is not repeated here.

[0141] For this implementation, when the first sub-identifier, the second sub-identifier, and the third sub-identifier all indicate that the PTP message is a delay measurement function message, the delay measurement identifier indicates that the PTP message is a delay measurement function message. When at least one of the first sub-identifier, the second sub-identifier, and the third sub-identifier indicates that the PTP message is not a delay measurement function message, the delay measurement identifier indicates that the PTP message is not a delay measurement function message.

[0142] 1.2. Message body 402

[0143] The structure of the message body 402 of the delay measurement message involved in different delay measurement mechanisms is different. The following 1.2.1 and 1.2.2 respectively introduce the structure of the message body 402 of the delay measurement message involved in the PTP mechanism and the ETE mechanism.

[0144] 1.2.1. Message body 402 of the delay measurement message involved in the PTP mechanism

[0145] FIG9 is a schematic diagram of the structure of each delay measurement message involved in a PTP mechanism provided in an embodiment of the present application. As shown in FIG9 , the message body 402 of the Pdelay_Req_dm message includes the following fields:

[0146] Source timestamp (originTimestamp) field: used to store the source timestamp, which is 0;

[0147] Reserved field: The value is 0 so that the function of the Pdelay_Req_dm message can be further expanded based on the reserved field.

[0148] The message body 402 of the Pdelay_Resp_dm message includes the following fields:

[0149] Request Receipt Timestamp field: used to store the request reception timestamp. In the one-step mode of the PTP mechanism, the request reception timestamp is the time it takes for the communication device that sends the Pdelay_Resp_dm message to respond to the Pdelay_Req_dm message, that is, the processing time of the Pdelay_Req_dm message on the communication device. In the two-step mode of the PTP mechanism, the request reception timestamp is the timestamp of the reception time of the Pdelay_Req_dm message. In this application, the reception time of any PTP message refers to the time when the communication device receives the PTP message.

[0150] Requesting port identifier (requestingPortIdentity) field: used to store the requesting port identifier, which is the identifier of the port that sends the Pdelay_Resp_dm message in response to the Pdelay_Req_dm message.

[0151] The message body 402 of the Pdelay_Resp_Follow_Up_dm message includes the following fields:

[0152] Response Origin Timestamp field: used to store the response origin timestamp. In the two-step mode of the PTP mechanism, the response origin timestamp is the timestamp of the sending time of the Pdelay_Resp_dm message followed by the Pdelay_Resp_Follow_Up_dm message. In this application, the sending time of any PTP message refers to the time when the communication device that generates the PTP message sends the PTP message;

[0153] Requesting port identification (requestingPortIdentity) field: used to store the requesting port identification, which is the identification of the port that sends the Pdelay_Resp_dm message.

[0154] 1.2.2. Message body 402 of the delay measurement message related to the ETE mechanism

[0155] FIG. 10 is a schematic diagram of the structure of a delay measurement message involved in an ETE mechanism provided in an embodiment of the present application. As shown in FIG. 10 , the message body 402 of the Sync_dm message includes the following fields:

[0156] Source timestamp (originTimestamp) field: used to store the source timestamp. In the single-step mode of the ETE mechanism, the source timestamp is the timestamp of the sending time of the Sync_dm message. In the two-step mode of the ETE mechanism, the value of the source timestamp is 0.

[0157] The message body 402 of the Delay_Req_dm message includes the following fields:

[0158] Source timestamp (originTimestamp) field: used to store the source timestamp, the value of which is 0.

[0159] The message body 402 of the Follow_Up_dm message includes the following fields:

[0160] Precise Origin Timestamp field: used to store the precise origin timestamp, which is the timestamp of the sending time of the Sync_dm message followed by the Follow_Up_dm message.

[0161] The message body 402 of the Delay_Resp_dm message includes the following fields:

[0162] Response Origin Timestamp field: used to store the response origin timestamp, which is the timestamp of the time when the Delay_Req_dm message to which the Delay_Resp_dm message responds is received.

[0163] Requesting port identification (requestingPortIdentity) field: used to store the requesting port identification, which is the identification of the port that receives the Delay_Resp_dm message.

[0164] The message headers of the various time measurement messages shown in FIG. 9 and FIG. 10 may all be message headers 401 including a delay measurement identifier.

[0165] 1.3, suffix 403

[0166] The suffix 403 may be any type length value (TLV) shown in Figure 11. The suffix 403 is an optional item in the PTP message 400 and is located at the end of the PTP message 400. In another possible implementation, the PTP message 400 may not include the suffix 403.

[0167] When the delay measurement identifier is located in suffix 403, the delay measurement identifier is located in the delay measurement type length value (TLV), and the delay measurement TLV is suffix 403. As described in 1.3.1 and 1.3.2 below, the delay measurement TLV can be a reserved TLV or a vendor TLV supported by the PTP message 400. Using this reserved TLV or vendor TLV to carry the delay measurement identifier prevents the delay measurement identifier from occupying other fields in the PTP message 400, thereby avoiding interference with other fields.

[0168] 1.3.1. The delay measurement TLV is a reserved TLV supported by PTP message 400.

[0169] At this time, the delay measurement TLV can be any reserved TLV supported by the PTP message shown in Figure 11, such as a reserved TLV corresponding to a tlv type (Type) value of 000A-1FFF, or a reserved TLV corresponding to a TLVType value of FFF0-FFFF.

[0170] Taking the reserved TLV as the delay measurement TLV as an example, the delay measurement TLV 1200 shown in FIG12 includes the following fields:

[0171] tlvType field: used to store the tlvType identifier of the latency measurement TLV. The tlvType identifier indicates that the TLV is a reserved TLV. Assuming that the TLV is a reserved TLV corresponding to 000A-1FFF, the value of the TLV type identifier is any value between 000A-1FFF.

[0172] LengthField: used to store the length of the value field of the delay measurement TLV1200;

[0173] Data Field: used to store data notified by the latency measurement TLV1200.

[0174] The delay measurement identifier is located in the tlvType field of the delay measurement TLV 1200. In this case, the delay measurement identifier is the tlvType identifier of the delay measurement TLV 1200. In this case, the delay measurement identifier is also used to indicate that the TLV type of the TLV is a delay measurement TLV. The PTP message 400 including the delay measurement TLV is a delay measurement function message. If the PTP message 400 does not include the delay measurement TLV, the PTP message 400 is not a delay measurement function message.

[0175] When the delay measurement identifier is located in the TLV type field of the delay measurement TLV1200, the delay measurement identifier also indicates the message type of the PTP message. In one possible implementation, the delay measurement identifier corresponds to multiple values, and the multiple values ​​are different. The multiple values ​​correspond to different message types. The message types corresponding to the multiple values ​​are the message types of the PTP messages involved in at least one delay measurement mechanism. Taking the PTP mechanism as an example, assuming that the multiple values ​​are the reserved values ​​{000A, 000B, 000C} of the tlvType field, as shown in Figure 12, the message types corresponding to 000A, 000B, and 000C are Pdelay_Req, Pdelay_Resp, and Pdelay_Resp_Follow_Up, respectively. If the delay measurement identifier is 000A, then the PTP message 400 is a Pdelay_Req_dm message. If the delay measurement identifier is 000B, then the PTP message 400 is a Pdelay_Resp_dm message. If the delay measurement identifier is 000C, then the PTP message 400 is a Pdelay_Resp_Follow_Up_dm message. Taking the ETE mechanism as an example, assume that the multiple values ​​are the reserved values ​​{000C, 000D, 000E, 000F} of the tlvType field, where the message types corresponding to 000C, 000D, 000E, and 000F are Sync, Delay_Req, Delay_Resp, and Follow_Up, respectively. If the delay measurement identifier is 000C, the PTP message 400 is a Sync_dm message. If the delay measurement identifier is 000D, the PTP message 400 is a Delay_Req_dm message. If the delay measurement identifier is 000E, the PTP message 400 is a Delay_Resp_dm message. If the delay measurement identifier is 000F, the PTP message 400 is a Follow_Up_dm message.

[0176] The data announced in the Value field of Delay Measurement TLV 1200 depends on the message type indicated by the Delay Measurement ID in the tlvType field. The announced data includes the message body 402 of the Delay Measurement Function message of that message type. As shown in Figure 12, if the Delay Measurement ID is 00A, indicating a Pdelay_Req_dm message, the Value field includes the message body 402 of the Pdelay_Req_dm message in Figure 9. If the Delay Measurement ID is 00B, indicating a Pdelay_Resp_dm message, the Value field includes the message body 402 of the Pdelay_Resp_dm message in Figure 9. If the Delay Measurement ID is 00C, indicating a Pdelay_Resp_Follow_Up_dm message, the Value field includes the message body 402 of the Pdelay_Resp_Follow_Up_dm message in Figure 9. If the message type indicated by the delay measurement identifier is a message type involved in the ETE mechanism, the data announced by the value field includes the message body 402 of the delay measurement function message involved in the ETE mechanism, which will not be described in detail here.

[0177] 1.3.2. The delay measurement TLV is the vendor TLV supported by PTP message 400.

[0178] At this time, the delay measurement TLV can be any vendor TLV supported by the PTP message shown in FIG. 11 , for example, the organization allowed extension (ORGANIZATION_EXTENSION_PROPAGATE) TLV for broadcast with a tlv type (Type) value of 4000.

[0179] Taking the vendor TLV as the latency measurement TLV as an example, the latency measurement TLV 1300 shown in Figure 13 includes the following fields:

[0180] TLV Type field: used to store the tlvType identifier of the latency measurement TLV. The tlvType identifier indicates that the TLV is a vendor TLV. For example, the TLV type identifier value is 4000.

[0181] LengthField: used to store the length of the value field of the delay measurement TLV1200;

[0182] Organization ID field: used to store the organization ID, which is the ID of the latency measurement TLV requested from the manufacturer;

[0183] Organization Subtype (OrganizationSubType) field: used to store the subtype identifier within the scope of the Organization Identifier field. The subtype identifier value is assigned by the manufacturer or standards organization identified by the Organization Identifier;

[0184] Data Field: used to store data notified by the latency measurement TLV1300.

[0185] The delay measurement identifier is located in the tlvType field of the delay measurement TLV 1300. In this case, the delay measurement identifier is the tlvType identifier of the delay measurement TLV 1300. The value of the delay measurement identifier is a reserved value of the tlvType field of the delay measurement TLV 1300. Since the tlvType field of the delay measurement TLV 1300 has only one reserved value, the delay measurement identifier only indicates that the PTP message is a delay function measurement message. The message type is indicated by the message type identifier in the message header 402 of the PTP message. For example, if the delay measurement identifier in the delay measurement TLV 1300 is 4000 and the message type identifier in the message header 402 is 0 (indicating the message type Sync), then the PTP message 400 is a Sync_dm message.

[0186] The data announced by the data field in the delay measurement TLV1300 depends on the message type indicated by the message type identifier in the message header 402. For example, the data announced by the data field in the delay measurement TLV1300 includes the message body 402 of the delay measurement function message of this message type, which is similar to the data field of the delay measurement TLV1200 and will not be repeated here.

[0187] 2. The second message format of PTP message

[0188] Figure 14 is a schematic diagram of a PTP message having a second message format provided in an embodiment of the present application. As shown in Figure 14, a PTP message 1400 includes a message type (messageType) field 1401 and multiple timestamp fields 1402. The delay measurement identifier is located in the message type field 1401. The multiple timestamp fields 1402 correspond to different delay measurement function messages. Each timestamp field 1402 is used to store the timestamp of the corresponding delay measurement function message.

[0189] Among them, multiple timestamp fields 1402 correspond to the same delay measurement mechanism, and thus correspond to the timestamp fields in each delay measurement function message under the delay measurement mechanism. As shown in Figure 14, taking the PTP mechanism as an example, the multiple timestamp fields 1402 are the source timestamp field in the Pdelay_Req_dm message, the request reception timestamp field in the Pdelay_Resp_dm message, and the response source timestamp field in the Pdelay_Resp_Follow_Up_dm message. Taking the ETE mechanism as an example, the multiple timestamp fields 1402 are the source timestamp field in the Sync_dm message, the source timestamp field in the Delay_Req_dm message, the response source timestamp field in the Delay_Resp_dm message, and the precise source timestamp field in the Follow_Up_dm message.

[0190] In one possible implementation, the PTP message 1400 further includes at least one non-timestamp field 1403. The non-timestamp field 1403 is a field other than the timestamp field in the message body 402 of each delay measurement function message under the corresponding delay measurement mechanism. As shown in FIG14 , taking the PTP mechanism as an example, the non-timestamp field 1403 is the request port identifier field in the Pdelay_Resp_dm message and the request port identifier field in the Pdelay_Resp_Follow_Up_dm message.

[0191] The length of the timestamp field 1402 and the length of the non-timestamp field 1403 in the same PTP message 1400 can be the same. For example, the length of each timestamp field 1402 and the length of each non-timestamp field 1403 are both 10 bytes. Alternatively, the length of the timestamp field 1402 and the length of the non-timestamp field 1403 are different. Here, the lengths of the timestamp field 1402 and the non-timestamp field 1403 are not limited.

[0192] The arrangement of the timestamp field 1402 and / or the non-timestamp field 1403 in the PTP message 1400 in Figure 14 is an example. The timestamp field 1402 and / or the non-timestamp field 1403 may also be arranged in the PTP message 1400 in other arrangements. Here, the arrangement of the timestamp field 1402 and / or the non-timestamp field 1403 in the PTP message 1400 is not limited.

[0193] The message type field 1401 may be the message type field in the message header 401 of the PTP message 400. The delay measurement identifier is located in the message type field 1401 as the message type identifier. The value selection method and the definition of each value of the delay measurement identifier can refer to the delay measurement identifier when the delay measurement identifier is located in the message type field in 1.1.1. The difference is that in the PTP message 400, the delay measurement identifier can have a value of 2, one of which (for example, 4) indicates that the PTP message 400 is a delay measurement function message in the PTP mechanism, and the other value (for example, 5) indicates that the PTP message 400 is a delay measurement function message in the ETE mechanism.

[0194] Next, based on the communication system 100 introduced above, a method for processing the PTP message (such as the PTP message 400 or the PTP message 1400 ) introduced above will be introduced in detail.

[0195] FIG15 is a flow chart of a method for processing a PTP message provided by an embodiment of the present application. The method is implemented by a first communication device and a second communication device through information interaction. The second communication device is any communication device in the communication system 100. For example, the second communication device is any communication device in the P2P network in the communication system 100. For another example, the second communication device is any service-carrying device in the underlay network in the communication system 100. The first communication device is a communication device in the communication system 100 that is directly connected to the second communication device. For example, the communication device 101 in FIG1 is the second communication device, and the communication device 102 is the first communication device. For another example, the communication device 101 in FIG2 and FIG3 is the second communication device, and the service-carrying device 110 is the first communication device. The method includes the following steps.

[0196] 1501. A second communication device obtains a PTP message, where the PTP message includes an identifier, and the identifier indicates whether the PTP message is a delay measurement function message.

[0197] The PTP message is any of the PTP messages 400 or 1400 described above. The message format of the PTP message is not limited herein. The identifier in the PTP message refers to the latency measurement identifier described above. The PTP message may be a PTP message sent by a fourth communication device in the communication system to a second communication device, or may be a PTP message generated by the second communication device.

[0198] Taking the PTP message sent by the fourth communication device as an example, the PTP message acquisition process is introduced as follows.

[0199] Among them, the fourth communication device is a communication device directly connected to the second communication device in the communication system 100. For example, the communication device 101 in Figure 1 is the fourth communication device, and the communication device 102 is the second communication device. For another example, the communication device 101 in Figures 2 and 3 is the fourth communication device, and the service carrying device 110 is the second communication device.

[0200] The fourth communication device obtains the PTP message, wherein the process for the fourth communication device to obtain the PTP message is similar to the process for the second communication device to obtain the PTP message. The fourth communication device sends the obtained PTP message to the second communication device, and the second communication device receives the PTP message from the fourth communication device, thereby obtaining the PTP message. After receiving the PTP message from the fourth communication device, the second communication device processes the PTP message based on the identifier in the PTP message. This processing process can be referred to the process for the first communication device to process the PTP message based on the identifier in the PTP message in step 1504 below, and will not be repeated here.

[0201] Taking the PTP message generated by the second communication device as an example, the PTP message acquisition process is introduced as follows.

[0202] In a time synchronization scenario, the second communication device can be any communication device in the communication system 100, and the PTP message generated by the second communication device is not a latency measurement function message. For example, the second communication device generates a PTP message based on a local clock and in accordance with the first message format described above. The identifier in the PTP message indicates that the PTP message is not a latency measurement function message, and the identifier is located in the message header of the PTP message. Alternatively, the second communication device generates a PTP message in accordance with the first message format described above, the PTP message does not include a latency measurement TLV, and the message header of the PTP message does not include the identifier. In this case, the PTP message is not a latency measurement function message, but a synchronization function message.

[0203] In a delay measurement scenario, assuming that the second communication device is not a service bearer device, for example, the second communication device is a communication device in a P2P network in the communication system 100, and further assuming that the second communication device uses a measurement mode under a delay measurement mechanism to measure the link transmission delay between the second communication device and an adjacent communication device in the P2P network, the second communication device generates a PTP message according to a first message format or a second message format, wherein the identifier in the PTP message indicates that the PTP message is a delay measurement function message. In this case, the message type of the PTP message depends on the measurement mode of the delay measurement mechanism. For example, assuming that the measurement mode is the single-step mode or the two-step mode under the PTP mechanism, the second communication device is a delay measurement requester, and the PTP message is a Pdelay_Req_dm message, i.e., a second delay measurement request message. For another example, assuming that the measurement mode is the single-step mode or the two-step mode under the ETE mechanism, the second communication device is a delay measurement requester, and the PTP message is a Sync_dm message, i.e., a delay measurement synchronization message.

[0204] In the delay measurement scenario, the second communication device performs delay measurement based on the generated PTP message. The process of the second communication device performing delay measurement is introduced in the following Figures 17 to 20 and will not be repeated here.

[0205] 1502. The second communication device sends a PTP message.

[0206] For example, the second communication device sends the PTP message to the first communication device.

[0207] 1503. The first communication device obtains the PTP message from the second communication device.

[0208] After obtaining the PTP message, the first communication device parses the PTP message, obtains the identifier from the PTP message, and then processes the PTP message based on the identifier, as shown in step 1504 below.

[0209] 1504. The first communication device processes the PTP message based on the identifier in the PTP message.

[0210] Among them, the PTP message may be a delay measurement function message or may not be a delay measurement function message. The first communication device determines whether the PTP message is a delay measurement function message based on the indication of the identifier. For example, if the identifier indicates that the PTP message is a delay measurement function message, it is determined that the PTP message is a delay measurement function message. If the identifier indicates that the PTP message is not a delay measurement function message, it is determined that the PTP message is not a delay measurement function message, but a synchronization function message.

[0211] The first communication device may or may not be a service bearer device. The manner in which the first communication device processes a PTP message depends on two factors: whether the PTP message is a delay measurement function message and whether the first communication device is a service bearer device. Next, using Figure 16 as an example, the manner in which PTP messages are processed is described.

[0212] As shown in Figure 16, for a PTP message sent by a second communication device, if the first communication device is a service bearer device and the PTP message is a delay measurement function message, then the PTP message is a service message in a delay measurement scenario. The first communication device sends the PTP message, for example, the first communication device sends the PTP message to a third communication device, and the third communication device processes the PTP message based on the identifier in the PTP message. The third communication device is a communication device directly connected to the first communication device in the communication system 100. The third communication device may or may not be a service bearer device. For example, using Figures 2 and 3 as examples, service bearer device 110 is the first communication device and service bearer device 120 is the third communication device, or service bearer device 120 is the first communication device and communication device 102 is the third communication device. The process by which the third communication device processes the PTP message based on the identifier in the PTP message is similar to the process by which the first communication device processes the PTP message based on the identifier in the PTP message, and will not be described in detail here.

[0213] As shown in Figure 16, when the first communication device is a service bearer device, if the PTP message is not a delay measurement function message, the first communication device terminates the PTP message. Taking Figures 2 and 3 as an example, assuming that the communication device 101 is the second communication device and the service bearer device 110 is the first communication device, if the PTP message sent by the communication device 101 is not a delay measurement function message, the service bearer device 110 terminates the delay measurement function message.

[0214] As shown in FIG16 , when the first communication device is not a service bearer device, if the PTP message is not a delay measurement function message, the first communication device terminates the PTP message. Still using FIG2 and FIG3 as examples, assuming that service bearer device 120 is the second communication device and communication device 102 is the first communication device, service bearer device 120 sends a PTP message to communication device 102. If the PTP message is not a delay measurement function message but a synchronization function message, communication device 102 terminates the PTP message. Again using FIG1 as an example, assuming that communication device 101 is the second communication device and communication device 102 is the first communication device, communication device 101 sends a PTP message to communication device 102. If the PTP message is not a delay measurement function message but a synchronization function message, communication device 102 terminates the PTP message.

[0215] If the first communication device is not a service bearer device, and the PTP message is a Delay Measurement Function message, the first communication device performs delay measurement based on the PTP message, measuring the link transmission delay between the first communication device and the PTP message generating device. A PTP message generating device is a device that generates PTP messages. Still using Figures 1-3 as an example, assuming the PTP message is a Delay Measurement Function message generated by communication device 101 and the first communication device is communication device 102, communication device 101 is the PTP message generating device, and communication device 102 performs delay measurement based on the PTP message.

[0216] If the first communication device is not a service bearer device, and the PTP message is a delay measurement function message, the first communication message determines the delay measurement mechanism and delay measurement mode to which the PTP message belongs based on the message type of the PTP message, and performs delay measurement according to the delay measurement mode to which the PTP message belongs. Still using Figure 16 as an example, if the message type of the PTP message is Pdelay_Req_dm, then the PTP message is a Pdelay_Req_dm message, and the delay measurement mechanism to which the PTP message belongs is the PTP mechanism. If the message type of the PTP message is Sync_dm, then the PTP message is a Sync_dm message, and the delay measurement mechanism to which the PTP message belongs is the ETE mechanism. For the delay measurement mechanism to which the PTP message belongs, if the first communication device turns on the single-step mode under the delay measurement mechanism, the PTP message is configured for single-step processing, and the first communication device processes the PTP message according to the single-step mode under the delay measurement mechanism. If the first communication device turns on the two-step mode under the delay measurement mechanism, the PTP message is configured for two-step processing, and the first communication device processes the PTP message according to the two-step mode under the delay measurement mechanism. The same delay measurement mode under different measurement mechanisms processes the PTP message differently. The subsequent processing of the PTP message will be introduced in conjunction with Figures 17-20, which are each delay measurement mode under the PTP mechanism and each delay measurement mode under the ETE mechanism, and will not be repeated here.

[0217] The above description of the processing of a PTP message from a second communication device uses the example of determining whether the PTP message is a latency measurement function message based on the indication of the identifier in the PTP message. In another possible implementation, the first communication device determines whether the PTP message is a latency measurement function message based on whether the identifier is present in the PTP message. In this case, the identifier indicates that the PTP message is a latency measurement function message. Exemplarily, the first communication device queries the PTP message for the identifier. If the identifier is present, the PTP message is determined to be a latency measurement function message. If the identifier is not present, the PTP message is determined not to be a latency measurement function message. Among them, the process of querying the identifier is, for example, that the first communication device first queries whether the identifier exists in the message header. If the identifier exists in the message header, the identifier is obtained from the message header. If the identifier does not exist in the message header, the first communication device compares the message length in the message length field in the message header with the actual length of the PTP message. If the message length in the message length field is less than the actual length of the PTP message, it means that there is a TLV as a suffix at the end of the PTP message. If the TLV is a delay measurement TLV, the value in the tlvType field of the delay measurement TLV is the identifier. If the TLV is not a delay measurement TLV, it means that the identifier does not exist in the PTP message. For this implementation method, after determining whether the PTP message is a delay measurement function message, the first communication device then processes the PTP message accordingly based on whether the PTP message is a delay measurement function message. For example, if the PTP message is a delay measurement function message, the first communication device processes the PTP message according to the processing method for the delay measurement function message in Figure 16; if the PTP message is not a delay measurement function message, the first communication device processes the PTP message according to the processing method for the non-delay measurement function message in Figure 16.

[0218] The above description uses the example of a first communication device performing the step of determining whether a PTP message is a delay measurement function message. In another possible implementation, the first communication device does not need to perform the step of determining whether the PTP message is a delay measurement function message, and instead processes the PTP message based on the indication of the identifier in the PTP message, or the presence of the identifier in the PTP message. For example, if the identifier in the PTP message indicates whether the PTP message is a delay measurement function message, the first communication device processes the PTP message as a delay measurement function message; if the identifier indicates that the PTP message is not a delay measurement function message, the first communication device processes the PTP message as a synchronization function message. Furthermore, for example, if the identifier in the PTP message indicates that the PTP message is a delay measurement function message, the first communication device processes the PTP message as a delay measurement function message if the PTP message includes the identifier; if the PTP message does not include the identifier, the first communication device processes the PTP message as a synchronization function message.

[0219] The method shown in Figure 15 indicates whether the PTP message is a delay measurement function message through an identifier in the PTP message, so that the communication device that receives the PTP message can process the PTP message based on the indication of the identifier. Since the communication device can process the delay measurement function message, the communication device can support the delay measurement function.

[0220] Regarding step 1504 above, if the PTP message obtained by the first communication device is a delay measurement function message, assuming that the second communication device is the device generating the PTP message, the first communication device is a neighboring communication device of the second communication device in the PTP network, and the second communication device is the delay measurement requester, the first communication device, acting as the delay measurement responder, performs delay measurement with the second communication device based on the PTP message. The PTP message may be a delay measurement function message or a delay measurement function message related to the PTP mechanism. Under different delay measurement mechanisms, the process of performing delay measurement between the first communication device and the second communication device based on the PTP message varies. Next, the following delay measurement processes 1 to 2 will describe the processes of delay measurement using the single-step mode and the two-step mode under the PTP mechanism, respectively. The following delay measurement processes 3 to 4 will describe the processes of delay measurement using the single-step mode and the two-step mode under the ETE mechanism, respectively.

[0221] Measurement process 1: Using the single-step mode under the PTP mechanism, delay measurement is performed based on the PTP message. At this time, the PTP message received by the first communication device is the second delay measurement request message, that is, the Pdelay_Req_dm message.

[0222] FIG17 is a flowchart of PTP message interaction between adjacent communication devices in a single-step mode of a PTP mechanism provided in an embodiment of the present application. The process includes the following steps.

[0223] 1701. A second communication device sends a second delay measurement request message.

[0224] The second delay measurement request message may be any of the Pdelay_Req_dm messages described above, for example, PTP message 400 with a delay measurement identifier in message header 401, indicating that the PTP message is a Pdelay_Req_dm message, or the delay measurement identifier and message type identifier in the message header jointly indicating that the PTP message is a Pdelay_Req_dm message. Another example is PTP message 1400 with a delay measurement identifier of 4 in the message type field.

[0225] The second communication device uses 0 as the source timestamp in the Pdelay_Req_dm message, generates a second delay measurement request message according to the first message format or the second message format, and sends the second delay measurement request message (for example, sending a second delay measurement request message to the first communication device). The second delay measurement request message includes a source timestamp and an identifier indicating that the PTP message is a delay measurement function message.

[0226] Under the PTP mechanism, the delay measurement requester is responsible for determining the link transmission delay between the delay measurement requester and the delay measurement responder. The second communication device acts as the delay measurement requester and also stores the sending timestamp of the second delay measurement request on its own end. The sending timestamp indicates the time when the second communication device sends the second delay measurement request, that is, the sending time of the second delay measurement request (for example, t1).

[0227] 1702. The first communications device obtains a second delay measurement request message, and sends a second delay measurement response message in response to the second delay measurement request message.

[0228] The second delay measurement response message may be any of the Pdelay_Resp_dm messages described above, for example, PTP message 400 with a delay measurement identifier in message header 401, indicating that the PTP message is a Pdelay_Resp_dm message, or PTP message 1400 with a delay measurement identifier of 4 in the message type field, indicating that the PTP message is a Pdelay_Resp_dm message. Alternatively, the delay measurement identifier and message type identifier in the message header may both indicate that the PTP message is a Pdelay_Resp_dm message. Another example is PTP message 1400 with a delay measurement identifier of 4 in the message type field.

[0229] After obtaining the second delay measurement request message, the first communications device uses the time at which the local end obtains the second delay measurement request message as the reception time of the second delay measurement request message, uses the time at which the local end sends the second delay measurement response message as the sending time of the second delay measurement response message, and determines the duration between the sending time of the second delay measurement response message and the receiving time of the second delay measurement request message as the processing duration of the second delay measurement request message on the local end. For example, if the reception time of the second delay measurement request message is t2 and the sending time of the second delay measurement response message is t3, the processing duration = t3 - t2.

[0230] The first communication device uses the processing duration as the request reception timestamp in the Pdelay_Resp_dm message, uses the identifier of the port used by the local end to send the second delay measurement response message as the request port identifier in the Pdelay_Resp_dm message, generates a second delay measurement response message according to the first message format or the second message format, and sends the second delay measurement response message (for example, sending the second delay measurement response message to the second communication device), where the second delay measurement response message includes the request reception timestamp, the request port identifier, and an identifier indicating that the PTP message is a delay measurement function message.

[0231] The second communication device obtains the second delay measurement response message, and obtains a request reception timestamp of the second delay measurement request message from the second delay measurement response message. The second communication device also uses the time when the second delay measurement response message is obtained by the local end as the reception time of the second delay measurement response message, and obtains a reception timestamp of the second delay measurement response message based on the reception time. The reception timestamp is used to indicate the reception time. In this way, during the delay measurement process, the timestamps obtained by the second communication device include: the sending timestamp of the second delay measurement request message, the request reception timestamp in the second delay measurement response request message, and the reception timestamp of the second delay measurement response message.

[0232] The second communication device determines a link transmission delay between the first communication device and the second communication device based on the timestamp of the second delay measurement request message and / or the timestamp of the second delay measurement response message. The link transmission delay may be a unidirectional link transmission delay or an average link transmission delay.

[0233] The single-step mode of the PTP mechanism is suitable for measuring the average link transmission delay. For example, the second communication device determines the average link transmission delay according to the following formula (1) based on the reception timestamp of the second delay measurement response request message, the request reception timestamp in the second delay measurement response request message, and the reception timestamp of the second delay measurement response message.

[0234] in, is the average link transmission delay, t1 is the sending time indicated by the sending timestamp of the second delay measurement request, t3-t2 is the processing time of the first delay measurement request indicated by the receiving timestamp of the request, and t4 is the receiving time indicated by the receiving timestamp of the second delay measurement response.

[0235] The two-step mode of the PTP mechanism is suitable for measuring the average link transmission delay and the one-way link transmission delay. It will be introduced in conjunction with Figure 18 later and will not be repeated here.

[0236] In the embodiment of the application shown in FIG17 , the steps performed by the second communication device, i.e., the process of the second communication device performing delay measurement based on the second delay measurement request message, and the steps performed by the first communication device, i.e., the process of the first communication device performing delay measurement based on the second delay measurement request message. Through the above process, the link transmission delay between the first and second communication devices can be measured.

[0237] Measurement process 2: Using the two-step mode under the PTP mechanism, delay measurement is performed based on the PTP message. At this time, the PTP message received by the first communication device is the second delay measurement request message, that is, the Pdelay_Req_dm message.

[0238] FIG18 is a flowchart of PTP message interaction between adjacent communication devices in a two-step mode of a PTP mechanism provided in an embodiment of the present application. The process includes the following steps.

[0239] 1801. A second communication device sends a second delay measurement request message.

[0240] Among them, this step 1801 is the same as step 1701 and will not be repeated here.

[0241] 1802. The first communications device obtains a second delay measurement request message, and sends a second delay measurement response message in response to the second delay measurement request message.

[0242] Among them, this step 1802 is similar to step 1702, the difference being that, in this step 1802, when generating the second delay measurement request message, the first communication device obtains the request reception timestamp in the second delay measurement response message based on the reception time of the second delay measurement request. At this time, the time indicated by the request reception timestamp is the reception time of the second delay measurement request, not the processing time of the second delay measurement request in the first communication device. The reception time of the second delay measurement request refers to the time when the first communication device obtains the first delay measurement request (for example, t2).

[0243] The difference is that after sending the second delay measurement response message, the first communication device further performs the following step 1803.

[0244] 1803. The first communications device sends a delay measurement response follow-up message of the second delay measurement response message.

[0245] The delay measurement response follow message may be any of the Pdelay_resp_follow_up_dm messages described above. For example, the PTP message 400 may have a delay measurement identifier in the message header 401, indicating that the PTP message is a Pdelay_resp_follow_up_dm message. Alternatively, the delay measurement identifier and the message type identifier in the message header may both indicate that the PTP message is a Pdelay_resp_follow_up_dm message. Another example may be a PTP message 1400 having a delay measurement identifier of 4 in the message type field.

[0246] The first communications device uses the time of sending the second delay measurement response message as the sending time of the second delay measurement response message, determines a response source timestamp in the Pdelay_resp_follow_up_dm message based on the sending time, uses the identifier of the port through which the local end sends the second delay measurement response message as the request port identifier in the Pdelay_resp_follow_up_dm message, generates a delay measurement response follow message according to the first message format or the second message format, and sends the delay measurement response follow message (for example, sending the delay measurement response follow message to the second communications device), wherein the delay measurement response follow message includes the precise source timestamp, the request port identifier, and an identifier indicating that the PTP message is a delay measurement function message, and the response source timestamp indicates the sending time of the second delay measurement response message (for example, t3).

[0247] The second communication device first obtains a second delay measurement response message, and then obtains a delay measurement response follow-up message. After obtaining the second delay measurement response message, the second communication device uses the acquisition request reception timestamp in the second delay measurement response message as the reception timestamp of the second delay measurement request message, and stores the reception timestamp of the second delay measurement request on this end. After obtaining the delay measurement response follow-up message, the second communication device uses the response source timestamp in the delay measurement response follow-up message as the reception timestamp of the second delay measurement response message, and stores the reception timestamp of the second delay measurement response message on this end. During the delay measurement process, the timestamps obtained by the second communication device include: the sending timestamp and receiving timestamp of the second delay measurement request, and the sending timestamp and receiving timestamp of the second delay measurement response message. The second communication device can determine the link transmission delay between the first communication device and the second communication device based on the timestamp of the second delay measurement request and / or the timestamp of the second delay measurement response message.

[0248] Taking the link transmission delay as the average link transmission delay as an example, the second communication device determines the average link transmission delay according to the above formula (1) based on the sending timestamp and receiving timestamp of the second delay measurement request and the sending timestamp and receiving timestamp of the second delay measurement response message. At this time, t2 and t3 in the above formula (1) are respectively the receiving time indicated by the receiving timestamp of the second delay measurement request and the sending time indicated by the sending timestamp of the second delay measurement response message.

[0249] Taking the link transmission delay as a unidirectional link transmission delay as an example, the second communication device determines the unidirectional link transmission delay according to the following formula (2) based on the sending timestamp and receiving timestamp of the second delay measurement request: Alternatively, the second communication device determines the unidirectional link transmission delay according to the following formula (3) based on the sending timestamp and receiving timestamp of the second delay measurement response message:

[0250] In the application embodiment shown in Figure 18, the steps performed by the second communication device, that is, the process of the second communication device performing delay measurement based on the second delay measurement request message, and the steps performed by the first communication device, that is, the process of the first communication device performing delay measurement based on the second delay measurement request message, can measure the link transmission delay between the first communication device and the second communication device through the above process.

[0251] Measurement process 3: Using the single-step mode under the ETE mechanism, delay measurement is performed based on the PTP message. At this time, the PTP message received by the first communication device is a delay measurement synchronization message, that is, a Sync_dm message.

[0252] Figure 19 is a flowchart of PTP message interaction between adjacent communication devices in a single-step mode of an ETE mechanism provided by an embodiment of the present application, and the flow includes the following processes.

[0253] 1901. The second communication device sends a delay measurement synchronization message.

[0254] The latency measurement synchronization message may be any of the Sync_dm messages described above. For example, a PTP message 400 may have a latency measurement identifier in the message header 401, indicating that the PTP message is a Sync_dm message. Alternatively, the latency measurement identifier and the message type identifier in the message header may both indicate that the PTP message is a Sync_dm message. Another example is message 1400 in which the latency measurement identifier in the message type field is 5.

[0255] The second communication device uses the time when the local end sends the delay measurement synchronization message as the sending time of the delay measurement synchronization message, determines the source timestamp in the Sync_dm message based on the sending time, generates the delay measurement synchronization message based on the source timestamp in accordance with the first message format or the second message format, and sends the delay measurement synchronization message (for example, sending the delay measurement synchronization message to the first communication device), wherein the delay measurement synchronization message includes the source timestamp and an identifier indicating that the PTP message is a delay measurement function message, and the source timestamp indicates the sending time of the delay measurement synchronization message (for example, t1).

[0256] Under the ETE mechanism, the delay measurement end responds to determine the link transmission delay between the delay measurement request end and the delay measurement responder. The second communication device, acting as the delay measurement request end, does not need to locally store the timestamps of the delay measurement process. The timestamps of the delay measurement process are stored by the first communication device.

[0257] 1902. The first communications device obtains a delay measurement synchronization message, and sends a first delay measurement request message in response to the delay measurement synchronization message.

[0258] The first delay measurement request message may be any of the Delay_Req_dm messages described above. For example, a PTP message 400 with a delay measurement identifier in the message header 401 may indicate that the PTP message is a Delay_Req_dm message. Alternatively, the delay measurement identifier and the message type identifier in the message header may both indicate that the PTP message is a Delay_Req_dm message. Another example may be a PTP message 1400 with a delay measurement identifier of 5 in the message type field.

[0259] After receiving the latency measurement synchronization message, the first communications device uses the source timestamp in the latency measurement synchronization message as the sending timestamp of the latency measurement synchronization message and stores the sending timestamp on the local end. The sending timestamp indicates the sending time of the latency measurement synchronization message. The receiving time of the latency measurement synchronization message is determined based on the receiving time, using the time when the latency measurement synchronization message was received as the receiving time of the latency measurement synchronization message. The receiving timestamp indicates the receiving time (e.g., t2).

[0260] The first communication device responds to the delay measurement synchronization message, uses 0 as the source timestamp in the Delay_Req_dm message, generates a first delay measurement request message based on the source timestamp in accordance with the first message format or the second message format, and sends the first delay measurement request message (for example, sending the first delay measurement request message to the second communication device). The first delay measurement request message includes the source timestamp and an identifier indicating that the PTP message is a delay measurement function message.

[0261] The first communication device also uses the time when the local end sends the first delay measurement request message as the sending time of the first delay measurement request message, generates a sending timestamp of the first delay measurement request message based on the sending time, and stores the sending timestamp on the local end, where the sending timestamp indicates the sending time (for example, t2).

[0262] 1903. The second communication device obtains the first delay measurement request message, and sends a first delay measurement response message in response to the first delay measurement request message.

[0263] The first delay measurement response message may be any of the Delay_Resp_dm messages described above, for example, PTP message 400 with a delay measurement identifier in message header 401, indicating that the PTP message is a Delay_Resp_dm message, or the delay measurement identifier and message type identifier in the message header jointly indicating that the PTP message is a Delay_Resp_dm message. Another example is PTP message 1400 with a delay measurement identifier of 5 in the message type field.

[0264] In response to the obtained first delay measurement request message, the second communications device uses the time when the local end obtains the first delay measurement request message as the reception time of the first delay measurement request message, determines a response source timestamp in the Delay_Resp_dm message based on the reception time, uses the identifier of the port through which the local end obtains the first delay measurement request message as the request port identifier in the Delay_Resp_dm message, generates a first delay measurement response message according to the first message format or the second message format, and sends the first delay measurement response message (for example, sending the first delay measurement response message to the first communications device). The first delay measurement response message includes the response source timestamp, the request port identifier, and an identifier indicating that the PTP message is a delay measurement function message. The response source timestamp indicates the reception time of the first delay measurement request message (for example, t4).

[0265] After the first communication device obtains the first delay measurement response message, the first communication device uses the response source timestamp in the first delay measurement response message as the reception timestamp of the first delay measurement request message, and stores the reception timestamp on the local end. In this way, during the delay measurement process, the timestamps obtained by the first communication device include: the sending timestamp and receiving timestamp of the delay measurement synchronization request, and the sending timestamp and receiving timestamp of the first delay measurement request message.

[0266] The first communication device determines the link transmission delay between the first communication device and the second communication device based on the timestamp of the delay measurement synchronization request and / or the timestamp of the first delay measurement request message. For example, the time indicated by the sending timestamp of the delay measurement synchronization request is t1 in formulas (1) to (3), the time indicated by the receiving timestamp of the delay measurement synchronization request is t2 in formulas (1) to (3), the time indicated by the sending timestamp of the first delay measurement request message is t3 in formulas (1) to (3), and the time indicated by the receiving timestamp of the first delay measurement request message is t4 in formulas (1) to (3). According to the above formula (1), the average link transmission delay between the first communication device and the second communication device is determined, or, according to the above formula (2) or (3), the unidirectional link transmission delay between the first communication device and the second communication device is determined.

[0267] In the embodiment of the application shown in FIG. 19 , the steps performed by the second communication device, i.e., the process of the second communication device performing delay measurement based on the delay measurement synchronization request, and the steps performed by the first communication device, i.e., the process of the first communication device performing delay measurement based on the delay measurement synchronization request. Through this process, the link transmission delay between the first and second communication devices can be measured.

[0268] Measurement process 4: Using the two-step mode under the ETE mechanism, delay measurement is performed based on the PTP message. At this time, the PTP message received by the first communication device is a delay measurement synchronization message, that is, a Sync_dm message.

[0269] FIG20 is a flowchart of a PTP message interaction between adjacent communication devices in a two-step mode of an ETE mechanism provided by an embodiment of the present application. The flow includes the following processes.

[0270] 2001. The second communication device sends a delay measurement synchronization message.

[0271] Among them, this step 2001 is the same as step 1901, the difference is that in this step 2001, the source timestamp in the delay measurement synchronization message is 0, and the sending time of the delay measurement synchronization message is notified to the first communication device through the delay measurement response following message (such as the following step 2002), and this step 2001 will not be repeated here.

[0272] 2002. The second communication device sends a delay measurement follow message of the delay measurement synchronization message.

[0273] The latency measurement follow message can be any of the Follow_Up_dm messages described above. For example, a PTP message 400 with a latency measurement identifier in the message header 401 indicates that the PTP message is a Follow_Up_dm message. Alternatively, the latency measurement identifier and the message type identifier in the message header jointly indicate that the PTP message is a Follow_Up_dm message. Another example is a PTP message 1400 with a latency measurement identifier of 5 in the message type field.

[0274] The second communication device uses the time when the delay measurement synchronization message is sent by the local end as the sending time of the delay measurement synchronization message, determines the precise source timestamp in Follow_Up_dm based on the sending time, generates a delay measurement follow message based on the precise timestamp in accordance with the first message format or the second message format, and sends the delay measurement follow message (for example, sending the delay measurement follow message to the first communication device). The delay measurement follow message includes the precise source timestamp and an identifier indicating that the PTP message is a delay measurement function message. The precise source timestamp indicates the sending time of the delay measurement synchronization message (for example, t1).

[0275] 2003. The first communication device obtains a delay measurement synchronization message and a delay measurement follow message, and sends a first delay measurement request message in response to the delay measurement synchronization message.

[0276] Among them, this step 2003 is the same as step 1902, the difference is that after obtaining the delay measurement synchronization message, the first communication device also obtains the delay measurement follow-up message, uses the precise source timestamp in the delay measurement follow-up message as the receiving timestamp of the delay measurement synchronization message, and stores the receiving timestamp on this end.

[0277] 2004. The second communication device obtains the first delay measurement request message, and sends a first delay measurement response message in response to the first delay measurement request message.

[0278] Among them, this step 2004 is the same as step 1903, and is similar to the delay measurement process shown in Figure 19. In the delay measurement process of Figure 20, the timestamps obtained by the first communication device include: the sending timestamp and receiving timestamp of the delay measurement synchronization request, and the sending timestamp and receiving timestamp of the first delay measurement request message, so that the first communication device executes the above-mentioned step 1903 based on the timestamp of the delay measurement synchronization request and / or the timestamp of the first delay measurement request message to determine the link transmission delay between the first communication device and the second communication device, which will not be repeated here.

[0279] In the embodiment of the application shown in FIG. 20 , the steps performed by the second communication device, i.e., the process of the second communication device performing delay measurement based on the delay measurement synchronization request, and the steps performed by the first communication device, i.e., the process of the first communication device performing delay measurement based on the delay measurement synchronization request. Through this process, the link transmission delay between the first and second communication devices can be measured.

[0280] Figures 17 to 20 above are all described using the example of a first communication device and a second communication device being directly connected adjacent communication devices in a P2P network. When the first communication device and the second communication device are connected via a service bearer device, for each delay measurement function message sent by the first communication device in Figures 17 to 20 above, the first communication device does not send these delay measurement function messages to the second communication device. Instead, it sends these delay measurement function messages to the service bearer device to which it is connected. The service bearer device between the first and second communication devices then transmits these delay measurement function messages from the first communication device to the second communication device, allowing the second communication device to respond to these delay measurement function messages. For each delay measurement function message sent by the second communication device in Figures 17 to 20 above, the second communication device does not send these delay measurement function messages to the first communication device. Instead, it sends these delay measurement function messages to the service bearer device to which it is connected. The service bearer device between the first and second communication devices then transmits these delay measurement function messages from the second communication device to the first communication device, allowing the second communication device to respond to these delay measurement function messages.

[0281] As can be seen from the above description, for a latency measurement function message sent by any communication device in the P2P network of communication system 100, in a direct connection scenario, the latency measurement function message is sent directly to a neighboring communication device of the communication device in the P2P network. In an indirect connection scenario, the latency measurement function message is forwarded to the neighboring communication device via a service bearer device. After the neighboring communication device receives the latency measurement function message, it performs latency measurement based on the latency measurement function message.

[0282] The above-mentioned method embodiments are all described by taking different communication devices directly sending PTP messages as an example. In the scenario of sending PTP messages, the communication device can also encapsulate the PTP message into a MAC message and send the PTP message by sending a MAC message. For example, taking any communication device in the communication system 100 as an example, for any PTP message to be sent, the communication device generates a MAC message based on the PTP message, and the MAC message includes the PTP message. At this time, the PTP message is the payload of the MAC message, and the PTP message includes a delay measurement identifier. The communication device sends the MAC message, and the communication device that receives the MAC message obtains the PTP message from the MAC message and processes the PTP message based on the identifier of the PTP message (such as termination processing or delay measurement).

[0283] The above is explained using an example in which an identifier in a PTP message indicates whether the PTP message is a delay measurement function message. In another possible implementation, the identifier indicates whether the PTP message is a synchronization function message. The communication device that receives the PTP message may also process the PTP message based on the identifier, and the processing method is similar to that of the above method embodiment. For example, when the communication device is located in a P2P network in the communication system 100, if the identifier indicates that the PTP message is a synchronization function message, the communication device terminates the PTP message; if the identifier indicates that the PTP message is not a synchronization function message, the communication device performs corresponding processing based on the PTP message (for example, performing delay measurement); when the communication device is a service bearer device in the communication system 100, if the identifier indicates that the PTP message is a synchronization function message, the communication device terminates the PTP message; if the identifier indicates that the PTP message is not a synchronization function message, the communication device sends the PTP message to another communication device to which it is connected.

[0284] The above describes the method of the embodiment of the present application, and the following describes the device of the embodiment of the present application. It should be understood that the device described below has any function of the communication device in the above method. The above describes in detail the processing method and sending method of the PTP message according to the embodiment of the present application in conjunction with Figures 15 to 20. Based on the same inventive concept, the device used for the above method will be described below in conjunction with Figures 21 to 24. It should be understood that the technical features described in the method embodiment are also applicable to the following device embodiment.

[0285] FIG21 is a schematic structural diagram of a PTP message processing device provided in an embodiment of the present application. As shown in FIG21 , the device 2100 includes:

[0286] An acquisition module 2101 is configured to acquire a PTP message from a second communication device, where the PTP message includes an identifier indicating whether the PTP message is a delay measurement function message;

[0287] The processing module 2102 is configured to process the PTP message based on the identifier.

[0288] In a possible implementation, the processing module 2102 is configured to: if the flag indicates that the PTP message is not a delay measurement function message, terminate the PTP message; if the flag indicates that the PTP message is a delay measurement function message, send the PTP message.

[0289] In one possible implementation, the processing module 2102 includes:

[0290] A termination unit, configured to terminate the PTP message if the identifier indicates that the PTP message is not a delay measurement function message;

[0291] The measuring unit is configured to perform delay measurement based on the PTP message if the identifier indicates that the PTP message is a delay measurement function message.

[0292] In one possible implementation, the PTP message is a synchronization message involved in a delay request response mechanism and includes an identifier, and the measurement unit is configured to:

[0293] In response to the PTP message, a first delay measurement request message is sent, where the first delay measurement request message refers to a delay request message involved in a delay request response mechanism and includes an identifier; a first delay measurement response message is obtained for the first delay measurement request message, where the first delay measurement response message refers to a delay response message involved in a delay request response mechanism and includes an identifier, and the first delay measurement response message includes a timestamp of the first delay measurement request message; and a link transmission delay between the first communication device and the second communication device is determined based on the timestamp of the PTP message and / or the timestamp of the first delay measurement request message.

[0294] In a possible implementation, the measurement unit is further configured to obtain a PTP delay measurement follow-up message, where the delay measurement follow-up message is a follow-up message involved in a delay request response mechanism and includes an identifier, and the delay measurement follow-up message includes a timestamp of the PTP message.

[0295] In one possible implementation, the PTP message is a delay request message involved in a peer-to-peer delay mechanism and includes an identifier, and the measurement unit is configured to send a second delay measurement response message in response to the PTP message, where the second delay measurement response message is a delay response message involved in the peer-to-peer delay mechanism and includes an identifier.

[0296] In one possible implementation, the measurement unit is further used to: send a delay measurement response follow-up message of the second delay measurement response message, where the delay measurement response follow-up message refers to a delay response follow-up message involved in the peer delay mechanism and including an identifier, and the delay measurement response follow-up message includes a timestamp of the second delay measurement response message.

[0297] In a possible implementation, the PTP message includes a domain number field, a message type field, and an identification field field, and the identification field is located in any one of the domain number field, the message type field, or the identification field field.

[0298] In one possible implementation, the PTP message includes a message type field and multiple timestamp fields, the identifier is located in the message type field, the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

[0299] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, the identification includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are respectively located in different fields in the domain number field, the message type field, and the identification domain field; if any sub-identifier of the first sub-identifier and the second sub-identifier is located in the domain number field, any sub-identifier indicates whether the PTP message is a delay measurement function message; if any sub-identifier is located in the message type field, any sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; if any sub-identifier is located in the identification domain field, any sub-identifier indicates whether the PTP message is a delay measurement function message.

[0300] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, and the identification includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; the first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; the second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and whether the PTP message is a delay measurement function message; the third sub-identifier is located in the identification domain field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

[0301] In a possible implementation, the PTP message includes a delay measurement type length value TLV, which identifies a type field in the delay measurement TLV.

[0302] In a possible implementation, the delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

[0303] In a possible implementation, the identifier is a reserved value of the field.

[0304] The above-mentioned device 2100 corresponds to the first communication device in the above-mentioned method embodiment. The device 2100 can be configured as the first communication device or a part of the first communication device, that is, the device 2100 is applied to the first communication device. The modules in the device 2100 and the above-mentioned other operations and / or functions are respectively for implementing the various steps and methods implemented by the first communication device in the method embodiment. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.

[0305] FIG22 is a schematic structural diagram of a device for sending a PTP message according to an embodiment of the present application. As shown in FIG22 , the device 2200 includes:

[0306] An acquisition module 2201 is configured to acquire a PTP message, where the PTP message includes an identifier indicating whether the PTP message is a delay measurement function message.

[0307] The sending module 2202 is used to send PTP messages.

[0308] In one possible implementation, the identifier indicates that the PTP message is a delay measurement function message, and the PTP message is a synchronization message involved in a delay request response mechanism and includes the identifier;

[0309] The acquisition module 2201 is further configured to acquire a first delay measurement request message of the PTP message, where the first delay measurement request message refers to a delay request message involved in a delay request response mechanism and including an identifier;

[0310] The sending module 2202 is further configured to send a second delay measurement response message in response to the first delay measurement request message, where the second delay measurement response message refers to a delay response message involved in the delay request response mechanism and including an identifier.

[0311] In a possible implementation, the sending module 2202 is further configured to send a delay measurement follow-up message of the delay measurement synchronization message, where the delay measurement follow-up message is a follow-up message involved in a delay request response mechanism and includes an identifier.

[0312] In one possible implementation, the identifier indicates that the PTP message is a delay measurement function message, the PTP message is a delay request message involved in a peer delay mechanism and includes the identifier, and the apparatus 2200 further includes a determining module:

[0313] The acquisition module 2201 is further configured to acquire a second delay measurement response message of the PTP message, where the second delay measurement response message refers to a delay response message involved in the peer delay mechanism and including an identifier;

[0314] The determining module is configured to determine a link transmission delay between the first communication device and the second communication device based on a timestamp of the PTP message and / or a timestamp of the second delay measurement response message.

[0315] In one possible implementation, the acquisition module 2201 is further used to obtain a delay measurement response follow-up message of the second delay measurement response message, where the delay measurement response follow-up message refers to a delay response follow-up message involved in the peer delay mechanism and including an identifier, and the delay measurement response follow-up message includes a timestamp of the second delay measurement response message.

[0316] In a possible implementation, the PTP message includes a domain number field, a message type field, and an identification field field, and the identification field is located in any one of the domain number field, the message type field, or the identification field field.

[0317] In one possible implementation, the PTP message includes a message type field and multiple timestamp fields, the identifier is located in the message type field, the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

[0318] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, the identification includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are respectively located in different fields in the domain number field, the message type field, and the identification domain field; if any sub-identifier of the first sub-identifier and the second sub-identifier is located in the domain number field, any sub-identifier indicates whether the PTP message is a delay measurement function message; if any sub-identifier is located in the message type field, any sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; if any sub-identifier is located in the identification domain field, any sub-identifier indicates whether the PTP message is a delay measurement function message.

[0319] In one possible implementation, the PTP message includes a domain number field, a message type field, and an identification domain field, and the identification includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; the first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; the second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and whether the PTP message is a delay measurement function message; the third sub-identifier is located in the identification domain field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

[0320] In a possible implementation, the PTP message includes a delay measurement type length value TLV, which identifies a type field in the delay measurement TLV.

[0321] In a possible implementation, the delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

[0322] In a possible implementation, the identifier is a reserved value of the field.

[0323] The above-mentioned device 2200 corresponds to the second communication device in the above-mentioned method embodiment. The device 2200 can be configured as a second communication device or a part of the second communication device, that is, the device 2200 is applied to the first communication device. The various modules in the device 2200 and the above-mentioned other operations and / or functions are respectively for implementing the various steps and methods implemented by the second communication device in the method embodiment. For specific details, please refer to the above-mentioned method embodiment. For the sake of brevity, they will not be repeated here.

[0324] When any of the above-mentioned devices 2100 and 2200 processes PTP messages, the division of the above-mentioned functional modules is used as an example only. In actual applications, the above-mentioned functions can be assigned to different functional modules as needed. That is, the internal structure of any of the devices can be divided into different functional modules to complete all or part of the functions described above. In addition, any of the devices provided in the above-mentioned embodiments and the above-mentioned method embodiments are based on the same concept. The specific implementation process is detailed in the above-mentioned method embodiments and will not be repeated here.

[0325] The above-mentioned first communication device and second communication device are both communication equipment. Next, the structures of the communication equipment are introduced respectively in conjunction with Figures 22 and 23.

[0326] Figure 23 is a structural diagram of a communication device provided in an embodiment of the present application. As shown in Figure 23, the communication device 2300 includes a main control board 2301 and an interface board 2302.

[0327] The main control board 2301 is also called the main processing unit (MPU) or route processing card. The main control board 2301 controls and manages the various components in the communication device 2300, including route calculation, device management, device maintenance, and protocol processing functions. As shown in Figure 23, the main control board 2301 includes a processor 2311 and a memory 2312. The processor 2311 is used to call the program code in the main control board memory to execute the method for processing PTP messages or the method for sending PTP messages provided in the embodiment of the method of the present application. The processor 2311 is used to call the program code in the memory 2322, and can execute the method for processing PTP messages or the method for sending PTP messages provided in the embodiment of the method of the present application.

[0328] Interface board 2302 is also known as a line processing unit (LPU), line card, or service board. It provides various service interfaces and forwards PTP messages or data packets. Service interfaces include, but are not limited to, Ethernet interfaces and POS (Packet over SONET / SDH) interfaces. Ethernet interfaces, for example, are Flexible Ethernet Clients (FlexE Clients).

[0329] As shown in Figure 23, the interface board 2302 includes a processor 2321, a memory 2322 and an interface card 2323. The processor 2321 is used to control and manage the interface board 2302 and communicate with the processor 2311. Exemplarily, the processor 2321 is used to call the program code of the memory 2322 to execute the reception and transmission of PTP messages or data packets. The processor 2321 is used to call the program code in the main control board memory to execute the Flexible Ethernet Clients, FlexE Clients provided in the embodiment of the method of the present application. For example, if the electronic device 2300 is an electronic device and is configured as an edge network device in an autonomous domain, the processor 2321 is used to call the program code of the memory 2322, and can also execute the PTP message processing method or PTP message sending method provided in the embodiment of the method of the present application.

[0330] Interface card 2323 implements the physical layer interconnection function. Raw traffic enters interface board 2302 through this card, and processed data packets are sent out from interface card 2323. Interface card 2323 includes at least one physical interface, also known as a physical port, which can function as either an external or internal interface within a network device. Interface card 2323, also known as a daughter card, can be installed on interface board 2302.

[0331] The main control board 2301 and the interface board 2302 are coupled. For example, the main control board 2301 and the interface board 2302 are connected to the system backplane via a system bus to achieve intercommunication. In one possible implementation, an inter-process communication (IPC) channel is established between the main control board 2301 and the interface board 2302, and the main control board 2301 and the interface board 2302 communicate via the IPC channel.

[0332] There may be one or more main control boards 2301, which may include a primary main control board and a backup main control board. There may be one or more interface boards 2302. The stronger the data processing capability of the communication device 2300, the more interface boards 2302 are provided. There may also be one or more interface cards 2323 on the interface board 2302. In a distributed forwarding architecture, the communication device 2300 may also have at least one switching network board (SMB), which enables data exchange between multiple interface boards 2302, providing high-capacity data exchange and processing capabilities. Therefore, network devices with a distributed architecture have greater data access and processing capabilities than devices with a centralized architecture. Alternatively, the communication device 2300 may have only one SMB, i.e., without a SMB. The functions of the interface board and the main control board are integrated on this single board. In this case, the processors on the interface board and the main control board can be combined into a central processing unit on this single board to perform the combined functions of the two. This type of device has lower data exchange and processing capabilities (for example, low-end network devices such as switches or routers). The specific architecture to be adopted depends on the specific network deployment scenario and is not limited here.

[0333] FIG24 is a schematic diagram of the structure of another communication device provided in an embodiment of the present application. As shown in FIG24 , the communication device 2400 includes a transceiver 2401, a processor 2402, and a memory 2403. The transceiver 2401 is used to send and receive data messages, PTP messages, data information, or notification messages.

[0334] The processor 2402 is used to execute the relevant steps performed by the first communication device or the second communication device in the above method embodiment. The processor 2402 may include one or more processing cores. The processor 2402 may be implemented in at least one hardware form of digital signal processing (DSP), field programmable gate array (FPGA), and programmable logic array (PLA). The processor 2402 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state.

[0335] The memory 2403 may include one or more computer-readable storage media, which may be non-transitory. The memory 2403 also includes a high-speed random access memory and a non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 2403 is used to store at least one program code, which is used to be executed by the processor 2402 to implement the PTP message processing method or PTP message sending method provided in the method embodiment of the present application.

[0336] In an exemplary embodiment, a computer-readable storage medium is further provided, such as a memory including program code. The program code can be executed by a processor in a communication device to implement the PTP message processing method or PTP message sending method in the above embodiment. For example, the computer-readable storage medium is a non-transitory computer-readable storage medium, such as a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0337] An embodiment of the present application also provides a computer program product or computer program, which includes a program code. The computer instructions are stored in a computer-readable storage medium. The processor in the communication device reads the program code from the computer-readable storage medium, and the processor executes the program code, so that the communication device executes the above-mentioned PTP message processing method or PTP message sending method.

[0338] In addition, an embodiment of the present application also provides a device, which can specifically be a chip, component or module, and the device may include a connected processor and memory; wherein the memory is used to store computer-executable instructions, and when the device is running, the processor can execute the computer-executable instructions stored in the memory to enable the chip to execute the PTP message processing method or PTP message sending method in the above-mentioned method embodiments.

[0339] Among them, the devices, equipment, computer-readable storage media, computer program products or chips provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.

[0340] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0341] The units described as separate components may or may not be physically separate, and the components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0342] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0343] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0344] In the description of this application, unless otherwise specified, " / " means "or", for example, A / B can mean A or B. "And / or" in this article is merely a description of the association relationship of associated objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, "at least one" means one or more, and "a plurality" means two or more. Words such as "first" and "second" do not limit the quantity and execution order, and words such as "first" and "second" do not limit them to be necessarily different.

[0345] In this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described in this application as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner.

[0346] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, storage, display, etc.), and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use, and processing of relevant data must comply with the relevant laws, regulations, and standards of the relevant countries and regions. For example, the PTP messages involved in this application are all obtained with full authorization.

[0347] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present disclosure, and will not be described in detail here.

[0348] The above description is merely an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for processing PTP messages of a precise clock synchronization protocol, characterized in that The method is executed by a first communication device, and the method includes: Obtaining a PTP message from a second communication device, where the PTP message includes an identifier, and the identifier indicates whether the PTP message is a delay measurement function message; Processing the PTP message based on the identifier.

2. The method according to claim 1, wherein The processing the PTP message based on the identifier includes: If the identifier indicates that the PTP message is not a delay measurement function message, performing termination processing on the PTP message; If the identifier indicates that the PTP message is a delay measurement function message, sending the PTP message.

3. The method according to claim 1, wherein The processing the PTP message based on the identifier includes: If the identifier indicates that the PTP message is not a delay measurement function message, performing termination processing on the PTP message; If the identifier indicates that the PTP message is a delay measurement function message, performing delay measurement based on the PTP message.

4. The method according to claim 3, wherein The PTP message is a synchronization message involved in a delay request response mechanism and includes the identifier, and the performing delay measurement based on the PTP message includes: In response to the PTP message, sending a first delay measurement request message, where the first delay measurement request message is a delay request message involved in the delay request response mechanism and includes the identifier; Obtaining a first delay measurement response message of the first delay measurement request message, where the first delay measurement response message is a delay response message involved in the delay request response mechanism and includes the identifier, and the first delay measurement response message includes a timestamp of the first delay measurement request message; Determining a link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the first delay measurement request message.

5. The method according to claim 4, characterized in that Before the sending the first delay measurement request message in response to the PTP message, the method further includes: Obtaining a delay measurement follow-up message of the PTP, where the delay measurement follow-up message is a follow-up message involved in the delay request response mechanism and includes the identifier, and the delay measurement follow-up message includes the timestamp of the PTP message.

6. The method according to claim 3, wherein The PTP message is a delay request message involved in a peer delay mechanism and includes the identifier, and the performing delay measurement based on the PTP message includes: In response to the PTP message, sending a second delay measurement response message, where the second delay measurement response message is a delay response message involved in the peer delay mechanism and includes the identifier.

7. The method according to claim 6, wherein After the sending the second delay measurement response message, the method includes: Sending a delay measurement response follow-up message of the second delay measurement response message, where the delay measurement response follow-up message is a delay response follow-up message involved in the peer delay mechanism and includes the identifier, and the delay measurement response follow-up message includes the timestamp of the second delay measurement response message.

8. The method according to any one of claims 1-7, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field, and the identifier is located in any one of the domain number field, the message type field, or the identifier field.

9. The method according to any one of claims 1-7, characterized in that, The PTP message includes a message type field and multiple timestamp fields. The identifier is located in the message type field. The multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

10. The method according to any one of claims 1-7, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier domain field. The identifier includes a first sub-identifier and a second sub-identifier. The first sub-identifier and the second sub-identifier are located in different fields among the domain number field, the message type field, and the identifier domain field respectively. If any one of the first sub-identifier and the second sub-identifier is located in the domain number field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message. If the any one of the sub-identifiers is located in the message type field, the any one of the sub-identifiers indicates the message type of the PTP message and that the PTP message is a delay measurement function message. If the any one of the sub-identifiers is located in the identifier domain field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message.

11. The method according to any one of claims 1-7, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier domain field. The identifier includes a first sub-identifier, a second sub-identifier, and a third sub-identifier. The first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message. The second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message. The third sub-identifier is located in the identifier domain field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

12. The method according to any one of claims 1-7, characterized in that, The PTP message includes a delay measurement type length value TLV. The identifier is located in the type field of the delay measurement TLV.

13. The method according to claim 12, wherein The delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

14. The method according to any one of claims 8 - 13, characterized in that, The identifier is a reserved value of the field where it is located.

15. A method for sending Precision Time Protocol (PTP) messages for precise clock synchronization, characterized in that, The method is executed by a second communication device. The method includes: Obtaining a PTP message, where the PTP message includes an identifier, and the identifier indicates whether the PTP message is a delay measurement function message. Sending the PTP message.

16. The method according to claim 15, characterized in that The identifier indicates that the PTP message is a delay measurement function message. The PTP message is a synchronization message involved in the delay request response mechanism and includes the identifier. After sending the PTP message, the method further includes: Obtaining a first delay measurement request message of the PTP message, where the first delay measurement request message is a delay request message involved in the delay request response mechanism and includes the identifier. In response to the first delay measurement request message, sending a second delay measurement response message, where the second delay measurement response message is a delay response message involved in the delay request response mechanism and includes the identifier.

17. The method according to claim 16, characterized in that, After sending the PTP message, the method further includes: Send a delay measurement follow-up message for the delay measurement synchronization message, where the delay measurement follow-up message refers to a follow-up message involved in the delay request response mechanism and includes the identifier.

18. The method according to claim 15, characterized in that, The identifier indicates that the PTP message is a delay measurement function message. The PTP message is a delay request message involved in the peer delay mechanism and includes the identifier. After sending the PTP message, the method further includes: Obtain a second delay measurement response message for the PTP message, where the second delay measurement response message refers to a delay response message involved in the peer delay mechanism and includes the identifier; Based on the timestamp of the PTP message and / or the timestamp of the second delay measurement response message, determine the link transmission delay between the first communication device and the second communication device.

19. The method according to claim 18, characterized in that, After obtaining the second delay measurement response message for the PTP message, the method further includes: Obtain a delay measurement response follow-up message for the second delay measurement response message, where the delay measurement response follow-up message refers to a delay response follow-up message involved in the peer delay mechanism and includes the identifier, and the delay measurement response follow-up message includes the timestamp of the second delay measurement response message.

20. The method according to any one of claims 15 - 19, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field, and the identifier is located in any one of the domain number field, the message type field, or the identifier field.

21. The method according to any one of claims 15 - 19, characterized in that, The PTP message includes a message type field and multiple timestamp fields. The identifier is located in the message type field, and the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store the timestamp of the corresponding delay measurement function message.

22. The method according to any one of claims 15 - 19, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field. The identifier includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are located in different fields among the domain number field, the message type field, and the identifier field respectively; If any one of the first sub-identifier and the second sub-identifier is located in the domain number field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message; If the any one of the sub-identifiers is located in the message type field, the any one of the sub-identifiers indicates the message type of the PTP message and that the PTP message is a delay measurement function message; If the any one of the sub-identifiers is located in the identifier field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message.

23. The method according to any one of claims 15 - 19, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field. The identifier includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; The first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; The second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; The third sub-identifier is located in the identifier field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

24. The method according to any one of claims 15-19, characterized in that, The PTP message includes a delay measurement type length value TLV, and the identifier is located in the type field of the delay measurement TLV.

25. The method according to claim 24, wherein The delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

26. The method according to any one of claims 20-25, characterized in that, The identifier is a reserved value of the field where it is located.

27. A communication system, characterized in that, The system includes a first communication device and a second communication device; The second communication device is configured to send a PTP message, and the PTP message includes an identifier that indicates whether the PTP message is a delay measurement function message; The first communication device is configured to obtain the PTP message, and if the identifier indicates that the PTP message is a delay measurement function message, perform delay measurement based on the PTP message.

28. The system according to claim 27, wherein, The PTP message refers to a synchronization message involved in the delay request response mechanism and including the identifier; The first communication device is further configured to, in response to the PTP message, send a first delay measurement request message, and the first delay measurement request message refers to a delay request message involved in the delay request response mechanism and including the identifier; The second communication device is further configured to obtain the first delay measurement request message, and in response to the first delay measurement request message, send a first delay measurement response message, and the first delay measurement response message refers to a delay response message involved in the delay request response mechanism and including the identifier; The first communication device is further configured to obtain the second delay measurement response message, and determine the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the first delay measurement response message.

29. The system according to claim 28, wherein The second communication device is further configured to send a delay measurement follow-up message of the PTP message, and the delay measurement follow-up message refers to a follow-up message involved in the delay request response mechanism and including the identifier, and the delay measurement follow-up message includes the timestamp of the PTP message.

30. The system according to claim 27, wherein, The PTP message is a delay request message involved in the peer delay mechanism and including the identifier; The first communication device is further configured to, in response to the PTP message, send a second delay measurement response message, and the second delay measurement response message refers to a delay response message involved in the peer delay mechanism and including the identifier; The second communication device is further configured to obtain the second delay measurement response message, and determine the link transmission delay between the first communication device and the second communication device based on the timestamp of the PTP message and / or the timestamp of the second delay measurement response message.

31. The system according to claim 30, wherein The first communication device is further configured to send a delay measurement response following message of the second delay measurement response message, where the delay measurement response following message refers to a delay response following message involved in the peer delay mechanism and including the identifier, and the delay measurement response following message includes a timestamp of the second delay measurement response message.

32. The system according to claim 27, wherein The system further includes a third communication device; The first communication device is further configured to, if the identifier indicates that the PTP message is not a delay measurement function message, perform an end process on the PTP message, and if the identifier indicates that the PTP message is a delay measurement function message, send the PTP message; The third communication device is configured to obtain the PTP message and perform the step of performing delay measurement based on the PTP message.

33. The system according to any one of claims 27 - 32, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field, and the identifier is located in any one of the domain number field, the message type field, or the identifier field.

34. The system according to any one of claims 27 - 32, characterized in that, The PTP message includes a message type field and multiple timestamp fields, the identifier is located in the message type field, the multiple timestamp fields correspond to different delay measurement function messages, and each timestamp field is used to store a timestamp of the corresponding delay measurement function message.

35. The system according to any one of claims 27 - 32, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field, the identifier includes a first sub-identifier and a second sub-identifier, and the first sub-identifier and the second sub-identifier are located in different fields among the domain number field, the message type field, and the identifier field respectively; If any one of the first sub-identifier and the second sub-identifier is located in the domain number field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message; If the any one of the sub-identifiers is located in the message type field, the any one of the sub-identifiers indicates the message type of the PTP message and that the PTP message is a delay measurement function message; If the any one of the sub-identifiers is located in the identifier field, the any one of the sub-identifiers indicates whether the PTP message is a delay measurement function message.

36. The system according to any one of claims 27 - 32, characterized in that, The PTP message includes a domain number field, a message type field, and an identifier field, and the identifier includes a first sub-identifier, a second sub-identifier, and a third sub-identifier; The first sub-identifier is located in the domain number field, and the first sub-identifier indicates whether the PTP message is a delay measurement function message; The second sub-identifier is located in the message type field, and the second sub-identifier indicates the message type of the PTP message and that the PTP message is a delay measurement function message; The third sub-identifier is located in the identifier field, and the third sub-identifier indicates whether the PTP message is a delay measurement function message.

37. The system according to any one of claims 27 - 32, characterized in that, The PTP message includes a delay measurement type length value TLV, and the identifier is located in the type field of the delay measurement TLV.

38. The system according to claim 37, wherein The delay measurement TLV is a reserved TLV or a vendor TLV supported by the PTP message.

39. The system according to any one of claims 33-38, characterized in that, The identifier is a reserved value of the field where it is located.

40. A processing device for Precision Time Protocol (PTP) messages of an accurate clock synchronization protocol, characterized in that, The device is configured to execute the method according to any one of claims 1 to 14.

41. A transmitting device for Precision Time Protocol (PTP) messages of an accurate clock synchronization protocol, characterized in that, The device is configured to perform the method according to any one of claims 15 to 26.

42. A communication device, characterized in that, The communication device includes a processor configured to execute program code to cause the communication device to perform the method according to any one of claims 1 to 14, or the method according to any one of claims 15 to 26.

43. A computer-readable storage medium, characterized in that, At least one program code is stored in the storage medium, and the at least one program code is read by a processor to cause a communication device to perform the method according to any one of claims 1 to 14, or the method according to any one of claims 15 to 26.

Citation Information

Patent Citations

  • Precision time protocol (PTP) message processing method, PTP message sending method, communication system and device

    CN120342531A

  • Delay measurement processing method and system

    CN108111365A

  • Measuring method and device and storage medium

    CN112398560A

  • Method for synchronizing distributed clocks by the precision time protocol, in a telecommunication network

    US20150171980A1

  • Apparatus and method for supporting precision time synchronization protocol of stealth clock type

    US20230024329A1