Time Delay Measurement Method, Device, Communication Equipment and Storage Medium

By using the IPID of the protocol message to determine the transmission time and the reception time, and calculating the transmission delay of the protocol message, the limitations of the delay measurement method in the prior art are solved, and higher accuracy and compatibility are achieved, and system overhead is reduced.

CN115987848BActive Publication Date: 2025-07-25DATANG MOBILE COMM EQUIP CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111205540.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-15
Publication Date
2025-07-25
Estimated Expiration
2041-10-15

AI Technical Summary

Technical Problem

In the prior art, IP timestamp options and the delay measurement method of the application layer custom timestamp fields have limitations in measuring end-to-end time delay, and cannot achieve cross-process and cross-device compatibility, and cannot subdivide the levels of delay exception occurrence.

Method used

By receiving the data packet number IPID in the protocol header of the protocol message, the transmission time of the protocol message is determined, and the transmission delay of the protocol message is calculated based on the reception time, and the delay measurement is performed using the existing protocol definition field.

Benefits of technology

It improves the accuracy of delay measurement, reduces measurement errors, has better universality and compatibility, and saves system overhead.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115987848B_ABST
    Figure CN115987848B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, communication equipment and storage medium for delay measurement, relating to the field of communication technologies. The specific implementation solution is as follows: receive a protocol message, determine the sending time of the protocol message according to the IPID (Identification) in the protocol header of the protocol message, and determine the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message. This method improves the accuracy of delay measurement, reduces measurement errors. At the same time, this method uses existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of communication technologies, and in particular, to a method and apparatus for measuring delay, a communication device, and a storage medium. Background Art

[0002] In the process of communication transmission, the transmission delay of data can affect the timeliness of data and is an important parameter for data communication quality. Therefore, in a time-sensitive network, monitoring the data transmission delay is a necessary function.

[0003] In the related art, the IP timestamp option or the application layer custom timestamp field is used to measure the transmission delay, but both of these delay measurement methods have certain limitations. Summary of the Invention

[0004] This application provides a method and apparatus for measuring delay, a communication device, and a storage medium.

[0005] According to a first aspect of this application, a method for measuring delay is provided, and the method includes:

[0006] Receiving a protocol packet;

[0007] Determining the sending time of the protocol packet according to the data packet number IPID in the protocol header of the protocol packet;

[0008] Determining the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet.

[0009] Optionally, the determining the sending time of the protocol packet according to the data packet number IPID in the protocol header of the protocol packet includes: parsing the protocol header of the protocol packet to obtain the IPID and the highest bit of the fragmentation flag; and determining the sending time according to the IPID when the highest bit of the fragmentation flag meets the set value.

[0010] Optionally, the determining the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet includes: obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal; determining a second time-domain offset of the sending time relative to the nearest synchronous clock signal; and determining the transmission delay of the protocol packet according to the difference between the first time-domain offset and the second time-domain offset.

[0011] Optionally, the obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal includes: determining the first time-domain offset of the receiving time relative to the nearest synchronous clock signal according to the receiving time when the protocol packet is received at the IP layer.

[0012] Optionally, the method further includes: writing the transmission delay into the IPID of the protocol header; by setting a target option for the socket interface, writing the protocol header into a data packet, so that the application layer reads the data packet to obtain the transmission delay carried by the IPID of the protocol header.

[0013] According to a second aspect of the present application, a method for measuring delay is provided, the method includes:

[0014] Determining a sending time of a protocol message for transmitting the data block according to the acquisition time of the data block;

[0015] Generating a data message number IPID in the protocol header of the protocol message according to the sending time; wherein, the IPID is used to determine the transmission delay of the protocol message;

[0016] Sending the protocol message to a receiving end.

[0017] Optionally, the generating a data message number IPID in the protocol header of the protocol message according to the sending time includes: when the delay measurement function is enabled, using the sending time as the IPID in the protocol header of the protocol message, and configuring the highest bit of the fragmentation flag in the protocol header of the protocol message to a set value; wherein, the set value is used to indicate that the value of the IPID is the sending time.

[0018] Optionally, the determining a sending time of a protocol message for transmitting the data block according to the acquisition time of the data block includes: according to the IP layer, obtaining the acquisition time of the data block, and determining that at least one protocol message for transmitting the data block corresponds to the sending time.

[0019] Optionally, the according to the IP layer, obtaining the acquisition time of the data block, and determining that at least one protocol message for transmitting the data block corresponds to the sending time includes:

[0020] Determining a time domain offset of the acquisition time of the data block obtained by the IP layer relative to the nearest synchronous clock signal;

[0021] Using the time domain offset as the sending time corresponding to at least one protocol message for transmitting the data block.

[0022] According to a third aspect of the present application, a communication device is provided, including a memory, a transceiver and a processor;

[0023] The memory is used for storing a computer program; the transceiver is used for transceiving data under the control of the processor; the processor is used for reading the computer program in the memory and performing the following operations:

[0024] Receive a protocol message;

[0025] Determine the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message;

[0026] Determine the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message.

[0027] Optionally, the determining the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message includes: parsing the protocol header of the protocol message to obtain the IPID and the highest bit of the fragmentation flag; and determining the sending time according to the IPID when the highest bit of the fragmentation flag meets the set value.

[0028] Optionally, the determining the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message includes: obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal; determining a second time-domain offset of the sending time relative to the nearest synchronous clock signal; and determining the transmission delay of the protocol message according to the difference between the first time-domain offset and the second time-domain offset.

[0029] Optionally, the obtaining the first time-domain offset of the receiving time relative to the nearest synchronous clock signal includes: determining the first time-domain offset of the receiving time relative to the nearest synchronous clock signal according to the receiving time when the protocol message is received at the IP layer.

[0030] Optionally, the processor further performs the following operations: writing the transmission delay into the IPID of the protocol header; and writing the protocol header into a data packet by setting a target option for a socket interface, so that the application layer reads the data packet to obtain the transmission delay carried by the IPID of the protocol header.

[0031] According to a fourth aspect of the present application, there is provided a communication device, including a memory, a transceiver, and a processor;

[0032] The memory is used for storing a computer program; the transceiver is used for transceiving data under the control of the processor; the processor is used for reading the computer program in the memory and performing the following operations:

[0033] Determine the sending time of a protocol message for transmitting the data block according to the acquisition time of the data block;

[0034] Generate a data message number IPID in the protocol header of the protocol message according to the sending time; wherein, the IPID is used for determining the transmission delay of the protocol message;

[0035] Send the protocol message to the receiving end.

[0036] Optionally, generating the data packet number IPID in the protocol header of the protocol message according to the sending time includes: when the delay measurement function is enabled, using the sending time as the IPID in the protocol header of the protocol message, and configuring the highest bit of the fragmentation flag in the protocol header of the protocol message to a set value; where the set value is used to indicate that the value of the IPID is the sending time.

[0037] Optionally, determining the sending time of the protocol message for transmitting the data block according to the acquisition time of the data block includes: determining, according to the IP layer, that the acquisition time of the data block is the sending time corresponding to at least one protocol message for transmitting the data block.

[0038] Optionally, determining that the acquisition time of the data block obtained according to the IP layer is the sending time corresponding to at least one protocol message for transmitting the data block includes:

[0039] Determining the time domain offset of the acquisition time of the data block obtained by the IP layer relative to the nearest synchronous clock signal;

[0040] Using the time domain offset as the sending time corresponding to at least one protocol message for transmitting the data block.

[0041] According to the fifth aspect of the present application, a delay measurement device is provided, including:

[0042] A transceiver unit, configured to receive a protocol message;

[0043] A processing unit, configured to determine the sending time of the protocol message according to the data packet number IPID in the protocol header of the protocol message;

[0044] A calculation unit, configured to determine the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message.

[0045] According to the sixth aspect of the present application, a delay measurement device is provided, including:

[0046] A processing unit, configured to determine the sending time of the protocol message for transmitting the data block according to the acquisition time of the data block;

[0047] A calculation unit, configured to generate the data packet number IPID in the protocol header of the protocol message according to the sending time; where the IPID is used to determine the transmission delay of the protocol message;

[0048] A transceiver unit, configured to send the protocol message to the receiving end.

[0049] According to the seventh aspect of the present application, there is provided a processor-readable storage medium storing a computer program for causing the processor to execute the delay measurement method described in the first aspect.

[0050] According to the eighth aspect of the present application, there is provided a processor-readable storage medium storing a computer program for causing the processor to execute the delay measurement method described in the second aspect.

[0051] The technical solutions provided by the embodiments of the present application have the following beneficial effects:

[0052] In the present application, by receiving a protocol message, determining the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message, and determining the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message, the accuracy of delay measurement is improved, measurement errors are reduced. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0053] It should be understood that the content described in this part is not intended to identify the key or important features of the embodiments of the present application, nor is it used to limit the scope of the present application. Other features of the present application will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The drawings are used to better understand the solution and do not constitute a limitation to the present application. Among them:

[0055] Figure 1 is a schematic diagram of the architecture of a communication system provided by an embodiment of the present application;

[0056] Figure 2 is a schematic flowchart of a delay measurement method provided by an embodiment of the present application;

[0057] Figure 3 is a schematic diagram of the protocol header format of a protocol message defined by IPv4 provided by an embodiment of the present application;

[0058] Figure 4 is a schematic flowchart of another delay measurement method provided by an embodiment of the present application;

[0059] Figure 5 is a schematic flowchart of a delay measurement method provided by an embodiment of the present application;

[0060] Figure 6 is a schematic flowchart of another delay measurement method provided by an embodiment of the present application;

[0061] Figure 7 It is a schematic structural diagram of a communication device provided by an embodiment of the present application;

[0062] Figure 8 It is a schematic structural diagram of another communication device provided by an embodiment of the present application;

[0063] Figure 9 It is a schematic structural diagram of a delay measurement device provided by an embodiment of the present application;

[0064] Figure 10 It is a schematic structural diagram of another delay measurement device provided by an embodiment of the present application. Detailed implementation manners

[0065] In the embodiments of the present application, the term "and / or" describes the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The character " / " generally represents an "or" relationship between the associated objects before and after.

[0066] In the embodiments of the present application, the term "a plurality of" means two or more, and other quantifiers are similar thereto.

[0067] Next, the technical solutions in the embodiments of the present application will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present application without creative efforts shall fall within the protection scope of the present application.

[0068] The embodiments of the present application provide a delay measurement method, device, communication device, and storage medium, which improve the accuracy of delay measurement. At the same time, using the fields defined by the existing protocol for delay measurement has better universality and compatibility, and saves system overhead.

[0069] To better understand a delay measurement method disclosed in the embodiments of the present application, the communication system applicable to the embodiments of the present application will be described first below.

[0070] Please refer to Figure 1 , Figure 1 which is a schematic architecture diagram of a communication system provided by an embodiment of the present application. The communication system includes, but is not limited to, a sending end and a receiving end. Figure 1 The illustrated communication system takes the example of including a sending end 101 and a receiving end 102.

[0071] The sending end 101 may be a network device, a terminal device, or a sub-module inside the network device. The receiving end 102 may also be a network device, a terminal device, or a sub-module inside the network device. That is to say, the delay measurement method provided in the embodiments of this application can be applied to the transmission delay measurement between network devices, the transmission delay measurement between a network device and a terminal device, and the transmission delay measurement between sub-modules inside the network device.

[0072] It should be noted that the technical solution provided in the embodiments of this application can be applied to multiple communication systems, especially 5G systems. For example, the applicable systems may be Global System of Mobile Communication (GSM) systems, Code Division Multiple Access (CDMA) systems, Wideband Code Division Multiple Access (WCDMA) General Packet Radio Service (GPRS) systems, Long Term Evolution (LTE) systems, LTE Frequency Division Duplex (FDD) systems, LTE Time Division Duplex (TDD) systems, Long Term Evolution Advanced (LTE-A) systems, Universal Mobile Telecommunication System (UMTS), Worldwide Interoperability for Microwave Access (WiMAX) systems, 5G New Radio (NR) systems, etc. Both terminal devices and network devices are included in these multiple systems. The system may also include a core network part, such as an Evolved Packet System (EPS), a 5G System (5GS), etc.

[0073] According to the OSI (Open System Interconnection) seven-layer model, the process of the sending end 101 sending data to the receiving end 102 is as Figure 1As shown in the figure. The data will pass through the application layer, presentation layer, session layer, transport layer, network layer, data link layer, and physical layer of the sending end 101 in sequence. In each layer, it is encapsulated through different corresponding protocols of each layer, and the encapsulated data packet is transmitted to the receiving end 102. Then, the receiving end 102 de-encapsulates the data packet layer by layer from the physical layer upwards. Finally, the data reaches the application layer of the receiving end 102. Among them, the protocol representative of the network layer is the IP (Internet Protocol) protocol.

[0074] During the communication transmission process, the transmission delay of data will affect the timeliness of the data, thereby affecting the communication quality. Therefore, in a time-sensitive network, the monitoring of data transmission delay will be carried out.

[0075] In the related art, the method of using IP timestamp options or customizing timestamp fields in the application layer is often used to measure the transmission delay. However, the measurement method using IP timestamp options is mainly applied to router tracking and router processing delay inspection, which reflects the state of the intermediate transmission links and cannot measure the end-to-end delay. And the delay measurement method using custom timestamp fields in the application layer can measure the end-to-end delay, but as a delay measurement method in the application layer, it is bound to the application program, that is, bound to the process, and does not have universality. That is, each process needs to be implemented separately. When interacting across processes, devices, and applications, inconsistent definition of the timestamp format cannot carry out communication interaction, and it measures the delay from the application layer to the peer layer of the application layer, and cannot judge and subdivide which layer the anomaly occurs in case of delay anomaly.

[0076] In the embodiments of the present application, by receiving a protocol message, determining the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message, and determining the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message, the accuracy of delay measurement is improved, the measurement error is reduced. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0077] Figure 2 It is a schematic flowchart of a delay measurement method provided by an embodiment of the present application.

[0078] As Figure 2 shown, a delay measurement method of an embodiment of the present application mainly includes the following steps:

[0079] Step S201, receive a protocol message.

[0080] Optionally, the protocol message is a protocol message based on an IPv4 (Internet Protocol version 4) network.

[0081] The protocol header format of the protocol message defined by IPv4 is as Figure 3 shown. The meanings of the respective fields are as follows:

[0082] Version: The version number of the IP protocol. This field in IPv4 is fixed at 4;

[0083] Header Length: The length of the IP header, including options (if any);

[0084] Differentiated Services: Differentiate data priorities and provide differentiated data transmission guarantee measures for services;

[0085] Total Length: The total length of the IP packet, including the basic IP header, IP header options, and the length of the IP - carried payload;

[0086] IPID: The data message number, the number of the data block submitted for service. If it is greater than the IP MTU (Maximum Transmission Unit), fragmentation is required, and the IDs carried by the fragments are the same. IPID is the number of the IP message. If a data block at the transport layer is fragmented at the IP layer, it needs to carry the same IPID. Therefore, IPID is also used as the basis for reassembly;

[0087] Flags: The fragmentation flag field. The highest - order bit is reserved, the second - highest - order bit is the "do not fragment" flag, and the lowest - order bit is the "last fragment" flag bit. Among them, the highest - order bit is the fragmentation flag bit R, the second - highest - order bit is the fragmentation flag bit D, and the lowest - order bit is the fragmentation flag bit M.

[0088] Fragment Offset: Indicates the offset of the first byte of the IP packet payload in the original packet;

[0089] Time to Live: Each time it passes through a router, this time to live is decremented by 1, that is, the routing hop count limit, to prevent data loop storms;

[0090] Protocol Type: Indicates the transport - layer protocol, such as UDP (User Datagram Protocol), TCP (Transmission Control Protocol), SCTP (Stream Control Transmission Protocol), etc.;

[0091] Header Checksum: Calculate the checksum for the IP header;

[0092] Source IP address: The IP address of the data sender;

[0093] Destination IP address: The IP address of the data receiver.

[0094] It can be understood that the receiving end receives the protocol packet and parses the protocol packet layer by layer from the physical layer upwards.

[0095] Step S202: Determine the sending time of the protocol packet according to the data packet number IPID in the protocol header of the protocol packet.

[0096] As described above, in the protocol header of the protocol packet, there is a data packet number IPID field.

[0097] In the embodiments of the present application, the sending time of the protocol packet can be determined according to the content filled in this field.

[0098] In some embodiments, the sending time of the protocol packet refers to the time when the IP layer of the sending end obtains the data block from the transport layer.

[0099] Optionally, the sending time is represented by the time domain offset of the nearest synchronous clock signal, that is, the offset time from the nearest synchronous clock signal.

[0100] It should be noted that in a communication system, the base station system requires all module frame numbers to be synchronized. Before the base station system performs service transmission, it is necessary to first complete the "clock alignment" of each module, that is, the clock synchronization process. This process is completed through hardware signal coding, and the accuracy can reach the nanosecond level. The technical solutions provided in the embodiments of the present application are all described based on the base station system that has been synchronized. Therefore, according to the synchronization of the base station, all devices and modules in the wireless communication system are UTC (Universal Time Coordinated) time synchronized.

[0101] It can be understood that according to different requirements, the accuracy of delay measurement may be different. Different methods can be used to represent the sending time of the protocol packet. In the case of representing it by the time domain offset of the nearest synchronous clock signal, different synchronous clock signals can also be selected according to different accuracy requirements.

[0102] Optionally, the synchronous clock signal is obtained after processing the received satellite signal and is derived from a satellite atomic clock. The period of this synchronous clock signal is 1000000 us.

[0103] In addition, it should be noted that since the meaning of the IPID field itself is the data packet number and the data block number submitted for the service, determining the sending time of the protocol packet through the IPID is the reuse of the IPID field.

[0104] In some embodiments, it may be indicated by indication information whether the content carried in the IPID field can be interpreted as the sending time.

[0105] Optionally, the indication information may be the fragmentation flag field in the protocol header.

[0106] Step S203: Determine the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet.

[0107] In some embodiments, the receiving time of the protocol packet refers to the time when the IP layer of the receiving end obtains the protocol packet.

[0108] Optionally, the receiving time is also represented by the time domain offset of the nearest synchronous clock signal, that is, the offset time from the nearest synchronous clock signal.

[0109] It can be understood that, according to different requirements, the accuracy of delay measurement may be different. Different methods can be used to represent the receiving time of the protocol packet. In the case of representing it by the time domain offset of the nearest synchronous clock signal, different synchronous clock signals can also be selected according to different accuracy requirements.

[0110] In the embodiments of the present application, the receiving end can determine the end-to-end transmission delay of the protocol packet by comparing the sending time and the receiving time of the protocol packet.

[0111] Optionally, the transmission delay can be determined by the difference between the time domain offsets of the sending time and the receiving time relative to the nearest synchronous clock signal.

[0112] In some embodiments, after the receiving end calculates the transmission delay of the protocol packet, the transmission delay is written into the IPID field of the protocol header of the protocol packet. By setting target options for the socket interface, the protocol header is written into the data packet so that the application layer can read the data packet to obtain the transmission delay carried by the IPID of the protocol header.

[0113] That is, in some embodiments, after the receiving end calculates the transmission delay of the protocol packet, the transmission delay is written into the IPID field of the protocol header of the packet. In order to enable the application layer of the receiving end to obtain the transmission delay, target options are set for the socket interface, which can write the protocol header into the data packet. When the application layer obtains the data packet, it also obtains the protocol header in the data packet, and reads the data packet to obtain the transmission delay.

[0114] Optionally, the target option is the IP_HDRINCL option.

[0115] The delay measurement method according to the embodiment of the present application determines the sending time of the protocol packet according to the data packet number IPID in the protocol header of the protocol packet by receiving the protocol packet, and determines the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet, which improves the accuracy of delay measurement and reduces measurement errors. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0116] Figure 4 It is a schematic flow chart of another delay measurement method provided by the embodiment of the present application.

[0117] As Figure 4 shown, another delay measurement method according to the embodiment of the present application mainly includes the following steps:

[0118] Step S401: Receive a protocol packet.

[0119] Optionally, the protocol packet is a protocol packet based on an IPv4 network.

[0120] Step S402: Analyze the protocol header of the protocol packet to obtain the IPID and the highest bit of the fragmentation flag.

[0121] Among them, the highest bit of the fragmentation flag refers to the highest bit in the three-bit fragmentation flag field, that is, the fragmentation flag bit R.

[0122] Optionally, the IP layer of the receiving end analyzes the protocol header of the protocol packet to obtain the IPID and the fragmentation flag bit R.

[0123] It can be understood that the IP layer of the receiving end analyzing the protocol header of the protocol packet can also obtain other information carried in the protocol header.

[0124] Step S403: When the highest bit of the fragmentation flag meets the set value, determine the sending time of the protocol packet according to the IPID.

[0125] Optionally, when the fragmentation flag bit R is 1, determine the sending time of the protocol packet according to the IPID. That is, when the fragmentation flag bit R is 1, the content of the IPID field can be interpreted as the sending time of the protocol packet.

[0126] It can be understood that similarly, the set value can also be set to 0, that is, when the fragmentation flag bit R is 0, determine the sending time of the protocol packet according to the IPID.

[0127] Step S404: Obtain the first time-domain offset of the receiving time of the protocol packet relative to the nearest synchronous clock signal.

[0128] Optionally, the receiving time of the protocol packet is the time when the IP layer of the receiving end receives the protocol packet.

[0129] Among them, the first time-domain offset is the time-domain offset of the receiving time relative to the nearest synchronous clock signal. It can be understood that the nearest synchronous clock signal is the nearest synchronous clock signal before the receiving time.

[0130] Step S405: Determine the second time-domain offset of the sending time of the protocol packet relative to the nearest synchronous clock signal.

[0131] Optionally, the sending time of the protocol packet is the time when the IP layer of the sending end obtains the data block from the transport layer.

[0132] Among them, the second time-domain offset is the time-domain offset of the sending time relative to the nearest synchronous clock signal in step S404.

[0133] Step S406: Determine the transmission delay of the protocol packet according to the difference between the first time-domain offset and the second time-domain offset.

[0134] It can be understood that the transmission delay of the protocol packet = the first time-domain offset - the second time-domain offset.

[0135] Step S407: Write the transmission delay into the IPID of the protocol header.

[0136] After calculating the transmission delay of the protocol packet, the receiving end writes the transmission delay into the IPID field of the protocol header.

[0137] It can be understood that the IP layer will still parse and transfer the data to the upper layer according to the normal communication method.

[0138] Step S408: Write the protocol header into the data packet by setting the target option for the socket interface, so that the application layer can read the transmission delay carried by the IPID of the protocol header when reading the data packet.

[0139] It can be understood that in order to enable the application layer to obtain the transmission delay, it is necessary to set the target option for the socket interface to write the protocol header in step S407 into the data packet that the application layer can read.

[0140] Optionally, the target option is the IP_HDRINCL option.

[0141] In this way, when the application layer reads the data packet, it can also read the protocol header written into the data packet, and read the IPID field of the protocol header to obtain the transmission delay of the protocol packet.

[0142] The delay measurement method of the embodiments of the present application receives protocol packets, parses the protocol headers of the protocol packets to obtain the IPID and the highest bit of the fragmentation flag. When the highest bit of the fragmentation flag meets the set value, the sending time of the protocol packet is determined according to the IPID. The first time-domain offset of the receiving time of the protocol packet relative to the nearest synchronous clock signal is obtained, the second time-domain offset of the sending time of the protocol packet relative to the nearest synchronous clock signal is determined, the transmission delay of the protocol packet is determined according to the difference between the first time-domain offset and the second time-domain offset, the transmission delay is written into the IPID of the protocol header, and by setting target options for the socket interface, the protocol header is written into the data packet, so that the application layer reads the data packet to obtain the transmission delay carried by the IPID of the protocol header, improving the accuracy of delay measurement and reducing measurement errors. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0143] Figure 5 It is a schematic flowchart of a delay measurement method provided by the embodiments of the present application.

[0144] As Figure 5 shown, a delay measurement method of the embodiments of the present application mainly includes the following steps:

[0145] Step S501, determine the sending time of the protocol packet used to transmit the data block according to the acquisition time of the data block.

[0146] In the embodiments of the present application, the protocol packet is a protocol packet based on the IPv4 network.

[0147] Optionally, determine the corresponding sending time of the protocol packet used to transmit the data block according to the time when the data block is obtained at the IP layer.

[0148] In some embodiments, if the data block is larger than the IP maximum transmission unit, the data block at the transport layer needs to be fragmented at the IP layer, that is, multiple protocol packets are required to transmit the data block. The IPIDs carried by the fragments of the same transport layer data block at the IP layer are the same, that is, multiple protocol packets for transmitting the same transport layer data block all correspond to this sending time.

[0149] Optionally, the sending time is represented by the time-domain offset of the nearest synchronous clock signal, that is, the offset time from the nearest synchronous clock signal, that is, the time-domain offset of the time when the data block is received at the IP layer relative to the nearest synchronous clock signal.

[0150] It can be understood that, depending on different requirements, the accuracy of latency measurement may vary, and different methods can be used to represent the transmission time of protocol packets. In the case of using the time-domain offset of the most recent synchronized clock signal for representation, different synchronized clock signals can also be selected according to different accuracy requirements.

[0151] Optionally, the synchronized clock signal is obtained after processing the received satellite signal and is derived from a satellite atomic clock, and the period of the synchronized clock signal is 1000000 us.

[0152] Step S502: Generate a data packet number IPID in the protocol header of the protocol packet according to the transmission time, where the IPID is used to determine the transmission latency of the protocol packet.

[0153] According to the transmission time of the protocol packet determined in step S501, generate a data packet number IPID in the protocol header of the protocol packet, that is, represent the transmission time of the protocol packet through the value of the IPID in the protocol packet.

[0154] Among them, the IPID is used to determine the transmission latency of the protocol packet. It can be understood that the receiving end can determine the transmission latency of the protocol packet according to the transmission time of the protocol packet represented by the IPID.

[0155] It should be noted that since the meaning of the IPID field itself is the data packet number and the data block number submitted for the service, determining the transmission time of the protocol packet through the IPID is a reuse of the IPID field.

[0156] In some embodiments, it can be indicated by an indication information whether the content carried in the IPID field can be interpreted as the transmission time.

[0157] Optionally, the indication information can be the fragmentation flag field in the protocol header.

[0158] Step S503: Send the protocol packet to the receiving end.

[0159] Optionally, the protocol packet is further encapsulated and processed through the data link layer and the physical layer from the IP layer and then sent to the receiving end.

[0160] In the embodiments of the present application, according to different application scenarios and communication systems, the protocol packet can be sent to the receiving end through various communication links such as wired and wireless, and the specific sending method of the protocol packet is not limited herein.

[0161] The delay measurement method according to the embodiment of the present application determines the sending time of the protocol message for transmitting the data block according to the acquisition time of the data block, and generates the IPID in the protocol header of the protocol message according to the sending time. The IPID is used to determine the transmission delay of the protocol message. Sending the protocol message to the receiving end improves the accuracy of delay measurement and reduces measurement errors. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0162] Figure 6 It is a schematic flowchart of another delay measurement method provided by the embodiment of the present application.

[0163] As Figure 6 shown, another delay measurement method according to the embodiment of the present application mainly includes the following steps:

[0164] Step S601: Determine the sending time corresponding to at least one protocol message for transmitting the data block according to the acquisition time of the data block obtained from the IP layer.

[0165] In some embodiments, if the data block is larger than the IP maximum transmission unit, the data block at the transport layer needs to be fragmented at the IP layer, that is, multiple protocol messages are required to transmit the data block. The IPIDs carried by the fragments of the same transport layer data block at the IP layer are the same. That is, multiple protocol messages for transmitting the same transport layer data block all correspond to the sending time.

[0166] Therefore, the sending time corresponding to at least one protocol message for transmitting the data block is the time when the IP layer obtains the data block.

[0167] Optionally, determine the time domain offset of the time when the IP layer receives the data block relative to the nearest synchronous clock signal, and use this time domain offset as the sending time corresponding to at least one protocol message for transmitting the data block.

[0168] Step S602: When the delay measurement function is enabled, use the sending time as the IPID in the protocol header of the protocol message, and configure the highest bit of the fragmentation flag in the protocol header of the protocol message to a set value.

[0169] Among them, the highest bit of the fragmentation flag is the highest bit among the three bits of the fragmentation flag field, that is, the fragmentation flag bit R. This set value is used to indicate that the value of the IPID is the sending time.

[0170] Optionally, when the delay measurement function is enabled, configure the fragmentation flag bit R to 1. That is, when the fragmentation flag bit R is 1, the content of the IPID field can be interpreted as the sending time of the protocol message.

[0171] It can be understood that, similarly, when the delay measurement function is enabled, the fragmentation flag bit R can also be configured to 0. That is, when the fragmentation flag bit R is 0, the content of the IPID field can be interpreted as the sending time of the protocol message.

[0172] Based on the sending time corresponding to at least one protocol message determined in S601, use this sending time as the IPID in the protocol header of the at least one protocol message. That is, represent the sending time of the at least one protocol message through the value of the IPID in the protocol message.

[0173] Step S603, send the protocol message to the receiving end.

[0174] In the delay measurement method of the embodiment of the present application, by obtaining the acquisition time of the data block according to the IP layer, determining the sending time corresponding to at least one protocol message for transmitting the data block, when the delay measurement function is enabled, using the sending time as the IPID in the protocol header of the protocol message, configuring the highest bit of the fragmentation flag in the protocol header of the protocol message to a set value, and sending the protocol message to the receiving end, the accuracy of delay measurement is improved, measurement errors are reduced. At the same time, this method uses the existing protocol-defined fields for delay measurement, has better universality and compatibility, and saves system overhead.

[0175] To implement the above embodiments, the embodiment of the present application also proposes a communication device. Figure 7 It is a schematic structural diagram of a communication device provided by the embodiment of the present application.

[0176] As Figure 7 shown, the communication device includes: a memory 701, a transceiver 702, and a processor 703.

[0177] Among them, the memory 701 is used to store computer programs; the transceiver 702 is used to send and receive data under the control of the processor; the processor 703 is used to read the computer programs in the memory and perform the following operations:

[0178] Receive protocol messages;

[0179] Determine the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message;

[0180] Determine the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message.

[0181] As a possible implementation manner, parse the protocol header of the protocol message to obtain the IPID and the highest bit of the fragmentation flag. When the highest bit of the fragmentation flag meets the set value, determine the sending time according to the IPID.

[0182] As a possible implementation, obtain a first time-domain offset of the receiving moment relative to the nearest synchronous clock signal, determine a second time-domain offset of the sending moment relative to the nearest synchronous clock signal, and determine the transmission delay of the protocol message according to the difference between the first time-domain offset and the second time-domain offset.

[0183] As a possible implementation, determine the first time-domain offset of the receiving moment relative to the nearest synchronous clock signal according to the receiving moment when the protocol message is received at the IP layer.

[0184] As a possible implementation, write the transmission delay into the IPID of the protocol header, and write the protocol header into the data packet by setting target options for the socket interface, so that the application layer reads the data packet to obtain the transmission delay carried by the IPID of the protocol header.

[0185] It should be noted that the above communication device provided by the embodiments of the present application can implement all the method steps implemented by the above Figure 2 , Figure 4 method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be described in detail herein.

[0186] To implement the above embodiments, the embodiments of the present application also propose another communication device. Figure 8 It is a schematic structural diagram of another communication device provided by the embodiments of the present application.

[0187] As Figure 8 shown, the communication device includes: a memory 801, a transceiver 802, and a processor 803.

[0188] Among them, the memory 801 is used to store computer programs; the transceiver 802 is used to send and receive data under the control of the processor; the processor 803 is used to read the computer programs in the memory and perform the following operations:

[0189] Determine the sending moment of the protocol message for transmitting the data block according to the acquisition moment of the data block;

[0190] Generate a data message number IPID in the protocol header of the protocol message according to the sending moment; wherein, the IPID is used to determine the transmission delay of the protocol message;

[0191] Send the protocol message to the receiving end.

[0192] As a possible implementation, when the time delay measurement function is enabled, the sending time is used as the IPID in the protocol header of the protocol message, and the highest bit of the fragmentation flag in the protocol header of the protocol message is configured with a set value; wherein, the set value is used to indicate that the value of the IPID is the sending time.

[0193] As a possible implementation, according to the acquisition time of the data block obtained by the IP layer, it is determined that at least one protocol message for transmitting the data block corresponds to the sending time.

[0194] As a possible implementation, the time domain offset of the acquisition time of the data block obtained by the IP layer relative to the nearest synchronous clock signal is determined, and the time domain offset is used as the sending time corresponding to at least one protocol message for transmitting the data block.

[0195] It should be noted that the above communication device provided by the embodiments of the present application can implement all the method steps implemented by the above Figures 5 - 6 method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be described in detail in this embodiment.

[0196] To implement the above embodiments, the embodiments of the present application also propose a time delay measurement device. Figure 9 It is a schematic structural diagram of a time delay measurement device provided by the embodiments of the present application.

[0197] As Figure 9 shown, the device includes: a transceiver unit 910, a processing unit 920, and a calculation unit 930.

[0198] Among them, the transceiver unit 910 is used to receive protocol messages;

[0199] The processing unit 920 is used to determine the sending time of the protocol message according to the data message number IPID in the protocol header of the protocol message;

[0200] The calculation unit 930 is used to determine the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message.

[0201] As a possible implementation, the processing unit 920 is specifically used to parse the protocol header of the protocol message to obtain the IPID and the highest bit of the fragmentation flag, and determine the sending time according to the IPID when the highest bit of the fragmentation flag meets the set value.

[0202] As a possible implementation, the computing unit 930 is specifically configured to obtain a first time-domain offset of the receiving moment relative to the nearest synchronization clock signal, determine a second time-domain offset of the sending moment relative to the nearest synchronization clock signal, and determine the transmission delay of the protocol message according to the difference between the first time-domain offset and the second time-domain offset.

[0203] As a possible implementation, the computing unit 930 is further specifically configured to determine the first time-domain offset of the receiving moment relative to the nearest synchronization clock signal according to the receiving moment when the protocol message is received at the IP layer.

[0204] As a possible implementation, the processing unit 920 is further configured to write the transmission delay into the IPID of the protocol header, and write the protocol header into the data packet by setting target options for the socket interface, so that the application layer reads the data packet to obtain the transmission delay carried by the IPID of the protocol header.

[0205] It should be noted that the above delay measurement device provided by the embodiments of the present application can implement all the method steps implemented by the above Figure 2 , Figure 4 method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be described in detail in this embodiment.

[0206] To implement the above embodiments, the embodiments of the present application also propose another delay measurement device. Figure 10 It is a schematic structural diagram of another delay measurement device provided by the embodiments of the present application.

[0207] As Figure 10 shown, the device includes: a processing unit 1010, a computing unit 1020, and a transceiver unit 1030.

[0208] Among them, the processing unit 1010 is configured to determine the sending moment of the protocol message for transmitting the data block according to the obtaining moment of the data block;

[0209] The computing unit 1020 is configured to generate a data message number IPID in the protocol header of the protocol message according to the sending moment; wherein, the IPID is used to determine the transmission delay of the protocol message;

[0210] The transceiver unit 1030 is configured to send the protocol message to the receiving end.

[0211] As a possible implementation, the computing unit 1020 is specifically configured to, when the delay measurement function is enabled, use the sending moment as the IPID in the protocol header of the protocol message, and configure the highest bit of the fragmentation flag in the protocol header of the protocol message to a set value; wherein the set value is used to indicate that the value of the IPID is the sending moment.

[0212] As a possible implementation, the processing unit 1010 is specifically configured to determine, according to the acquisition moment of the data block obtained by the IP layer, that at least one protocol message for transmitting the data block corresponds to the sending moment.

[0213] As a possible implementation, the processing unit 1010 is specifically configured to determine the time-domain offset of the acquisition moment of the data block obtained by the IP layer relative to the nearest synchronous clock signal, and use the time-domain offset as the sending moment corresponding to at least one protocol message for transmitting the data block.

[0214] It should be noted that the above delay measurement device provided by the embodiments of the present application can implement all the method steps implemented by the above Figures 5 - 6 method embodiments, and can achieve the same technical effects. The same parts and beneficial effects as those in the method embodiments will not be described in detail in this embodiment.

[0215] It should be noted that in each embodiment of the present application, each functional unit can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.

[0216] 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 processor-readable storage medium. Based on such an understanding, the technical solution of the present application, in essence, 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. The computer software product is stored in a storage medium and includes several instructions for causing a computer device (which can be a personal computer, a server, or a network-side device, etc.) or a processor to execute all or part of the steps of the methods in the various embodiments of the present application. The foregoing storage medium includes: various media such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disc that can store program codes.

[0217] According to an embodiment of the present application, the present application further provides a processor-readable storage medium.

[0218] Wherein, the processor-readable storage medium stores a computer program, and the computer program is used to cause the processor to execute the delay measurement method described in the above embodiments of the present application Figure 2 , Figure 4 or the delay measurement method described in the above Figures 5 - 6 embodiments.

[0219] Wherein, the processor-readable storage medium can be any available medium or data storage device accessible by the processor, including but not limited to magnetic memories (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical memories (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor memories (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid state drives (SSD)), etc.

[0220] These computing programs (also referred to as programs, software, software applications, or code) include machine instructions for a programmable processor and can implement these computing programs using high-level procedures and / or object-oriented programming languages and / or assembly / machine languages. As used herein, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (such as a disk, optical disc, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including a machine-readable medium that receives machine instructions as a machine-readable signal. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0221] In order to provide interaction with the user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (such as a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and a pointing device (such as a mouse or trackball), through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (such as visual feedback, auditory feedback, or tactile feedback); and the input from the user can be received in any form (including voice input, speech input, or tactile input).

[0222] The systems and techniques described herein can be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described herein), or a computing system that includes any combination of such backend, middleware, or frontend components. The components of the system can be interconnected to each other by digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include: local area network (LAN), wide area network (WAN), and the Internet.

[0223] A computer system can include clients and servers. The clients and servers are generally far apart from each other and typically interact through a communication network. The client - server relationship is created by computer programs that run on respective computers and have a client - server relationship with each other.

[0224] Those skilled in the art will appreciate that the embodiments of the present application can be provided as a method, system, or computer program product. Accordingly, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer - usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer - usable program code.

[0225] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and combinations of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer - executable instructions. These computer - executable instructions can be provided to the processor of a general - purpose computer, special - purpose computer, embedded processor, or other programmable data - processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data - processing device produce means for implementing the functions specified in Figure 1 one or more of the flows or multiple flows and / or blocks Figure 1 one or more of the blocks or multiple blocks.

[0226] These processor - executable instructions can also be stored in a processor - readable memory that can direct a computer or other programmable data - processing device to operate in a particular manner, such that the instructions stored in the processor - readable memory produce a manufacture including instruction means that implement the functions in Figure 1 one or more of the flows or multiple flows and / or blocks Figure 1The functions specified in one or more boxes.

[0227] These processor-executable instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process. Thus, the instructions executed on the computer or other programmable device provide for implementing the steps of the functions specified in one or more processes and / or boxes Figure 1 One or more processes and / or boxes Figure 1 The steps of the functions specified in one or more boxes.

[0228] It should be understood that various forms of the process shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this application can be executed in parallel, sequentially, or in a different order, as long as the desired results of the technical solution disclosed in this application can be achieved. This is not limited herein.

[0229] The above specific embodiments do not constitute a limitation on the protection scope of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application shall be included within the protection scope of this application.

Claims

1. A method for measuring time delay, characterized in that The method includes: Receiving a protocol message; Parsing the protocol header of the protocol message to obtain a data message number IPID and the highest bit of the fragmentation flag; When the highest bit of the fragmentation flag meets the set value, determining the sending time according to the IPID; Determining the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message.

2. The method according to claim 1, wherein The determining the transmission delay of the protocol message according to the sending time and the receiving time of the protocol message includes: Obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal; Determining a second time-domain offset of the sending time relative to the nearest synchronous clock signal; Determining the transmission delay of the protocol message according to the difference between the first time-domain offset and the second time-domain offset.

3. The method according to claim 2, wherein The obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal includes: Determining the first time-domain offset of the receiving time relative to the nearest synchronous clock signal according to the receiving time when the protocol message is received at the IP layer.

4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: Writing the transmission delay into the IPID of the protocol header; Writing the protocol header into the data packet by setting target options for the socket interface, so that the application layer can read the data packet to obtain the transmission delay carried by the IPID of the protocol header.

5. A method for measuring time delay, characterized in that, The method includes: Determining the sending time of the protocol message for transmitting the data block according to the obtaining time of the data block; Generating a data message number IPID in the protocol header of the protocol message according to the sending time; wherein, the IPID is used to determine the transmission delay of the protocol message; Sending the protocol message to the receiving end; Wherein, the generating a data message number IPID in the protocol header of the protocol message according to the sending time includes: When the delay measurement function is enabled, using the sending time as the IPID in the protocol header of the protocol message, and configuring the highest bit of the fragmentation flag in the protocol header of the protocol message to the set value; wherein, the set value is used to indicate that the value of the IPID is the sending time.

6. The method according to claim 5, wherein The determining the sending time of the protocol message for transmitting the data block according to the obtaining time of the data block includes: Determining that at least one protocol message for transmitting the data block corresponds to the sending time according to the obtaining time of the data block obtained by the IP layer.

7. The method according to claim 6, characterized in that, The determining that at least one protocol message for transmitting the data block corresponds to the sending time according to the obtaining time of the data block obtained by the IP layer includes: Determining the time-domain offset of the obtaining time of the data block obtained by the IP layer relative to the nearest synchronous clock signal; Using the time-domain offset as the sending time corresponding to at least one protocol message for transmitting the data block.

8. A communication device, characterized in that, Including a memory, a transceiver, and a processor: The memory is used to store a computer program; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer program in the memory and perform the following operations: Receiving a protocol message; Parse the protocol header of the protocol packet to obtain the data packet number IPID and the highest bit of the fragmentation flag; when the highest bit of the fragmentation flag meets the set value, determine the sending time according to the IPID. Determine the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet.

9. The communication device according to claim 8, characterized in that, The determining the transmission delay of the protocol packet according to the sending time and the receiving time of the protocol packet includes: Obtain a first time-domain offset of the receiving time relative to the nearest synchronous clock signal. Determine a second time-domain offset of the sending time relative to the nearest synchronous clock signal. Determine the transmission delay of the protocol packet according to the difference between the first time-domain offset and the second time-domain offset.

10. The communication device according to claim 9, wherein The obtaining a first time-domain offset of the receiving time relative to the nearest synchronous clock signal includes: According to the receiving time when the protocol packet is received at the IP layer, determine the first time-domain offset of the receiving time relative to the nearest synchronous clock signal.

11. The communication device according to any one of claims 8-10, characterized in that, The processor also performs the following operations: Write the transmission delay into the IPID of the protocol header. Write the protocol header into the data packet by setting target options for the socket interface, so that the application layer can read the data packet to obtain the transmission delay carried by the IPID of the protocol header.

12. A communication device, characterized in that, Including a memory, a transceiver, and a processor: The memory is used to store computer programs; the transceiver is used to transmit and receive data under the control of the processor; the processor is used to read the computer programs in the memory and perform the following operations: Determine the sending time of the protocol packet for transmitting the data block according to the acquisition time of the data block. Generate the data packet number IPID in the protocol header of the protocol packet according to the sending time; wherein, the IPID is used to determine the transmission delay of the protocol packet. Send the protocol packet to the receiving end. Wherein, the generating the data packet number IPID in the protocol header of the protocol packet according to the sending time includes: When the delay measurement function is enabled, use the sending time as the IPID in the protocol header of the protocol packet, and configure the highest bit of the fragmentation flag in the protocol header of the protocol packet to a set value; wherein, the set value is used to indicate that the value of the IPID is the sending time.

13. The communication device according to claim 12, wherein The determining the sending time of the protocol packet for transmitting the data block according to the acquisition time of the data block includes: According to the acquisition time of the data block obtained by the IP layer, determine that at least one protocol packet for transmitting the data block corresponds to the sending time.

14. The communication device according to claim 13, wherein The determining that at least one protocol packet for transmitting the data block corresponds to the sending time according to the acquisition time of the data block obtained by the IP layer includes: Determine the time-domain offset of the acquisition time of the data block obtained by the IP layer relative to the nearest synchronous clock signal. Use the time-domain offset as the sending time corresponding to at least one protocol packet for transmitting the data block.

15. A time delay measurement device, characterized in that, Including: A transceiver unit for receiving protocol packets. A processing unit, configured to parse a protocol header of the protocol packet to obtain a data packet number IPID and a highest bit of a fragmentation flag; When the highest bit of the fragmentation flag meets a set value, determine a sending time according to the IPID; A calculation unit, configured to determine a transmission delay of the protocol packet according to the sending time and a receiving time of the protocol packet.

16. A time delay measurement device, characterized in that, Comprising: A processing unit, configured to determine a sending time of a protocol packet for transmitting the data block according to an obtaining time of the data block; A calculation unit, configured to generate an IPID of a data packet in the protocol header of the protocol packet according to the sending time; wherein the IPID is used to determine a transmission delay of the protocol packet; A transceiver unit, configured to send the protocol packet to a receiving end; Wherein, the calculation unit is specifically configured to: When a delay measurement function is enabled, use the sending time as the IPID in the protocol header of the protocol packet, and configure the highest bit of the fragmentation flag in the protocol header of the protocol packet to a set value; wherein the set value is used to indicate that the value of the IPID is the sending time.

17. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and the computer program is used to cause the processor to execute the method according to any one of claims 1 to 4.

18. A processor-readable storage medium, characterized in that, The processor-readable storage medium stores a computer program, and the computer program is used to cause the processor to execute the method according to any one of claims 5 to 7.

Citation Information

Patent Citations

  • Method for adding time stamp to data packet

    JP1997046396A