Method and system for realizing time synchronization based on wireless management message

By adding time information to the Beacon and Probe messages in IEEE 802.11 wireless networks, the terminal device can realize time synchronization, solving the needs of additional protocols, improving compatibility and reducing resource usage.

CN120018265APending Publication Date: 2025-05-16CHINA ELECTRONICS TECHNOLOGY AVIONICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510171383.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-17
Publication Date
2025-05-16

AI Technical Summary

Technical Problem

In IEEE 802.11 wireless networks, mobile devices need to use additional communication protocols such as NTP or SNTP to achieve time synchronization, resulting in an increase in the air interface resource burden.

Method used

By adding vendor custom fields with time information in Beacon messages and Probe messages, the terminal device can directly obtain time information from these messages and update the system time when connecting to wireless access point devices.

Benefits of technology

This method solves the problem that wireless transmission networks need to use additional protocols to achieve time synchronization, improves device compatibility, and reduces the use of air interface resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120018265A_ABST
    Figure CN120018265A_ABST
Patent Text Reader

Abstract

The invention discloses a method for realizing time synchronization based on a wireless management message, which comprises the following steps: when a terminal device is connected with a wireless access point device, receiving a Beacon message or a Probe interactive message broadcasted by the wireless access point device, the Beacon message or the Probe interactive message carrying a manufacturer custom field of time information; the terminal equipment processes the Beacon message or the Probe interactive message to obtain the processed time information; and updating the system time of the terminal equipment according to the processed time information. According to the method, the manufacturer self-defined fields with the time information are added in the Beacon message and the Probe message, so that extra protocol messages do not need to be generated, and the occupation of air interface resources due to equipment time synchronization is reduced. The Beacon message and the Probe message are broadcast messages and are sent at the lowest rate, so that the management message can be received by different types of equipment in the network.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of computer networks, and in particular to a method and system for realizing time synchronization based on wireless management messages. Background Art

[0002] Currently, many critical applications rely on time synchronization between devices in the network:

[0003] 1. In a distributed system, time synchronization is the key to maintaining data consistency. Each node needs to share a unified time reference to avoid data conflicts and errors caused by time inconsistencies.

[0004] 2. Many security protocols and systems rely on timestamps to authenticate and authorize operations. Time synchronization ensures the accuracy and consistency of timestamps, thereby ensuring the security of the system.

[0005] 3. In system logging and troubleshooting, accurate timestamps help quickly locate and solve problems. Time synchronization ensures the time order and consistency of events in the log.

[0006] 4. Time synchronization is very important for the correct function of network communication protocols. In communications involving multiple parties, ensuring the consistency of message timestamps is the basis for ensuring smooth communication.

[0007] 5. For applications that require real-time processing, time synchronization ensures the real-time and accuracy of data.

[0008] The popularity of WiFi wireless devices has promoted the informatization process of modern society. With the continuous evolution of technology, WiFi has penetrated almost every home, office and public place, providing users with a convenient and high-speed wireless network access experience. It not only allows people to access the Internet anytime and anywhere, and enjoy diversified services such as online entertainment, distance education, and remote office, but also promotes the rapid development of emerging technologies such as smart homes and the Internet of Things, greatly enriching people's lifestyles and work patterns. Therefore, achieving time synchronization between various devices in a WiFi network is the basis for improving network stability and expanding network functions.

[0009] Currently, in IEEE 802.11 wireless networks, frequency synchronization has been achieved between APs and mobile devices, but if mobile devices want to achieve time synchronization, they still need to use communication protocols such as NTP or SNTP, which undoubtedly increases the burden on air interface resources. Summary of the invention

[0010] The purpose of the present invention is to provide a method and system for realizing time synchronization based on wireless management messages, so as to solve the technical problems existing in the prior art.

[0011] The present invention is achieved through the following technical solutions:

[0012] In a first aspect, an embodiment of the present invention provides a method for implementing time synchronization based on a wireless management message, comprising:

[0013] When the terminal device is connected to the wireless access point device, it receives the Beacon message or the Probe interactive message broadcast by the wireless access point device, wherein the Beacon message or the Probe interactive message contains a manufacturer-defined field with time information;

[0014] The terminal device processes the Beacon message or the Probe interactive message to obtain the processed time information;

[0015] Update the system time of the terminal device according to the processed time information.

[0016] In a second aspect, an embodiment of the present invention provides a system for implementing time synchronization based on wireless management messages, including: a terminal device and a wireless access point device, when the terminal device is connected to the wireless access point device, the terminal device receives a Beacon message or a Probe interactive message broadcast by the wireless access point device, wherein the Beacon message or the Probe interactive message contains a manufacturer-defined field with time information;

[0017] The terminal device processes the Beacon message or the Probe interactive message to obtain the processed time information;

[0018] The terminal device updates the system time of the terminal device according to the processed time information.

[0019] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0020] The embodiment of the present invention provides a method and system for realizing time synchronization based on wireless management messages, which is based on the IEEE 802.11 wireless transmission protocol and solves the problem that the wireless transmission network needs to use additional protocols to realize time synchronization by adding a manufacturer-defined field with time information in Beacon messages and Probe messages.

[0021] The time information is carried in Beacon messages and Probe messages, which improves the compatibility of devices. Since Beacon messages and Probe messages are broadcast messages and are sent at the lowest rate, devices of different models in the network can receive this management message.

[0022] At the same time, the time information is carried in the IEEE 802.11 protocol message, reducing the occupation of air interface resources due to device time synchronization. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the exemplary embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without creative work. In the drawings:

[0024] Figure 1 It is a flowchart of the WIFI connection process;

[0025] Figure 2 A flowchart of a method for implementing time synchronization based on wireless management messages provided in the first embodiment of the present invention;

[0026] Figure 3 Customize field format diagrams for manufacturers;

[0027] Figure 4 This is the format diagram of the manufacturer-defined field in the Beacon message;

[0028] Figure 5 This is a schematic diagram of the Probe message synchronization principle;

[0029] Figure 6 A structural block diagram of a system for implementing time synchronization based on wireless management messages provided in another embodiment of the present invention. DETAILED DESCRIPTION

[0030] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments and drawings. The exemplary embodiments of the present invention and their description are only used to explain the present invention and are not intended to limit the present invention.

[0031] Example 1

[0032] like Figure 1As shown in the figure, during the process of the terminal device connecting to the AP, the interaction process and sequence of the messages usually follow certain rules, including discovery, authentication, association and other stages. According to this process, the terminal device can successfully connect to the wireless access point device. In the discovery stage, the main function of the Beacon frame is to broadcast the existence of the network so that nearby wireless devices can discover and connect to the network. The terminal device actively sends a probe request frame (Probe Request), indicating that the terminal device wants to join a certain network. The probe request frame usually carries the network SSID (Service Set Identifier) ​​and supported rates (Supported Rates). After receiving the probe request frame, the wireless access point (AP) device will reply with a probe response frame (Probe Response) message. The probe response frame contains the SSID, MAC address and supported encryption methods of the wireless access point device. The terminal device decides whether to join the network based on this information.

[0033] like Figure 2 As shown, a method for implementing time synchronization based on a wireless management message provided by an embodiment of the present invention includes:

[0034] When the terminal device is connected to the wireless access point device, it receives the Beacon message or Probe interactive message broadcast by the wireless access point device. The Beacon message or Probe interactive message contains a manufacturer-defined field with time information.

[0035] The terminal device processes the Beacon message or the Probe interactive message to obtain the processed time information;

[0036] Update the system time of the terminal device according to the processed time information.

[0037] In the embodiment of the present invention, during the process of the terminal device connecting to the AP, the communication messages Beacon, Probe Request, and Probe Response between the terminal device and the AP device may contain a manufacturer-defined field. Therefore, by specifying a manufacturer-defined field, which contains time information, time synchronization between the AP device and the terminal device can be achieved. Figure 3 As shown in the figure, the manufacturer-defined field includes: 1-byte element number, 1-byte field length, 3-byte organization identifier and 4-byte first time information, and may also include 4-byte second time information. The element number is 221 specified by the IEEE 802.11 protocol, which is a manufacturer-defined field; the field length is the actual length of this field; the organization identifier is the manufacturer information; the first time information is the local time of the device when sending the message, and the second time is the local time of the device when receiving the previous message.

[0038] The first method is to use Beacon messages to synchronize time. This method is suitable for devices that do not require high accuracy. In the manufacturer-defined field of the non-interactive Beacon message, add the time when the message was sent. Figure 4 As shown in FIG. 1 , the manufacturer-defined field includes a 1-byte element number, a 1-byte field length, a 3-byte organization identifier, and a 4-byte time information, with a total length of 9 bytes. The time information is the time when the wireless access point device sends the current Beacon message.

[0039] After receiving the Beacon message, the terminal device identifies the specified SSID, extracts the time information in the message, and updates the extracted time to the system time of the terminal device. This method ignores the transmission time of the Beacon message and considers the coverage of the wireless network. If the message transmission time is not considered, the impact on the time synchronization accuracy is tens to hundreds of nanoseconds. Therefore, this method is suitable for devices with low accuracy requirements.

[0040] The second method: Use Probe messages to synchronize time. Probe messages are interactive messages between AP devices and terminal devices. This method is suitable for devices that require high time synchronization accuracy, such as Figure 5 As shown in the figure, the specific method for the terminal device to process the Probe interactive message is as follows:

[0041] 1) The terminal device sends a probe request frame message to the wireless access point device. The probe request frame message contains a manufacturer-defined field with a total length of 9 bytes. The time information is the time when the terminal device sends the current Probe Request message, recorded as T1;

[0042] 2) The terminal device receives the probe response frame message sent by the wireless access point device and records the time when the probe response frame message is received, wherein the time information in the probe response frame message includes the time when the probe request frame message is received and the time when the probe response frame message is sent, the time when the wireless access point device receives the probe request frame message is recorded as T2, the time when the wireless access point device sends the probe response frame message is recorded as T3, and the time when the terminal device receives the probe response frame message is recorded as T4;

[0043] 3) The formula for calculating the message transmission time based on T1, T2, T3, and T4 is:

[0044]

[0045] 4) The calculation formula for the time difference between the terminal device and the wireless access point device is:

[0046] Time difference = T2-T1-transmission time;

[0047] 5) Update the system time of the terminal device with the time obtained by adding the current time of the terminal device and the time difference.

[0048] By carrying time information on the Probe message, the time synchronization between the terminal device and the wireless access point device is realized. From the two processes of the terminal device's request and the wireless access point device's response, the transmission time of the protocol message can be calculated. In this way, the time difference between the terminal device and the wireless access point device is further calculated, and the time obtained by adding the time difference and the current time of the terminal device is used to update the system time of the terminal device, so that the time synchronization effect is more accurate. Therefore, this method is suitable for devices with high requirements for time synchronization accuracy.

[0049] The method for implementing time synchronization based on wireless management messages provided by an embodiment of the present invention has the following advantages:

[0050] Based on the IEEE 802.11 wireless transmission protocol, the manufacturer-defined field with time information added to Beacon and Probe messages solves the problem that wireless transmission networks need additional protocols to achieve time synchronization.

[0051] The time information is carried in Beacon messages and Probe messages, which improves the compatibility of devices. Since Beacon messages and Probe messages are broadcast messages and are sent at the lowest rate, devices of different models in the network can receive this management message;

[0052] At the same time, the time information is carried in the IEEE 802.11 protocol message, reducing the occupation of air interface resources due to device time synchronization.

[0053] like Figure 6 As shown, another embodiment of the present invention provides a system for implementing time synchronization in a wireless management message, including: a terminal device and a wireless access point device, when the terminal device is connected to the wireless access point device, the terminal device receives a Beacon message or a Probe interactive message broadcast by the wireless access point device, wherein the Beacon message or the Probe interactive message contains a manufacturer-defined field containing time information;

[0054] The terminal device processes the Beacon message or Probe interactive message and obtains the time information;

[0055] The terminal device updates the system time of the terminal device according to the time information.

[0056] The manufacturer-defined field includes the element number, field length, organization identifier, and time information. The element number is 221 as specified in the IEEE 802.11 protocol. The field length is the actual length of the field. The organization identifier is the manufacturer information. The time information includes the local time of the device when the message is sent. The manufacturer-defined field time information in the ProbeResponse message sent by the wireless access point device to the terminal device also includes the local time of the device when the previous message was received.

[0057] The terminal device includes a Beacon message analysis module, which is used to identify a specified SSID from a Beacon message, extract time information from the Beacon message, and use the extracted time information to update the system time of the terminal device.

[0058] The Beacon message analysis module is suitable for devices with low accuracy requirements. In the manufacturer-defined field of the non-interactive Beacon message, add the time when the message is sent. The manufacturer-defined field includes a 1-byte element number, a 1-byte field length, a 3-byte organization identifier, and a 4-byte time information, with a total length of 9 bytes. The time information is the time when the wireless access point device sends the current Beacon message.

[0059] After the terminal device receives the Beacon message, the Beacon message analysis module identifies the specified SSID from the Beacon message, extracts the time information in the message, and updates the extracted time to the system time of the terminal device. Since the transmission time of the Beacon message is ignored, considering the coverage of the wireless network, if the message transmission time is not considered, the impact on the time synchronization accuracy is tens to hundreds of nanoseconds. Therefore, the Beacon message analysis module is suitable for devices with low accuracy requirements.

[0060] The terminal device includes a Probe interactive message analysis module, which sends a probe request frame message to the wireless access point device, wherein the time information is the time when the terminal device sends the current probe request frame message, which is recorded as T1;

[0061] The terminal device receives the probe response frame message sent by the wireless access point device and records the time when the probe response frame message is received, wherein the time information in the probe response frame message includes the time when the probe request frame message is received and the time when the probe response frame message is sent, the time when the wireless access point device receives the probe request frame message is recorded as T2, the time when the wireless access point device sends the probe response frame message is recorded as T3, and the time when the terminal device receives the probe response frame message is recorded as T4;

[0062] The formula for calculating the message transmission time based on T1, T2, T3, and T4 is:

[0063]

[0064] The calculation formula for the time difference between the terminal device and the wireless access point device is:

[0065] Time difference = T2-T1-transmission time;

[0066] Update the system time of the terminal device with the time obtained by adding the current time of the terminal device and the time difference.

[0067] By carrying time information on the Probe message, the time synchronization between the terminal device and the wireless access point device is realized. From the two processes of the terminal device's request and the wireless access point device's response, the Probe interactive message analysis module can calculate the transmission time of the protocol message, and further calculate the time difference between the terminal device and the wireless access point device, and use the time difference and the current time of the terminal device to add to the time to update the system time of the terminal device, so that the time synchronization effect is more accurate. Therefore, the Probe interactive message analysis module is suitable for devices with high requirements for time synchronization accuracy.

[0068] The system for implementing time synchronization based on wireless management messages provided by an embodiment of the present invention has the following advantages:

[0069] Based on the IEEE 802.11 wireless transmission protocol, the manufacturer-defined field with time information added to Beacon and Probe messages solves the problem that wireless transmission networks need additional protocols to achieve time synchronization.

[0070] The time information is carried in Beacon messages and Probe messages, which improves the compatibility of devices. Since Beacon messages and Probe messages are broadcast messages and are sent at the lowest rate, devices of different models in the network can receive this management message;

[0071] At the same time, the time information is carried in the IEEE 802.11 protocol message, reducing the occupation of air interface resources due to device time synchronization.

[0072] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for implementing time synchronization based on wireless management messages, characterized in that: include: When the terminal device is connected to the wireless access point device, it receives the Beacon message or the Probe interactive message broadcast by the wireless access point device, wherein the Beacon message or the Probe interactive message contains a manufacturer-defined field with time information; The terminal device processes the Beacon message or the Probe interactive message to obtain the processed time information; Update the system time of the terminal device according to the processed time information.

2. The method according to claim 1, characterized in that The manufacturer-defined field includes: element number, field length, organization identifier and time information, and the element number is 221 specified in the IEEE 802.11 protocol; The field length is the actual length of the field; The organization identifier is manufacturer information; The time information includes the local time of the device when the message is sent.

3. The method according to claim 2, characterized in that The time information also includes the local time of the device when the previous message was received.

4. The method according to claim 1 or 2, characterized in that: The specific method for the terminal device to process the Beacon message includes: Identify the specified SSID from the Beacon message; Extract the time information in the Beacon message and use the extracted time information to update the system time of the terminal device.

5. The method according to claim 1 or 3, characterized in that: The specific method for the terminal device to process the Probe interactive message includes: The terminal device sends a probe request frame message to the wireless access point device, wherein the time information is the time when the terminal device sends the current probe request frame message, which is recorded as T1; The terminal device receives the probe response frame message sent by the wireless access point device and records the time when the probe response frame message is received, wherein the time information in the probe response frame message includes the time when the probe request frame message is received and the time when the probe response frame message is sent, the time when the wireless access point device receives the probe request frame message is recorded as T2, the time when the wireless access point device sends the probe response frame message is recorded as T3, and the time when the terminal device receives the probe response frame message is recorded as T4; The formula for calculating the message transmission time based on T1, T2, T3, and T4 is: The calculation formula for the time difference between the terminal device and the wireless access point device is: Time difference = T2-T1-transmission time; Update the system time of the terminal device with the time obtained by adding the current time of the terminal device and the time difference.

6. A system for implementing time synchronization based on wireless management messages, characterized in that: include: The terminal device and the wireless access point device, when the terminal device is connected to the wireless access point device, the terminal device receives a Beacon message or a Probe interactive message broadcast by the wireless access point device, wherein the Beacon message or the Probe interactive message contains a manufacturer-defined field with time information; The terminal device processes the Beacon message or the Probe interactive message to obtain the processed time information; The terminal device updates the system time of the terminal device according to the processed time information.

7. The system according to claim 5, characterized in that The manufacturer-defined field includes an element number, a field length, an organization identifier, and time information, and the element number is 221 as specified in the IEEE 802.11 protocol; The field length is the actual length of the field; The organization identifier is manufacturer information; The time information includes the local time of the device when the message is sent.

8. The system according to claim 6, characterized in that The time information also includes the local time of the device when the previous message was received.

9. The system according to claim 6 or 7, characterized in that: The terminal device includes a Beacon message analysis module, which is used to identify a specified SSID from a Beacon message, extract time information from the Beacon message, and use the extracted time information to update the system time of the terminal device.

10. The system according to claim 6 or 8, characterized in that: The terminal device includes a Probe interactive message analysis module, which sends a probe request frame message to the wireless access point device, wherein the time information is the time when the terminal device sends the current probe request frame message, which is recorded as T1; The terminal device receives the probe response frame message sent by the wireless access point device and records the time when the probe response frame message is received, wherein the time information in the probe response frame message includes the time when the probe request frame message is received and the time when the probe response frame message is sent, the time when the wireless access point device receives the probe request frame message is recorded as T2, the time when the wireless access point device sends the probe response frame message is recorded as T3, and the time when the terminal device receives the probe response frame message is recorded as T4; The formula for calculating the message transmission time based on T1, T2, T3, and T4 is: The calculation formula for the time difference between the terminal device and the wireless access point device is: Time difference = T2-T1-transmission time; Update the system time of the terminal device with the time obtained by adding the current time of the terminal device and the time difference.