Delay determination method, communication device, chip and storage medium

By including the MPDU of delay information in the Wi-Fi message and parsing the information at the receiving end, the problem of large error in measuring Wi-Fi message delay in the existing technology is solved, and accurate one-way delay measurement is achieved.

CN115580559BActive Publication Date: 2025-09-19伟光有限公司(CN)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211110965.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-13
Publication Date
2025-09-19
Estimated Expiration
2042-09-13

AI Technical Summary

Technical Problem

The existing technology has the problem of large error or the need for additional software and hardware support when measuring the one-way delay of Wi-Fi network messages.

Method used

The transmission delay of the message is determined by including the delay information in the medium access control MAC protocol data unit MPDU in the message generated by the first device end and parsing the delay information at the second device end.

Benefits of technology

This achieves accurate measurement of the one-way delay from message generation to reception without the need for additional software and hardware support, reducing complexity and improving accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115580559B_ABST
    Figure CN115580559B_ABST
Patent Text Reader

Abstract

An embodiment of the present application discloses a delay determination method, a communication device, a chip, and a storage medium. The delay determination method at a first device includes: determining the delay of the first device based on a first time when an application layer generates a first message and a second time when an antenna sends a signal corresponding to the first message; generating a medium access control MAC protocol data unit MPDU based on the first message, the MPDU including delay information representing the delay of the first device stored in a first field; and sending the MPDU to a second device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of communication technologies, and in particular to a method for determining a time delay, a communication device, a chip, and a storage medium. Background Art

[0002] With the development of the Internet of Things (IoT), more and more devices are connected to Wi-Fi networks. To achieve a better audio-visual experience, people often require these devices to work together. For example, a home may have a mobile phone, two Wi-Fi speakers, and a TV. People may want to project videos from their mobile phone onto the TV while also playing the corresponding audio on both speakers simultaneously. To achieve this synchronization, accurately measuring the one-way latency of Wi-Fi network packets is becoming increasingly important.

[0003] Currently, two methods are commonly used to determine the one-way delay of a message. The first method first measures the round-trip delay. Specifically, the sending device records the time of the request message. The receiving device then sends a response message after receiving the request message. The sending device then records the time when the response message is received. The difference between the two times is the sum of the two-way delays, and dividing by two gives the one-way delay. The second method first synchronizes the time of the sending and receiving devices using a precise time protocol. The sending device then records the time the message is sent, and the receiving device records the time the message is received. The difference between the reception time and the sending time is the one-way delay.

[0004] However, the first method mentioned above is actually based on the assumption that the round-trip delay is equal. The one-way delay calculated based on this assumption will have a large error. The second method requires additional protocol modules and hardware support for precise time synchronization, and requires that the intermediate nodes in the network also support the corresponding protocol, which is highly complex. Summary of the Invention

[0005] Embodiments of the present application provide a delay determination method, a communication device, a chip, and a storage medium.

[0006] The technical solution of the embodiment of the present application is implemented as follows:

[0007] In a first aspect, an embodiment of the present application provides a method for determining a time delay, which is performed on a first device, and the method includes:

[0008] Determine a first device latency based on a first time at which the application layer generates a first message and a second time at which the antenna transmits a signal corresponding to the first message;

[0009] generating a medium access control MAC protocol data unit MPDU based on the first message, wherein the MPDU includes delay information representing a delay of the first device stored in a first field; and

[0010] The MPDU is sent to the second device.

[0011] In a second aspect, an embodiment of the present application provides a method for determining a delay, which is performed on a second device, and the method includes:

[0012] receiving an MPDU from a first device, wherein the MPDU is generated by the first device based on a first message;

[0013] Parsing the delay information representing the first device delay stored in the first field from the MPDU; and

[0014] The transmission delay of the first message is determined based on the delay information and the second device delay.

[0015] In a third aspect, an embodiment of the present application provides a communication device, including a processor, wherein the processor is configured to:

[0016] Determine a first device latency based on a first time at which the application layer generates a first message and a second time at which the antenna transmits a signal corresponding to the first message;

[0017] An MPDU is generated based on the first message, where the MPDU includes delay information representing the first device delay stored in a first field.

[0018] In a fourth aspect, an embodiment of the present application provides a communication device, including a processor, wherein the processor is configured to:

[0019] Parsing delay information representing a delay of the first device stored in a first field from an MPDU received from the first device, wherein the MPDU is generated by the first device based on the first message;

[0020] A transmission delay of the first message is determined based on the delay information and a second device delay of the communication device.

[0021] In a fifth aspect, an embodiment of the present application provides a chip, including a processor, for calling and running a computer program from a memory, so that a communication device equipped with the chip executes the above-mentioned delay determination method executed on the first device side.

[0022] In a sixth aspect, an embodiment of the present application provides a chip, including a processor, for calling and running a computer program from a memory, so that a communication device equipped with the chip executes the above-mentioned delay determination method executed on the second device side.

[0023] In a seventh aspect, an embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned delay determination method when executed by a processor.

[0024] The embodiments of the present application provide a method for determining a delay, a communication device, a chip, and a storage medium. The method for determining a delay performed on a first device includes: determining the delay of the first device based on a first time when the application layer generates a first message and a second time when the antenna transmits a signal corresponding to the first message; generating a media access control (MAC) protocol data unit (MPDU) based on the first message, the MPDU including delay information representing the delay of the first device stored in a first field; and transmitting the MPDU to a second device. The technical solution provided by the embodiments of the present application provides a solution for accurately measuring the real-time one-way delay from message generation to reception, which not only does not require additional software and hardware support, but also has low complexity and high accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 An exemplary segment delay diagram provided in an embodiment of the present application;

[0026] Figure 2 A schematic diagram of a delay determination method provided in an embodiment of the present application Figure 1 ;

[0027] Figure 3 A schematic diagram of an exemplary HTC field format provided in an embodiment of the present application;

[0028] Figure 4 A schematic diagram of an exemplary format of the Service field provided in an embodiment of the present application;

[0029] Figure 5 A schematic diagram of the format of an exemplary A-MPDU aggregation packet provided in an embodiment of the present application;

[0030] Figure 6 A schematic diagram of a delay determination method provided in an embodiment of the present application Figure 2 ;

[0031] Figure 7 A schematic diagram of an exemplary communication scenario provided in an embodiment of the present application;

[0032] Figure 8 A schematic diagram of an exemplary message transmission delay provided in an embodiment of the present application;

[0033] Figure 9 A schematic diagram of the structure of a communication device provided in an embodiment of the present application Figure 1 ;

[0034] Figure 10 A schematic diagram of the structure of a communication device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION

[0035] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0036] The following will specifically describe the technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems through embodiments and in conjunction with the accompanying drawings. The following embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments.

[0037] In addition, the technical solutions described in the embodiments of the present application can be arbitrarily combined without conflict.

[0038] It should be noted that, in the embodiment of the present application, the segment delay of the message in the network can be as follows: Figure 1 The specific meanings of each delay are as follows:

[0039] Operating system path delay: It indicates the time required for the message to be generated, queued in the operating system protocol stack, and sent to the MAC send queue through the Wi-Fi driver. Figure 1 It is represented as T1-T0.

[0040] Media access path delay: It indicates the time required for a message to enter the sending queue of the MAC layer and then enter the sending control module. Figure 1 It is expressed as T2-T1.

[0041] Channel access delay: It indicates the time required for a message to be encapsulated into a Wi-Fi MAC protocol data unit (MPDU) and then sent in accordance with the 802.11 protocol to compete for a channel or the time required to wait for the peer end to allocate a sending opportunity. If the MPDU data packet containing the message fails to be sent, the time required for retransmission is also included. Figure 1 It is expressed as T3-T2.

[0042] Physical layer and radio frequency delay: The time from when the MAC layer sends the MPDU header to the PHY layer to when the symbol corresponding to the MPDU header appears on the air interface. This includes the time required for PHY coding and modulation, digital-to-analog conversion, and radio frequency path. Figure 1 It is expressed as T4-T3.

[0043] It should be noted that, in the embodiment of the present application, the transmission delay of the delay-sensitive message can cover various delays of the above-mentioned message in the unidirectional transmission stage. The delay determination method is described in detail below.

[0044] An embodiment of the present application provides a method for determining a time delay, which is executed on a first device. The first device can be any communication device such as a mobile phone or a tablet computer. Figure 2 A schematic diagram of a delay determination method provided in an embodiment of the present application Figure 1 .like Figure 2 As shown, in an embodiment of the present application, the delay determination method performed on the first device mainly includes the following steps:

[0045] S101. Determine a first device delay based on a first time when an application layer generates a first message and a second time when an antenna sends a signal corresponding to the first message.

[0046] In an embodiment of the present application, the first device may determine the first device delay based on a first time when the application layer generates the first message and a second time when the antenna sends a signal corresponding to the first message.

[0047] It should be noted that, in the embodiment of the present application, the first message is generated by the first device at the application layer, and the time when the application layer generates the first message is the first time.

[0048] In an embodiment of the present application, the first message is a delay-sensitive message. The first device can specifically identify whether the first message is a delay-sensitive message at the driver layer based on the message information in the first message and / or the special mark corresponding to the first message.

[0049] It should be noted that in the embodiments of the present application, the specific method in which the first device identifies the first message as a delay-sensitive message at the driver layer includes but is not limited to: identification based on protocol type, identification based on address value, identification based on port number, and notification of special marks applied by the upper layer.

[0050] It should be noted that, in an embodiment of the present application, the first device may estimate the second time based on the sending time of the signal corresponding to the first message from the MAC layer to the antenna and the transmission delay from the MAC layer to the antenna.

[0051] It should be noted that in the embodiments of the present application, the signal corresponding to the first message waits at the MAC layer for an opportunity to be transmitted to the antenna. The moment when the signal waits for the transmission opportunity is the transmission time from the MAC layer to the antenna. The transmission delay from the MAC layer to the antenna is generally fixed and can be measured in advance. The first device can specifically add the transmission delay from the MAC layer to the transmission time of the signal corresponding to the first message from the MAC layer to the antenna to use as the estimated second time.

[0052] It should be noted that in the embodiments of the present application, the first time is the time when the first message is generated, and the second time is the estimated time when the signal corresponding to the first message is sent from the first device. The first device can determine the time difference between the second time and the first time as the first device latency. The first device latency is actually the latency of the first message in the first device.

[0053] In an embodiment of the present application, the first device also synchronizes the clock domain of the MAC layer to the application layer through the driver layer and the operating system in sequence; the first time, the second time and the first device delay are the times based on the clock domain timing of the MAC layer.

[0054] It should be noted that the clock domains between different network layers may differ. To address this, the MAC layer's time domain can be used as a benchmark for synchronization across all layers. Specifically, the MAC layer can provide an interface to the driver layer for obtaining the MAC layer's clock domain. The driver layer can then provide an interface to the operating system layer for obtaining the MAC layer's clock domain. The operating system layer can then provide an interface to the application layer for obtaining the MAC layer's clock domain. In this way, the application layer can synchronize the MAC layer's clock domain, thereby recording time in the same clock domain. The first time, second time, and first device delay are all based on the MAC layer's clock domain, ensuring the accuracy of delay determination.

[0055] S102: Generate an MPDU based on the first message, where the MPDU includes delay information representing a delay of the first device stored in a first field.

[0056] In an embodiment of the present application, after determining the first device delay, the first device further generates an MPDU based on the first message, where the MPDU includes delay information representing the first device delay stored in the first field.

[0057] It should be noted that, in the embodiment of the present application, the first device may perform MAC layer encapsulation on the first message at the MAC layer, thereby generating an MPDU.

[0058] It should be noted that in the embodiment of the present application, the MPDU includes a first field, and the first field stores latency information indicating the latency of the first device, for example, data of a certain number of bits indicating the latency of the first device. The first field may be the HTC field of the MPDU header.

[0059] It should be noted that, in an embodiment of the present application, the MPDU may further include a latency indicator, which is used to indicate that the MPDU includes latency information of the first device. For example, it may be a control identifier controlID corresponding to the latency information. The latency indicator may also be stored in the first field, i.e., the HTC field.

[0060] Figure 3 The following is a schematic diagram of an exemplary format of the HTC field provided in the embodiment of the present application. Figure 3 As shown, in an embodiment of the present application, the HTC field uses a newly added delay indication identifier control ID, and the control ID indicates that the subsequent control information field is delay information indicating the delay of the first device.

[0061] It should be noted that the current HTC field has 26 bits available. The range that can be represented in microseconds is 0-67 seconds, the range that can be represented in 100 ns is 0-6.7 seconds, and the range that can be represented in 10 ns is 0-0.67 seconds. The range can be dynamically negotiated based on the required accuracy. Table 1 lists a method for dynamically negotiating the range, where A represents a positive integer value.

[0062] Table 1

[0063] Control ID value Representation range A 0-67s A+1 0-6.7s A+2 0-0.67s

[0064] If the length of the HTC field is subsequently extended, the field for writing the delay information can be dynamically extended together so that the field can represent a wider range and provide higher accuracy.

[0065] It should be noted that in an embodiment of the present application, the delay information representing the delay of the first device can be divided into two parts of data, one part of the data can be stored in the first field, that is, the HTC field, and the other part of the data can also be stored in the Service field when the MPDU is further encapsulated in the physical layer PHY.

[0066] Figure 4 The following is a schematic diagram of an exemplary format of the Service field provided in the embodiment of the present application. Figure 4 As shown, bit7-bit15 in the Service field in the PHY header is a reserved field, and bit7-bit15 can be used in combination with the HTC field to represent the delay information of the first device delay to increase its representation range or improve the representation accuracy.

[0067] S103: Send the MPDU to the second device.

[0068] In an embodiment of the present application, the first device may send the MPDU to the second device after generating the MPDU.

[0069] It should be noted that, in the embodiment of the present application, the first device may send the MPDU in a manner different from the aggregated MAC protocol data unit A-MPDU.

[0070] It should be noted that in an embodiment of the present application, the first device may determine to send the MPDU in a manner different from the A-MPDU when the driver layer identifies that the first message is a delay-sensitive message. For example, the first device may send the MPDU in a standalone manner.

[0071] It should be noted that the format of the A-MPDU aggregation packet is as follows: Figure 5 As shown, the protocol stipulates that when all MPDU messages of the same message type are aggregated and sent, the HTC field in the A-MPDU aggregation packet is the same, where T PHY+RF Indicates the transmission delay from the MAC layer to the antenna, T 1-1 Indicates the time when the message is obtained, T CURT1 、T CURT3 Indicates different times on the time axis. The time from the generation of the HTC field to the time the RF sends out each MPDU in an A-MPDU is actually different, such as Figure 5 As shown, the HTC field needs to be calculated when sub-MPDU1 is sent, but the actual delay-sensitive message is in sub-MPDU3 and should be expressed as T CURT3 To calculate the value of HTC, T CURT3 -T CURT1 To reduce such errors, it is proposed to send delay-sensitive packets in a non-A-MPDU aggregation mode.

[0072] It should be noted that, in an embodiment of the present application, after sending the MPDU to the second device, the first device may further perform the following steps: if no response to the MPDU is received from the second device, determine the updated first device delay based on the first time and the target time for the antenna to send the signal corresponding to the first message; the target time is after the second time; regenerate the MPDU based on the first message, the regenerated MPDU including delay information representing the updated first device delay stored in the first field; and send the regenerated MPDU to the second device.

[0073] An embodiment of the present application provides a method for determining a time delay, which is executed on a second device. Figure 6 A schematic diagram of a delay determination method provided in an embodiment of the present application Figure 2 .like Figure 6 As shown, the delay determination method performed on the second device mainly includes the following steps:

[0074] S201. Receive an MPDU from a first device; wherein the MPDU is generated by the first device based on a first message.

[0075] In an embodiment of the present application, the second device may receive the MPDU from the first device.

[0076] It should be noted that, in the embodiment of the present application, as described in the delay determination method executed by the first device, the MPDU is generated by the first device based on the first message.

[0077] It should be noted that, in an embodiment of the present application, when the second device receives the MPDU from the first device, it may also send a response to the MPDU to the first device to notify the first device that the MPDU sent by it has been received.

[0078] S202: Parse the MPDU to obtain delay information stored in the first field, indicating the delay of the first device.

[0079] In the embodiment of the present application, the first device receives the MPDU and can parse the MPDU to obtain the delay information stored in the first field.

[0080] It should be noted that in the embodiment of the present application, as described in the delay determination method executed by the first device end above, the MPDU includes delay information representing the delay of the first device stored in the first field. Based on this, the second device can parse the MPDU, thereby obtaining the delay information representing the delay of the first device from the first field therein, and thus obtain the delay of the first device based on the delay information.

[0081] It should be noted that, in the embodiment of the present application, the MPDU further includes a delay indication flag, and the delay indication flag is used to indicate that the MPDU includes delay information of the first device.

[0082] It should be noted that, in the embodiment of the present application, the second device can identify whether the first message is a delay-sensitive message based on the delay indication identifier.

[0083] S203: Determine the transmission delay of the first message based on the delay information and the delay of the second device.

[0084] In an embodiment of the present application, when the second device obtains the delay information, it can determine the transmission delay of the first message based on the delay information and the delay of the second device.

[0085] In an embodiment of the present application, the second device determines the second device delay based on the fourth time when the application layer receives the first message and the third time when the antenna receives the signal corresponding to the first message; the first message is parsed from the MPDU.

[0086] It should be noted that, in the embodiment of the present application, the second device estimates the third time based on the time when the MAC layer receives the first message and the transmission delay from the antenna to the MAC layer.

[0087] It should be noted that in the embodiments of the present application, the time at which the MAC receives the first message can be directly obtained, and the transmission delay from the antenna to the MAC is generally fixed and can be measured in advance. The second device can specifically subtract the transmission delay from the antenna to the MAC layer from the time at which the MAC layer receives the first message to obtain the estimated third time.

[0088] It should be noted that in the embodiments of the present application, the fourth time is the time at which the application layer receives the first message, and the third time is the estimated time at which the antenna receives the signal corresponding to the first message. The second device can determine the time difference between the fourth time and the third time as the second device latency. The second device latency is actually the latency of the first message in the second device.

[0089] In an embodiment of the present application, the second device also synchronizes the clock domain of the MAC layer to the application layer through the driver layer and the operating system in sequence; the third time, the fourth time and the delay of the second device are the times based on the clock domain timing of the MAC layer.

[0090] It can be understood that in the embodiment of the present application, the third time, the fourth time and the second device delay are all times based on the clock domain timing of the MAC layer, which ensures the accuracy of delay determination.

[0091] It is understood that in the embodiments of the present application, the second device can obtain the first device latency based on the latency information parsed from the MPDU. The first device latency is actually the latency in the first device from the time the first message is generated, and the second device latency is actually the latency in the second device after the first message is transmitted to the second device. Based on this, the second device can determine the sum of the first device latency and the second device latency as the transmission latency of the first message.

[0092] It should be noted that, in an embodiment of the present application, the second device determines the transmission delay of the first message, and may also consider the air interface transmission delay between the first device and the second device. Specifically, the second device may determine the sum of the air interface transmission delay, the first device delay, and the second device delay as the transmission delay of the first message.

[0093] It can be understood that in the embodiments of the present application, the air interface transmission delay between devices can be taken into account in the transmission delay of the first message to improve the accuracy of the final determination of the transmission delay. Of course, the air interface transmission delay can also be ignored. It can be determined according to actual needs and application scenarios, and the embodiments of the present application are not limited.

[0094] It should be noted that, in the embodiment of the present application, the measurement of the air interface transmission delay can be achieved by first measuring the air interface distance using the FTM protocol and then dividing the distance by the speed of light.

[0095] The following Figure 7 The communication scenario shown, and Figure 8 The method for determining one-way delay is fully described using the schematic diagram of message transmission delay as an example. A delay-sensitive message, namely the first message described above, is generated by device 1, forwarded by device 2, and finally reaches the application layer of device 3. In one scenario, device 1 can be a mobile phone, device 2 can be a router, and device 3 can be a television. The specific device types are not limited in this embodiment.

[0096] It should be noted that, in the embodiments of this application, Figure 8 APP in it represents the application layer, OS represents the operating system, and Driver represents the driver layer.

[0097] See also Figure 7 and Figure 8 ,The detailed steps for determining high-precision one-way delay include:

[0098] Step 1: Device 1 records the generation time T of a delay-sensitive message when it is generated at the application layer. 1-1 ;

[0099] Step 2: Device 1 identifies the message as a delay-sensitive message at the driver layer and determines to send it in a manner different from the A-MPDU. The identification method includes but is not limited to the protocol type, address value, port number, or special tag notification of the upper layer application.

[0100] Step 3: The delay-sensitive message passes through the driver layer of device 1 and reaches the sending queue and is sent in the queue.

[0101] Step 4: When the device 1 is about to send the HTC field of the message from the MAC layer, it calculates the transmission time T of the HTC field of the message at the antenna. 1-2 :

[0102] T 1-2 =T CURT1 +D (PHY+RF)1

[0103] Where T CURT1 is the transmission time from the MAC layer to the antenna, D (PHY+RF)1 It is the transmission delay from the MAC layer to the antenna. This delay is usually fixed and can be measured in advance.

[0104] Step 5: Device 1 calculates the message delay D1 at the MAC layer:

[0105] D1=T 1-2 -T 1-1

[0106] Step 6: Device 1 fills the delay indicator control ID in the HTC field of the message and fills the delay Daccu1 in the controlinformation field;

[0107] Because device 1 is a device that generates delay-sensitive messages, Daccu1 = D1.

[0108] Step 7: Device 1 sends the MPDU generated based on the message to the PHY layer at the MAC layer, and then sends it to the PHY layer of device 2 via the antenna.

[0109] It should be noted that, upon receiving the MPDU, device 2 will send a corresponding response to device 1. If device 1 does not receive a response from device 2, device 1 will wait for a transmission opportunity again from step 4.

[0110] Step 8: Device 2 can parse the MPDU sent by device 1, obtain the HTC field of the message at the MAC layer and parse out the Control ID, then determine that the message is a delay-sensitive message, and estimate the reception time T of the HTC field at the device 2 antenna. 2-1 , and the control information field is stored as the delay Daccu1.

[0111] T 2-1 =T CURT2 -D (RF+PHY)

[0112] Among them, T CURT2 is the time to receive the message at the MAC layer, D (RF+PHY) is the transmission delay from the antenna to the MAC layer.

[0113] Step 9: Device 2 sends the message along with the delay-sensitive tag at the MAC layer, and receives the message at time T 2-1 and delay Daccu1 and optional air interface transmission time D a1 Provided to the driver layer.

[0114] Step 10: Device 2 finds at the driver layer that the message needs to be forwarded to device 3, and from the information provided by the MAC layer, it is known that the message is a delay-sensitive message. Then, device 2 sends the message along with the receiving time T 2-1 and D accu1 are provided to the MAC layer, and the message is notified to be sent in an independent manner.

[0115] Step 11: The delay-sensitive message in device 2 waits for a sending opportunity at the MAC layer.

[0116] Step 12: When the device 2 is about to send the HTC field of the message, it calculates the sending time T of the HTC field of the message at the antenna. 2-2 :

[0117] T 2-2 =T CURT3 +D (PHY+RF)2

[0118] Where T CURT3 is the time sent at the MAC layer, D (PHY+RF)2 is the transmission delay from the MAC layer to the antenna.

[0119] Step 13: Device 2 calculates the delay D2 of the delay-sensitive message on the local device at the MAC layer:

[0120] D2=T 2-2 –T 2-1

[0121] Step 14: Device 2 fills the delay indicator control ID in the HTC field of the message and fills the accumulated delay Daccu2 in the controlinformation field;

[0122] Daccu2=D2+D a1 +Daccu1.

[0123] Step 15: Device 2 sends the MPDU generated based on the message from the MAC layer to the PHY layer, and then sends it to the PHY layer of device 3 via the antenna.

[0124] It should be noted that, upon receiving the MPDU, device 3 will send a corresponding response to device 2. If device 2 does not receive a response from device 3, device 2 will wait for a transmission opportunity again from step 12.

[0125] Step 16: Device 3 can parse the MPDU sent by device 2, obtain the HTC field of the message at the MAC layer and parse out the Control ID, then determine that the message is a delay-sensitive message, and estimate the reception time T of the HTC field at the antenna of device 3. 3-1 , and the control information field is stored as the accumulated delay Daccu2.

[0126] T 3-1 =T CURT4 -D (RF+PHY)3

[0127] Among them, T CURT4 is the time to receive the message at the MAC layer, D( RF+PHY)3 is the transmission delay from the antenna to the MAC layer.

[0128] Step 17: Device 3 sends the message along with the sensitive delay tag and the receiving time T at the MAC layer. 3-1 and Daccu2 and optional air interface transmission delay D a2Provided to the application layer.

[0129] Step 18: When device 3 receives the message at the application layer, it records the arrival time T of the message. 3-2 , and calculate Daccu3.

[0130] Daccu3=T 3-2 -T 3-1 +D a2 +Daccu2

[0131] Daccu3 is the transmission delay of the message.

[0132] It should be noted that in the embodiments of the present application, a method for identifying delay-sensitive messages at the driver layer using the message protocol type, address value, port number, or notification from the upper layer is proposed; a method for identifying messages as delay-sensitive messages based on the Control ID at the MAC layer is also proposed; a method for addressing the issue of inconsistent time acquisition between modules in a Wi-Fi device by using the MAC layer clock domain as a reference, with the MAC layer providing an interface to the Driver layer, the Driver to the OS layer, and the OS layer to the APP layer; a method for sending delay-sensitive messages in a non-A-MPDU aggregation manner is proposed, which reduces the error in delay calculation within each device caused by the A-MPDU sending method; a method for calculating the cumulative path delay of the message at the MAC layer and using the HTC field to carry the cumulative path delay of the message can provide each message with real-time delay on the complete path. This approach addresses the need for special messages or auxiliary devices to measure latency. The cumulative delay calculation takes into account the time Wi-Fi spends waiting for a transmission opportunity or the time it takes for a transmission failure to retransmit, improving the accuracy of delay calculation. The proposed method calculates the delay within the device at the MAC layer, compensating for the delay from the MAC layer to the RF layer, further improving the accuracy of delay measurement. The proposed method dynamically negotiates the required time accuracy in the HTC to meet the varying time accuracy requirements of different applications, or the time accuracy requirements of the same application at different times. The proposed method combines the HTC field with the reserved fields in the Service field to expand the range of delay representation or improve delay representation accuracy.

[0133] An embodiment of the present application provides a communication device. Figure 9 A schematic diagram of the structure of a communication device provided in an embodiment of the present application Figure 1 .like Figure 9 As shown, in an embodiment of the present application, the communication device 1 includes a processor 301, and the processor 301 is configured to:

[0134] Parsing delay information representing a delay of the first device stored in a first field from an MPDU received from the first device, wherein the MPDU is generated by the first device based on the first message;

[0135] A transmission delay of the first message is determined based on the delay information and a second device delay of the communication device.

[0136] In an embodiment of the present application, the MPDU further includes a delay indication flag, and the delay indication flag is used to indicate that the MPDU includes delay information of the first device.

[0137] In one embodiment of the present application, the processor 301 is further configured to:

[0138] The MPDU is sent in a different manner than an aggregated MAC protocol data unit A-MPDU.

[0139] In one embodiment of the present application, the processor 301 is further configured to:

[0140] The second time is estimated based on a sending time of a signal corresponding to the first message from the MAC layer to the antenna and a transmission delay from the MAC layer to the antenna.

[0141] In one embodiment of the present application, the processor 301 is further configured to:

[0142] At the driver layer, based on the message information in the first message and / or the special mark corresponding to the first message, it is identified whether the first message is a delay-sensitive message.

[0143] In one embodiment of the present application, the processor 301 is further configured to:

[0144] The clock domain of the MAC layer is synchronized to the application layer through the driver layer and the operating system in sequence; the first time, the second time and the first device delay are the times based on the clock domain timing of the MAC layer.

[0145] In one embodiment of the present application, the first field is the high throughput control HTC field of the MPDU header.

[0146] In an embodiment of the present application, the delay indication identifier is stored in the first field.

[0147] In one embodiment of the present application, the processor 301 is further configured to:

[0148] If no response to the MPDU is received from the second device, determining an updated first device latency based on the first time and a target time for the antenna to transmit a signal corresponding to the first message, wherein the target time is after the second time.

[0149] regenerating an MPDU based on the first message, where the regenerated MPDU includes the delay information representing the updated first device delay stored in the first field; and

[0150] Sending the regenerated MPDU to the second device.

[0151] Figure 10 A schematic diagram of the structure of a communication device provided in an embodiment of the present application Figure 2 .like Figure 10 As shown, in an embodiment of the present application, the communication device 2 includes: a processor 401, and the processor 401 is configured to:

[0152] Parsing delay information representing a delay of the first device stored in a first field from an MPDU received from the first device, wherein the MPDU is generated by the first device based on the first message;

[0153] A transmission delay of the first message is determined based on the delay information and a second device delay of the communication device.

[0154] In an embodiment of the present application, the MPDU further includes a delay indication flag, and the delay indication flag is used to indicate that the MPDU includes delay information of the first device.

[0155] In one embodiment of the present application, the processor 401 is further configured to:

[0156] Based on the delay indication identifier, it is identified whether the first message is a delay-sensitive message.

[0157] In one embodiment of the present application, the processor 401 is further configured to:

[0158] The second device delay is determined based on a fourth time when the application layer receives the first message and a third time when the antenna receives the signal corresponding to the first message; the first message is parsed from the MPDU.

[0159] In one embodiment of the present application, the processor 401 is further configured to:

[0160] The third time is estimated based on the time when the MAC layer receives the first message and the transmission delay from the antenna to the MAC layer.

[0161] In one embodiment of the present application, the processor 401 is further configured to:

[0162] The clock domain of the MAC layer is synchronized to the application layer through the driver layer and the operating system in sequence; the third time, the fourth time and the second device delay are the times based on the clock domain timing of the MAC layer.

[0163] An embodiment of the present application also provides a chip, including a processor, for calling and running a computer program from a memory, so that a communication device equipped with the chip executes the above-mentioned delay determination method executed on the first device side.

[0164] An embodiment of the present application further provides a chip, including a processor, configured to call and run a computer program from a memory, so that a communication device equipped with the chip executes the above-mentioned method for determining the delay at the second device end.

[0165] An embodiment of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the above-mentioned delay determination method when executed by a processor. The computer-readable storage medium can be a volatile memory (volatile memory), such as a random-access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk drive (HDD) or a solid-state drive (SSD); or it can be a respective device including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant

[0166] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments combining software and hardware. Furthermore, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage and optical storage, etc.) containing computer-usable program code.

[0167] The present application is described with reference to the implementation flow charts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flow charts and / or block diagrams, as well as the combination of processes and / or boxes in the flow charts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the implementation flow charts. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0168] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which is implemented in the implementation flow diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0169] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process described in the flowchart. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0170] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this utility model should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for determining a time delay, characterized in that: The method is executed on a first device, where the first device includes a wireless network Wi-Fi device, and includes: Determining a first device latency based on a first time when an application layer generates a first message and a second time when an antenna transmits a signal corresponding to the first message; wherein the second time is estimated by the first device based on a transmission time of the signal corresponding to the first message from a medium access control (MAC) layer in the Wi-Fi protocol to the antenna and a transmission delay from the MAC layer in the Wi-Fi protocol to the antenna; and determining the first device latency based on a time difference between the second time and the first time. generating a MAC protocol data unit (MPDU) in the Wi-Fi protocol based on the first message, wherein the MPDU includes delay information indicating the delay of the first device stored in a first field, or the MPDU includes a portion of the delay information indicating the delay of the first device stored in the first field and another portion of the delay information indicating the delay of the first device stored in a service field; the first field is a high throughput control (HTC) field of the MPDU header; and Sending the MPDU to a second device; If no response to the MPDU is received from the second device, determining an updated first device latency based on the first time and a target time for the antenna to transmit a signal corresponding to the first message, wherein the target time is after the second time. regenerating an MPDU based on the first message, where the regenerated MPDU includes the delay information representing the updated first device delay stored in the first field; and sending the regenerated MPDU to the second device; The method further comprises: When the driver layer identifies that the first message is a delay-sensitive message, sending the MPDU in an independent manner; The clock domain of the MAC layer in the Wi-Fi protocol is synchronized to the application layer through the interface, the driver layer, the operating system, and the first time, the second time, and the first device delay are times based on the clock domain timing of the MAC layer in the Wi-Fi protocol.

2. The method according to claim 1, wherein The MPDU further includes a delay indication flag, where the delay indication flag is used to indicate that the MPDU includes delay information of the first device delay.

3. The method according to claim 1, wherein The method further comprises: At the driver layer, based on the message information in the first message and / or the special mark corresponding to the first message, it is identified whether the first message is a delay-sensitive message.

4. The method according to claim 2, wherein The delay indication identifier is stored in the first field.

5. A method for determining a time delay, performed on a second device, the second device comprising a wireless network Wi-Fi device, the method comprising: Receive an MPDU (Media Access Control) in a Wi-Fi protocol from a first device; wherein the MPDU is generated by the first device based on a first message; the MPDU is independently sent by the first device when a driver layer identifies the first message as a delay-sensitive message; or, the MPDU is regenerated by the first device based on the first message; the regenerated MPDU includes delay information representing an updated first device delay stored in a first field; the updated first device delay is determined by a target time for the first device to transmit a signal corresponding to the first message based on a first time and an antenna if the first device does not receive a response from the second device to the MPDU; the target time is after a second time; Parsing the delay information representing the first device delay stored in the first field from the MPDU; or parsing a portion of the delay information representing the first device delay stored in the first field from the MPDU, and parsing another portion of the delay information representing the first device delay stored in the service field from the MPDU; adding the portion of the data and the another portion of the data to form the complete delay information representing the first device delay; the first field being a high throughput control (HTC) field of the MPDU header; as well as Determining a transmission delay of the first message based on the delay information and the second device delay; The first device latency is determined based on a time difference between a second time when the antenna transmits a signal corresponding to the first message and a first time when the application layer of the first device generates the first message; the second time is obtained by estimating a transmission time from the MAC layer in the Wi-Fi protocol to the antenna based on the signal corresponding to the first message, and a transmission delay from the MAC layer in the Wi-Fi protocol to the antenna; the first device synchronizes a clock domain of the MAC layer in the Wi-Fi protocol to the application layer via an interface, sequentially through the driver layer and the operating system; the first time, the second time, and the first device latency are times based on the clock domain timing of the MAC layer in the Wi-Fi protocol.

6. The method according to claim 5, wherein The MPDU further includes a delay indication flag, where the delay indication flag is used to indicate that the MPDU includes delay information of the first device.

7. The method according to claim 6, wherein The method further comprises: Based on the delay indication identifier, it is identified whether the first message is a delay-sensitive message.

8. The method according to claim 5, wherein The method further comprises: The second device delay is determined based on a fourth time when the application layer receives the first message and a third time when the antenna receives the signal corresponding to the first message; the first message is parsed from the MPDU.

9. The method according to claim 8, wherein The method further comprises: The third time is estimated based on the time when the MAC layer receives the first message and the transmission delay from the antenna to the MAC layer.

10. The method according to claim 8, wherein The method further comprises: The clock domain of the MAC layer is synchronized to the application layer through the driver layer and the operating system in sequence; the third time, the fourth time and the second device delay are the times based on the clock domain timing of the MAC layer.

11. A communication device is applied to a first device, characterized in that: comprising a processor configured to: Determining a first device latency based on a first time when an application layer generates a first message and a second time when an antenna transmits a signal corresponding to the first message; wherein the second time is estimated by the first device based on a transmission time of the signal corresponding to the first message from a medium access control (MAC) layer in the Wi-Fi protocol to the antenna and a transmission delay from the MAC layer in the Wi-Fi protocol to the antenna; and determining the first device latency based on a time difference between the second time and the first time. generating a MAC protocol data unit (MPDU) in the Wi-Fi protocol based on the first message, the MPDU including delay information indicating the delay of the first device stored in a first field, or the MPDU including a portion of the delay information indicating the delay of the first device stored in the first field and another portion of the delay information indicating the delay of the first device stored in a service field; the first field being a high throughput control (HTC) field of the MPDU header; If no response to the MPDU is received from the second device, determining an updated first device latency based on the first time and a target time for the antenna to transmit a signal corresponding to the first message, wherein the target time is after the second time; regenerating an MPDU based on the first message, where the regenerated MPDU includes the delay information representing the updated first device delay stored in the first field; The processor is further configured to: When the driver layer identifies that the first message is a delay-sensitive message, sending the MPDU in an independent manner; The clock domain of the MAC layer in the Wi-Fi protocol is synchronized to the application layer through the interface, the driver layer, the operating system, and the first time, the second time, and the first device delay are times based on the clock domain timing of the MAC layer in the Wi-Fi protocol.

12. A communication device is applied to a second device, characterized in that: comprising a processor configured to: Parse the delay information of the first device stored in the first field from the MPDU of the media access control MAC in the wireless network Wi-Fi protocol received from the first device; or parse a portion of the delay information of the first device stored in the first field from the MPDU, and parse another portion of the delay information of the first device stored in the service field from the MPDU; add the portion of the data and the other portion of the data to form the complete delay information of the first device; wherein the MPDU is generated by the first device based on the first message; ... If the driver layer identifies the first message as a delay-sensitive message, the first message is sent independently; or the MPDU is regenerated by the first device based on the first message; the regenerated MPDU includes delay information representing an updated first device delay stored in a first field; the updated first device delay is determined by a target time for the first device to transmit a signal corresponding to the first message based on a first time and an antenna if the first device does not receive a response from the second device to the MPDU; the target time is after a second time; the first field is a high throughput control (HTC) field in the MPDU header; determining a transmission delay of the first message based on the delay information and a second device delay of the second device; The first device latency is determined based on a time difference between a second time when the antenna transmits a signal corresponding to the first message and a first time when the application layer of the first device generates the first message; the second time is obtained by estimating a transmission time from the MAC layer in the Wi-Fi protocol to the antenna based on the signal corresponding to the first message, and a transmission delay from the MAC layer in the Wi-Fi protocol to the antenna; the first device synchronizes a clock domain of the MAC layer in the Wi-Fi protocol to the application layer via an interface, sequentially through the driver layer and the operating system; the first time, the second time, and the first device latency are times based on the clock domain timing of the MAC layer in the Wi-Fi protocol.

13. A chip, characterized in that: The chip comprises a processor configured to call and run a computer program from a memory, so that a communication device equipped with the chip executes the delay determination method according to any one of claims 1 to 4.

14. A chip, characterized in that: The chip comprises a processor configured to call and run a computer program from a memory, so that a communication device equipped with the chip executes the delay determination method according to any one of claims 5 to 10.

15. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the delay determination method according to any one of claims 1 to 10 is implemented.

Citation Information

Patent Citations

  • Method and device for media business quality measurement

    WO2016176857A1

  • Communication method and communication device

    WO2017193308A1