Method and apparatus for adjusting beacon frame receiving window, storage medium and electronic device

By automatically adjusting the beacon frame receiving window size of the Wi-Fi device by receiving the number of beacon frames from the target router, it solves the shortcomings of low-power Wi-Fi devices in balancing power consumption and wake-up speed, and achieves lower power consumption and faster wake-up.

CN116032428BActive Publication Date: 2025-10-14HANGZHOU HUACHENG SOFTWARE TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211738660.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-30
Publication Date
2025-10-14
Estimated Expiration
2042-12-30

AI Technical Summary

Technical Problem

In the prior art, low-power Wi-Fi devices have deficiencies in balancing power consumption and wake-up speed within the beacon frame receiving window, resulting in power consumption waste or slow wake-up speed.

Method used

By receiving the number of beacon frames sent by the target router, the beacon frame receiving window size of the Wi-Fi device in sleep state is automatically adjusted. The target size of the receiving window, including the advance amount and lag amount, is determined according to the reception status of the beacon frames to ensure the normal reception of beacon frames.

Benefits of technology

It achieves lower power consumption when beacon frames are received normally, takes into account the wake-up speed, improves battery life and user experience, and reduces development and maintenance costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116032428B_ABST
    Figure CN116032428B_ABST
Patent Text Reader

Abstract

Embodiments of the present application provide a beacon frame receiving window adjustment method and device, a storage medium and an electronic device, wherein the method comprises: in the case of connecting to a target hotspot of a target router, receiving a first number of target beacon frames sent by the target router; determining a target size of a receiving window of the WIFI device for receiving the beacon frame in the sleep state based on the first number of target beacon frames; and adjusting the size of the receiving window of the WIFI device for receiving the beacon frame to the target size. Through the present application, the problem that power consumption and wake-up speed cannot be considered in the related art is solved, and the effect of considering power consumption and wake-up speed is achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the wireless field, and in particular, to a method, device, storage medium, and electronic device for adjusting a beacon frame receiving window. Background Art

[0002] With the development of the Internet of Things (IoT), wireless Wi-Fi technology is increasingly being used across various industries and scenarios. Low-power Wi-Fi is also gaining widespread adoption in battery-powered products like mobile phones. Low-power Wi-Fi operates in a dormant state most of the time, and its power consumption during this dormant state is a significant factor affecting the battery life of battery-powered products.

[0003] In low-power Wi-Fi normal mode, the radio window remains open, continuously receiving air interface packets. This results in higher power consumption. In sleep mode, the radio receive window is closed and periodically wakes up to open the window and receive air interface packets. This saves power, resulting in lower power consumption.

[0004] The interval between beacon frame transmissions from a router is typically controlled by a hardware timer. The accuracy of the timer and clock source affects beacon frame transmission accuracy. To ensure compatibility with different routers, low-power Wi-Fi requires adjusting the beacon frame receive window to ensure it can receive beacon frames every time it wakes up. Each beacon reception is preceded by a certain amount of lead (opening the RF window in advance) and delayed by a certain amount of delay (closing the RF window appropriately if no beacons are received within the theoretical time). To balance power consumption and router compatibility, the beacon frame receive window should be neither too large nor too small. A large window will result in high power consumption, while a small window will easily cause beacon frame loss, affecting wake-up speed.

[0005] In related technologies, the beacon frame receiving window adjustment solution has the following problems:

[0006] 1. The beacon frame receiving window needs to be manually adjusted based on actual test results, which is time-consuming and has high maintenance costs.

[0007] 2. The beacon frame receiving window is hard-coded in the software. Sometimes, to be compatible with a router that sends inaccurate beacon frames, the receiving window is adjusted to a larger value, which causes unnecessary power consumption on routers that send beacon frames more accurately.

[0008] 3. To balance power consumption, the beacon frame receiving window is usually not opened too large. In this case, on routers that send beacon frames inaccurately, beacon frames are prone to loss, which slows down the wake-up speed and affects the user experience.

[0009] It can be seen from this that the related technology has the problem of not being able to balance power consumption and wake-up speed.

[0010] Currently, no effective solution has been proposed for the above-mentioned problems existing in the related technologies. Summary of the Invention

[0011] Embodiments of the present invention provide a method, device, storage medium, and electronic device for adjusting a beacon frame receiving window, so as to at least solve the problem in the related art of being unable to balance power consumption and wake-up speed.

[0012] According to one embodiment of the present invention, a method for adjusting a beacon frame receiving window is provided, comprising: receiving a first number of target beacon frames sent by a target router when connected to a target hotspot of the target router; determining a target size of a receiving window for receiving beacon frames of a WIFI device in a sleep state based on the first number of target beacon frames; and adjusting the size of the receiving window for receiving beacon frames of the WIFI device to the target size.

[0013] According to another embodiment of the present invention, a device for adjusting a beacon frame receiving window is provided, comprising: a receiving module for receiving a first number of target beacon frames sent by a target router when connected to a target hotspot of the target router; a determining module for determining a target size of a receiving window for receiving beacon frames of a WIFI device in a sleep state based on the first number of target beacon frames; and an adjusting module for adjusting the size of the receiving window for receiving beacon frames of the WIFI device to the target size.

[0014] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0015] According to another embodiment of the present invention, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to perform the steps in any one of the above method embodiments.

[0016] By the present application, in the case of connecting to a target hotspot of a target router, a first number of target beacon frames sent by the target router are received, a target size of a receiving window of a beacon frame of the WIFI device in a sleep state is determined according to the first number of target beacon frames, and the size of the receiving window of the beacon frame of the WIFI device is adjusted to the target size. Since the target size of the receiving window of the beacon frame is determined according to the first number of target beacon frames sent by the target router, the size of the receiving window of the beacon frame can be automatically adjusted according to the performance of the target router, and lower power consumption is ensured in the case of normal reception of the beacon frame. Therefore, the problem of being unable to balance power consumption and wake-up speed in the related art can be solved, and the effect of balancing power consumption and wake-up speed is achieved. BRIEF DESCRIPTION OF DRAWINGS

[0017] Figure 1 is a hardware structure block diagram of a mobile terminal of a beacon frame receiving window adjustment method according to an embodiment of the present application;

[0018] Figure 2 is a flowchart of a beacon frame receiving window adjustment method according to an embodiment of the present application;

[0019] Figure 3 is a beacon frame receiving diagram in a low-power WIFI sleep state according to an exemplary embodiment of the present application;

[0020] Figure 4 is a flowchart of a beacon frame receiving window adjustment method according to an exemplary embodiment of the present application;

[0021] Figure 5 is a beacon frame receiving diagram in an ideal sleep state according to an exemplary embodiment of the present application;

[0022] Figure 6 is an abnormal situation beacon frame receiving diagram according to an exemplary embodiment of the present application;

[0023] Figure 7 is a beacon frame receiving window calculation method diagram according to an exemplary embodiment of the present application;

[0024] Figure 8 is a structure block diagram of a beacon frame receiving window adjustment device according to an embodiment of the present application. DETAILED DESCRIPTION

[0025] Hereinafter, embodiments of the present application will be described in detail with reference to the accompanying drawings and in conjunction with embodiments.

[0026] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily describe a specific order or sequence.

[0027] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure diagram of a mobile terminal according to an embodiment of the present invention, which includes a method for adjusting a beacon frame receiving window. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the above mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.

[0028] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the method for adjusting the beacon frame receiving window in the embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, implementing the above-mentioned method. The memory 104 may include a high-speed random access memory and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely located relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0029] The transmission device 106 is used to receive or send data via a network. A specific example of the aforementioned network may include a wireless network provided by the mobile terminal's communications provider. In one embodiment, the transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In another embodiment, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0030] In this embodiment, a method for adjusting a beacon frame receiving window is provided. Figure 2is a flow chart of a method for adjusting a beacon frame receiving window according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0031] Step S202, when connected to a target hotspot of a target router, receiving a first number of target beacon frames sent by the target router;

[0032] Step S204: determining a target size of a receiving window for receiving beacon frames of the WIFI device in a sleep state based on the first number of target beacon frames;

[0033] Step S206: adjusting the size of the receiving window of the WIFI device for receiving beacon frames to the target size.

[0034] In the above embodiment, the low-power Wi-Fi sleep state uses the received beacon frame to determine whether there is a network packet to be received. If there is data to be received, the RF port is opened to receive the network packet. Generally, the low-power Wi-Fi does not receive every beacon when it is in sleep mode, but receives it once every period of time. The schematic diagram of the beacon frame reception in the low-power Wi-Fi sleep state can be found in the attached figure. Figure 3 ,like Figure 3 As shown, the router sends a beacon frame every 100ms, and the Wi-Fi device wakes up to receive beacon frames every 10 beacons while in sleep mode (configurable as needed). The interval between beacon frame transmissions is typically controlled by a hardware timer. The accuracy of the timer and clock source affects the accuracy of beacon frame transmission. To ensure compatibility with different routers, low-power Wi-Fi devices must adjust the beacon frame receive window to ensure they can receive beacon frames every time they wake up. Each beacon reception is preceded by a certain amount of lead (opening the RF window in advance) and lag (delaying closing the RF window if no beacons are received within the theoretical timeframe). To balance power consumption and router compatibility, the beacon frame receive window should be neither too large nor too small. A large window will result in high power consumption, while a small window will easily cause beacon frame loss, which will affect the wake-up speed.

[0035] In the above embodiment, after a Wi-Fi device successfully connects to an AP, the most appropriate beacon frame reception window can be calculated based on the beacon frame reception status. This allows for a low-power Wi-Fi sleep mode, achieving lower power consumption while ensuring normal beacon frame reception. This also eliminates the need to manually configure the beacon frame reception window during router compatibility testing, reducing development and maintenance costs. Wi-Fi devices may include devices with integrated Wi-Fi modules, such as smartphones, smartwatches, computers, tablets, and smart home devices.

[0036] In the above embodiment, before the Wi-Fi device enters sleep mode, it may receive a first number of target beacon frames sent by the target router. Based on the first number of target beacon frames, a target size of a receive window for receiving beacon frames on the Wi-Fi device while in sleep mode is determined, and the size of the receive window for receiving beacon frames on the Wi-Fi device is adjusted to the target size. After the size of the receive window for receiving beacon frames on the Wi-Fi device is adjusted to the target size, the Wi-Fi device may enter sleep mode. When the beacon frame receive window is reached, the Wi-Fi device wakes up and receives beacon frame signals from the target router.

[0037] Optionally, the execution entity of the above steps can be a WIFI device, a background processor, or other devices with similar processing capabilities, or a machine that integrates at least a WIFI module and a data processing device, wherein the data processing device can include terminals such as computers and mobile phones, but is not limited to this.

[0038] Through the present invention, when connected to a target hotspot of a target router, a first number of target beacon frames sent by the target router are received, and a target size of a receiving window for receiving beacon frames of a WIFI device in a dormant state is determined based on the first number of target beacon frames, and the size of the receiving window for receiving beacon frames of the WIFI device is adjusted to the target size. Because the target size of the beacon frame receiving window is determined based on the first number of target beacon frames sent by the target router, the beacon frame receiving window size can be automatically adjusted based on the performance of the target router, ensuring lower power consumption when beacon frames are received normally. Therefore, the problem of not being able to balance power consumption and wake-up speed in the related art can be solved, and the effect of balancing power consumption and wake-up speed can be achieved.

[0039] In an exemplary embodiment, determining the target size of a receiving window for receiving beacon frames when the WIFI device is in a sleep state based on the first number of target beacon frames includes: determining an advance amount of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; determining a lag amount of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; and determining the target size based on the advance amount and the lag amount. In this embodiment, a flowchart of the method for adjusting the beacon frame receiving window can be found in the attached FIG. Figure 4 ,like Figure 4 As shown in the figure, due to the different performance of different routers, the accuracy of their beacon transmission is also inconsistent. After the low-power Wi-Fi successfully connects to the AP, it calculates the advance and lag of the beacon frame reception window during sleep based on the beacon frame reception status (the accuracy of the router's beacon transmission). This determines the beacon frame reception window size, ensuring lower power consumption when beacon frames are normally received. On high-performance routers, battery life is improved without affecting wake-up speed. On low-performance routers, wake-up speed is increased at the expense of some power consumption. This provides a better user experience.

[0040] In the above embodiment, the low-power Wi-Fi will periodically wake up to receive beacon frames in the dormant state, and the time interval between waking up to receive beacon frames is determined during the dormant state. Figure 5 As shown in the figure, the router sends beacon frames very accurately, and each frame falls within the Wi-Fi receiving window. However, this is not always the case in reality. Due to the performance differences between different routers, the accuracy of beacon frame transmission also varies. Figure 6 This is a diagram of abnormal beacon frame reception, such as Figure 6 As shown in the figure, the sending of beacon frames may be advanced or delayed. Therefore, the advance and delay of the receiving window need to be adjusted to be compatible with different routers.

[0041] In an exemplary embodiment, determining the advance of the receive window when the Wi-Fi device is in a dormant state based on the first number of target beacon frames includes: sequentially determining the transmission time intervals between two adjacent target beacon frames included in the first number of target beacon frames; sorting the transmission time intervals according to a target order to obtain a target time interval sequence; and determining the advance based on the target time interval sequence. In this embodiment, when determining the advance, the transmission time intervals between two adjacent target beacon frames included in the first number of target beacon frames may be determined, and the transmission time intervals may be sorted according to a target order to obtain a target time interval sequence, and the advance is determined based on the target time interval sequence. The target order may be in ascending order.

[0042] In the above embodiment, the first number can be a predetermined number, such as 1000, 2000, or other values, which are not limited in the present invention. For example, before hibernation, 1001 beacon frames are continuously collected, and the time difference between each two beacon frames is recorded, that is, the target time interval between each two target beacon frames sent by the target router is recorded to obtain 1000 target time intervals. The 1000 target time intervals are then sorted in ascending order to obtain a target time interval sequence. The advance amount is determined based on the target time interval sequence.

[0043] In an exemplary embodiment, determining the advance amount based on the target time interval sequence includes: determining a standard time interval for the target router to transmit beacon frames; determining a first difference between the Nth time interval included in the target time interval sequence and the standard time interval, where N is a positive integer and is less than the first number; and determining the first difference as the advance amount. In this embodiment, the standard time interval for the target router to transmit beacon frames is determined based on a hardware timer of the target router. The first difference between the Nth time interval included in the target time interval sequence and the standard time interval can be determined as the advance amount.

[0044] In the above embodiment, N can be configured based on the actual application scenario, that is, the user can determine the value of N during use. For example, to balance sleep power consumption and wake-up speed, it is necessary to receive 90% of beacon frames during sleep. When the first number is 1001, the first 5% and last 5% of the data in the target time interval sequence can be discarded. In this case, N can be 51, and the first difference between the 51st time interval and the standard time interval is determined as the lead amount. For example, if the standard time interval is 100ms and the 51st time interval is 9ms, the lead amount can be 91ms.

[0045] In an example embodiment, the determining the lag amount of the receiving window based on the first quantity of the target beacon frames comprises: sequentially determining a transmission time interval between two adjacent target beacon frames included in the first quantity of the target beacon frames; sorting the transmission time intervals according to a target order to obtain a target time interval sequence; and determining the lag amount based on the target time interval sequence. In this embodiment, the transmission time interval between two adjacent target beacon frames included in the first quantity of the target beacon frames is determined, and the transmission time intervals are sorted according to the target order to obtain the target time interval sequence, and the target time interval sequence determines the lead amount. The target order can be from small to large.

[0046] In the above embodiment, the first quantity can be a predetermined quantity, which can be 1000, 2000 or other values, and the application does not limit this. For example, 1001 beacon frames are collected continuously before sleep, and the time difference between each two times is recorded, i.e., the target time interval between every two target beacon frames sent by the target router is recorded, and 1000 target time intervals are obtained. The 1000 target time intervals are sorted according to the target time interval from small to large to obtain a target time interval sequence. The lag amount is determined according to the target time interval sequence.

[0047] In an example embodiment, the determining the lag amount based on the target time interval sequence comprises: determining a standard time interval of the beacon frames sent by the target router; determining a second difference value between the Mth time interval included in the target time interval sequence and the standard time interval, wherein M is a positive integer, and M is less than the first quantity; and determining the second difference value as the lag amount. In this embodiment, the standard time interval of the beacon frames sent by the target router is determined according to the hardware timer of the target router. The second difference value between the Mth time interval included in the target time interval sequence and the standard time interval is determined as the lag amount.

[0048] In the above embodiment, M can be configured according to the actual application scenario, i.e., the user can determine the value of M during use. For example, in order to balance the sleep power consumption and the wake-up speed, 90% of the beacon frames can be received during sleep, and when the first quantity is 1001, the first 5% and the last 5% of the data in the target time interval sequence can be discarded. M can be 950, and the second difference value between the 950th time interval and the standard time interval is determined as the lag amount. For example, when the standard time interval is 100 ms and the 950th time interval is 9 ms, the lag amount can be 91 ms.

[0049] When low-power Wi-Fi is in sleep mode, the beacon frame receiving window is determined according to the worst test results and cannot be modified after being determined. That is, once determined, the beacon frame receiving window is consistent for all routers. It is not necessary to open the receiving window so large on most routers, which will cause unnecessary waste of power. At the same time, in order to take into account battery life, the beacon frame receiving window is generally not opened too large. On routers with inaccurate beacon frame transmission, beacon frame loss is prone to occur, which slows down the wake-up speed and affects the user experience. In order to solve the above problems, after successfully connecting to the router, a certain number of beacon frames will be collected before sleeping, and the size of the beacon frame receiving window will be determined based on the transmission accuracy of the beacon frame. Among them, the schematic diagram of the beacon frame receiving window calculation method is shown as follows Figure 7 The calculation process is as follows: 1. Before going into sleep mode, collect 1000 beacon frames continuously and record the time difference between each two frames. 2. Sort the 1000 results in ascending order. 3. To balance sleep power consumption and wake-up speed, ensuring that 90% of beacon frames are received during sleep mode, discard the first 5% and last 5% of data. The difference between the 51st sampled data and the standard beacon frame transmission time is the beacon frame acceptance window advance; the difference between the 950th sampled data and the standard beacon frame transmission time is the beacon frame acceptance window lag.

[0050] In an exemplary embodiment, determining the target size based on the advance and the hysteresis includes: determining a size of a beacon frame receiving window for the Wi-Fi device; and determining the target size as the sum of the size of the beacon frame receiving window, the advance, and the hysteresis. In this embodiment, the target size of the Wi-Fi device beacon frame receiving window may be the sum of the advance, the size of the Wi-Fi device beacon frame receiving window, and the hysteresis.

[0051] In the aforementioned embodiment, after successfully connecting to the router, a certain number of beacon frames are collected before going to sleep, and the size of the beacon frame receiving window is determined based on the beacon frame transmission accuracy. This can be applied to all scenarios that require low-power Wi-Fi, and its main advantages are as follows:

[0052] 1. For routers with better performance, it can ensure lower power consumption when beacon frames are received normally. This significantly improves battery life without affecting the wake-up speed.

[0053] 2. For routers with poor performance, the system sacrifices some power consumption to increase wake-up speed, thus providing a better user experience.

[0054] 3. After successfully connecting to the hotspot, a certain number of beacon frames are collected before going into sleep mode, and the beacon frame receiving window during sleep mode is calculated. This automatically adjusts the beacon frame receiving window size based on the router's performance, eliminating the need to manually modify the beacon frame receiving window during router compatibility testing and reducing software development and maintenance costs.

[0055] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present invention.

[0056] This embodiment also provides a device for adjusting the beacon frame receiving window, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0057] Figure 8 is a structural block diagram of a device for adjusting a beacon frame receiving window according to an embodiment of the present invention. Figure 8 As shown, the device includes:

[0058] A receiving module 82 is configured to receive a first number of target beacon frames sent by a target router when the target hotspot is connected to the target router;

[0059] A determination module 84 is configured to determine a target size of a receiving window for receiving beacon frames of the WIFI device in a sleep state based on the first number of target beacon frames;

[0060] The adjustment module 86 is configured to adjust the size of the receiving window of the WIFI device for receiving beacon frames to the target size.

[0061] In an exemplary embodiment, the determination module 84 can determine the target size of the receiving window for receiving beacon frames when the WIFI device is in a sleep state based on the first number of target beacon frames in the following manner: determine the advance of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; determine the lag of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; and determine the target size based on the advance and the lag.

[0062] In an exemplary embodiment, the determination module 84 can determine the advance amount of the receiving window of the WIFI device in the sleep state based on the first number of target beacon frames in the following manner: sequentially determine the sending time intervals between two adjacent target beacon frames included in the first number of target beacon frames; sort the sending time intervals according to the target order to obtain a target time interval sequence; and determine the advance amount based on the target time interval sequence.

[0063] In an exemplary embodiment, the determination module 84 can determine the advance amount based on the target time interval sequence in the following manner: determine a standard time interval for the target router to send a beacon frame; determine a first difference between the Nth time interval included in the target time interval sequence and the standard time interval, wherein N is a positive integer and is less than the first number; and determine the first difference as the advance amount.

[0064] In an exemplary embodiment, the determination module 84 can determine the hysteresis of the receiving window of the WIFI device in the sleep state based on the first number of target beacon frames in the following manner: sequentially determine the sending time interval between two adjacent target beacon frames included in the first number of target beacon frames; sort the sending time intervals according to the target order to obtain a target time interval sequence; and determine the hysteresis based on the target time interval sequence.

[0065] In an exemplary embodiment, the determination module 84 can determine the hysteresis based on the target time interval sequence in the following manner: determine a standard time interval for the target router to send a beacon frame; determine a second difference between the Mth time interval included in the target time interval sequence and the standard time interval, wherein M is a positive integer and is less than the first number; and determine the second difference as the hysteresis.

[0066] In an exemplary embodiment, the adjustment module 86 may determine the target size based on the advance amount and the lag amount in the following manner: determine the size of the beacon frame receiving window of the WIFI device; and determine the sum of the size of the beacon frame receiving window, the advance amount, and the lag amount as the target size.

[0067] It should be noted that the above modules can be implemented through software or hardware. For the latter, it can be implemented in the following ways, but not limited to: the above modules are all located in the same processor; or the above modules are located in different processors in any combination.

[0068] An embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, wherein when the computer program is executed by a processor, the steps of any of the above methods are implemented.

[0069] In an exemplary embodiment, the computer-readable storage medium may include, but is not limited to, various media that can store computer programs, such as a USB flash drive, a read-only memory (ROM), a random access memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.

[0070] An embodiment of the present invention further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0071] In an exemplary embodiment, the electronic device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0072] For specific examples in this embodiment, reference may be made to the examples described in the above embodiments and exemplary implementation modes, and this embodiment will not be described in detail here.

[0073] It should be apparent to those skilled in the art that the modules or steps of the application described above can be implemented with general computing devices, which can be centralized on a single computing device or distributed on a network of multiple computing devices, which can be implemented with program codes executable by the computing devices, so that they can be stored in storage devices and executed by the computing devices, and in some cases, the steps shown or described can be executed in different orders than shown, or made into individual integrated circuit modules, or made into a single integrated circuit module. Thus, the application is not limited to any particular combination of hardware and software.

[0074] The preferred embodiments of the application described above are intended to be merely exemplary and those skilled in the art will readily suggest modifications and variations to the above-described embodiments. Any modification, equivalent replacement, improvement, etc. made within the principles of the application should be included in the protection scope of the application.

Claims

1. A method for adjusting a beacon frame receiving window, characterized in that: include: In a case of being connected to a target hotspot of a target router, receiving a first number of target beacon frames sent by the target router; Determine, based on the first number of target beacon frames, a target size of a receiving window for receiving beacon frames by the WIFI device in a sleep state; Adjusting the size of the receiving window of the WIFI device for receiving beacon frames to the target size; Determining a target size of a receiving window for receiving beacon frames when the WIFI device is in a sleep state based on the first number of target beacon frames includes: determining an advance amount of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; determining a lag amount of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; and determining the target size based on the advance amount and the lag amount. Determining, based on the first number of target beacon frames, that the WIFI device is in a dormant state, the advance of the receive window comprising: sequentially determining a transmission time interval between two adjacent target beacon frames included in the first number of target beacon frames; sorting the transmission time intervals according to a target order to obtain a target time interval sequence; and determining the advance based on the target time interval sequence; determining, based on the first number of target beacon frames, that the WIFI device is in a dormant state, the lag of the receive window comprising: sequentially determining a transmission time interval between two adjacent target beacon frames included in the first number of target beacon frames; sorting the transmission time intervals according to a target order to obtain a target time interval sequence; and determining the lag based on the target time interval sequence; Determining the target size based on the advance amount and the hysteresis amount includes: determining a size of a beacon frame receiving window of the WIFI device; and determining a sum of the size of the beacon frame receiving window, the advance amount, and the hysteresis amount as the target size.

2. The method according to claim 1, characterized in that Determining the advance based on the target time interval sequence includes: Determining a standard time interval for the target router to send beacon frames; Determine a first difference between an Nth time interval included in the target time interval sequence and the standard time interval, wherein N is a positive integer and is less than the first number; The first difference is determined as the advance amount.

3. The method according to claim 1, characterized in that Determining the hysteresis amount based on the target time interval sequence includes: Determining a standard time interval for the target router to send beacon frames; Determine a second difference between an Mth time interval included in the target time interval sequence and the standard time interval, wherein M is a positive integer and is less than the first number; The second difference is determined as the hysteresis amount.

4. A device for adjusting a beacon frame receiving window, characterized in that: include: a receiving module, configured to receive a first number of target beacon frames sent by a target router when connected to the target hotspot of the target router; a determination module, configured to determine, based on the first number of target beacon frames, a target size of a receiving window for receiving beacon frames by the WIFI device in a sleep state; An adjustment module, configured to adjust the size of a receiving window for receiving beacon frames of the WIFI device to the target size; The receiving module determines a target size of a receiving window for receiving beacon frames when the WIFI device is in a sleep state based on the first number of target beacon frames by: determining an advance amount of the receiving window when the WIFI device is in a sleep state based on the first number of target beacon frames; Determine, based on the first number of target beacon frames, a hysteresis of the receiving window of the WIFI device in a sleep state; and determine the target size based on the advance and the hysteresis; The receiving module determines the advance of the receiving window when the WIFI device is in a dormant state based on the first number of target beacon frames by: sequentially determining the sending time interval between two adjacent target beacon frames included in the first number of target beacon frames; sorting the sending time intervals according to a target order to obtain a target time interval sequence; and determining the advance based on the target time interval sequence. The receiving module determines the lag of the receiving window when the WIFI device is in a dormant state based on the first number of target beacon frames by: sequentially determining the sending time interval between two adjacent target beacon frames included in the first number of target beacon frames; sorting the sending time intervals according to a target order to obtain a target time interval sequence; and determining the lag based on the target time interval sequence. The receiving module determines the target size based on the advance amount and the hysteresis amount in the following manner: determining the size of the beacon frame receiving window of the WIFI device; and determining the sum of the size of the beacon frame receiving window, the advance amount, and the hysteresis amount as the target size.

5. A computer-readable storage medium, characterized in that The computer-readable storage medium stores a computer program, wherein the computer program implements the steps of the method described in any one of claims 1 to 3 when executed by a processor.

6. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to perform the method according to any one of claims 1 to 3.

Citation Information

Patent Citations

  • Method for reducing power consumption of Bluetooth receiving equipment, equipment and storage medium

    CN113543090A