Wake-up method and apparatus, and electronic device

By using a binary search method to adjust the early wake-up time of the WLAN module in electronic devices, the problem of abnormal wake-up caused by Beacon loss is solved, the efficiency of wake-up time adjustment and the accuracy of Beacon reception are improved, and power consumption is reduced.

WO2026067427A1PCT designated stage Publication Date: 2026-04-02VIVO MOBILE COMM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-24
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

In the prior art, the failure of the WLAN module of an electronic device to receive the Beacon sent by the AP in a timely manner leads to abnormal wake-up, which affects power consumption. Furthermore, the existing methods are inefficient because they involve gradually adjusting the wake-up time.

Method used

The binary search method is used to adjust the early wake-up time of the WLAN module. The wake-up time is precisely adjusted when the accumulated time reaches DTIM and no beacon data packet is received, thereby reducing the possibility of abnormal wake-up.

Benefits of technology

It improves the efficiency of wake-up time adjustment, ensures that the WLAN module accurately receives Beacon, reduces abnormal wake-ups, and saves power consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2025123504_02042026_PF_FP_ABST
    Figure CN2025123504_02042026_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of communications, and discloses a wake-up method and apparatus, and an electronic device. The method comprises: initializing a start time of a timer, an advance wake-up time of a wireless local area network (WLAN) module of an electronic device, a time adjustment range of the advance wake-up time, and a first accumulated timing threshold of the timer; when an accumulated time of the timer reaches a delivery traffic indication message (DTIM), and a first count of consecutive failures by the electronic device to receive a first beacon data packet within a first time period is greater than or equal to a first count threshold, on the basis of the time adjustment range of the advance wake-up time and by using a bisection method, adjusting the advance wake-up time, so as to obtain a first wake-up time, the first time period being a time period from the start time of the timer to the first accumulated timing threshold; and when the accumulated time of the timer reaches the first wake-up time, waking up the WLAN module.
Need to check novelty before this filing date? Find Prior Art

Description

Wake-up method, device and electronic device

[0001] Cross-reference to Related Applications

[0002] This application claims priority to Chinese Patent Application No. 202411375590.6, filed on September 29, 2024, entitled “Wake-up method, device and electronic device”, the entire contents of which are incorporated herein by reference. TECHNICAL FIELD

[0003] Embodiments of the present application relate to the field of communication technology, in particular to a wake-up method, device and electronic device. BACKGROUND

[0004] When the user does not use the electronic device temporarily, the wireless local area network (WLAN) module of the electronic device is woken up every time the delivery traffic indication message (DTIM) duration elapses to avoid not receiving data sent from an external network, and receives a beacon (Beacon) sent by an access point wireless (AP) AP. According to the Beacon, it is determined whether the AP has buffered data to be sent to the electronic device. If so, the WLAN module wakes up the system of the electronic device and receives the data to report to the system application.

[0005] However, in actual application, the WLAN module of the electronic device may not receive the Beacon sent by the AP in time due to problems of the AP or the electronic device, causing a Beacon loss phenomenon. If the electronic device appears multiple Beacon loss phenomena, the WLAN module may abnormally wake up the system, which affects the power consumption of the electronic device.

[0006] Currently, in order to solve the problem that the WLAN module does not receive the Beacon of the AP in time, the wake-up time of the WLAN module is usually adjusted step by step, and the wake-up time of the WLAN module is advanced to ensure that the Beacon sent by the AP can be received. However, this determination method of advancing the wake-up time is inefficient. SUMMARY

[0007] Embodiments of the present application aim to provide a wake-up method, device and electronic device to improve the determination efficiency of the WLAN module to advance the wake-up time, to accurately receive the Beacon sent by the AP, and to reduce the possibility of abnormal wake-up of the WLAN module.

[0008] In a first aspect, the embodiments of the present application provide a wake-up method, which comprises:

[0009] initializing a start time of a timer, an early wake-up time of a wireless local area network (WLAN) module of the electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer;

[0010] in a case where the accumulated timing time of the timer reaches a delivery traffic indication message (DTIM) and a first number of times that the electronic device continuously fails to receive a first beacon data packet in a first time period is greater than or equal to a first number threshold, adjusting the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time by using a dichotomy method, the first time period being a time period between the start time of the timer and the first accumulated timing time threshold;

[0011] in a case where the accumulated timing time of the timer reaches the first wake-up time, waking up the WLAN module.

[0012] In a second aspect, an embodiment of the present application provides a wake-up device, which comprises:

[0013] an initialization module, configured to initialize a start time of a timer, an early wake-up time of a wireless local area network (WLAN) module of the electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer;

[0014] a time adjustment module, configured to, in a case where the accumulated timing time of the timer reaches a delivery traffic indication message (DTIM) and a first number of times that the electronic device continuously fails to receive a first beacon data packet in a first time period is greater than or equal to a first number threshold, adjust the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time by using a dichotomy method, the first time period being a time period between the start time of the timer and the first accumulated timing time threshold;

[0015] a wake-up module, configured to, in a case where the accumulated timing time of the timer reaches the first wake-up time, wake up the WLAN module.

[0016] In a third aspect, an embodiment of the present application provides an electronic device, which comprises a processor and a memory, the memory storing a program or instructions executable on the processor, and the program or instructions, when executed by the processor, implement the steps of the method according to the first aspect.

[0017] In a fourth aspect, an embodiment of the present application further provides an electronic device configured to perform the wake-up method according to the first aspect.

[0018] In a fifth aspect, an embodiment of the present application provides a readable storage medium, the readable storage medium storing a program or instructions, the program or instructions being executed by a processor to implement the steps of the method according to the first aspect.

[0019] In a sixth aspect, an embodiment of the present application provides a chip, the chip comprising a processor and a communication interface, the communication interface being coupled to the processor, and the processor being configured to run a program or instructions to implement the method according to the first aspect.

[0020] In a seventh aspect, an embodiment of the present application provides a computer program product stored in a storage medium, the computer program product being executed by at least one processor to implement the method according to the first aspect.

[0021] In the embodiment of the present application, when the early wake-up time is adjusted, the initialized early wake-up time is adjusted by using a dichotomy method based on the time adjustment range of the initialized early wake-up time, to obtain a first wake-up time. Thus, compared with the prior art of gradually adjusting the early wake-up time in the time adjustment range of the early wake-up time, the embodiment of the present application adjusts the early wake-up time by using a dichotomy method, which improves the adjustment efficiency of the early wake-up time. In the embodiment of the present application, the early wake-up time is adjusted when the accumulated timing time of the timer reaches the DTIM, and the first number of times that the electronic device continuously fails to receive the first beacon data packet in the first time period is greater than or equal to the first number threshold. Thus, the problem of abnormal wake-up of the WLAN module of the electronic device caused by the loss of the Beacon in the prior art can be solved, so that the Beacon sent by the AP can be accurately received, and the possibility of abnormal wake-up of the WLAN module can be reduced. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the description of the embodiments of the present application will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0023] FIG. 1 is a flowchart of a wake-up method according to some embodiments of the present application;

[0024] FIG. 2 is a flowchart of a wake-up method according to some embodiments of the present application;

[0025] FIG. 3 is a flowchart of an adjustment of an early wake-up time by a passive algorithm according to some embodiments of the present application;

[0026] FIG. 4 is a flowchart illustrating a process of adjusting an early wake-up time according to an active algorithm, according to some embodiments of the present disclosure;

[0027] FIG. 5 is a structural diagram of a wake-up device, according to some embodiments of the present disclosure;

[0028] FIG. 6 is a structural diagram of an electronic device, according to some embodiments of the present disclosure;

[0029] FIG. 7 is a hardware structural diagram of an electronic device, according to some embodiments of the present disclosure. DETAILED DESCRIPTION

[0030] The technical solutions in the embodiments of the present disclosure will be clearly described below with reference to the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only some, but not all, of the embodiments of the present disclosure. Based on the embodiments in the present disclosure, all other embodiments obtained by a person of ordinary skill in the art belong to the scope of the present disclosure.

[0031] The terms "first", "second", and the like in the specification and claims of the present disclosure are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure can be implemented in an order other than that illustrated or described herein, and the objects distinguished by "first", "second", etc. are usually a category and do not limit the number of objects, for example, the first object can be one or more. In addition, "and / or" in the specification and claims means at least one of the connected objects, and the character " / ", generally represents a "or" relationship between the front and rear associated objects.

[0032] The wake-up method provided by the embodiments of the present disclosure can be applied to the scenario of the WLAN module of the electronic device being woken up in advance, and a specific application scenario is that the user sets the WLAN module of the electronic device to enter a sleep state in the setting interface of the electronic device, and sets the DTIM of the WLAN module, and another specific application scenario is that the DTIM of the WLAN module of the electronic device is automatically set when the electronic device is shipped, so that the WLAN module of the electronic device is automatically woken up every DTIM to receive data sent by other devices.

[0033] The wake-up method provided by the embodiments of the present disclosure will be described in detail below in combination with the drawings, through specific embodiments and application scenarios.

[0034] FIG. 1 is a flowchart illustrating a wake-up method, according to an embodiment of the present disclosure. As shown in FIG. 1, the wake-up method provided by the embodiments of the present disclosure can include steps 110-130.

[0035] Step 110, initializing a start time of a timer, an early wake-up time of a WLAN module of the electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer.

[0036] The start time of the timer can be an initial time of the initialized timer, which can be 0.

[0037] The early wake-up time can be a time at which the WLAN module is woken up before a DTIM set by the system or set by the user, that is, under normal circumstances, the WLAN module is woken up when the time of the timer reaches the DTIM, and the early wake-up time is a time at which the WLAN module is woken up before the time of the timer reaches the DTIM. The early wake-up time can be set by the user according to the user's needs, which is not limited in the embodiment of the present application.

[0038] In an example, taking DTIM=400us as an example, the early wake-up time can be 200us.

[0039] The time adjustment range of the early wake-up time can be a time range for adjusting the early wake-up time, and the lower limit value of the time adjustment range of the early wake-up time can be the initialized early wake-up time. The time adjustment range of the early wake-up time can be set by the user according to the user's needs, which is not limited in the embodiment of the present application. For example, the time adjustment range of the early wake-up time [Emin, Emax]=[200us, 5ms].

[0040] The first accumulated timing time threshold of the timer can be a threshold of the accumulated timing time of the timer, which can be obtained according to prior experience.

[0041] It should be noted that if the electronic device does not receive a Beacon sent by the AP to a certain threshold within the time period from the start time of the initialized timer to the first accumulated timing time threshold, the connection between the electronic device and the AP will be disconnected. If the connection between the electronic device and the AP is disconnected, the electronic device cannot receive the Beacon, so the first accumulated timing time threshold of the timer can be determined according to the above experience. The first accumulated timing time threshold of the timer can be set by the user according to the user's needs, which is not limited in the embodiment of the present application.

[0042] It should be noted that, because normally the WLAN module of the electronic device should be woken up once every DTIM, the early wake-up time in the embodiments of the present application should be the time before each DTIM, and the first accumulated timing time threshold of the timer is also related to the DTIM, and specifically the first accumulated timing time threshold of the timer can be an integer multiple of the DTIM, for example, the first accumulated timing time threshold of the timer can be 10 times of the DTIM, that is, the first accumulated timing time threshold can be 4 ms.

[0043] In step 120, when the accumulated timing time of the timer reaches the DTIM and the first number of times that the electronic device continuously fails to receive the first beacon data packet within the first time period is greater than or equal to the first number threshold, the early wake-up time is adjusted by using the dichotomy method based on the time adjustment range of the early wake-up time, to obtain the first wake-up time.

[0044] In the first time period, it can be the time period between the start time of the timer and the first accumulated timing time threshold.

[0045] The first beacon data packet can be a beacon data packet that the electronic device needs to receive, that is, a Beacon data packet that the electronic device needs to receive, and the Beacon data packet has data that the electronic device needs to receive.

[0046] The first number of times can be the number of times that the electronic device continuously fails to receive the first beacon data packet within the first time period, that is, how many times the electronic device continuously fails to receive the first beacon data packet within the first time period.

[0047] The first number threshold can be a threshold of the first number of times, which can be 3, for example, and the first number threshold can be set by the user as needed, which is not limited in the embodiments of the present application.

[0048] The first wake-up time can be the wake-up time obtained after the early wake-up time is adjusted.

[0049] In some embodiments of the present application, when the accumulated timing time of the timer reaches the DTIM and the first number of times that the electronic device continuously fails to receive the first beacon data packet within the first time period is greater than or equal to the first number threshold, the early wake-up time can be adjusted by using the dichotomy method based on the time adjustment range of the early wake-up time, to obtain the first wake-up time.

[0050] In some embodiments of the present application, in order to reduce the possibility of abnormal wake-up of the WLAN module, step 120 can specifically include:

[0051] In the case that the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally woken up, the wake-up reason of the electronic device being abnormally woken up is obtained.

[0052] In a case where the wake-up reason is not that the electronic device continuously fails to receive the first beacon data packet and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, a first number of times that the electronic device continuously fails to receive the first beacon data packet within a first time period is obtained.

[0053] In a case where the first number of times is greater than or equal to a first number threshold, the early wake-up time is adjusted by using a dichotomy method based on a time adjustment range of the early wake-up time, to obtain a first wake-up time.

[0054] In some embodiments of the present application, in a case where the accumulated timing time of the timer reaches a DTIM and the electronic device is abnormally woken up, a wake-up reason for the electronic device being abnormally woken up can be obtained. If the reason for the electronic device being abnormally woken up is that the electronic device continuously fails to receive the first beacon data packet, that is, the electronic device is abnormally woken up due to continuously failing to receive the first beacon data packet, and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, a first number of times that the electronic device continuously fails to receive the first beacon data packet within a first time period is obtained. In a case where the first number of times is greater than or equal to a first number threshold, the early wake-up time is adjusted by using a dichotomy method based on a time adjustment range of the early wake-up time, to obtain a first wake-up time.

[0055] It should be noted that, when detecting whether the reason for the electronic device being abnormally woken up is that the electronic device continuously fails to receive the first beacon data packet, it can be detected whether the hardware in the electronic device has been abnormally woken up. This is because the first beacon data packet stores data transmitted to the system application of the electronic device, and the reception of the data requires the system application to receive it. To make the system application of the electronic device receive the data, the hardware of the electronic device needs to be woken up. Thus, the hardware is woken up to wake up the system application based on the hardware, such as the instant messaging message stored in the first beacon data and transmitted to the instant messaging application program of the electronic device. When the electronic device is abnormally woken up, the central processing unit (CPU) of the electronic device is also woken up to process the instant messaging message to be received by the instant messaging application program based on the CPU.

[0056] In the embodiments of the present application, when the early wake-up time is adjusted, the early wake-up time is adjusted only when it is determined that the electronic device does not abnormally wake up due to not receiving the first beacon data packet, the accumulated timing time of the timer is greater than the first accumulated timing time threshold, and the first number of times that the electronic device continuously does not receive the first beacon data packet within the first time period is greater than or equal to the first preset number threshold. This can solve the problem of abnormal wake-up of the WLAN module of the electronic device caused by Beacon loss in the prior art, so as to accurately receive the Beacon sent by the AP and reduce the possibility of abnormal wake-up of the WLAN module.

[0057] In some embodiments of the present application, in order to further improve the efficiency of determining the early wake-up time, the time adjustment range based on the early wake-up time is used to adjust the early wake-up time by using the bisection method to obtain the first wake-up time, which can specifically include:

[0058] The time adjustment range of the early wake-up time is calculated by using the bisection method to obtain the first wake-up time.

[0059] In some embodiments of the present application, the time adjustment range of the early wake-up time can be calculated by using the bisection method to obtain the first wake-up time.

[0060] In one example, the early wake-up time is 200us, DTIM=400us, the time adjustment range [Emin,Emax] of the early wake-up time is [200us, 5ms], the first accumulated timing time threshold T1 of the timer is 10 times the DTIM, that is, T1=10x400us=4ms, and the first number threshold A1 is 3. For example, if the electronic device does not receive the first beacon data packet for 3 times within 4ms, the time adjustment range [Emin,Emax] of the early wake-up time is calculated by using the bisection method, that is, (200+5000) / 2=2600us, and the first wake-up time is 2600us.

[0061] If the early wake-up time is adjusted from 200us to 2600us in the manner of the prior art with a step of 25us, 96 adjustments are needed. However, in the embodiments of the present application, only one adjustment is needed.

[0062] In the embodiments of the present application, the time adjustment range of the early wake-up time is calculated by using the bisection method to obtain the first wake-up time. Compared with the manner of gradually adjusting the early wake-up time in the prior art, the adjustment efficiency of the early wake-up time is improved by using the scheme in the embodiments of the present application.

[0063] Step 130, in the case that the accumulated timing time of the timer reaches the first wake-up time, wake up the WLAN module.

[0064] In some embodiments of the present application, in the case that the accumulated timing time of the timer reaches the first wake-up time, the WLAN module can be woken up, so that the electronic device can receive the Beacon sent by the AP, and the loss of the Beacon can be avoided.

[0065] In some embodiments of the present application, in order to further improve the efficiency of determining the early wake-up time, after the first wake-up time is obtained by adjusting the early wake-up time in the time adjustment range based on the early wake-up time by using the dichotomy, the method can further include:

[0066] resetting the start time of the timer to 0 to restart the timing, and in the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, obtaining a second number of times that the electronic device continuously fails to receive the first beacon data packet in a second time period;

[0067] in the case that the second number of times is less than the first number of times threshold, obtaining a third number of times that the electronic device fails to receive the first beacon data packet in a third time period;

[0068] in the case that the third number of times is greater than or equal to the second number of times threshold, performing dichotomy calculation on the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time to obtain a second wake-up time.

[0069] The second time period can be a time period between the time when the timer restarts the timing and the first accumulated timing time threshold.

[0070] The second number of times can be the number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period, that is, how many times the electronic device continuously fails to receive the first beacon data packet in the second time period.

[0071] The third time period can be a time period between the time when the timer restarts the timing and the second accumulated timing time threshold.

[0072] The second accumulated timing time threshold can be a threshold of the accumulated timing time of the timer, which can be obtained according to prior experience, and can be set by the user according to the user's demand, which is not limited in the embodiments of the present application.

[0073] In some embodiments of the present application, the second accumulated timing time threshold can be a positive integer multiple of DTIM, and the second accumulated timing time threshold is greater than the first accumulated timing time threshold, for example, the second accumulated timing time threshold can be 20 times of DTIM, that is, the second accumulated timing time threshold can be 8 ms.

[0074] The second number threshold can be a pre-set second number threshold, which can be 5 for example, and can be set according to user demand, and is not limited in the embodiments of the present application.

[0075] The second wake-up time can be a wake-up time obtained by performing binary search on the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time.

[0076] In some embodiments of the present application, after obtaining the first wake-up time, i.e., after adjusting the early wake-up time for the first time, the starting time of the timer is reset to 0, and then the timer is restarted. When the accumulated timing time of the timer reaches the first accumulated timing time threshold again, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is obtained. Then, when the second number is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is obtained. It is determined whether the third number is greater than or equal to the second number threshold. If yes, the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time is calculated by binary search to obtain the second wake-up time.

[0077] With reference to the above example, taking the second accumulated timing time threshold T2 as 20 times of DTIM, i.e., T2 = 20 x 400us = 8ms, and the second number threshold A2 as 5 for example, after adjusting the early wake-up time in the last round to obtain the first wake-up time 2600us, the starting time of the timer is reset to 0, and then the timer is restarted. When the accumulated timing time of the timer reaches the 10th DTIM again, i.e., the accumulated timing time of the timer reaches the 4th ms, if it is counted that the electronic device fails to receive the first beacon data packet for 3 times continuously in the 4ms, which is less than A1, the timer continues to count. When the accumulated timing time of the timer continues to reach the next 10th DTIM, i.e., the accumulated timing time of the timer reaches the 8th ms, if it is counted that the electronic device fails to receive the first beacon data packet for 5 times in the 8ms, which is equal to A2, the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time is calculated by binary search, i.e., (2600+5000) / 2 = 3800us, i.e., the second wake-up time is 3800us.

[0078] If the early wake-up time is adjusted from 200us to 3800us in the manner of the prior art with a step of 25us, 144 adjustments are needed, i.e., (3800-200) / 25 = 144. However, in the embodiments of the present application, only two adjustments are needed.

[0079] In the embodiments of the present application, the first wake-up time after the previous round of adjustment is further adjusted by using a dichotomy method, compared with the way of gradually adjusting the early wake-up time in the prior art, the scheme of the embodiments of the present application improves the adjustment efficiency of the early wake-up time.

[0080] In some embodiments of the present application, in order to further improve the determination efficiency of the early wake-up time, in the case that the third number is greater than or equal to the second number threshold, the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time is calculated by dichotomy to obtain the second wake-up time, and the above-mentioned method can further include:

[0081] The first wake-up time is taken as the lower limit value of the time adjustment range of the early wake-up time to obtain the first adjustment time range.

[0082] After obtaining the second wake-up time, the above-mentioned method can further include:

[0083] Resetting the start time of the timer to 0 to restart the timing, in the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of the first beacon data packet continuously not received by the electronic device in the second time period is less than the first number threshold, the third number of the first beacon data packet not received by the electronic device in the third time period is less than the second number threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range, the second wake-up time and the lower limit value of the first adjustment time range are calculated by dichotomy to obtain the third wake-up time.

[0084] The first adjustment time range can be the updated early wake-up time adjustment range obtained after taking the first wake-up time as the lower limit value of the time adjustment range of the early wake-up time, that is, the first adjustment time range [Emin, Emax] = [2600us, 5ms].

[0085] The third wake-up time can be the wake-up time obtained by calculating the second wake-up time and the lower limit value of the first adjustment time range by dichotomy.

[0086] In some embodiments of the present application, before the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time is calculated by bisection, the first wake-up time needs to be taken as the lower limit value of the time adjustment range of the early wake-up time, the time adjustment range of the early wake-up time is updated to obtain the first adjustment time range, then after the second wake-up time is obtained, that is, after the early wake-up time is adjusted for the second time, the starting time of the timer is reset to 0, then the timing is restarted, in the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold again, the second number of times that the electronic device continuously does not receive the first beacon data packet in the second time period is obtained, then in the case that the second number of times is less than the first number of times threshold, the third number of times that the electronic device does not receive the first beacon data packet in the third time period is obtained, if the third number of times is less than the second number of times threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range, the second wake-up time and the lower limit value of the first adjustment time range are calculated by bisection to obtain the third wake-up time.

[0087] With reference to the above example, after the first wake-up time is adjusted in the last round to obtain the second wake-up time 3800us, the starting time of the timer is reset to 0, then the timing is restarted, in the case that the accumulated timing time of the timer reaches the 10th DTIM again, that is, the accumulated timing time of the timer reaches the 4th ms, if the number of times that the electronic device continuously does not receive the first beacon data packet in the 4ms is less than A1, the timer continues to time, in the case that the accumulated timing time of the timer continues to reach the next 10th DTIM, that is, the accumulated timing time of the timer reaches the 8th ms, if the number of times that the electronic device does not receive the first beacon data packet in the 8ms is less than A2, it is judged that the size of the second wake-up time 3800us and the lower limit value 2600us of the first adjustment time range, it is determined that the second wake-up time 3800us is greater than the lower limit value 2600us of the first adjustment time range, then the second wake-up time and the lower limit value of the first adjustment time range are calculated by bisection, that is, (3800+2600) / 2=3200us, that is, the third wake-up time is 3200us.

[0088] If the early wake-up time is adjusted from 200us to 3200us in the manner of the prior art with a step of 25us, 120 adjustments are needed, however, in the embodiments of the present application, only three adjustments are needed.

[0089] In the embodiments of the present application, the second wake-up time adjusted in the last round is further adjusted by using the bisection method, compared with the way of gradually adjusting the early wake-up time in the prior art, the scheme of the embodiments of the present application improves the adjustment efficiency of the early wake-up time.

[0090] In some embodiments of the present application, in order to accurately determine the end time of the adjustment to the wake-up time, before the second wake-up time and the lower limit value of the first adjustment time range are calculated by bisection to obtain the third wake-up time, the above-mentioned method can further comprise:

[0091] Taking the second wake-up time as the upper limit value of the first adjustment time range, the second adjustment time range is obtained;

[0092] After obtaining the third wake-up time, the above-mentioned method can further comprise:

[0093] Resetting the current time to 0;

[0094] Resetting the start time of the timer to 0 and restarting the timer, and ending the adjustment to the wake-up time in the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, and the second number of times that the electronic device continuously fails to receive the first beacon data packet within the second time period is less than the first number threshold, and the third number of times that the electronic device fails to receive the first beacon data packet within the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range.

[0095] Among them, the second adjustment time range can be the updated time adjustment range of the early wake-up time after taking the second wake-up time as the upper limit value of the first adjustment time range, that is, the second adjustment time range [Emin, Emax] = [2600us, 3800us].

[0096] In some embodiments of the present application, before the second wake-up time and the lower limit value of the first adjustment time range are calculated by bisection to obtain the third wake-up time, the second wake-up time needs to be taken as the upper limit value of the first adjustment time range to update the first adjustment time range to obtain the second adjustment time range. After obtaining the third wake-up time, that is, after adjusting the early wake-up time for the third time, the start time of the timer can be reset to 0, and then the timer can be restarted. In the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold again, the second number of times that the electronic device continuously fails to receive the first beacon data packet within the second time period is obtained. In the case that the second number of times is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet within the third time period is obtained. If the third number of times is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, the adjustment to the wake-up time is ended.

[0097] Continuing to refer to the above example, after the third wake-up time 3200us is obtained by adjusting the second wake-up time in the last round, the start time of the timer is reset to 0, and then the timing is restarted. When the accumulated timing time of the timer reaches the 10th DTIM again, i.e., the accumulated timing time of the timer reaches 4 ms, if the number of times that the electronic device fails to receive the first beacon data packet within 4 ms is less than Al, the timer continues to count. When the accumulated timing time of the timer continues to reach the next 10th DTIM, i.e., the accumulated timing time of the timer reaches 8 ms, if the number of times that the electronic device fails to receive the first beacon data packet within 8 ms is less than A2, it is determined that the third wake-up time 3200us is greater than the lower limit value 2600us of the second adjustment time range, and it is determined that the third wake-up time 3200us is greater than the lower limit value 2600us of the second adjustment time range.

[0098] In the above example, since the third wake-up time 3200us is greater than the lower limit value 2600us of the second adjustment time range, the third wake-up time and the lower limit value of the second adjustment time range are calculated by bisection method, i.e., (3200+2600) / 2=2900us, to obtain the fourth round of wake-up time 2900us, and the wake-up time 3200us of the last round is taken as the upper limit value of the second adjustment time range, to obtain the third adjustment time range [Emin, Emax]=[2600us, 3200us].

[0099] Then the start time of the timer is reset to 0, and then the timing is restarted. When the accumulated timing time of the timer reaches the 10th DTIM again, i.e., the accumulated timing time of the timer reaches 4 ms, if the number of times that the electronic device fails to receive the first beacon data packet within 4 ms is less than Al, the timer continues to count. When the accumulated timing time of the timer continues to reach the next 10th DTIM, i.e., the accumulated timing time of the timer reaches 8 ms, if the number of times that the electronic device fails to receive the first beacon data packet within 8 ms is less than A2, it is determined that the fourth round of wake-up time 2900us is greater than the lower limit value 2600us of the third adjustment time range, and it is determined that the fourth round of wake-up time 2900us is greater than the lower limit value 2600us of the third adjustment time range. Then the fourth round of wake-up time and the lower limit value of the third adjustment time range are calculated by bisection method, i.e., (2900+2600) / 2=2750us, to obtain the fifth round of wake-up time 2750us, and the wake-up time 2900us of the last round is taken as the upper limit value of the third adjustment time range, to obtain the fourth adjustment time range [Emin, Emax]=[2600us, 2900us].

[0100] Then continue to reset the start time of the timer to 0, if the first number of times that the timer is started from 0 and continuously does not receive the first beacon data packet within the first accumulated timing time threshold T1 is greater than or equal to the first number threshold A1, but the timer is started from 0 and continuously does not receive the first beacon data packet until the second accumulated timing time threshold T2, the second number of times is less than the threshold A2, and the final wake-up time is 2800us±20us, that is, the final wake-up time is [2780, 2820]us. For example, since the threshold 2600us < the fifth round of wake-up time 2750us < the final wake-up time 2800us±20us when the sixth adjustment is performed, the sixth round of wake-up time is calculated according to the bisection method on the fifth round of wake-up time and the upper limit value of the fourth adjustment time range, that is, (2750+2900) / 2=2825us, and the wake-up time of the last round 2750us is used as the lower limit value of the fourth adjustment time range, and the fifth adjustment time range [Emin,Emax]=[2750us, 2900us] is obtained.

[0101] When the seventh adjustment is performed, since the sixth round of wake-up time 2825 is greater than the final wake-up time 2800us±20us, the seventh round of adjustment is performed, and the sixth round of wake-up time 2825 is calculated according to the bisection method on the fifth adjustment time range.

[0102] Since the wake-up time obtained after the seventh round of adjustment is 2788us, which satisfies 2800us±20us, according to the scheme of the embodiment of the present application, only 7 rounds of adjustment are required to adjust to a suitable value.

[0103] If the prior art scheme is used, the wake-up time is adjusted from 200us to 2800us±20us, that is, the wake-up time is adjusted from 200us to [2780, 2820]us, and for example, the step is 25us, then the adjustment needs to be adjusted (2800-200) / 25=104 times, and needs to experience 104 times of adjustment.

[0104] In the embodiment of the present application, when the accumulated timing time of the timer reaches the first accumulated timing time threshold, and the second number of times that the electronic device continuously does not receive the first beacon data packet in the second time period is less than the first number threshold, and the third number of times that the electronic device does not receive the first beacon data packet in the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, the adjustment of the third wake-up time cannot be continued, and the adjustment of the wake-up time is ended at this time, so that the end time of the adjustment of the wake-up time can be accurately determined.

[0105] The adjustment mode of the early wake-up time is a passive adjustment mode, which is an improvement of the passive adjustment mode in the prior art.

[0106] In some embodiments of the present application, in order to further improve the determination efficiency of the early wake-up time, the present application further provides an active adjustment mode, which is specifically as follows:

[0107] In some embodiments of the present application, in order to further improve the determination efficiency of the early wake-up time, the above-mentioned method can further include, before the wake-up reason of the electronic device being abnormally woken up is obtained:

[0108] initializing a starting number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet;

[0109] After the wake-up reason of the electronic device being abnormally woken up is obtained, the above-mentioned method can further include:

[0110] In the case that the wake-up reason is that the electronic device continuously fails to receive the first beacon data packet, updating the starting number of times to obtain a fourth number of times;

[0111] In the case that the fourth number of times is greater than a third number of times threshold, obtaining a first number of data packets of a second beacon data packet sent by the electronic device to a test server, a second number of data packets of the first beacon data packet fed back to the electronic device by the test server, a transmission delay duration of the first beacon data packet fed back by the test server, and a reference delay duration of the first beacon data fed back by the test server, wherein the first beacon data packet is obtained by the test server after analyzing the second beacon data packet;

[0112] According to the first number of data packets, the second number of data packets, the transmission delay duration and the reference delay duration, the early wake-up time is adjusted to obtain a fourth wake-up time.

[0113] The initialized starting number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet can be 0.

[0114] The fourth number of times can be the number of times after updating the initialized starting number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet in the case that the wake-up reason is that the electronic device continuously fails to receive the first beacon data packet.

[0115] The third number of times threshold can be a threshold of the fourth number of times, which can be set by the user as needed and is not limited in the embodiments of the present application, for example, the third number of times threshold can be 10.

[0116] The test server can be an external server that sends the first beacon data packet to the electronic device.

[0117] The second beacon data packet can be a beacon data packet sent by the electronic device to the test server.

[0118] In some embodiments of the present application, the first beacon data packet can be obtained by the test server after analyzing the second beacon data packet.

[0119] The first data packet number can be the number of the second beacon data packets sent by the electronic device to the test server, for example, the first data packet number can be 150.

[0120] The second data packet number can be the number of the first beacon data packets fed back by the test server to the electronic device, for example, the second data packet number can be 120.

[0121] The transmission delay duration can be the delay duration of the first beacon data packet fed back by the test server to the electronic device, for example, the transmission delay duration can be 500 ms, that is, the test server feeds back the first beacon data packet obtained by analyzing the second beacon data packet to the electronic device after delaying for 500 ms after receiving the second beacon data packet sent by the electronic device.

[0122] The reference delay duration can be a standard delay duration of the first beacon data packet fed back by the test server to the electronic device, for example, the reference delay duration can be a high delay standard time of the beacon data packet, and the reference delay duration can be set according to prior experience, which is not limited in the embodiments of the present application, for example, the reference delay duration can be 800 ms.

[0123] It should be noted that the reference delay duration of each first beacon data packet is the same.

[0124] The fourth wake-up time can be a wake-up time obtained after adjusting the early wake-up time.

[0125] In some embodiments of the present application, the initial number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet is first initialized, and in the case where it is detected that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet, the initial number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet can be updated to obtain a fourth number of times, and if the fourth number of times is greater than a third number of times threshold, it can be concluded that the electronic device is abnormally woken up multiple times due to the Beacon loss problem, which will affect the power consumption of the electronic device, so at this time, the fourth wake-up time can be obtained by adjusting the early wake-up time according to the first number of data packets of the second beacon data packet sent by the electronic device to the test server, the second number of data packets of the first beacon data packet fed back by the test server to the electronic device, the transmission delay duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data fed back by the test server.

[0126] In the embodiments of the present application, compared with the passive adjustment mode of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time in the prior art, the scheme of the embodiments of the present application can not need to set the time adjustment range of the early wake-up time, but in the case where it is determined that the number of times that the electronic device is abnormally woken up due to failure to receive the first beacon data packet is greater than the third number of times threshold, the fourth wake-up time can be obtained by directly adjusting the early wake-up time in one step according to the first number of data packets of the second beacon data packet sent by the electronic device to the test server, the second number of data packets of the first beacon data packet fed back by the test server to the electronic device, the transmission delay duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data fed back by the test server, thereby improving the determination efficiency of the early wake-up time.

[0127] In some embodiments of the present application, in order to improve the determination accuracy of the fourth wake-up time, the adjustment of the early wake-up time according to the first number of data packets, the second number of data packets, the transmission delay duration and the reference delay duration to obtain the fourth wake-up time can specifically include:

[0128] In the case where the first number of data packets is greater than or equal to a preset number threshold, the average delay duration of the first beacon data packet of the fifth number of data packets fed back by the test server can be calculated according to the transmission delay duration of each first beacon data packet fed back by the test server.

[0129] The packet loss rate of the second beacon data packet can be calculated according to the first number of data packets and the second number of data packets.

[0130] determine a delay rate of the first beacon data packet fed back by the test server according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration;

[0131] update the early wake-up time according to the average delay duration, the packet loss rate and the delay rate;

[0132] determine the fourth wake-up time based on the updated early wake-up time.

[0133] The preset quantity threshold can be a threshold of the first data packet quantity, which can be set according to user demand and is not limited in the embodiments of the present application.

[0134] In some embodiments of the present application, in the case that the first data packet quantity is greater than or equal to the preset quantity threshold, the average delay duration of the first beacon data packet of the first data packet quantity fed back by the test server to the electronic device can be calculated according to the transmission delay duration of each first beacon data packet fed back by the test server to the electronic device. Then the packet loss rate of the second beacon data packet can be calculated according to the first data packet quantity and the second data packet quantity. The delay rate of the first beacon data packet fed back by the test server to the electronic device can be determined according to the transmission delay duration of the first beacon data packet fed back by the test server to the electronic device and the reference delay duration. The early wake-up time can be updated according to the average delay duration, the packet loss rate and the delay rate. The fourth wake-up time can be determined based on the updated early wake-up time.

[0135] In the embodiments of the present application, in the case that the first data packet quantity is greater than or equal to the preset quantity threshold, the early wake-up time is updated according to the average delay duration of the first beacon data packet of the first data packet quantity fed back by the test server to the electronic device, the packet loss rate of the second beacon data packet and the delay rate of the first beacon data packet, to obtain the fourth wake-up time. In this way, the fourth wake-up time is determined in a quantitative manner, which improves the determination accuracy of the fourth wake-up time.

[0136] In some embodiments of the present application, in order to further improve the determination accuracy of the fourth wake-up time, the determination of the delay rate of the first beacon data packet fed back by the test server according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration can specifically include:

[0137] select a third beacon data packet with a transmission delay duration greater than the reference delay from the first beacon data packet;

[0138] determine the delay rate of the first beacon data packet fed back by the test server according to the number of the third beacon data packet and the first data packet quantity.

[0139] The third beacon data packet can be selected from the first beacon data packet, and the corresponding beacon data packet has a transmission delay duration greater than the reference delay duration.

[0140] In some embodiments of this application, a third beacon data packet with a transmission delay duration greater than a reference delay duration can be selected from the first beacon data packet, and then the delay rate of the feedback first beacon data packet can be determined based on the number of third beacon data packets and the number of first data packets.

[0141] The above method of determining the delay rate of the first beacon data packet based on the number of third beacon data packets and the number of first data packets can be achieved by determining the delay rate of the first beacon data packet as the ratio of the number of third beacon data packets to the number of first data packets.

[0142] In this embodiment of the application, by selecting a third beacon data packet from the first beacon data packet whose transmission delay duration is greater than the reference delay duration, and determining the delay rate of the first beacon data packet fed back by the test server based on the number of third beacon data packets and the number of first data packets, the delay rate of the first beacon data packet can be accurately determined, so as to accurately determine the fourth wake-up time and improve the accuracy of the determination of the fourth wake-up time.

[0143] In some embodiments of this application, in order to improve the efficiency of determining the wake-up time, the step of determining the fourth wake-up time based on the updated early wake-up time may specifically include:

[0144] If the updated early wake-up time falls within the time adjustment range of the early wake-up time, the updated early wake-up time will be determined as the fourth wake-up time.

[0145] In some embodiments of this application, if it is determined that the updated early wake-up time is within the time adjustment range of the early wake-up time, the updated early wake-up time can be directly determined as the fourth wake-up time, so that the adjustment of the early wake-up time can be achieved with only one adjustment.

[0146] In the embodiments of this application, when it is determined that the updated early wake-up time is within the time adjustment range of the early wake-up time, the updated early wake-up time is determined as the fourth wake-up time. Thus, the early wake-up time can be adjusted with only one adjustment. Compared with the passive adjustment method in the prior art, which gradually adjusts the early wake-up time within the time adjustment range, the solution of the embodiments of this application improves the efficiency of determining the wake-up time.

[0147] In some embodiments of the present application, in order to save the power consumption of the electronic device, before the fourth wake-up time is obtained by adjusting the wake-up time according to the first data packet number, the second data packet number, the transmission delay time length and the reference delay time length, the method can further include:

[0148] In the case that the electronic device test server is in a connected state, the connection between the electronic device and the test server is disconnected.

[0149] In some embodiments of the present application, before the first data packet number of the second beacon data packet sent by the electronic device to the test server, the second data packet number of the first beacon data packet fed back by the test server to the electronic device, the transmission delay time length of the test server feeding back the first beacon data packet and the reference delay time length of the test server feeding back the first beacon data, the electronic device needs to be connected with the test server first, so that the first data packet number of the second beacon data packet sent by the electronic device to the test server, the second data packet number of the first beacon data packet fed back by the test server to the electronic device, the transmission delay time length of the test server feeding back the first beacon data packet and the reference delay time length of the test server feeding back the first beacon data can be obtained.

[0150] Then, before the fourth wake-up time is obtained by adjusting the wake-up time according to the first data packet number, the second data packet number, the transmission delay time length and the reference delay time length, the connection between the electronic device and the test server can be disconnected, and the average delay time length of the first beacon data packet, the delay rate and the packet loss rate of the second beacon data packet can be directly calculated in the electronic device.

[0151] In the embodiments of the present application, before the fourth wake-up time is obtained by adjusting the wake-up time according to the first data packet number, the second data packet number, the transmission delay time length and the reference delay time length, if the electronic device and the test server are in a connected state, the connection between the electronic device and the test server can be directly disconnected, and the calculation of the average delay time length of the first beacon data packet, the delay rate and the packet loss rate of the second beacon data packet can be directly performed in the electronic device, so that the power consumption of the electronic device is saved.

[0152] In order to more clearly understand the scheme of the embodiments of the present application, the embodiments of the present application provide another implementable manner of the wake-up method, which includes steps 201-209.

[0153] Step 201, initializing the start time of the timer, the advance wake-up time of the WLAN module of the electronic device, the time adjustment range of the advance wake-up time, the first cumulative timing time threshold of the timer and the start number of times that the electronic device is abnormally woken up because of continuous non-reception of the first beacon data packet.

[0154] Step 202, judge whether the accumulated timing time of the timer reaches the DTIM, if yes, execute step 203, if no, return to execute step 202.

[0155] Step 203, judge whether the electronic device is abnormally woken up due to not receiving the first beacon data packet, if no, execute step 204, if yes, execute step 206.

[0156] Step 204, judge whether the accumulated timing time of the timer is greater than the first accumulated timing time threshold, if yes, execute step 205, if no, return to execute step 202.

[0157] Step 205, adjust the early wake-up time by using the passive algorithm.

[0158] Step 206, update the starting number of times that the electronic device is abnormally woken up due to continuously not receiving the first beacon data packet, to obtain a fourth number of times.

[0159] Step 207, judge whether the fourth number of times is greater than or equal to a third number of times threshold, if yes, execute step 208, if no, execute step 204.

[0160] Step 208, adjust the early wake-up time by using the active algorithm.

[0161] Step 209, reset the starting time of the timer to the initialization value.

[0162] In step 207, the starting time of the timer is reset to the initialization value, that is, the starting time of the timer is reset to the value initialized in step 201.

[0163] The following will be described in detail how to adjust the early wake-up time by using the passive algorithm in step 205 in FIG. 2.

[0164] Referring to FIG. 3, FIG. 3 is a flowchart of adjusting the early wake-up time by using the passive algorithm according to an embodiment of the present application, as shown in FIG. 3, the passive algorithm for adjusting the early wake-up time includes steps 301-307.

[0165] Step 301, judge whether the first number of times that the electronic device continuously does not receive the first beacon data packet in the first time period is greater than or equal to a first number of times threshold, if yes, execute step 302, if no, execute step 303.

[0166] Step 302, based on the time adjustment range of the early wake-up time, adjust the early wake-up time by using the dichotomy method to obtain a first wake-up time, and take the first wake-up time as the lower limit value of the time adjustment range of the early wake-up time to obtain a first adjustment time range.

[0167] After step 302, the starting time of the timer is reset to the initialization value, and the timing is restarted to obtain a second number of times that the electronic device continuously fails to receive the first beacon data packet in a second time period.

[0168] Step 303: Determine whether the second number of times that the electronic device fails to receive the first beacon data packet in the second time period is greater than or equal to a second number threshold. If yes, perform step 304; if no, perform step 305.

[0169] Step 304: Calculate the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time by dichotomy to obtain a second wake-up time.

[0170] After step 304, the starting time of the timer is reset to the initialization value, and the timing is restarted to obtain a third number of times that the electronic device continuously fails to receive the first beacon data packet in a third time period.

[0171] Step 305: Determine whether the second wake-up time is greater than the lower limit value of the first adjustment time range. If yes, perform step 306; if no, end the flow.

[0172] Step 306: Calculate the third wake-up time by dichotomy on the second wake-up time and the lower limit value of the first adjustment time range.

[0173] After step 306, the starting time of the timer is reset to the initialization value, and the timing is restarted to obtain the third number of times that the electronic device continuously fails to receive the first beacon data packet in the third time period.

[0174] Step 307: Reset the starting number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet to 0.

[0175] The following describes in detail how to adjust the early wake-up time by using the active algorithm in step 208 in FIG. 2.

[0176] Referring to FIG. 4, which is a flowchart of adjusting the early wake-up time by using the active algorithm according to an embodiment of the present application, the active algorithm for adjusting the early wake-up time includes steps 401-410.

[0177] Step 401: Connect to a test server.

[0178] Step 402: Obtain the first number of data packets of the second beacon data packet sent by the electronic device to the test server, the second number of data packets of the first beacon data packet fed back by the test server to the electronic device, the transmission delay duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data fed back by the test server.

[0179] Step 403, judging whether the first data packet quantity is greater than or equal to a preset quantity threshold value, if yes, executing step 406, if no, executing step 404.

[0180] Step 404, continuing to send the first beacon data packet to the test server.

[0181] Step 405, receiving the second beacon data packet fed back by the test server.

[0182] Step 406, disconnecting the connection with the test server.

[0183] Step 407, calculating the average delay time length of the first beacon data packet of which the second data packet quantity is fed back according to the transmission delay time length of each first beacon data packet, calculating the packet loss rate of the second beacon data packet according to the first data packet quantity and the second data packet quantity, and determining the delay rate of the first beacon data packet fed back by the test server according to the transmission delay time length of the first beacon data packet fed back by the test server and the reference delay time length.

[0184] Step 408, updating the early wake-up time according to the average delay time length, the packet loss rate and the delay rate, and obtaining the updated early wake-up time.

[0185] Step 409, judging whether the updated early wake-up time is within the time adjustment range of the early wake-up time, if yes, executing step 410, if no, ending the flow.

[0186] Step 410, taking the updated early wake-up time as the fourth wake-up time.

[0187] In step 410, taking the updated early wake-up time as the fourth wake-up time means taking the updated early wake-up time as the final wake-up time.

[0188] The execution subject of the wake-up method provided by the embodiments of the present application can be the wake-up device. The wake-up device provided by the embodiments of the present application is described by taking the wake-up device as an example for executing the wake-up method.

[0189] FIG. 5 is a structural schematic diagram of a wake-up device according to an exemplary embodiment. As shown in FIG. 5, the wake-up device 500 can include:

[0190] The initialization module 510 is configured to initialize the start time of the timer, the early wake-up time of the wireless local area network (WLAN) module of the electronic device, the time adjustment range of the early wake-up time and the first cumulative timing time threshold value of the timer.

[0191] The time adjustment module 520 is configured to, when the accumulated timing time of the timer reaches a delivery traffic indication information (DTIM) and a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period is greater than or equal to a first number threshold, adjust the early wake-up time based on a time adjustment range of the early wake-up time by using a dichotomy method to obtain a first wake-up time, wherein the first time period is a time period between the start time of the timer and the first accumulated timing time threshold.

[0192] The wake-up module 530 is configured to wake up the WLAN module when the accumulated timing time of the timer reaches the first wake-up time.

[0193] In the embodiments of the present application, when the early wake-up time is adjusted, the early wake-up time is adjusted by using a dichotomy method based on a time adjustment range of the initialized early wake-up time to obtain the first wake-up time. Thus, compared with gradually adjusting the early wake-up time in the time adjustment range of the early wake-up time in the prior art, the early wake-up time is adjusted by using a dichotomy method in the embodiments of the present application, which improves the adjustment efficiency of the early wake-up time. In the embodiments of the present application, the early wake-up time is adjusted when the accumulated timing time of the timer reaches the DTIM and the first number of times that the electronic device continuously fails to receive the first beacon data packet in the first time period is greater than or equal to the first number threshold. Thus, the problem of abnormal wake-up of the WLAN module of the electronic device caused by the loss of the Beacon in the prior art can be solved, so that the Beacon sent by the AP can be accurately received, and the possibility of abnormal wake-up of the WLAN module can be reduced.

[0194] In some embodiments of the present application, the time adjustment module 520 is specifically configured to:

[0195] perform dichotomy calculation on the time adjustment range of the early wake-up time to obtain the first wake-up time.

[0196] In some embodiments of the present application, the device described above can further include:

[0197] The time resetting module is configured to, after obtaining the first wake-up time, reset the start time of the timer to 0 and restart timing, and when the accumulated timing time of the timer reaches the first accumulated timing time threshold, obtain a second number of times that the electronic device continuously fails to receive the first beacon data packet in a second time period, wherein the second time period is a time period between the time when the timer restarts timing and the first accumulated timing time threshold.

[0198] obtain a third number of times that the electronic device does not receive the first beacon data packet in a third time period, when the second number of times is less than the first number threshold, wherein the third time period is a time period from the timer restarting to a second accumulated time threshold, the second accumulated time threshold is a positive integer multiple of the DTIM, and the second accumulated time threshold is greater than the first accumulated time threshold;

[0199] The time adjustment module 520 is further configured to perform a binary calculation on an upper limit value of the time adjustment range of the first wake-up time and the early wake-up time to obtain a second wake-up time, when the third number of times is greater than or equal to a second number threshold.

[0200] In some embodiments of the present application, the time adjustment module 520 is further configured to, before performing the binary calculation on the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time to obtain a second number, take the first wake-up time as a lower limit value of the time adjustment range of the early wake-up time to obtain a first adjustment time range, when the third number of times is greater than or equal to the second number threshold.

[0201] The time resetting module is further configured to, after obtaining the second wake-up time, reset the starting time of the timer to 0 to restart the timer, and perform a binary calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain a third wake-up time, when the accumulated time of the timer reaches the first accumulated time threshold, the second number of times that the electronic device continuously does not receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device does not receive the first beacon data packet in the third time period is less than the second number threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range.

[0202] In some embodiments of the present application, the time adjustment module 520 is further configured to, before performing the binary calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain a third wake-up time, take the second wake-up time as the upper limit value of the first adjustment time range to obtain a second adjustment time range.

[0203] The time resetting module is further configured to reset the start time of the timer to 0 and restart timing after obtaining the third wake-up time, and end the adjustment of the wake-up time in the case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit of the second adjustment time range.

[0204] In some embodiments of the present application, the time adjustment module 520 is specifically configured to:

[0205] In the case that the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally woken up, obtaining a wake-up reason for the electronic device being abnormally woken up;

[0206] In the case that the wake-up reason is not that the electronic device continuously fails to receive the first beacon data packet and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, obtaining a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period;

[0207] In the case that the first number of times is greater than or equal to the first number threshold, adjusting the early wake-up time based on a time adjustment range of the early wake-up time to obtain a first wake-up time by using a dichotomy method.

[0208] In some embodiments of the present application, the initialization module 510 is further configured to initialize a start number of times that the electronic device is abnormally woken up due to continuously failing to receive the first beacon data packet before obtaining the wake-up reason for the electronic device being abnormally woken up, and an initial value of the start number of times is 0.

[0209] The above-mentioned device can further include:

[0210] The updating module is configured to update the start number of times to obtain a fourth number of times in the case that the wake-up reason is that the electronic device continuously fails to receive the first beacon data packet after obtaining the wake-up reason for the electronic device being abnormally woken up.

[0211] The acquisition module is further configured to, in a case where the fourth quantity is greater than a third quantity threshold, acquire a first data packet quantity of a second beacon data packet sent by the electronic device to a test server, a second data packet quantity of the first beacon data packet fed back to the electronic device by the test server, a transmission delay duration of the first beacon data packet fed back by the test server, and a reference delay duration of the first beacon data fed back by the test server, wherein the first beacon data packet is obtained by the test server after analyzing the second beacon data packet.

[0212] The time adjustment module 520 is further configured to adjust the extracted wake-up time according to the first data packet quantity, the second data packet quantity, the transmission delay duration, and the reference delay duration, to obtain a fourth wake-up time.

[0213] In some embodiments of the present application, the time adjustment module 520 is specifically configured to:

[0214] In a case where the first data packet quantity is greater than or equal to a preset quantity threshold, calculate an average delay duration of the first beacon data packet whose second data packet quantity is fed back by the test server according to the transmission delay duration of each first beacon data packet fed back by the test server.

[0215] Calculate a packet loss rate of the second beacon data packet according to the first data packet quantity and the second data packet quantity.

[0216] Determine a delay rate of the first beacon data packet fed back by the test server according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration.

[0217] Update the early wake-up time according to the average delay duration, the packet loss rate, and the delay rate.

[0218] Determine a fourth wake-up time based on the updated extracted wake-up time.

[0219] In some embodiments of the present application, the time adjustment module 520 is specifically configured to:

[0220] Select a third beacon data packet with a transmission delay duration greater than the reference delay duration from the first beacon data packet.

[0221] Determine a delay rate of the first beacon data packet fed back by the test server according to the quantity of the third beacon data packet and the first data packet quantity.

[0222] In some embodiments of the present application, the time adjustment module 520 is specifically configured to:

[0223] In a case where the updated early wake-up time is within the time adjustment range of the early wake-up time, the updated early wake-up time is determined as a fourth wake-up time.

[0224] In some embodiments of the present application, the apparatuses described above can further include:

[0225] The disconnection module is configured to, before the fourth wake-up time is obtained by adjusting the extracted wake-up time according to the second data packet number, the second data packet number, the transmission delay duration and the reference delay duration, disconnect the connection between the electronic device and the test server in a case where the test server is in a connected state.

[0226] In some embodiments of the present application, the early wake-up time is a time at which the WLAN module is woken up before the DTIM, the lower limit value of the time adjustment range of the extracted wake-up time is the early wake-up time, the first accumulated counting time threshold of the timer is a positive integer multiple of the DTIM, and the start time of the initialized timer is 0.

[0227] The wake-up apparatus in the embodiments of the present application can be an electronic device or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices other than the terminal. For example, the electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a vehicle-mounted electronic device, a mobile Internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), and the like. The electronic device can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, and the like. The embodiments of the present application are not limited in this regard.

[0228] The information processing apparatus in the embodiments of the present application can be an apparatus with an operating system. The operating system can be an Android operating system, an ios operating system or other possible operating systems. The embodiments of the present application are not limited in this regard.

[0229] The wake-up device provided in the embodiments of the present application can realize each process realized by the method embodiment of FIG. 1, and thus details are not repeated here.

[0230] Optionally, as shown in FIG. 6, the embodiments of the present application further provide an electronic device 600, which includes a processor 601 and a memory 602, and the memory 602 has stored programs or instructions executable on the processor 601, the programs or instructions are executed by the processor 601 to realize each step of the wake-up method embodiments and achieve the same technical effects, and thus details are not repeated here.

[0231] It should be noted that the electronic device in the embodiments of the present application includes the mobile electronic device and the non-mobile electronic device described above.

[0232] FIG. 7 is a schematic diagram of a hardware structure of an electronic device for implementing the embodiments of the present application.

[0233] The electronic device 700 includes but is not limited to the following components: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710, etc.

[0234] Those skilled in the art can understand that the electronic device 700 can further include a power supply (such as a battery) for supplying power to each component, and the power supply can be logically connected to the processor 710 through a power management system, so as to realize the functions of managing charging, discharging, and power consumption management through the power management system. The electronic device structure shown in FIG. 7 does not constitute a limitation on the electronic device, and the electronic device can include more or fewer components than shown, or combine certain components, or different component arrangements, and thus details are not repeated here.

[0235] The processor 710 is configured to initialize a start time of a timer, an early wake-up time of a wireless local area network (WLAN) module of the electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer; in a case where accumulated timing time of the timer reaches a delivery traffic indication message (DTIM) and a first number of times that the electronic device continuously fails to receive a first beacon data packet in a first time period is greater than or equal to a first number threshold, adjust the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time, the first time period being a time period between the start time of the timer and the first accumulated timing time threshold; and wake up the WLAN module in a case where the accumulated timing time of the timer reaches the first wake-up time.

[0236] Therefore, when the early wake-up time is adjusted, the early wake-up time is adjusted by using a dichotomy method based on the time adjustment range of the initialized early wake-up time, to obtain the first wake-up time. Compared with the prior art in which the early wake-up time is adjusted step by step in the time adjustment range of the early wake-up time, the adjustment efficiency of the early wake-up time is improved by using the dichotomy method in the embodiment of the application. In the embodiment of the application, the early wake-up time is adjusted when the accumulated timing time of the timer reaches the DTIM, and the first number of times that the electronic device continuously fails to receive the first beacon data packet in the first time period is greater than or equal to the first number threshold. Therefore, the problem of abnormal wake-up of the WLAN module of the electronic device caused by loss of the Beacon in the prior art can be solved, so that the Beacon sent by the AP can be accurately received, and the possibility of abnormal wake-up of the WLAN module is reduced.

[0237] Optionally, the processor 710 is further configured to perform dichotomy calculation on the time adjustment range of the early wake-up time to obtain the first wake-up time.

[0238] Therefore, the dichotomy calculation is performed on the time adjustment range of the early wake-up time to obtain the first wake-up time. Compared with the prior art in which the early wake-up time is adjusted step by step, the adjustment efficiency of the early wake-up time is improved by using the dichotomy method in the embodiment of the application.

[0239] Optionally, the processor 710 is further configured to reset the start time of the timer to 0 and restart the timer. When the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in a second time period is obtained. The second time period is a time period between the time when the timer is restarted and the first accumulated timing time threshold. When the second number of times is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in a third time period is obtained. The third time period is a time period between the time when the timer is restarted and a second accumulated timing time threshold. The second accumulated timing time threshold is an integer multiple of the DTIM, and the second accumulated timing time threshold is greater than the first accumulated timing time threshold. When the third number of times is greater than or equal to the second number threshold, dichotomy calculation is performed on the upper limit value of the time adjustment range of the early wake-up time and the first wake-up time to obtain the second wake-up time.

[0240] Thus, by further adjusting the first wake-up time of the previous round of adjustment in a dichotomy manner, compared with the step-by-step adjustment of the wake-up time in the prior art, the adjustment efficiency of the wake-up time is improved.

[0241] Optionally, the processor 710 is further configured to: take the first wake-up time as a lower limit value of a time adjustment range of the wake-up time, to obtain a first adjustment time range; reset a start time of the timer to 0, and restart the timer; in a case where the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet within the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet within the third time period is less than the second number threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range, perform dichotomy calculation on the second wake-up time and the lower limit value of the first adjustment time range, to obtain a third wake-up time.

[0242] Thus, by further adjusting the second wake-up time of the previous round of adjustment in a dichotomy manner, compared with the step-by-step adjustment of the wake-up time in the prior art, the adjustment efficiency of the wake-up time is improved.

[0243] Optionally, the processor 710 is further configured to: take the second wake-up time as an upper limit value of the first adjustment time range, to obtain a second adjustment time range; reset the start time of the timer to 0, and restart the timer; in a case where the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet within the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet within the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, end the adjustment of the wake-up time.

[0244] Thus, in a case where the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet within the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet within the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, the adjustment of the third wake-up time cannot be continued, and the adjustment of the wake-up time can be ended at this time, so that the end time of the adjustment of the wake-up time can be accurately determined.

[0245] Optionally, the processor 710 is further configured to, in a case that the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally woken up, acquire a wake-up reason for the electronic device being abnormally woken up; in a case that the wake-up reason is not that the electronic device continuously fails to receive the first beacon data packet and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, acquire a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period; and in a case that the first number of times is greater than or equal to the first number of times threshold, adjust the early wake-up time based on a time adjustment range of the early wake-up time to obtain a first wake-up time.

[0246] Thus, when the early wake-up time is adjusted, the early wake-up time is adjusted only in a case that it is determined that the electronic device is not abnormally woken up due to failure to receive the first beacon data packet, the accumulated timing time of the timer is greater than the first accumulated timing time threshold, and the first number of times that the electronic device continuously fails to receive the first beacon data packet in the first time period is greater than or equal to the first number of times threshold. Thus, the problem of abnormal wake-up of the WLAN module of the electronic device due to loss of the Beacon in the prior art can be solved, so that the Beacon sent by the AP can be accurately received, and the possibility of abnormal wake-up of the WLAN module is reduced.

[0247] Optionally, the processor 710 is further configured to initialize a starting number of times that the electronic device is abnormally woken up due to continuous failure to receive the first beacon data packet, and an initial value of the starting number of times is 0; in a case that the wake-up reason is that the electronic device continuously fails to receive the first beacon data packet, update the starting number of times to obtain a fourth number of times; and in a case that the fourth number of times is greater than a third number of times threshold, acquire a first number of data packets of the second beacon data packet sent by the electronic device to a test server, a second number of data packets of the first beacon data packet fed back by the test server to the electronic device, a transmission delay duration of the first beacon data packet fed back by the test server, and a reference delay duration of the first beacon data fed back by the test server, wherein the first beacon data packet is obtained by the test server after analyzing the second beacon data packet; and adjust the early wake-up time based on the first number of data packets, the second number of data packets, the transmission delay duration, and the reference delay duration to obtain a fourth wake-up time.

[0248] Therefore, compared with the passive adjustment manner in the prior art that gradually adjusts the early wake-up time in the time adjustment range of the early wake-up time, the scheme of the embodiment of the application can not need to set the time adjustment range of the early wake-up time, and adjust the early wake-up time in the time adjustment range, but in the case that the number of abnormal wake-ups of the electronic device caused by the failure to receive the first beacon data packet is greater than the third number threshold, the early wake-up time is directly adjusted by one step through the active adjustment manner by using the first data packet number of the second beacon data packet sent by the electronic device to the test server, the second data packet number of the first beacon data packet fed back to the electronic device by the test server, the transmission delay duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data fed back by the test server, to obtain the fourth wake-up time, and the determination efficiency of the early wake-up time is improved.

[0249] Optionally, the processor 710 is further configured to, in the case that the first data packet number is greater than or equal to a preset number threshold, calculate an average delay duration of the first beacon data packet whose number is fed back by the test server according to the transmission delay duration of each first beacon data packet fed back by the test server, calculate a packet loss rate of the second beacon data packet according to the first data packet number and the second data packet number, determine a delay rate of the first beacon data packet fed back by the test server according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration, update the early wake-up time according to the average delay duration, the packet loss rate and the delay rate, and determine a fourth wake-up time based on the updated early wake-up time.

[0250] Therefore, in the case that the first data packet number is greater than or equal to a preset number threshold, the early wake-up time is updated according to the average delay duration of the first beacon data packet whose number is fed back by the test server to the electronic device, the packet loss rate of the second beacon data packet and the delay rate of the first beacon data packet, to obtain the fourth wake-up time, so that the fourth wake-up time is determined in a quantitative manner, and the determination accuracy of the fourth wake-up time is improved.

[0251] Optionally, the processor 710 is further configured to select a third beacon data packet whose transmission delay duration is greater than the reference delay from the first beacon data packet, and determine a delay rate of the first beacon data packet fed back by the test server according to the number of the third beacon data packet and the first data packet number.

[0252] Thus, by selecting the third beacon data packet with the transmission delay time length greater than the reference delay time length from the first beacon data packet, the delay rate of the test server feeding back the first beacon data packet is determined according to the number of the third beacon data packet and the first data packet number, so that the delay rate of the first beacon data packet can be accurately determined, so as to accurately determine the fourth wake-up time, and the determination accuracy of the fourth wake-up time is improved.

[0253] Optionally, the processor 710 is further configured to determine the updated early wake-up time as the fourth wake-up time in a case where the updated early wake-up time is within the time adjustment range of the early wake-up time.

[0254] Thus, in a case where the updated early wake-up time is within the time adjustment range of the early wake-up time, the updated early wake-up time is determined as the fourth wake-up time, so that the adjustment of the early wake-up time can be realized only once, and compared with the passive adjustment mode of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time in the prior art, the determination efficiency of the wake-up time is improved.

[0255] Optionally, the processor 710 is further configured to disconnect the connection between the electronic device and the test server in a case where the test server of the electronic device is in the connected state.

[0256] Thus, before the early wake-up time is adjusted to obtain the fourth wake-up time according to the first data packet number, the second data packet number, the transmission delay time length and the reference delay time length, if the electronic device and the test server are in the connected state, the connection between the electronic device and the test server can be directly disconnected, and the calculation of the average delay time length of the first beacon data packet, the delay rate and the packet loss rate of the second beacon data packet can be directly performed in the electronic device, so that the power consumption of the electronic device is saved.

[0257] It should be understood that in the embodiments of the present application, the input unit 704 can include a graphics processor (GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes image data of a still picture or a video obtained by an image capture device (such as a color camera) in a video capture mode or an image capture mode. The display unit 706 can include a display panel 7061, which can be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 707 includes at least one of a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 can include two parts of a touch detection device and a touch controller. The other input devices 7072 can include, but are not limited to, a physical keyboard, function keys (such as volume control keys, on-off keys, etc.), a trackball, a mouse, a joystick, and the like, which will not be described here.

[0258] The memory 709 can be used to store software programs and various data. The memory 709 can mainly include a first storage area storing programs or instructions and a second storage area storing data, wherein the first storage area can store an operating system, application programs or instructions required by at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory 709 can include a volatile memory or a non-volatile memory, or the memory 709 can include both a volatile memory and a non-volatile memory. The non-volatile memory can be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically EPROM (EEPROM), or a flash memory. The volatile memory can be a Random Access Memory (RAM), a Static RAM (SRAM), a Dynamic RAM (DRAM), a Synchronous DRAM (SDRAM), a Double Data Rate SDRAM (DDR SDRAM), an Enhanced SDRAM (ESDRAM), a Synch link DRAM (SLDRAM), and a Direct Rambus RAM (DRRAM). The memory 709 in the embodiments of the present application includes but is not limited to these and any other suitable types of memory.

[0259] The processor 710 can include one or more processing units; optionally, the processor 710 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and an application program, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It can be understood that the above-mentioned modem processor can also not be integrated into the processor 710.

[0260] The embodiments of the present application also provide a readable storage medium, the readable storage medium stores programs or instructions, the programs or instructions are executed by a processor to realize various processes of the above-mentioned wake-up method embodiments, and the same technical effects can be achieved. To avoid repetition, details are not described here.

[0261] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a computer readable storage medium, such as a computer readable only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0262] The embodiment of the present application further provides a chip, which comprises a processor and a communication interface, the communication interface is coupled with the processor, the processor is used for running programs or instructions to realize the processes of the above-mentioned wake-up method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0263] It should be understood that the chip mentioned in the embodiment of the present application can also be referred to as a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0264] The embodiment of the present application provides a computer program product, which is stored in a storage medium, and is executed by at least one processor to realize the processes of the above-mentioned wake-up method embodiments and achieve the same technical effects. To avoid repetition, details are not described herein.

[0265] It should be noted that in this document, the term "comprising" or "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed or inherent to such process, method, article or device. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the method and device in the embodiment of the present application is not limited to the order of performing the functions as shown or discussed, but can also include performing the functions in a substantially simultaneous manner or in a reverse order, for example, the described method can be performed in an order different from the described order, and various steps can also be added, omitted or combined. In addition, the features described with reference to some examples can be combined in other examples.

[0266] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned example methods can be realized by means of software and a necessary general hardware platform, and of course, can also be realized by hardware, but in many cases, the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a computer software product in essence or in the form of a part that contributes to the prior art, which is stored in a storage medium (such as a ROM / RAM, a magnetic disk, or an optical disk) and includes a plurality of instructions for causing a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present application.

[0267] The embodiments of the present application are described above in combination with the drawings, but the present application is not limited to the above-mentioned specific embodiments, and the above-mentioned specific embodiments are only illustrative and not restrictive. Those skilled in the art can make many forms under the inspiration of the present application without departing from the scope of the present application and the scope protected by the claims.

Claims

1. A wake-up method, the method comprising: initializing a start time of a timer, an early wake-up time of a wireless local area network (WLAN) module of an electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer; when accumulated timing time of the timer reaches a delivery traffic indication message (DTIM) and a first number of times that the electronic device continuously fails to receive a first beacon data packet within a first time period is greater than or equal to a first number threshold, adjusting the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time using a binary search method, the first time period being a time period between the start time of the timer and the first accumulated timing time threshold; when accumulated timing time of the timer reaches the first wake-up time, waking up the WLAN module.

2. The method of claim 1, wherein, The adjusting the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time using a binary search method comprises: performing binary search calculation on the time adjustment range of the early wake-up time to obtain a first wake-up time.

3. The method of claim 1 or 2, wherein, After the adjusting the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time using a binary search method, the method further comprises: resetting the start time of the timer to 0 to restart timing, and when accumulated timing time of the timer reaches the first accumulated timing time threshold, obtaining a second number of times that the electronic device continuously fails to receive the first beacon data packet within a second time period, the second time period being a time period between the timer restarting timing and the first accumulated timing time threshold; when the second number of times is less than the first number threshold, obtaining a third number of times that the electronic device fails to receive the first beacon data packet within a third time period, the third time period being a time period between the timer restarting timing and a second accumulated timing time threshold, the second accumulated timing time threshold being an integer multiple of the DTIM, and the second accumulated timing time threshold being greater than the first accumulated timing time threshold; when the third number of times is greater than or equal to a second number threshold, performing binary search calculation on an upper limit value of the time adjustment range of the early wake-up time and the first wake-up time to obtain a second wake-up time.

4. The method of claim 3, wherein, Before the performing binary search calculation on the upper limit value of the time adjustment range of the early wake-up time and the first wake-up time to obtain a second wake-up time when the third number of times is greater than or equal to a second number threshold, the method further comprises: taking the first wake-up time as a lower limit value of the time adjustment range of the early wake-up time to obtain a first adjustment time range; After the obtaining the second wake-up time, the method further comprises: resetting a start time of the timer to 0 to restart timing, and in a case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is less than the second number threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range, performing a binary calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain a third wake-up time.

5. The method of claim 4, wherein, Before the binary calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain the third wake-up time, the method further comprises: taking the second wake-up time as an upper limit value of the first adjustment time range to obtain a second adjustment time range; After the third wake-up time is obtained, the method further comprises: resetting the start time of the timer to 0 to restart timing, and in a case that the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, ending the adjustment of the wake-up time.

6. The method of claim 1, wherein, In a case that the accumulated timing time of the timer reaches the DTIM, and a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period is greater than or equal to a first number threshold, adjusting the early wake-up time by using a binary method based on a time adjustment range of the early wake-up time to obtain a first wake-up time, comprising: In a case that the accumulated timing time of the timer reaches the DTIM, and the electronic device is abnormally woken up, obtaining a wake-up reason of the electronic device being abnormally woken up; In a case that the wake-up reason is not that the electronic device continuously fails to receive the first beacon data packet, and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, obtaining a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period; In a case that the first number is greater than or equal to the first number threshold, adjusting the early wake-up time by using a binary method based on a time adjustment range of the early wake-up time to obtain a first wake-up time.

7. The method of claim 6, wherein, Before the wake-up reason of the electronic device being abnormally woken up is obtained, the method further comprises: initializing a start number of times that the electronic device is abnormally woken up due to continuously failing to receive the first beacon data packet, and an initial value of the start number of times is 0; After the wake-up reason of the electronic device being abnormally woken up is obtained, the method further comprises: In a case where the wake-up reason is that the electronic device continuously does not receive the first beacon data packet, the starting number is updated to obtain a fourth number; In a case where the fourth number is greater than a third number threshold, a first data packet number of a second beacon data packet sent by the electronic device to a test server, a second data packet number of the first beacon data packet fed back to the electronic device by the test server, a transmission delay duration of the first beacon data packet fed back by the test server, and a reference delay duration of the first beacon data fed back by the test server are obtained, wherein the first beacon data packet is obtained by the test server after analyzing the second beacon data packet; The early wake-up time is adjusted according to the first data packet number, the second data packet number, the transmission delay duration, and the reference delay duration to obtain a fourth wake-up time.

8. The method of claim 7, wherein, The early wake-up time is adjusted according to the first data packet number, the second data packet number, the transmission delay duration, and the reference delay duration to obtain a fourth wake-up time, including: In a case where the first data packet number is greater than or equal to a preset number threshold, an average delay duration of the first beacon data packet whose second data packet number is fed back by the test server is calculated according to the transmission delay duration of each first beacon data packet fed back by the test server; A packet loss rate of the second beacon data packet is calculated according to the first data packet number and the second data packet number; A delay rate of the first beacon data packet fed back by the test server is determined according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration; The early wake-up time is updated according to the average delay duration, the packet loss rate, and the delay rate; A fourth wake-up time is determined based on the updated early wake-up time.

9. The method of claim 8, wherein, The delay rate of the first beacon data packet fed back by the test server is determined according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration, including: Third beacon data packets with a transmission delay duration greater than the reference delay are selected from the first beacon data packets; The delay rate of the first beacon data packet fed back by the test server is determined according to the number of the third beacon data packets and the first data packet number.

10. The method of claim 8, wherein, The fourth wake-up time is determined based on the updated early wake-up time, including: In a case where the updated early wake-up time is within a time adjustment range of the early wake-up time, the updated early wake-up time is determined as the fourth wake-up time.

11. The method of claim 7, wherein, Before the early wake-up time is adjusted according to the first data packet number, the second data packet number, the transmission delay duration, and the reference delay duration to obtain the fourth wake-up time, the method further includes: In a case where the electronic device and the test server are in a connected state, the connection between the electronic device and the test server is disconnected.

12. The method of claim 1, wherein, The early wake-up time is a time at which the WLAN module is woken up before the DTIM, a lower limit of a time adjustment range of the early wake-up time is the early wake-up time, a first accumulated timing time threshold of the timer is a positive integer multiple of the DTIM, and a start time of the initialized timer is 0.

13. An apparatus for waking up, the apparatus comprising: an initialization module configured to initialize a start time of a timer, an early wake-up time of a WLAN module of an electronic device, a time adjustment range of the early wake-up time, and a first accumulated timing time threshold of the timer; a time adjustment module configured to, when an accumulated timing time of the timer reaches a delivery traffic indication information (DTIM) and a first number of times that the electronic device continuously fails to receive a first beacon data packet within a first time period is greater than or equal to a first number threshold, adjust the early wake-up time based on the time adjustment range of the early wake-up time to obtain a first wake-up time using a binary search method, the first time period being a time period from the start time of the timer to the first accumulated timing time threshold; a wake-up module configured to wake up the WLAN module when the accumulated timing time of the timer reaches the first wake-up time.

14. The apparatus of claim 13, wherein, The time adjustment module is specifically configured to: perform binary search calculation on the time adjustment range of the early wake-up time to obtain the first wake-up time.

15. The apparatus of claim 13 or 14, wherein, The apparatus further comprises: a time resetting module configured to, after the first wake-up time is obtained, reset the start time of the timer to 0 to restart the timer, and when the accumulated timing time of the timer reaches the first accumulated timing time threshold, obtain a second number of times that the electronic device continuously fails to receive the first beacon data packet within a second time period, the second time period being a time period from when the timer restarts to when the first accumulated timing time threshold ends; a obtaining module configured to, when the second number is less than the first number threshold, obtain a third number of times that the electronic device fails to receive the first beacon data packet within a third time period, the third time period being a time period from when the timer restarts to a second accumulated timing time threshold, the second accumulated timing time threshold being a positive integer multiple of the DTIM, and the second accumulated timing time threshold being greater than the first accumulated timing time threshold; The time adjustment module is further configured to, when the third number is greater than or equal to a second number threshold, perform binary search calculation on an upper limit of the time adjustment range of the early wake-up time and the first wake-up time to obtain a second wake-up time.

16. The apparatus of claim 15, wherein, The time adjustment module is further configured to, before the binary search calculation on the upper limit of the time adjustment range of the early wake-up time and the first wake-up time to obtain the second value is performed when the third number is greater than or equal to the second number threshold, use the first wake-up time as the lower limit of the time adjustment range of the early wake-up time to obtain a first adjustment time range. The time resetting module is further configured to, after obtaining the second wake-up time, reset the start time of the timer to 0 and restart the timer, and in a case where the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is less than the second number threshold, and the second wake-up time is greater than the lower limit value of the first adjustment time range, perform bisection calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain a third wake-up time.

17. The apparatus of claim 16, wherein, The time adjustment module is further configured to, before the bisection calculation on the second wake-up time and the lower limit value of the first adjustment time range to obtain the third wake-up time, take the second wake-up time as the upper limit value of the first adjustment time range to obtain a second adjustment time range. The time resetting module is further configured to, after obtaining the third wake-up time, reset the start time of the timer to 0 and restart the timer, and in a case where the accumulated timing time of the timer reaches the first accumulated timing time threshold, the second number of times that the electronic device continuously fails to receive the first beacon data packet in the second time period is less than the first number threshold, the third number of times that the electronic device fails to receive the first beacon data packet in the third time period is less than the second number threshold, and the third wake-up time is less than the lower limit value of the second adjustment time range, end the adjustment of the wake-up time.

18. The apparatus of claim 13, wherein, The time adjustment module is specifically configured to: in a case where the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally woken up, obtain a wake-up reason for the electronic device being abnormally woken up; in a case where the wake-up reason is not that the electronic device continuously fails to receive the first beacon data packet and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, obtain a first number of times that the electronic device continuously fails to receive the first beacon data packet in a first time period; in a case where the first number of times is greater than or equal to the first number threshold, adjust the early wake-up time by using bisection to obtain a first wake-up time based on a time adjustment range of the early wake-up time.

19. The apparatus of claim 18, wherein, The initialization module is further configured to, before obtaining the wake-up reason for the electronic device being abnormally woken up, initialize a start number of times that the electronic device is abnormally woken up due to continuously failing to receive the first beacon data packet, and an initial value of the start number of times is 0. The device further includes: an updating module configured to, after obtaining the wake-up reason for the electronic device being abnormally woken up, in a case where the wake-up reason is that the electronic device continuously fails to receive the first beacon data packet, update the start number of times to obtain a fourth number of times. The acquisition module is further configured to acquire, when the fourth number of times is greater than a third number of time threshold, a first number of data packets of a second beacon data packet sent by the electronic device to a test server, a second number of data packets of the first beacon data packet fed back to the electronic device by the test server, a transmission delay duration of the first beacon data packet fed back by the test server, and a reference delay duration of the first beacon data fed back by the test server, wherein the first beacon data packet is obtained by the test server after analyzing the second beacon data packet. The time adjustment module is further configured to adjust the early wake-up time according to the first number of data packets, the second number of data packets, the transmission delay duration, and the reference delay duration, to obtain a fourth wake-up time.

20. The apparatus of claim 19, wherein, The time adjustment module is specifically configured to: when the first number of data packets is greater than or equal to a preset number threshold, calculate an average delay duration of the first beacon data packet whose second number of data packets is fed back by the test server according to the transmission delay duration of each first beacon data packet fed back by the test server; calculate a packet loss rate of the second beacon data packet according to the first number of data packets and the second number of data packets; determine a delay rate of the first beacon data packet fed back by the test server according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration; update the early wake-up time according to the average delay duration, the packet loss rate, and the delay rate; determine a fourth wake-up time based on the updated early wake-up time.

21. The apparatus of claim 20, wherein, The time adjustment module is specifically configured to: select, from the first beacon data packet, a third beacon data packet whose transmission delay duration is greater than the reference delay duration; determine a delay rate of the first beacon data packet fed back by the test server according to the number of the third beacon data packet and the first number of data packets.

22. The apparatus of claim 20, wherein, The time adjustment module is specifically configured to: when the updated early wake-up time is within a time adjustment range of the early wake-up time, determine the updated early wake-up time as the fourth wake-up time.

23. The apparatus of claim 19, wherein, The device further comprises: a disconnection module configured to disconnect the connection between the electronic device and the test server when the electronic device and the test server are in a connected state before the early wake-up time is adjusted according to the first number of data packets, the second number of data packets, the transmission delay duration, and the reference delay duration to obtain the fourth wake-up time.

24. The apparatus of claim 13, wherein, The early wake-up time is a time at which the WLAN module is woken up before the DTIM, the lower limit of the time adjustment range of the early wake-up time is the early wake-up time, the first accumulated timing time threshold of the timer is an integer multiple of the DTIM, and the start time of the initialized timer is 0.

25. An electronic device comprising a processor and a memory, said memory storing a program or instructions executable on said processor, said program or instructions, when executed by said processor, implementing the steps of the wake-up method according to any one of claims 1-12.

Citation Information

Patent Citations

  • Method for reducing power consumption of WiFi device, WiFi device and WiFi network system

    CN115361730A

  • Wake-up method and device and electronic equipment

    CN119233377A

  • Dynamic selection of early-RX duration during network sleep operation

    US20140064166A1

  • Beacon miss prevention in power save modes using timing synchronization function

    US8005515B1