Method, device, system and apparatus for calibrating reference time under power saving mechanism
Patent Information
- Application Number
- CN202611129659.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-28
- Publication Date
- 2026-10-27
AI Technical Summary
但在上述低功耗方案中,STA在部分工作场景下可能长时间不接收完整的DTIM帧,而未能获取TSF时间戳,导致本地基准时间长期无法得到校准
[0017]本发明提供的省电机制下基准时间校准方法、装置、系统及设备,通过由睡眠唤醒管理模块在低功耗睡眠过程中自动获取本地记录信息与DTIM帧中的信标帧承载信息,并根据时间同步信息与本地基准时间之间的偏差程度,结合连续未更新次数进行基准时间校准,实现了由硬件逻辑自主完成TSF的实时检测和自动校准,无需唤醒主控电路即可消除AP与STA之间的时间基准累积偏差,在保证低功耗性能的同时确保了通信系统的长期稳定性。
Smart Images

Figure CN122994885A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wireless communication technology, and in particular to a reference time calibration method, apparatus, system and device under a power-saving mechanism. Background Technology
[0002] In IoT (Internet of Things) applications, Wi-Fi devices typically employ the DTIM (Delivery Traffic Indication Message) power-saving mechanism from the IEEE 802.11 standard to reduce power consumption. Under this mechanism, the STA (Station, i.e., Wi-Fi receiver) enters sleep mode when there are no data transmission or reception tasks, waking up only at a preset DTIM time to receive DTIM frames broadcast by the AP (Access Point). DTIM frames are Beacon frames carrying DTIM indication information. The DTIM frame carries a timestamp field, used to broadcast the AP's TSF (Timing Synchronization Function) time value to the STA. The STA uses this to calibrate its local reference time, thereby maintaining network-wide time synchronization.
[0003] To further reduce power consumption, existing technologies propose automatically parsing relevant fields in the DTIM frame during reception to determine if there is any buffered data. If no buffered data is confirmed to be waiting to be received, reception is immediately stopped and the device re-enters sleep mode without waiting for the complete frame to be received or waking up the main control circuit. This approach can significantly reduce the average power consumption of the device, but it also introduces new technical challenges: Because the AP and STA use independent crystal oscillators, manufacturing deviations and temperature drift are inevitable in the crystal frequencies. Under normal 802.11 power-saving mechanisms, the STA calibrates its local reference time in real time by fully receiving DTIM frames and parsing their TSF timestamps. However, in the aforementioned low-power solution, the STA may not receive complete DTIM frames for extended periods in some scenarios, thus failing to obtain the TSF timestamps and resulting in prolonged periods without local reference time calibration. Over time, the time discrepancy between the AP and STA gradually accumulates. When the discrepancy exceeds a certain threshold, it will affect the STA's normal reception timing of Beacon frames, and may even cause the STA to miss buffered data notifications sent by the AP, potentially jeopardizing the stability of the entire communication system.
[0004] Therefore, how to ensure that the Wi-Fi receiver can maintain time synchronization with the AP while ensuring low power consumption performance has become an urgent technical problem to be solved. Summary of the Invention
[0005] The purpose of this invention is to provide a reference time calibration method, device, system and equipment under a power-saving mechanism, so as to ensure the long-term stable operation of the communication system through a hardware-autonomous TSF calibration mechanism while ensuring low power consumption performance.
[0006] In a first aspect, the present invention provides a reference time calibration method under a power-saving mechanism, applied to the sleep-wake management module of a Wi-Fi receiver, comprising: During low-power sleep, when the preset wake-up time is reached, the receiving module is woken up to obtain the DTIM frame and acquire local recording information. The local recording information includes the local reference time and the number of consecutive times without updating. The number of consecutive times without updating is the number of times the local reference time has been continuously and successfully updated during the sleep process. Upon detecting a DTIM frame, beacon frame bearer information is obtained from the DTIM frame. The beacon frame bearer information includes the time synchronization information broadcast by the AP. Based on the degree of deviation between the time synchronization information and the local reference time, and combined with the number of consecutive times without updating, the reference time is calibrated.
[0007] In an optional implementation, the time synchronization information is the actual TSF value; after detecting a DTIM frame, the beacon frame bearer information is obtained from the DTIM frame, including: After detecting the frame header of the DTIM frame, the actual TSF value is obtained from the timestamp field of the frame body of the DTIM frame.
[0008] In an optional implementation, the locally recorded information further includes a first beacon interval, and the beacon frame bearer information further includes a second beacon interval; after detecting a DTIM frame and obtaining the beacon frame bearer information from the DTIM frame, the reference time calibration method under the power-saving mechanism further includes: Determine whether the first beacon interval and the second beacon interval are consistent; If there is a discrepancy, the time synchronization information is determined to be unreliable, and reference time calibration is not performed.
[0009] In an optional implementation, the local reference time is the TSF statistical value recorded from the start of sleep, and the time synchronization information is the actual TSF value; based on the degree of deviation between the time synchronization information and the local reference time, and combined with the number of consecutive times without updating, reference time calibration is performed, including: The TSF offset is calculated based on the TSF statistics and the actual TSF value. If the TSF offset exceeds the preset reasonable TSF offset threshold, or the number of consecutive no-updates exceeds the preset consecutive no-update threshold, then continue receiving DTIM frames, update the local reference time, and reset the consecutive no-update count.
[0010] In an optional implementation, the beacon frame carrying information also includes data buffer information; the reference time calibration method under the power-saving mechanism further includes: If the TSF offset does not exceed the reasonable TSF offset threshold, the number of consecutive no-updates does not exceed the consecutive no-update threshold, and the data buffer information indicates that there is no data to be received, then it is determined not to update the local reference time, the reception of DTIM frames is stopped, and the number of consecutive no-updates is incremented before entering the sleep state.
[0011] In an optional implementation, the reference time calibration method under the power-saving mechanism further includes: If the TSF offset does not exceed the reasonable TSF offset threshold, and the number of consecutive no-updates does not exceed the consecutive no-update threshold, and the data buffer information indicates that there is data to be received, then the reception of the DTIM frame is completed, the local reference time is updated and the number of consecutive no-updates is reset, and the wake-up process is initiated.
[0012] Secondly, the present invention provides a reference time calibration device under a power-saving mechanism, applied to the sleep-wake management module of a Wi-Fi receiver, comprising: The wake-up unit is used to wake up the receiving module to obtain DTIM frames and local recording information when a preset wake-up time is reached during low-power sleep. The local recording information includes the local reference time and the number of consecutive times without updates. The number of consecutive times without updates is the number of times the local reference time has been continuously and successfully updated during sleep. The acquisition unit is used to acquire beacon frame bearer information from the DTIM frame after detecting the DTIM frame. The beacon frame bearer information includes the time synchronization information broadcast by the AP. The calibration unit is used to calibrate the reference time based on the degree of deviation between the time synchronization information and the local reference time, combined with the number of consecutive times it has not been updated.
[0013] Thirdly, the present invention provides a reference time calibration system under a power-saving mechanism, applied to a Wi-Fi receiver, including a sleep-wake management module and a receiving module, wherein the receiving module is connected to the sleep-wake management module; the sleep-wake management module is used to execute the reference time calibration method under the power-saving mechanism of any of the foregoing embodiments.
[0014] In an optional implementation, it also includes a main control circuit and a storage module that are respectively connected to the sleep wake-up management module; The main control circuit is used to configure low-power parameters in normal operating mode and to be in sleep mode in low-power mode; the low-power parameters include the sleep cycle of the sleep wake-up management module.
[0015] The storage module is used to maintain locally recorded information during low-power sleep.
[0016] Fourthly, the present invention provides a Wi-Fi device including a reference time calibration system under the power-saving mechanism of the aforementioned embodiments.
[0017] The power-saving time calibration method, apparatus, system, and device provided by this invention automatically acquires local recorded information and beacon frame carrying information in DTIM frames during low-power sleep by the sleep wake-up management module. Based on the degree of deviation between the time synchronization information and the local reference time, and combined with the number of consecutive times without updating, the reference time is calibrated. This enables real-time detection and automatic calibration of TSF autonomously by hardware logic. It can eliminate the accumulated time reference deviation between AP and STA without waking up the main control circuit, ensuring the long-term stability of the communication system while maintaining low power consumption performance. Attached Figure Description
[0018] To more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0019] Figure 1 A schematic flowchart of a reference time calibration method under a power-saving mechanism provided in an embodiment of the present invention; Figure 2 This is a schematic diagram of a reference time calibration device under a power-saving mechanism provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of a reference time calibration system under a power-saving mechanism provided in an embodiment of the present invention; Figure 4 This is a schematic diagram of the architecture of a reference time calibration system under a power-saving mechanism provided in an embodiment of the present invention; Figure 5 This is a schematic diagram of the workflow of a reference time calibration system under a power-saving mechanism, provided in an embodiment of the present invention. Figure 6 A schematic diagram of the frame body format of a DTIM frame provided in an embodiment of the present invention; Figure 7 This is a timing flowchart of the low-power sleep process under existing low-power solutions; Figure 8 This is a timing flowchart of a low-power sleep process provided in an embodiment of the present invention. Detailed Implementation
[0020] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0021] For IoT devices with high power consumption requirements, the DTIM mechanism in the Wi-Fi 802.11 protocol is typically used for periodic sleep and wake-up operations. To further reduce power consumption, the STA immediately enters sleep mode when it confirms that there is no local buffered data to receive. In some operating scenarios, this method may fail to obtain the TSF timestamp due to the inability to receive complete DTIM frames for an extended period, resulting in the local reference time being unable to be calibrated for a long time.
[0022] Receiving the entire DTIM frame ensures effective TSF updates, but if there is no cached data to receive, the act of receiving the entire DTIM frame itself will generate unnecessary power consumption, which contradicts the low-power design goal of IoT devices.
[0023] Therefore, existing technical solutions cannot achieve a balance between system stability and extremely low power consumption.
[0024] Based on this, embodiments of the present invention provide a reference time calibration method, device, system and equipment under a power-saving mechanism. In the low-power scenario of sleep-wake-up of the DTIM mechanism, the hardware logic autonomously completes the TSF check and calibration. The whole process does not require additional wake-up of the main control circuit. It can meet the low power consumption requirements of device operation and ensure the long-term stability of the communication system through automatic TSF calibration.
[0025] The key terms involved in the embodiments of this invention are explained as follows: 1. DTIM: A core power-saving mechanism in the Wi-Fi 802.11 standard, introduced in version 802.11b. Its basic principle is as follows: The AP periodically sends Beacon frames, carrying a DTIM frame every few Beacon frames; STAs enter sleep mode when there is no data transmission or reception, waking up only during DTIM. The AP uses the Traffic Indication Bitmap in the DTIM frame to notify each STA whether there is buffered data to be received; once a STA finds that its corresponding bit is set (i.e., there is buffered data to be received), it exits sleep mode, completes data exchange, and then enters sleep mode again.
[0026] 2. Beacon Frame: A management frame periodically broadcast by the AP in an 802.11 Wi-Fi network. It is used to announce the existence of the network, synchronize the network clock, and transmit network parameters, such as SSID (Service Set Identifier), transmission rate, encryption method, etc. The Timestamp field in the Beacon frame body carries the AP's TSF timestamp for associated STAs to synchronize their time.
[0027] 3. TBTT (Target Beacon Transmission Time): The predetermined time at which the AP periodically sends Beacon frames, determined by the Beacon Interval. Whenever the TBTT arrives, the AP actively sends a Beacon broadcast frame, and all associated STAs in the network use this time as a reference for time synchronization and scheduling.
[0028] 4. Beacon Interval: This parameter determines the time interval between two consecutive TBTTs. The default value is 100 TU (Time Unit, 1 TU = 1024 µs), which is approximately 102.4 ms. The STA and AP negotiate to determine this value and calculate the sleep-wake cycle accordingly.
[0029] 5. TSF: A 64-bit microsecond-level counter defined in the 802.11 standard, used to achieve time synchronization of all devices in the network. The AP maintains the master TSF counter and broadcasts its value in the Timestamp field of the Beacon frame; all associated STAs correct their local counters based on the AP's TSF, ensuring that the time base of the entire network is consistent, thereby accurately scheduling Beacon reception and sleep / wake-up timing.
[0030] To facilitate understanding of this embodiment, a reference time calibration method under a power-saving mechanism disclosed in this embodiment of the invention will be described in detail first.
[0031] This invention provides a reference time calibration method under a power-saving mechanism, which can be applied to the sleep-wake management module of a Wi-Fi receiver. The Wi-Fi receiver is a core communication component in a STA (Station) device, used to realize wireless signal transmission and reception and protocol processing between the STA and AP. The Wi-Fi receiver includes a receiving module and a main control circuit, both connected to the sleep-wake management module. The receiving module receives DTIM frames sent by the AP; the sleep-wake management module wakes up the main control circuit when it detects the presence of data to be received. See also... Figure 1 The diagram shows a flowchart of a reference time calibration method under a power-saving mechanism. The method mainly includes the following steps S110 to S130: Step S110: During low-power sleep, when the preset wake-up time is reached, the receiving module is woken up to obtain the DTIM frame and obtain local recording information, which includes the local reference time and the number of consecutive times not updated.
[0032] The aforementioned low-power sleep process refers to the energy-saving state that the Wi-Fi receiver enters when there are no data transmission or reception tasks. In this state, most of the Wi-Fi receiver's circuitry is powered down, with only essential circuitry maintaining minimum functionality in a low-voltage, low-frequency mode. The preset wake-up time is calculated based on the sleep cycle, which is configured by the Wi-Fi receiver's main control circuitry in normal operating mode according to the actual application scenario. The aforementioned DTIM frame is a special Beacon frame periodically sent by the AP to synchronize the network clock and notify each STA whether there is buffered data to be received.
[0033] The aforementioned local reference time is a TSF statistical value recorded from the start of sleep. It is used to compare this value with the time synchronization information broadcast by the AP after wakefulness to assess the degree of time deviation. The number of consecutive times the local reference time has not been successfully updated is a continuously counted number of times during sleep, reflecting the extent to which the time synchronization function has not been calibrated for an extended period. Locally recorded information can be stored in a storage module, which can use non-volatile storage materials or be powered by an independent power supply to ensure that information is not lost during sleep.
[0034] Specifically, when the Wi-Fi receiver enters a low-power sleep state, the sleep wake-up management module monitors the sleep time. When the preset DTIM packet reception wake-up time (i.e., the wake-up time) is reached, this module wakes up the receiving module to prepare for receiving DTIM frames. Simultaneously, it reads the TSF statistics recorded from the sleep start time from the storage module for subsequent logic judgment. The receiving module can be a simplified subset of the Wi-Fi RF circuit, not requiring full 802.11 protocol transmission and reception capabilities, meeting the DTIM frame reception requirements with minimal circuit resources and power consumption. The receiving module is powered down when entering sleep mode and is woken up in advance by the sleep wake-up management module at the preset time. Considering the time required for voltage stabilization and clock locking, the wake-up time is earlier than the actual arrival time of the over-the-air DTIM frame.
[0035] This can be explained by the fact that the aforementioned consecutive no-update count is continuously counted throughout the entire low-power sleep process. After each DTIM packet reception process, if the local base time is not successfully updated, the consecutive no-update count is incremented; if the update is successful, the consecutive no-update count is reset.
[0036] Step S120: After detecting the DTIM frame, obtain the beacon frame bearer information from the DTIM frame. The beacon frame bearer information includes the time synchronization information broadcast by the AP.
[0037] A DTIM frame is essentially a special type of Beacon frame. Its frame body structure contains multiple fields, among which the Timestamp field (8 bytes) stores the AP's TSF timestamp information, used for time synchronization by associated STAs. Because the Timestamp field is located at the very beginning of the Beacon frame body, this information can be obtained earliest during reception and TSF determination can be performed, buying time for subsequent decisions.
[0038] In some possible embodiments, the aforementioned time synchronization information is the actual TSF value. Based on this, step S120 may include: after detecting the frame header of the DTIM frame, obtaining the actual TSF value from the timestamp field of the frame body of the DTIM frame.
[0039] For example, when the receiving module detects the frame header of the DTIM frame (i.e., the preamble and PLCP (Physical Layer Convergence Procedure) header), the hardware parsing circuit in the sleep-wake management module starts working. This circuit automatically locates the Timestamp field at the beginning of the frame body and reads the 8-byte TSF timestamp value from it. For example, the actual TSF value obtained at the AP end is 1234567905μs. Since the Timestamp field is located at the beginning of the Beacon frame body, the TSF information (i.e., the actual TSF value) is obtained first. At the same time, the hardware parsing circuit also parses the Traffic Indication Bitmap field in the frame body in parallel to determine whether the AP end has cached data for this device, that is, whether the AP end has data to be received for this device.
[0040] Because this scheme has a mechanism to prematurely terminate packet reception, it cannot verify the correctness of packet reception through a complete FCS (Frame Check Sequence). To avoid data interference causing erroneous bits and thus triggering process errors, this scheme uses the Beacon Interval field value to verify the reliability of time synchronization information. Based on this, in some possible embodiments, the aforementioned local record information also includes a first beacon interval, and the beacon frame carrying information also includes a second beacon interval. After step S120, the method further includes: determining whether the first beacon interval and the second beacon interval are consistent; if they are inconsistent, the time synchronization information is determined to be unreliable, reference time calibration is not performed, and the method enters a sleep state after incrementing the number of consecutive no-updates. If they are consistent, the time synchronization information is determined to be reliable, and the subsequent step S130 is executed.
[0041] Specifically, the STA and AP negotiate and confirm the Beacon Interval value during the association phase; this value is the first beacon interval. The Beacon Interval field value parsed from the received DTIM frame is the second beacon interval. If the two are inconsistent, the time synchronization information obtained this time is considered to be affected by interference or erroneous bits, and its reliability is insufficient; it should not be used as the basis for reference time calibration.
[0042] Step S130: Based on the degree of deviation between the time synchronization information and the local reference time, and combined with the number of consecutive times without updating, perform reference time calibration.
[0043] The aforementioned deviation reflects the magnitude of the time base discrepancy between the AP and STA, determined by the difference between the time synchronization information (the actual TSF value at the AP) and the local reference time (the TSF statistics recorded locally at the STA). The aforementioned number of consecutive times without updates reflects the extent to which the time synchronization function has not been calibrated for an extended period. Both serve as the basis for determining whether reference time calibration is necessary.
[0044] Specifically, the sleep-wake management module compares the locally estimated TSF value (i.e., the TSF statistical value) with the TSF value carried in the DTIM frame (i.e., the actual TSF value), combines this with a preset reasonable TSF offset threshold, and the number of consecutive no-updates compared to a preset consecutive no-update threshold, to determine whether the TSF update condition is met. If met, the DTIM frame reception state is maintained until the local reference time completes the hardware automatic update. This process only requires maintaining the most basic receiving module operation, without waking up the main control circuit, and does not generate additional power consumption. If not met, the low-power DTIM frame reception process is executed normally, maintaining a minimum power consumption operating state.
[0045] In some possible embodiments, the aforementioned local reference time is the TSF statistical value recorded from the start of sleep, and the time synchronization information is the actual TSF value. Based on this, step S130 may include: calculating the TSF offset based on the TSF statistical value and the actual TSF value; if the TSF offset exceeds a preset reasonable TSF offset threshold, or the number of consecutive no-updates exceeds a preset consecutive no-update threshold, then continue receiving DTIM frames, update the local reference time, and reset the consecutive no-update count; then, based on the data buffer information, determine whether to wake up the main control circuit to enter the wake-up process.
[0046] Specifically, the TSF offset is calculated as follows: Let the actual TSF value obtained from the DTIM frame be T1. The TSF value recorded when entering sleep mode, plus the sleep time and pre-wake time, is used as the basis for calculation to obtain the expected TSF statistical value T2 (expected value) when receiving the DTIM. The absolute value of the difference between T1 and T2 is the TSF offset generated during this sleep-wake process, reflecting the degree of time reference deviation between the AP and STA. The calculated TSF offset is compared with a reasonable TSF offset threshold, and the number of consecutive no-updates is compared with a consecutive no-update threshold. If the TSF offset is within a reasonable range (i.e., less than or equal to the reasonable TSF offset threshold) and the number of consecutive no-updates is less than or equal to the consecutive no-update threshold, the low-power DTIM frame reception process is executed normally (i.e., the main control circuit is directly woken up based on the data cache information to enter the wake-up process), maintaining the minimum power consumption working state. If the TSF offset exceeds a reasonable range (i.e., greater than the reasonable TSF offset threshold) or the number of consecutive no-updates exceeds the consecutive no-update threshold (i.e., greater than the consecutive no-update threshold), the sleep wake-up management module forcibly maintains the DTIM frame reception state until packet reception is completed, triggering the TSF automatic update mechanism under normal logic to eliminate the accumulated time deviation. Then, based on the data cache information, it is determined whether to wake up the main control circuit to enter the wake-up process.
[0047] The aforementioned reasonable TSF offset threshold is configured by the main control circuit under normal operating mode according to the actual application scenario. Assuming that in normal operation, each DTIM frame is received, the receiving module is woken up 20μs before the arrival of air interface data. The RF receiver circuit requires at least 5μs of stabilization time to ensure normal reception. Therefore, the maximum possible early wake-up time is 5μs. In this scenario, the reasonable TSF offset threshold can be set to 10μs. When the TSF offset of a received DTIM frame is found to be greater than 10μs, forced reception of the entire DTIM frame can be triggered to calibrate the TSF.
[0048] The aforementioned consecutive no-update threshold is also configured by the main control circuit. In certain environments, multiple consecutive DTIM frame receptions may fail to receive valid data, meaning the actual TSF value cannot be obtained for offset calculation and judgment, and the TSF cannot be updated (i.e., the local reference time cannot be updated). When this occurs, a counting system is implemented. The software sets a threshold (i.e., the consecutive no-update threshold) based on the actual device requirements. When the number of consecutive wake-ups to receive DTIM frames without effective TSF updates exceeds this threshold, a complete reception of the beacon frame will be forced to update the TSF before allowing the device to enter sleep mode again. In other words, when the number of consecutive no-updates exceeds the consecutive no-update threshold, even if the current TSF offset is within a reasonable range, a complete reception and TSF update will be forced to prevent small errors from accumulating over time and forming a systematic deviation.
[0049] In some possible embodiments, the beacon frame carrying information also includes data buffer information. Based on this, the method further includes: if the TSF offset does not exceed a reasonable TSF offset threshold, and the number of consecutive no-updates does not exceed a consecutive no-update threshold, and the data buffer information indicates that there is no data to be received, then it is determined not to update the local reference time, reception of DTIM frames is stopped, and the number of consecutive no-updates is incremented before entering a sleep state.
[0050] Specifically, when the TSF offset is within a reasonable range and the number of consecutive no-updates does not exceed the consecutive no-update threshold, it indicates that the current time deviation is still within an acceptable range and no forced calibration is required. At this time, it is further determined whether there is data to be received based on the data cache information (i.e., whether the corresponding bit in the TIM Bitmap is set). If it is confirmed that there is no data to be received, reception is immediately stopped and the device re-enters sleep mode without waiting for the complete frame to be received or waking up the main control circuit. At the same time, since the local reference time was not successfully updated this time, the number of consecutive no-updates is incremented by 1.
[0051] In some possible embodiments, the above method further includes: if the TSF offset does not exceed the reasonable TSF offset threshold, and the number of consecutive non-updates does not exceed the consecutive non-update threshold, and the data cache information indicates that there is data to be received, then the reception of the DTIM frame is completed, the local reference time is updated and the number of consecutive non-updates is reset, and the wake-up process is entered.
[0052] Specifically, when the TSF offset is within a reasonable range and the number of consecutive no-updates does not exceed the consecutive no-update threshold, but the data buffer information indicates that there is data to be received, the receiving module needs to receive the entire DTIM frame to obtain the data. Since the DTIM frame has been fully received, the Timestamp field (the actual TSF value) contained in the frame body has been obtained by the hardware, so the local reference time can be updated simultaneously without additional power consumption. At the same time, since the local reference time has been successfully updated, the number of consecutive no-updates is reset to 0. After that, the wake-up process begins, waking up the main control circuit to complete subsequent data interaction.
[0053] The power-saving reference time calibration method provided in this embodiment of the invention automatically acquires local recorded information and beacon frame carrying information in DTIM frames during low-power sleep by the sleep wake-up management module. Based on the degree of deviation between the time synchronization information and the local reference time, and combined with the number of consecutive times without updating, the reference time is calibrated. This enables real-time detection and automatic calibration of TSF by hardware logic, eliminating the accumulated time reference deviation between AP and STA without waking up the main control circuit. This ensures the long-term stability of the communication system while maintaining low-power performance.
[0054] Corresponding to the aforementioned power-saving time calibration method, this embodiment of the invention also provides a power-saving time calibration device, which is applied to the sleep / wake management module of a Wi-Fi receiver. See also... Figure 2 The diagram shows a schematic of a reference time calibration device under a power-saving mechanism. The device includes: The wake-up unit 201 is used to wake up the receiving module to obtain DTIM frames and local recording information when a preset wake-up time is reached during low-power sleep. The local recording information includes local reference time and the number of consecutive times without updating. The number of consecutive times without updating is the number of times the local reference time has been continuously and successfully updated during sleep. The acquisition unit 202 is used to acquire beacon frame bearer information from the DTIM frame after detecting the DTIM frame. The beacon frame bearer information includes the time synchronization information broadcast by the AP. The calibration unit 203 is used to perform reference time calibration based on the degree of deviation between the time synchronization information and the local reference time, combined with the number of consecutive times that it has not been updated.
[0055] The power-saving reference time calibration device provided in this embodiment of the invention introduces the number of consecutive times without updating as one of the criteria for determining reference time calibration. This allows the calibration operation to be triggered even if the deviation between the time synchronization information and the local reference time is small during a single wake-up in the low-power sleep process, in the event that the local reference time fails to be updated successfully multiple times. This effectively prevents the synchronization failure problem caused by the long-term accumulation of small deviations, and balances low-power performance and long-term stability of time synchronization without the need for frequent wake-ups of the main control circuit.
[0056] Furthermore, the aforementioned time synchronization information is the actual TSF value; the aforementioned acquisition unit 202 is specifically used to: after detecting the frame header of the DTIM frame, obtain the actual TSF value from the timestamp field of the frame body of the DTIM frame.
[0057] Furthermore, the aforementioned local recording information also includes a first beacon interval, and the beacon frame carrying information also includes a second beacon interval; the aforementioned device also includes a verification unit, which is used to: determine whether the first beacon interval and the second beacon interval are consistent; if they are inconsistent, then determine that the time synchronization information is unreliable and do not perform reference time calibration.
[0058] Furthermore, the aforementioned local reference time is the TSF statistical value recorded from the start of sleep, and the time synchronization information is the actual TSF value; the aforementioned calibration unit 203 is specifically used to: calculate the TSF offset based on the TSF statistical value and the actual TSF value; if the TSF offset exceeds a preset reasonable TSF offset threshold, or the number of consecutive no updates exceeds a preset consecutive no update threshold, then continue receiving DTIM frames, update the local reference time, and reset the number of consecutive no updates.
[0059] Furthermore, the beacon frame carrying information also includes data buffer information; the calibration unit 203 is also used to: if the TSF offset does not exceed the reasonable TSF offset threshold, and the number of consecutive non-updates does not exceed the consecutive non-update threshold, and the data buffer information indicates that there is no data to be received, then determine not to update the local reference time, stop receiving DTIM frames, increment the number of consecutive non-updates, and enter a sleep state.
[0060] Furthermore, the calibration unit 203 is also used to: if the TSF offset does not exceed the reasonable threshold for TSF offset, and the number of consecutive non-updates does not exceed the threshold for consecutive non-updates, and the data buffer information indicates that there is data to be received, then complete the reception of the DTIM frame, update the local reference time and reset the number of consecutive non-updates, and enter the wake-up process.
[0061] The power-saving time calibration device provided in this embodiment has the same implementation principle and technical effect as the aforementioned power-saving time calibration method embodiment. For the sake of brevity, any parts not mentioned in the power-saving time calibration device embodiment can be referred to the corresponding content in the aforementioned power-saving time calibration method embodiment.
[0062] Corresponding to the above-described power-saving time calibration method, this embodiment of the invention also provides a power-saving time calibration system. See [link to previous document]. Figure 3 The diagram shows a reference time calibration system under a power-saving mechanism. The system is applied to a Wi-Fi receiver and includes a sleep-wake management module 301 and a receiving module 302. The receiving module 302 is connected to the sleep-wake management module 301. The sleep-wake management module 301 is used to execute the reference time calibration method under the power-saving mechanism described above.
[0063] In some possible embodiments, such as Figure 3As shown, the system also includes a main control circuit 303 and a storage module 304 connected to the sleep wake-up management module 301 respectively; the main control circuit 303 is used to configure low-power parameters in normal working mode and to be in sleep mode in low-power mode; wherein, the low-power parameters include the sleep cycle of the sleep wake-up management module, as well as the reasonable threshold of TSF offset and the threshold of continuous non-updating; the storage module 304 is used to maintain local recorded information during low-power sleep.
[0064] The power-saving time calibration system provided in this embodiment has the same implementation principle and technical effect as the aforementioned power-saving time calibration method embodiment. For the sake of brevity, any parts not mentioned in the power-saving time calibration system embodiment can be referred to the corresponding content in the aforementioned power-saving time calibration method embodiment.
[0065] For ease of understanding, see Figure 4 The diagram shows the architecture of a reference time calibration system under a power-saving mechanism. The system includes the following core functional modules: main control circuit, receiving module, storage module and sleep / wake management module.
[0066] (1) Main control circuit: When the Wi-Fi receiver is working normally, the circuit module responsible for interacting with the upper-layer software and controlling the specific receiving and transmitting behavior is the main body of the Wi-Fi communication system and one of the main sources of power consumption of the device. In low power mode, this circuit is in a disabled or even power-off state during sleep.
[0067] (2) Receiver module: A simplified subset of the Wi-Fi radio frequency circuit, which does not need to have full 802.11 protocol transmission and reception capabilities, and only meets the DTIM frame reception requirements with minimal circuit resources and power consumption. When entering sleep mode, this module is powered off and is woken up in advance by the sleep wake-up management module at a preset time (considering the time required for electrical characteristics such as voltage stabilization and clock locking, the wake-up time is earlier than the actual arrival time of the air interface DTIM frame).
[0068] (3) Storage module: Responsible for storing key statistical values in the sleep-wake process, such as sleep time and sleep initiation TSF value. This module uses non-volatile storage materials or is powered by an independent power supply to ensure that information is not lost during sleep.
[0069] (4) Sleep-Wake-Up Management Module: The core module of this solution, its functions include DTIM frame data buffer parsing and TSF checking, involving TSF checking logic, DTIM data buffer checking logic, and abort reception determination logic. DTIM parsing is used to determine whether the AP has buffered data and decide whether to wake up the main control circuit; TSF checking is used to evaluate time offset and, if necessary, force the reception state to be maintained to complete calibration. The TSF check result and the DTIM data parsing result together determine the system's wake-up strategy and the effective working time of each module. The innovation of this solution lies in the introduction of a TSF autonomous checking mechanism in the sleep-wake-up management logic.
[0070] The workflow of the reference time calibration system under the above power-saving mechanism may include: 1. Parameter configuration: Under normal operating conditions, the main control circuit configures relevant parameters according to the actual application scenario, including sleep cycle (i.e., reception time cycle), reasonable threshold for TSF offset, and threshold for continuous non-update.
[0071] 2. Entering sleep mode: The main control circuit controls the system to enter sleep mode. Most circuits are powered off, and only the necessary circuits are retained to maintain minimum functionality in low-voltage and low-frequency mode.
[0072] 3. Pre-wake-up: When the preset DTIM packet reception wake-up time is reached, the sleep wake-up management module wakes up the receiving module to prepare to receive DTIM frames, and at the same time reads the TSF statistics recorded at the start time of sleep from the storage module for subsequent logic judgment.
[0073] 4. Parallel Parsing: After detecting the DTIM frame header, the hardware automatically parses the TSF information (Timestamp field) and data buffer information (Traffic Indication Bitmap field) in the frame body in parallel. Since the Timestamp field is located at the beginning of the Beacon frame body, the TSF information will be obtained first.
[0074] 5. TSF Determination and Calibration: By comparing the locally estimated TSF statistics with the actual TSF value carried in the DTIM frame, and considering the reasonable TSF offset threshold, the number of consecutive no-updates, and the consecutive no-update threshold, it is determined whether the TSF update conditions are met. If met, the DTIM frame reception state is maintained until the TSF completes automatic hardware update. This process only requires maintaining the most basic receiver module operation, without waking up the main control circuit and generating no additional power consumption.
[0075] 6. Wake-up Decision: After TSF calibration, whether to wake up the main control circuit is determined independently by the data buffer detection result (i.e., whether the corresponding bit in the TIMBitmap is set). If there is buffered data to be received, the main control circuit is woken up to complete the data interaction; otherwise, it immediately enters sleep mode.
[0076] See Figure 5 The diagram illustrates the workflow of a reference time calibration system under a power-saving mechanism. The system's workflow in low-power mode may include the following steps: Step S1: Configure the relevant receiving time period according to actual needs, and the system enters sleep mode.
[0077] Step S2: Maintain sleep state until the predetermined time point, retrieve recorded information (i.e., local recorded information) from the storage module, and the hardware RX part circuit (i.e., the receiving module) automatically wakes up to receive DTIM frames, parses the specified fields, determines whether there is buffered data to be received, and checks whether the TSF update condition is met. If there is data to be received, proceed to state S5 (i.e., execute step S5); if the TSF update condition is met, proceed to state S4 (i.e., execute step S4); otherwise, proceed to state S3 (i.e., execute step S3).
[0078] Step S3: Stop receiving, update the statistics (i.e., the number of consecutive times not updated) to the storage module, enter sleep mode and return to S2.
[0079] Step S4: Maintain the DTIM receiving state until the TSF update is complete, update the statistics to the storage module, and if data needs to be received at this time, enter the S5 state; otherwise, enter sleep mode and return to S2.
[0080] Step S5: Complete the reception of the DTIM frame and enter the wake-up process. Then proceed to step S6.
[0081] Step S6: Wake up the main control circuit, complete the transmit and receive tasks, and wait for the next sleep cycle.
[0082] In this embodiment of the invention, the TSF detection and determination mechanism is as follows: (1) DTIM frame format and TSF information location. The frame body format of the DTIM frame is as follows: Figure 6 As shown, the data includes multiple fields such as MAC header, Timestamp, Beacon Interval, and Capability. The Timestamp field (8 bytes) stores the AP's TSF timestamp information. Since the Timestamp field is located at the very beginning of the Beacon frame body, this information can be obtained earliest during reception to determine TSF, thus buying time for subsequent decisions.
[0083] (2) TSF information credibility verification. Due to the mechanism of prematurely terminating packet reception in this scheme, the correctness of packet reception cannot be confirmed through complete FCS verification. In order to avoid data interference causing erroneous bits and thus causing process errors, this scheme uses the method of checking the Beacon Interval field value to indirectly verify the credibility of TSF information. The STA and AP have negotiated and confirmed the value of Beacon Interval (i.e., the first beacon interval) during the association phase. If the Beacon Interval (i.e., the second beacon interval) parsed from the received frame is inconsistent with the negotiated value (i.e., the first beacon interval), the TSF information is considered unreliable, and the TSF detection result is invalid.
[0084] (3) TSF offset calculation. Let the actual TSF value obtained from the DTIM frame be T1. The TSF value recorded when entering sleep plus the sleep time and pre-wake time are used as the basis for calculation to obtain the expected TSF statistical value T2 when receiving DTIM. The absolute value of the difference between T1 and T2, ΔT=|T1-T2|, is the TSF offset generated in this sleep-wake process, reflecting the degree of time reference deviation between AP and STA.
[0085] (4) TSF offset determination and forced calibration. The calculated TSF offset ΔT is compared with the reasonable TSF offset threshold: if ΔT is within the reasonable range (ΔT≤ reasonable TSF offset threshold), the low-power DTIM frame reception process is executed normally, maintaining the minimum power consumption working state; if ΔT exceeds the reasonable range (ΔT> reasonable TSF offset threshold), the sleep wake-up management module forces the DTIM frame reception state to continue until packet reception is completed, triggering the TSF automatic update mechanism under normal logic to eliminate the accumulated time deviation.
[0086] (5) Continuous non-update fault tolerance mechanism. Throughout the process, the number of times the TSF fails to be updated during continuous DTIM packet reception is continuously counted. When the number of consecutive non-updates exceeds the consecutive non-update threshold, even if the current TSF offset is within a reasonable range, the DTIM frame will be received completely and the TSF will be updated to prevent small errors from accumulating over a long period of time and forming a systematic deviation.
[0087] In existing technologies, prematurely terminating DTIM frame reception in pursuit of extremely low power consumption can reduce unnecessary power consumption, but it may prevent the STA from calibrating the TSF for an extended period. Once the time offset accumulates to a certain extent, it will directly affect the normal reception timing of Beacon frames, and may even lead to missed buffered data notifications, jeopardizing system stability. A timing diagram illustrating this problem is shown below. Figure 7 As shown. Figure 7 This demonstrates the low-power DTIM reception timing in a scenario where there is no valid data for an extended period and a time base discrepancy exists between the receiver and the access point (AP) when this solution is not employed. For example... Figure 7As shown, with the continuous accumulation of time offset, the wake-up window of the STA gradually deviates from the actual frame transmission time of the AP, eventually affecting the normal DTIM frame reception process, and even causing the inability to detect buffered data notifications in a timely manner.
[0088] Figure 8 The results demonstrate the DTIM reception performance under the same timing scenario after adopting this solution. Figure 8 As shown, normal reception can be restored by performing a forced TSF calibration before the time offset causes a packet reception anomaly. Figure 7 and Figure 8 The timing comparison shows that this scheme only needs to receive a complete DTIM frame before the offset accumulates to the critical value to complete the calibration, without having to wake up the main control circuit. Therefore, the power consumption is minimal, achieving an effective balance between low power consumption and stability.
[0089] In summary, the key points of the embodiments of the present invention include: in the low-power DTIM sleep-wake process, the hardware logic autonomously completes the real-time detection and automatic calibration of TSF, eliminating the accumulated time base deviation between AP and STA without waking up the main control circuit, thus ensuring the long-term stability of the communication system while guaranteeing extremely low power performance.
[0090] The embodiments of the present invention have the following advantages: 1. High efficiency and low power consumption: This solution uses pure hardware logic to implement TSF self-calibration. The entire calibration process does not require waking up the main control circuit and does not add any additional interaction overhead. Calibration can be completed by fully receiving a single DTIM frame when the TSF offset exceeds the threshold. Compared with existing technologies that periodically force full reception or periodically wake up the main control circuit, this solution minimizes the calibration cost while meeting the low power consumption requirement.
[0091] 2. Strong Compatibility: This solution is based on the standard Wi-Fi 802.11 DTIM protocol process, requiring no modifications to the AP side. Only TSF check logic needs to be added to the sleep / wake management module on the STA side. By adjusting key parameters such as the reasonable threshold for TSF offset and the threshold for continuous non-update, it can flexibly adapt to different application scenarios and proprietary protocol standards, exhibiting good versatility and configurability.
[0092] 3. High Stability: This solution utilizes real-time TSF monitoring and automatic calibration mechanisms to ensure that the STA and AP maintain a consistent time base, even in scenarios with prolonged periods of no effective data reception, preventing communication failure due to accumulated deviations. Compared to existing technologies that rely on periodic forced wake-ups or shortened listening intervals to maintain synchronization, this solution achieves long-term stable operation of the communication system with minimal power consumption.
[0093] Corresponding to the aforementioned power-saving time calibration system, this embodiment of the invention also provides a Wi-Fi device that includes the aforementioned power-saving time calibration system.
[0094] The Wi-Fi device provided in this embodiment has the same implementation principle and technical effect as the aforementioned reference time calibration system embodiment under the power saving mechanism. For the sake of brevity, any parts not mentioned in the Wi-Fi device embodiment can be referred to the corresponding content in the aforementioned reference time calibration system embodiment under the power saving mechanism.
[0095] In all examples shown and described herein, any specific values should be interpreted as merely exemplary and not as limitations; therefore, other examples of exemplary embodiments may have different values.
[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code, which contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.
[0097] In the several embodiments provided in this application, it should be understood that the disclosed systems, apparatuses, and methods can be implemented in other ways. The apparatus embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and there may be other division methods in actual implementation. Furthermore, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Additionally, the coupling or direct coupling or communication connection shown or discussed may be through some communication interface; the indirect coupling or communication connection between apparatuses or modules may be electrical, mechanical, or other forms.
[0098] The modules described as separate components may or may not be physically separate. Similarly, the components shown as modules may or may not be physical modules; they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment, depending on actual needs.
[0099] In addition, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module.
[0100] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A reference time calibration method under a power-saving mechanism, characterized in that, A sleep / wake management module for Wi-Fi receivers includes: During low-power sleep, when the preset wake-up time is reached, the receiving module is woken up to obtain the transmission indication mapping DTIM frame and obtain local recording information. The local recording information includes the local reference time and the number of consecutive times without update. The number of consecutive times without update is the number of times the local reference time has been unsuccessfully updated continuously during the sleep process. Upon detecting the DTIM frame, beacon frame bearer information is obtained from the DTIM frame, including time synchronization information broadcast by the access point (AP). Based on the degree of deviation between the time synchronization information and the local reference time, and in conjunction with the number of consecutive times without updating, the reference time is calibrated.
2. The reference time calibration method under power-saving mechanism according to claim 1, characterized in that, The time synchronization information is the actual value of the time synchronization function TSF; after detecting the DTIM frame, obtaining the beacon frame bearer information from the DTIM frame includes: After detecting the frame header of the DTIM frame, the actual TSF value is obtained from the timestamp field of the frame body of the DTIM frame.
3. The reference time calibration method under power-saving mechanism according to claim 1, characterized in that, The local recording information further includes a first beacon interval, and the beacon frame bearer information further includes a second beacon interval; after detecting the DTIM frame and obtaining the beacon frame bearer information from the DTIM frame, the reference time calibration method under the power-saving mechanism further includes: Determine whether the first beacon interval and the second beacon interval are consistent; If there is a discrepancy, the time synchronization information is determined to be unreliable, and reference time calibration is not performed.
4. The reference time calibration method under power-saving mechanism according to claim 1, characterized in that, The local reference time is the TSF statistical value recorded from the start of sleep, and the time synchronization information is the actual TSF value; the reference time calibration based on the degree of deviation between the time synchronization information and the local reference time, combined with the number of consecutive times not updated, includes: The TSF offset is calculated based on the TSF statistical value and the actual TSF value. If the TSF offset exceeds a preset reasonable TSF offset threshold, or the number of consecutive no-updates exceeds a preset consecutive no-update threshold, then continue receiving the DTIM frame, update the local reference time, and reset the number of consecutive no-updates.
5. The reference time calibration method under power-saving mechanism according to claim 4, characterized in that, The beacon frame carrying information also includes data cache information; The reference time calibration method under the power-saving mechanism also includes: If the TSF offset does not exceed the reasonable threshold for TSF offset, and the number of consecutive no-updates does not exceed the consecutive no-update threshold, and the data cache information indicates that there is no data to be received, then it is determined not to update the local reference time, the reception of the DTIM frame is stopped, and the number of consecutive no-updates is incremented before entering a sleep state.
6. The reference time calibration method under power-saving mechanism according to claim 5, characterized in that, The reference time calibration method under the power-saving mechanism also includes: If the TSF offset does not exceed the reasonable threshold for TSF offset, and the number of consecutive no-updates does not exceed the consecutive no-update threshold, and the data cache information indicates that there is data to be received, then the reception of the DTIM frame is completed, the local reference time is updated and the number of consecutive no-updates is reset, and the wake-up process is initiated.
7. A reference time calibration device under a power-saving mechanism, characterized in that, A sleep / wake management module for Wi-Fi receivers includes: The wake-up unit is used to wake up the receiving module to obtain DTIM frames and local recording information when a preset wake-up time is reached during low-power sleep. The local recording information includes local reference time and the number of consecutive times without updating. The number of consecutive times without updating is the number of times the local reference time has been continuously and successfully updated during sleep. The acquisition unit is used to acquire beacon frame bearer information from the DTIM frame after detecting the DTIM frame. The beacon frame bearer information includes time synchronization information broadcast by the AP. The calibration unit is used to perform reference time calibration based on the degree of deviation between the time synchronization information and the local reference time, combined with the number of consecutive times without updating.
8. A reference time calibration system under a power-saving mechanism, characterized in that, An application in a Wi-Fi receiver includes a sleep-wake management module and a receiving module, wherein the receiving module is connected to the sleep-wake management module; the sleep-wake management module is used to execute the reference time calibration method under the power-saving mechanism as described in any one of claims 1-6.
9. The reference time calibration system under power-saving mechanism according to claim 8, characterized in that, It also includes a main control circuit and a storage module that are respectively connected to the sleep wake-up management module; The main control circuit is used to configure low-power parameters in normal operating mode and to be in sleep mode in low-power mode; wherein, the low-power parameters include the sleep cycle of the sleep-wake management module; The storage module is used to maintain the locally recorded information during low-power sleep.
10. A Wi-Fi device, characterized in that, Includes the reference time calibration system under the power-saving mechanism as described in claim 8 or 9.