Wake-up method and device and electronic equipment
Adjusting the early wake-up time of the WLAN module through dichotomy, solving the abnormal wake-up problem caused by Beacon loss in electronic devices, improving the efficiency and accuracy of wake-up time determination, and reducing power consumption.
Patent Information
- Application Number
- CN202411375590.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2024-12-31
AI Technical Summary
In the prior art, the WLAN module of the electronic device fails to receive the Beacon sent by the AP in time, resulting in abnormal wake-up, which has a successful consumption impact, and the efficiency of adjusting the early wake-up time is low.
The dichotomous method is used to adjust the early wake-up time of the WLAN module, and the wake-up time is accurately adjusted according to the accumulated timing time of the timer and the number of times the beacon packets have not been received to ensure that the Beacon sent by the AP is received.
It improves the efficiency of adjusting the early wake-up time, reduces the possibility of abnormal wake-up of WLAN modules, ensures accurate reception of Beacons, and reduces power consumption.
Smart Images

Figure CN119233377A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of communication technology, and specifically relates to a wake-up method, device and electronic equipment. Background Art
[0002] When the user is not using the electronic device temporarily, the Wireless Local Area Network (WLAN) module of the electronic device will be awakened at the Delivery Traffic Indication Message (DTIM) time interval to avoid not receiving data from the external network, and receive the beacon sent by the wireless access point (AP) AP. According to the Beacon, it is determined whether the AP has cached data that needs to be sent to the electronic device. If so, the WLAN module wakes up the system of the electronic device and receives the data and reports it to the system application.
[0003] However, in actual applications, the WLAN module of the electronic device may fail to receive the Beacon sent by the AP in time due to problems with the AP or the electronic device, resulting in Beacon loss. If the electronic device loses Beacon multiple times, the WLAN module may abnormally wake up the system, affecting the power consumption of the electronic device.
[0004] At present, in order to solve the problem that the WLAN module fails to receive the Beacon from the AP in time, the wake-up time of the WLAN module is usually gradually adjusted to advance the wake-up time of the WLAN module to ensure that the Beacon sent by the AP can be received. However, this method of determining the wake-up time in advance is inefficient. Summary of the invention
[0005] The purpose of the embodiments of the present application is to provide a wake-up method, device and electronic device to improve the efficiency of determining the early wake-up time of the WLAN module, so as to accurately receive the Beacon sent by the AP and reduce the possibility of abnormal wake-up of the WLAN module.
[0006] In a first aspect, an embodiment of the present application provides a wake-up method, the method comprising:
[0007] 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 of the timer;
[0008] When the accumulated timing time of the timer reaches the delivery traffic indication information DTIM, and the first number of times that the electronic device fails to continuously 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 a binary method based on the time adjustment range of the early wake-up time to obtain a first wake-up time, and the first time period is a time period from the start time of the timer to the first accumulated timing time threshold;
[0009] When the accumulated timing time of the timer reaches the first wake-up time, the WLAN module is woken up.
[0010] In a second aspect, an embodiment of the present application provides a wake-up device, the device comprising:
[0011] An initialization module, used 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 of the timer;
[0012] A time adjustment module, configured to adjust the early wake-up time by using a binary method to obtain a first wake-up time based on a time adjustment range of the early wake-up time when the accumulated timing time of the timer reaches the delivery traffic indication information DTIM and the first number of times that the electronic device has not continuously received the first beacon data packet within a first time period is greater than or equal to a first number threshold, wherein the first time period is a time period from the start time of the timer to the first accumulated timing time threshold;
[0013] The wake-up module is used to wake up the WLAN module when the accumulated timing time of the timer reaches the first wake-up time.
[0014] In a third aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0015] In a fourth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0016] In a fifth aspect, an 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 implement the method described in the first aspect.
[0017] In an embodiment of the present application, when adjusting the early wake-up time, based on the time adjustment range of the initialized early wake-up time, the initialized early wake-up time is adjusted by a binary search method to obtain a first wake-up time. Compared with the prior art in which the early wake-up time is gradually adjusted within the time adjustment range of the early wake-up time, the embodiment of the present application adjusts the early wake-up time by a binary search method, thereby improving the adjustment efficiency of the early wake-up time. In an embodiment of the present application, when adjusting the early wake-up time, the early wake-up time is adjusted when the accumulated timing time of the timer reaches DTIM and the first number of times that the electronic device has not continuously received the first beacon data packet in the first time period is greater than or equal to the first number threshold. This can solve the problem of abnormal awakening 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 awakening of the WLAN module. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 is a flowchart of a wake-up method provided in some embodiments of the present application;
[0019] Figure 2 is a flowchart of a wake-up method provided in some embodiments of the present application;
[0020] Figure 3 It is a flowchart of a passive algorithm for adjusting the early wake-up time provided by some embodiments of the present application;
[0021] Figure 4 It is a flowchart of an active algorithm for adjusting the early wake-up time provided by some embodiments of the present application;
[0022] Figure 5 is a schematic diagram of the structure of a wake-up device shown in some embodiments of the present application;
[0023] Figure 6 is a schematic diagram of the structure of an electronic device shown in some embodiments of the present application;
[0024] Figure 7 It is a schematic diagram of the hardware structure of an electronic device shown in some embodiments of the present application. DETAILED DESCRIPTION
[0025] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0026] The terms "first", "second", etc. in the specification and claims of this application 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 interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or N. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0027] It should be noted that the wake-up method provided in the embodiments of the present application can be executed by electronic devices such as mobile phones, tablet computers, laptop computers, PDAs, and vehicle-mounted electronic devices. In some embodiments of the present application, the wake-up method provided in the embodiments of the present application is described by taking the electronic device as the execution subject to execute the wake-up method.
[0028] The wake-up method provided in the embodiment of the present application can be applied to the scenario of early awakening the WLAN module of the electronic device. Among them, one specific application scenario is that in order to save the power consumption of the electronic device, the user sets the WLAN module of the electronic device to enter the sleep state in the setting interface of the electronic device, and sets the DTIM of the WLAN module. Another specific application scenario is that the DTIM of the WLAN module of the electronic device is automatically set when the electronic device leaves the factory. In this way, the WLAN module of the electronic device will be automatically awakened every DTIM to receive data sent by other devices.
[0029] The wake-up method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.
[0030] Figure 1 is a flowchart of a wake-up method provided in an embodiment of the present application, such as Figure 1 As shown, the wake-up method provided in the embodiment of the present application may include steps 110 to 130.
[0031] Step 110: Initialize the start time of the timer, the early wake-up time of the WLAN module of the electronic device, the time adjustment range of the early wake-up time, and the first accumulated timing time threshold of the timer.
[0032] The start time of the timer may be the initial time of the initialized timer, and the start time may be 0.
[0033] The early wake-up time can be the time when the WLAN module is awakened before the DTIM set by the system or set by the user, that is, under normal circumstances, when the timer reaches the DTIM, the WLAN module will be awakened. The early wake-up time is the time when the WLAN module is awakened before the timer reaches the DTIM. The early wake-up time can be set according to user needs and is not limited in the embodiments of the present application.
[0034] In an example, taking DTIM=400us as an example, the early wake-up time may be 200us.
[0035] The time adjustment range of the early wake-up time may be a time range for adjusting the early wake-up time, the lower limit of the time adjustment range of the early wake-up time may be the initialized early wake-up time, and the time adjustment range of the early wake-up time may be set according to user needs and 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].
[0036] The first accumulated timing time threshold of the timer may be a preset accumulated timing time threshold of the timer, and the first accumulated timing time threshold may be obtained based on prior experience.
[0037] It should be noted that if the electronic device does not receive the Beacon sent by the AP and reaches a certain threshold within the time period from the start time of the initialized timer to the end of the first cumulative timing time threshold, the connection between the electronic device and the AP will be disconnected, and the electronic device will no longer be able to receive the Beacon. Therefore, the setting of the first cumulative timing time threshold of the timer can be determined based on the above experience. The first cumulative timing time threshold of the timer can be set according to user needs and is not limited in the embodiments of the present application.
[0038] It should be noted that, because under normal circumstances, the WLAN module of the electronic device should be awakened once every DTIM, the early wake-up time in the embodiment of the present application should be the time before each DTIM, and the first cumulative timing time threshold of the timer is also related to DTIM. Specifically, the first cumulative timing time threshold of the timer can be a positive integer multiple of DTIM. For example, the first cumulative timing time threshold of the timer can be 10 times of DTIM, that is, the first cumulative timing time threshold can be 4ms.
[0039] Step 120: When the accumulated timing time of the timer reaches DTIM and the first number of times that the electronic device has not continuously received 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 based on the time adjustment range of the early wake-up time by using a binary search method to obtain a first wake-up time.
[0040] The first time period may be a time period from the start time of the timer to the first accumulated timing time threshold.
[0041] The first beacon data packet may 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 contains data that the electronic device needs to receive.
[0042] The first number may be the number of times the electronic device fails to receive the first beacon data packet continuously within the first time period, that is, the number of times the electronic device fails to receive the first beacon data packet continuously within the first time period.
[0043] The first number threshold may be a pre-set first number threshold, such as 3. The first number threshold may be set according to user needs and is not limited in the embodiments of the present application.
[0044] The first wake-up time may be a wake-up time obtained by adjusting the advance wake-up time.
[0045] In some embodiments of the present application, when the accumulated timing time of the timer reaches DTIM, and the first number of times that the electronic device has not continuously received 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 time adjustment range of the early wake-up time and the binary method to obtain the first wake-up time.
[0046] In some embodiments of the present application, in order to reduce the possibility of abnormal awakening of the WLAN module, step 120 may specifically include:
[0047] When the accumulated timing time of the timer reaches DTIM and the electronic device is abnormally awakened, obtaining the awakening reason of the electronic device being abnormally awakened;
[0048] When the wake-up reason is not that the electronic device has not continuously received 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 has not continuously received the first beacon data packet within the first time period;
[0049] When the first number is greater than or equal to the first number threshold, the advance wake-up time is adjusted by using a binary method based on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
[0050] In some embodiments of the present application, when the accumulated timing time of the timer reaches DTIM and the electronic device is abnormally awakened, the wake-up reason of the electronic device being abnormally awakened can be obtained. If the reason for the electronic device being abnormally awakened is that the first beacon data packet has not been received continuously, that is, the electronic device is abnormally awakened due to not continuously receiving the first beacon data packet, and the accumulated timing time of the timer is greater than the first accumulated timing time threshold, the first number of times that the electronic device has not continuously received the first beacon data packet within the first time period can be obtained. When the first number is greater than or equal to the first number threshold, the early wake-up time is adjusted based on the time adjustment range of the early wake-up time by using the binary search method to obtain the first wake-up time.
[0051] It should be noted that when detecting whether the reason for the abnormal awakening of the electronic device is the continuous failure to receive the first beacon data packet, it may be detected whether the hardware in the electronic device has been abnormally awakened. This is because the first beacon data packet stores data sent to the system application of the electronic device, and the reception of the data requires the system application to receive it. In order for the system application of the electronic device to receive this data, the hardware of the electronic device needs to be awakened, and then the system application is awakened based on the awakened hardware. For example, the first beacon data stores an instant messaging message sent to the instant messaging application of the electronic device. When the electronic device is abnormally awakened, the central processing unit (CPU) of the electronic device will also be awakened to process the instant messaging message to be received by the instant messaging application based on the CPU.
[0052] In an embodiment of the present application, when adjusting the early wake-up time, the early wake-up time is adjusted only when it is determined that the electronic device does not experience abnormal wake-up due to failure to receive the first beacon data packet, and the cumulative timing time of the timer is greater than the first cumulative timing time threshold, and the first number of times the electronic device has failed to receive the first beacon data packet continuously within a first time period is greater than or equal to a first preset number threshold. This can solve the problem of abnormal wake-up of the WLAN module of the electronic device due to 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.
[0053] In some embodiments of the present application, in order to further improve the efficiency of determining the advance wake-up time, the time adjustment range based on the advance wake-up time is used to adjust the advance wake-up time by using a binary method to obtain the first wake-up time, which may specifically include:
[0054] A dichotomy calculation is performed on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
[0055] In some embodiments of the present application, a binary method may be used to calculate the time adjustment range of the advance wake-up time to obtain the first wake-up time.
[0056] In an example, taking the early wake-up time as 200us, DTIM=400us, the time adjustment range of the early wake-up time [Emin, Emax]=[200us, 5ms], the first cumulative timing time threshold T1 of the timer is 10 times the DTIM, that is, T1=10×400us=4ms, and the first counting threshold A1 is 3 as an example, if the electronic device fails to receive the first beacon data packet for three consecutive times within 4ms, the time adjustment range of the early wake-up time [Emin, Emax]=[200us, 5ms] is binary-calculated, that is, (200+5000) / 2=2600us, and the first wake-up time is 2600us.
[0057] If the prior art method is used to adjust the early wake-up time from 200us to 2600us in steps of 25us, (2600-200) / 25=96 adjustments are required. However, in the embodiment of the present application, only one adjustment is performed.
[0058] In an embodiment of the present application, a first wake-up time is obtained by performing a binary calculation on the time adjustment range of the advance wake-up time. Compared with the method of gradually adjusting the advance wake-up time in the prior art, the scheme of the embodiment of the present application improves the adjustment efficiency of the advance wake-up time.
[0059] Step 130: When the accumulated timing time of the timer reaches the first wake-up time, wake up the WLAN module.
[0060] In some embodiments of the present application, when 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 avoid the loss of the Beacon.
[0061] In some embodiments of the present application, in order to further improve the efficiency of determining the advance wake-up time, after the advance wake-up time is adjusted by using a binary method in the time adjustment range based on the advance wake-up time to obtain the first wake-up time, the above method may further include:
[0062] Reset the start time of the timer to 0 and restart the 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 fails to continuously receive the first beacon data packet within the second time period;
[0063] When the second number is less than the first number threshold, obtaining a third number of times that the electronic device does not receive the first beacon data packet within a third time period;
[0064] When the third number is greater than or equal to the second number threshold, a binary calculation is performed on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time to obtain the second wake-up time.
[0065] The second time period may be a time period from when the timer restarts to the first accumulated time threshold.
[0066] The second number may be the number of times the electronic device fails to receive the first beacon data packet continuously within the second time period, that is, how many times the electronic device fails to receive the first beacon data packet continuously within the second time period.
[0067] The third time period may be a time period from when the timer restarts to the second accumulated time threshold.
[0068] The above-mentioned second cumulative timing time threshold can be a threshold of the cumulative timing time of a pre-set timer. The second cumulative timing time threshold can be obtained based on prior experience. The second cumulative timing time threshold can be set according to user needs and is not limited in the embodiments of the present application.
[0069] In some embodiments of the present application, the second cumulative timing time threshold may be a positive integer multiple of DTIM, and the second cumulative timing time threshold is greater than the first cumulative timing time threshold. For example, the second cumulative timing time threshold may be 20 times of DTIM, that is, the second cumulative timing time threshold may be 8ms.
[0070] The second number threshold may be a preset second number threshold, such as 5. The second number threshold may be set according to user needs and is not limited in the embodiments of the present application.
[0071] The second wake-up time may be a wake-up time obtained by performing a binary calculation on the upper limit values of the time adjustment ranges of the first wake-up time and the advance wake-up time.
[0072] In some embodiments of the present application, after obtaining the first wake-up time, that is, after the early wake-up time is adjusted for the first time, the start time of the timer can be reset to 0, and then the timing can be restarted. When the cumulative timing time of the timer reaches the first cumulative timing time threshold again, the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is obtained, and then when the second number is less than the first number threshold, the third number of times that the electronic device has not received the first beacon data packet in the third time period is obtained, and it is determined whether the third number is greater than or equal to the second number threshold. If so, the upper limit value of the time adjustment range of the first wake-up time and the early wake-up time is binary calculated to obtain the second wake-up time.
[0073] Continuing to refer to the above example, taking the second cumulative timing time threshold T2 as 20 times the DTIM, that is, T2=20×400us=8ms, and the second counting threshold A2 as 5 as an example, after adjusting the early wake-up time in the previous round to obtain the first wake-up time of 2600us, the start time of the timer is reset to 0, and then the timing is restarted. When the cumulative timing time of the timer reaches the 10th DTIM again, that is, when the cumulative timing time of the timer reaches the 4th ms, if it is counted that the electronic device has not received the first beacon data packet for 3 consecutive times within these 4ms, which is less than A1, the timer continues to time. When the cumulative timing time of the timer continues to reach the next 10th DTIM, that is, when the cumulative timing time of the timer reaches the 8th ms, if it is counted that the electronic device has not received the first beacon data packet 5 times within these 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, that is, (2600+5000) / 2=3800us, that is, the second wake-up time is 3800us.
[0074] If the prior art method is used to adjust the early wake-up time from 200us to 3800us in steps of 25us, (3800-200) / 25=144 adjustments are required. However, in the embodiment of the present application, only two adjustments are performed.
[0075] In an embodiment of the present application, the first wake-up time after the previous round of adjustment is further adjusted by adopting a binary method. Compared with the method of gradually adjusting the advance wake-up time in the prior art, the scheme of the embodiment of the present application improves the adjustment efficiency of the advance wake-up time.
[0076] In some embodiments of the present application, in order to further improve the efficiency of determining the early wake-up time, when 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 binary division to obtain the second wake-up time. The above method may also include:
[0077] Taking the first wake-up time as the lower limit of the time adjustment range of the advance wake-up time, to obtain a first adjustment time range;
[0078] After obtaining the second wake-up time, the above method may further include:
[0079] The starting time of the reset timer is 0, and the timing is restarted. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and in the third time period, the third number of times that the electronic device has not received the first beacon data packet 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 binary calculated to obtain the third wake-up time.
[0080] The first adjustment time range may be an updated time adjustment range of the advance wake-up time obtained by taking the first wake-up time as the lower limit of the time adjustment range of the advance wake-up time, that is, the first adjustment time range [Emin, Emax] = [2600us, 5ms].
[0081] The third wake-up time may be a wake-up time obtained by performing a dichotomy calculation on the second wake-up time and the lower limit value of the first adjustment time range.
[0082] In some embodiments of the present application, before performing a 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 the second wake-up time, it is necessary to first use the first wake-up time as the lower limit value of the time adjustment range of the early wake-up time, update the time adjustment range of the early wake-up time, and obtain the first adjustment time range. Then, after obtaining the second wake-up time, that is, after the early wake-up time is adjusted for the second time, the start time of the timer can be reset to 0, and then the timing is restarted. When the cumulative timing time of the timer reaches the first cumulative timing time threshold again, the second number of times that the electronic device has not received the first beacon data packet continuously 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 has not received the first beacon data packet in the third time period is obtained. If the third number 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 binary calculated to obtain the third wake-up time.
[0083] Continuing with the above example, after adjusting the first wake-up time in the last round and obtaining the second wake-up time of 3800us, 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, that is, when the accumulated timing time of the timer reaches the 4th ms, if the number of electronic devices that have not received the first beacon data packet for two consecutive times within the 4ms is counted, and it is less than A1, the timer continues to count, and when the accumulated timing time of the timer continues to reach the next 10th DTIM, that is, when the accumulated timing time of the timer reaches the 4th ms, the timer continues to count. When the time reaches the 8th ms, if the number of electronic devices that have not received the first beacon data packet 4 times within this 8 ms is counted, which is less than A2, then the second wake-up time 3800us and the lower limit value 2600us of the first adjustment time range are judged, and 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 dichotomy, that is, (3800+2600) / 2=3200us, that is, the third wake-up time is 3200us.
[0084] If the prior art method is used to adjust the early wake-up time from 200us to 3200us in steps of 25us, (3200-200) / 25=120 adjustments are required. However, in the embodiment of the present application, only three adjustments are performed.
[0085] In an embodiment of the present application, the second wake-up time after the previous round of adjustment is further adjusted by adopting a binary method. Compared with the method of gradually adjusting the early wake-up time in the prior art, the scheme of the embodiment of the present application improves the adjustment efficiency of the early wake-up time.
[0086] In some embodiments of the present application, in order to accurately determine the end time of adjusting the wake-up time, before performing a 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 involved may further include:
[0087] Taking the second wake-up time as the upper limit of the first adjustment time range, to obtain a second adjustment time range;
[0088] After obtaining the third wake-up time, the above method may further include:
[0089] Reset the current time to 0;
[0090] The starting time of the reset timer is 0, and the timing is restarted. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times the electronic device has not received 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 wake-up time is ended.
[0091] The second adjustment time range may be a time adjustment range of the updated early wake-up time obtained by taking the second wake-up time as the upper limit of the first adjustment time range, that is, the second adjustment time range [Emin, Emax] = [2600us, 3800us].
[0092] In some embodiments of the present application, before performing a 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, it is necessary to first use the second wake-up time as the upper limit value of the first adjustment time range, update the first adjustment time range, and obtain the second adjustment time range. Then, after obtaining the third wake-up time, that is, after the advance wake-up time is adjusted for the third time, the start time of the timer can be reset to 0, and then the timing is restarted. When the cumulative timing time of the timer reaches the first cumulative timing time threshold again, the second number of times that the electronic device has not received the first beacon data packet continuously 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 has not received the first beacon data packet in the third time period is obtained. If the third number 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 wake-up time is terminated.
[0093] Continuing to refer to the above example, after adjusting the second wake-up time in the last round and obtaining the third wake-up time of 3200us, the start time of the timer is reset to 0, and then the timing is restarted. When the cumulative timing time of the timer reaches the 10th DTIM again, that is, when the cumulative timing time of the timer reaches the 4th ms, if the number of electronic devices that have not received the first beacon data packet for two consecutive times within these 4ms is counted, it is less than A1, and the timer continues to time. When the cumulative timing time of the timer continues to reach the next 10th DTIM, that is, when the cumulative timing time of the timer reaches the 8th ms, if the number of electronic devices that have not received the first beacon data packet for four times within these 8ms is counted, it is less than A2, then the third wake-up time 3200us and the lower limit value 2600us of the second adjustment time range are judged, 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.
[0094] 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 further calculated by dichotomy, that is, (3200+2600) / 2=2900us, and the fourth round of wake-up time 2900us is obtained, and the previous round of wake-up time 3200us is used as the upper limit value of the second adjustment time range, and the third adjustment time range [Emin, Emax]=[2600us, 3200us] is obtained.
[0095] Then continue to reset the start time of the timer to 0, and then restart the timing. When the accumulated timing time of the timer reaches the 10th DTIM again, that is, when the accumulated timing time of the timer reaches the 4th ms, if the number of electronic devices that have not received the first beacon data packet for 2 consecutive times within these 4ms is less than A1, the timer continues to count. When the accumulated timing time of the timer continues to reach the next 10th DTIM, that is, when the accumulated timing time of the timer reaches the 8th ms, if the number of electronic devices that have not received the first beacon data packet for 4 times within these 8ms is less than A2, it is determined that the fourth round of call The wake-up time 2900us and the lower limit value 2600us of the third adjustment time range are determined to be greater than the lower limit value 2600us of the third adjustment time range, and the fourth round wake-up time and the lower limit value of the third adjustment time range are further calculated by dichotomy, that is, (2900+2600) / 2=2900us, and the fifth round wake-up time 2750us is obtained, and the previous round wake-up time 2900us is used as the upper limit value of the third adjustment time range to obtain the fourth adjustment time range [Emin, Emax]=[2600us, 2900us].
[0096] Then continue to reset the start time of the timer to 0. If 2600us is used as the timer starting from 0 to the first cumulative timing time threshold T1, the first number of times the first beacon data packet is not received continuously is greater than or equal to the first number threshold A1, but the second number of times the first beacon data packet is not received from the timer starting from 0 to the second cumulative timing time threshold T2 is less than the threshold A2, the final wake-up time is 2800us±20us, that is, the final wake-up time is [2780,2820]us. For example, when the sixth adjustment is made If the threshold 2600us is less than the fifth round wake-up time 2750us and less than the final wake-up time 2800us±20us, then when performing the sixth round of adjustment, the fifth round wake-up time and the upper limit of the fourth adjustment time range are calculated by binary search, that is, (2750+2900) / 2=2825us, to obtain the sixth round wake-up time, and the previous round wake-up time 2750us is used as the lower limit of the fourth adjustment time range to obtain the fifth adjustment time range [Emin, Emax]=[2750us, 2900us].
[0097] When making the seventh adjustment, since the sixth round wake-up time 2825 is greater than the final wake-up time 2800us±20us, when making the seventh round of adjustment, the sixth round wake-up time 2825 and the upper limit value of the fifth adjustment time range are calculated by dichotomy, that is, (2825+2750) / 2=2788us.
[0098] After the seventh round of adjustment, the wake-up time is 2788us, which meets 2800us±20us. Therefore, according to the solution of the embodiment of the present application, only 7 rounds of adjustment are needed to adjust to the appropriate value.
[0099] If the prior art solution is used, the early wake-up time is adjusted from 200us to 2800us±20us, that is, the early wake-up time is adjusted from 200us to within the range of [2780,2820]us. Taking the step of 25us as an example, it needs to be adjusted (2800-200) / 25=104 times, and 104 adjustments need to be made.
[0100] In an embodiment of the present application, when the cumulative timing time of the timer reaches a first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously within the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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 of the second adjustment time range, the third wake-up time can no longer be adjusted, and the adjustment of the wake-up time can be ended at this time, so the end time of the adjustment of the wake-up time can be accurately determined.
[0101] The above-mentioned adjustment method for the early wake-up time is a passive adjustment method, that is, an improvement on the passive adjustment method in the prior art.
[0102] In some embodiments of the present application, in order to further improve the efficiency of determining the early wake-up time, the embodiments of the present application also provide an active adjustment method, which is as follows:
[0103] In some embodiments of the present application, in order to further improve the efficiency of determining the early wake-up time, before obtaining the wake-up reason of the electronic device being abnormally awakened, the above method may further include:
[0104] Initialize the starting number of times that the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet;
[0105] After obtaining the reason why the electronic device is abnormally awakened, the above method may further include:
[0106] When the wake-up reason is that the electronic device fails to receive the first beacon data packet continuously, the starting number is updated to obtain a fourth number;
[0107] When the fourth number is greater than the third number threshold, obtaining the number of first data packets of the second beacon data packet sent by the electronic device to the test server, the number of second 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 packet fed back by the test server, wherein the first beacon data packet is obtained after the test server parses the second beacon data packet;
[0108] The advance wake-up time is adjusted according to the number of first data packets, the number of second data packets, the transmission delay duration, and the reference delay duration to obtain a fourth wake-up time.
[0109] The starting number of times that the initialized electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet may be 0.
[0110] The fourth number may be the number after updating the starting number of times the initialized electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet when it is determined that the awakening reason is that the electronic device has failed to continuously receive the first beacon data packet.
[0111] The third number threshold may be a pre-set fourth number threshold. The third number threshold may be set according to user needs and is not limited in the embodiments of the present application. For example, the third number threshold may be 10.
[0112] The test server may be an external server that sends the first beacon data packet to the electronic device.
[0113] The second beacon data packet may be a beacon data packet sent by the electronic device to the test server.
[0114] In some embodiments of the present application, the first beacon data packet may be obtained by parsing the second beacon data packet by the test server.
[0115] The number of first data packets may be the number of second beacon data packets sent by the electronic device to the test server. For example, the number of first data packets may be 150.
[0116] The second number of data packets may be the number of first beacon data packets fed back by the test server to the electronic device. For example, the second number of data packets may be 120.
[0117] The transmission delay duration can be the delay duration of the first beacon data packet that the test server feeds back to the electronic device. The transmission delay duration here can be, for example, 500ms, that is, after receiving the second beacon data packet sent by the electronic device, the test server delays 500ms and feeds back the first beacon data packet obtained after parsing the second beacon data packet to the electronic device.
[0118] The reference delay duration can be the standard delay duration of the first beacon data packet that the test server feeds back to the electronic device. For example, the reference delay duration can be the high delay standard time of the beacon data packet. The reference delay duration can be set according to prior experience and is not limited in the embodiments of the present application. For example, it can be 800ms.
[0119] It should be noted that the reference delay duration of each first beacon data packet is the same.
[0120] The fourth wake-up time may be a wake-up time obtained after adjusting the advance wake-up time.
[0121] In some embodiments of the present application, the starting number of times the electronic device is abnormally awakened due to continuous failure to receive the first beacon data packet is initialized. When it is detected that the reason for the abnormal awakening of the electronic device is the continuous failure to receive the first beacon data packet, the starting number of times the initialized electronic device is abnormally awakened due to continuous failure to receive the first beacon data packet can be updated to obtain a fourth number. If the fourth number is greater than the third number threshold, it may indicate that the electronic device has been abnormally awakened multiple times due to the Beacon loss problem, which will affect the power consumption of the electronic device. Therefore, at this time, the early wake-up time can be adjusted by obtaining 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 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.
[0122] In an embodiment of the present application, compared with the passive adjustment method in the prior art of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time, the scheme of the embodiment of the present application does not need to set the time adjustment range of the early wake-up time, and adjusts the early wake-up time within the time adjustment range. Instead, when it is determined that the number of abnormal wake-ups of the electronic device due to failure to receive the first beacon data packet is greater than the third number threshold, the early wake-up time is directly adjusted in one step by actively adjusting the number of first data packets of the second beacon data packet sent by the electronic device to the test server, the second number of first beacon data packets 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, so as to obtain the fourth wake-up time, thereby improving the efficiency of determining the early wake-up time.
[0123] In some embodiments of the present application, in order to improve the accuracy of determining the fourth wake-up time, the advance wake-up time is adjusted according to the number of first data packets, the number of second data packets, the transmission delay duration, and the reference delay duration to obtain the fourth wake-up time, which may specifically include:
[0124] When the number of first data packets is greater than or equal to the preset number threshold, the average delay duration of the first beacon data packets of the fifth number of data packets 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;
[0125] Calculating a packet loss rate of a second beacon data packet according to the number of first data packets and the number of second data packets;
[0126] Determine 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;
[0127] Update the early wake-up time based on the average delay duration, packet loss rate, and delay rate;
[0128] Based on the updated extracted wake-up time, a fourth wake-up time is determined.
[0129] Among them, the preset quantity threshold can be a preset threshold of the number of first data packets, and the preset quantity threshold can be set according to user needs and is not limited in the embodiments of the present application.
[0130] In some embodiments of the present application, when the number of first data packets is greater than or equal to a preset number threshold, the average delay duration of the first beacon data packets of the first data packets fed back by the test server to the electronic device can be calculated based on 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 based on the number of first data packets and the number of second data packets. According to the transmission delay duration and reference delay duration of the first beacon data packet fed back by the test server to the electronic device, the delay rate of the first beacon data packet fed back by the test server to the electronic device is determined, and the early wake-up time can be updated based on the average delay duration, packet loss rate and delay rate, and the fourth wake-up time can be determined based on the updated early wake-up time.
[0131] In an embodiment of the present application, when the number of first data packets is greater than or equal to a preset number threshold, the advance wake-up time is updated based on the average delay duration of the first beacon data packet of the first number of data packets fed back to the electronic device by the test server, the packet loss rate of the second beacon data packet and the delay rate of the first beacon data packet to obtain a fourth wake-up time. In this way, the fourth wake-up time is determined in a quantitative manner, thereby improving the accuracy of determining the fourth wake-up time.
[0132] In some embodiments of the present application, in order to further improve the accuracy of determining the fourth wake-up time, determining 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 may specifically include:
[0133] Selecting, from the first beacon data packet, a third beacon data packet having a transmission delay duration greater than a reference delay;
[0134] 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 number of the first data packets.
[0135] The third beacon data packet may be a beacon data packet selected from the first beacon data packet, and the corresponding transmission delay duration may be greater than the reference delay duration.
[0136] In some embodiments of the present application, a third beacon data packet having 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.
[0137] The delay rate of feeding back the first beacon data packet is determined based on the number of the third beacon data packets and the number of the first data packets, and the ratio of the number of the third beacon data packets to the number of the first data packets may be determined as the delay rate of the first beacon data packet.
[0138] In an embodiment of the present application, a third beacon data packet whose transmission delay duration is greater than a reference delay duration is selected from the first beacon data packet, and the delay rate of the first beacon data packet fed back by the test server is determined based on the number of third beacon data packets and the number of first data packets. In this way, the delay rate of the first beacon data packet can be accurately determined, so as to accurately determine the fourth wake-up time, thereby improving the accuracy of determining the fourth wake-up time.
[0139] In some embodiments of the present application, in order to improve the efficiency of determining the wake-up time, determining the fourth wake-up time based on the updated advance wake-up time may specifically include:
[0140] 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.
[0141] In some embodiments of the present 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 can be directly determined as the fourth wake-up time, so that the early wake-up time can be adjusted only once.
[0142] In an embodiment of the present 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. In this way, the early wake-up time can be adjusted only once. Compared with the passive adjustment method in the prior art of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time, the solution of the embodiment of the present application improves the efficiency of determining the wake-up time.
[0143] In some embodiments of the present application, in order to save power consumption of the electronic device, before the extracted wake-up time is adjusted according to the number of first data packets, the number of second data packets, the transmission delay duration, and the reference delay duration to obtain the fourth wake-up time, the above-mentioned method may further include:
[0144] When the electronic device test server is in a connected state, the connection between the electronic device and the test server is disconnected.
[0145] In some embodiments of the present application, before obtaining 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 duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data packet fed back by the test server, it is first necessary to connect the electronic device to the test server, 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 duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data packet fed back by the test server can be obtained.
[0146] Then, according to the number of first data packets, the number of second data packets, the transmission delay duration and the reference delay duration, the extracted wake-up time is adjusted. Before obtaining the fourth wake-up time, the connection between the electronic device and the test server can be disconnected, and the average delay duration, delay rate and packet loss rate of the first beacon data packet and the second beacon data packet can be directly calculated in the electronic device.
[0147] In an embodiment of the present application, the extracted wake-up time is adjusted according to the number of first data packets, the number of second data packets, the transmission delay duration and the reference delay duration. Before obtaining the fourth wake-up time, 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 subsequent calculation of the average delay duration 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, thereby saving power consumption of the electronic device.
[0148] In order to more clearly understand the solution of the embodiment of the present application, the embodiment of the present application provides another implementable manner of the wake-up method, which includes steps 201 to 209.
[0149] Step 201, initialize the start time of the timer, the early wake-up time of the WLAN module of the electronic device, the time adjustment range of the early wake-up time, the first cumulative timing threshold of the timer, and the starting number of times the electronic device is abnormally awakened due to failure to receive the first beacon data packet continuously.
[0150] Step 202 , determine whether the accumulated timing time of the timer reaches DTIM, if so, execute step 203 , if not, return to execute step 202 .
[0151] Step 203 , determining whether the electronic device is abnormally awakened due to failure to receive the first beacon data packet, if not, executing step 204 , if yes, executing step 206 .
[0152] Step 204 , determine whether the accumulated timing time of the timer is greater than the first accumulated timing time threshold, if so, execute step 205 , if not, return to execute step 202 .
[0153] Step 205: Use a passive algorithm to adjust the early wake-up time.
[0154] Step 206: Update the starting number of times that the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet to obtain a fourth number.
[0155] Step 207 , determine whether the fourth number is greater than or equal to the third number threshold, if so, execute step 208 , if not, execute step 204 .
[0156] Step 208: Use an active algorithm to adjust the early wake-up time.
[0157] Step 209: reset the start time of the timer to the initialization value.
[0158] In step 207 , resetting the start time of the timer to the initialization value means resetting the start time of the timer to the value initialized in step 201 .
[0159] The following is a detailed description of the above Figure 2 How to use the passive algorithm to adjust the early wake-up time in step 205.
[0160] refer to Figure 3 , Figure 3 A schematic diagram of a process of adjusting the early wake-up time by a passive algorithm provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the passive algorithm for adjusting the early wake-up time includes steps 301 to 307.
[0161] Step 301, determine whether the first number of times that the electronic device fails to receive a first beacon data packet continuously within a first time period is greater than or equal to a first number threshold, if so, execute step 302, if not, execute step 303.
[0162] Step 302: Based on the time adjustment range of the advance wake-up time, the advance wake-up time is adjusted by using a binary method to obtain a first wake-up time, and the first wake-up time is used as the lower limit of the time adjustment range of the advance wake-up time to obtain a first adjustment time range.
[0163] After step 302, the start time of the timer is reset to the initialization value, and the timing is restarted to obtain the second number of times that the electronic device fails to receive the first beacon data packet continuously within the second time period.
[0164] Step 303 , determining whether the second number of times that the electronic device fails to receive the first beacon data packet within the second time period is greater than or equal to the second number threshold, if so, executing step 304 , if not, executing step 305 .
[0165] Step 304: Calculate the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time by binary division to obtain the second wake-up time.
[0166] After step 304, the start 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 fails to receive the first beacon data packet continuously within the third time period.
[0167] Step 305 , determine whether the second wake-up time is greater than the lower limit of the first adjustment time range, if so, execute step 306 , if not, execute step 307 .
[0168] Step 306: Calculate the second wake-up time and the lower limit of the first adjustment time range by binary division to obtain a third wake-up time.
[0169] After step 306, the start time of the timer is reset to the initialization value, the timing is restarted, and the third number of times that the electronic device fails to continuously receive the first beacon data packet within the third time period is re-obtained.
[0170] Step 307: reset the starting number of times the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet to 0.
[0171] The following is a detailed description of the above Figure 2 How to use the active algorithm to adjust the early wake-up time in step 208.
[0172] refer to Figure 4 , Figure 4 A flowchart of an active algorithm for adjusting the early wake-up time provided in an embodiment of the present application is shown in FIG. Figure 4 As shown, the passive algorithm for adjusting the early wake-up time includes steps 401 to 410.
[0173] Step 401: Connect to the test server.
[0174] Step 402: Obtain the number of first data packets of the second beacon data packets sent by the electronic device to the test server, the number of second data packets of the first beacon data packets 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 packet fed back by the test server.
[0175] Step 403 , determine whether the number of first data packets is greater than or equal to a preset number threshold, if so, execute step 406 , if not, go to step 404 .
[0176] Step 404: Continue to send the first beacon data packet to the test server.
[0177] Step 405: Receive a second beacon data packet fed back by the test server.
[0178] Step 406: Disconnect from the test server.
[0179] Step 407: calculate the average delay of the first beacon data packets that feedback the number of second data packets based on the transmission delay of each first beacon data packet fed back; calculate the packet loss rate of the second beacon data packets based on the number of first data packets and the number of second data packets; determine the delay rate of the first beacon data packet fed back by the test server based on the transmission delay of the first beacon data packet fed back by the test server and the reference delay.
[0180] Step 408: Update the early wake-up time according to the average delay duration, the packet loss rate, and the delay rate to obtain an updated early wake-up time.
[0181] Step 409 , determine whether the updated early wake-up time is within the time adjustment range of the early wake-up time, if so, execute step 410 , if not, end the process.
[0182] Step 410: Use the updated early wake-up time as the fourth wake-up time.
[0183] In step 410, using the updated advance wake-up time as the fourth wake-up time means using the updated advance wake-up time as the final wake-up time.
[0184] The awakening method provided in the embodiment of the present application can be executed by a wake-up device. In the embodiment of the present application, the awakening device provided in the embodiment of the present application is described by taking the awakening method executed by the awakening device as an example.
[0185] Figure 5 FIG. 1 is a schematic diagram showing a structure of a wake-up device according to an exemplary embodiment. Figure 5 As shown, the awakening device 500 may include:
[0186] An initialization module 510 is used 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 of the timer;
[0187] The time adjustment module 520 is used to adjust the early wake-up time by using a binary method based on the time adjustment range of the early wake-up time to obtain a first wake-up time when the accumulated timing time of the timer reaches the delivery traffic indication information DTIM and the first number of times that the electronic device fails to continuously receive the first beacon data packet within the first time period is greater than or equal to the first number threshold, wherein the first time period is a time period from the start time of the timer to the first accumulated timing time threshold;
[0188] 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.
[0189] In an embodiment of the present application, when adjusting the early wake-up time, based on the time adjustment range of the initialized early wake-up time, the initialized early wake-up time is adjusted by a binary search method to obtain a first wake-up time. Compared with the prior art in which the early wake-up time is gradually adjusted within the time adjustment range of the early wake-up time, the embodiment of the present application adjusts the early wake-up time by a binary search method, thereby improving the adjustment efficiency of the early wake-up time. In an embodiment of the present application, when adjusting the early wake-up time, the early wake-up time is adjusted when the accumulated timing time of the timer reaches DTIM and the first number of times that the electronic device has not continuously received the first beacon data packet in the first time period is greater than or equal to the first number threshold. This can solve the problem of abnormal awakening 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 awakening of the WLAN module.
[0190] In some embodiments of the present application, the time adjustment module 520 is specifically used to:
[0191] A dichotomy calculation is performed on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
[0192] In some embodiments of the present application, the above-mentioned device may further include:
[0193] a time resetting module, configured to, after obtaining the first wake-up time, reset the start time of the timer to 0 and restart the 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 fails to continuously receive the first beacon data packet within a second time period, wherein the second time period is a time period from when the timer restarts to the first accumulated timing time threshold;
[0194] an acquisition module, configured to acquire, when 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 within a third time period, wherein the third time period is a time period from when the timer restarts to a second cumulative timing time threshold, the second cumulative timing time threshold is a positive integer multiple of the DTIM, and the second cumulative timing time threshold is greater than the first cumulative timing time threshold;
[0195] The time adjustment module 520 is further configured to, when the third number is greater than or equal to the second number threshold, perform a binary calculation on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time to obtain a second wake-up time.
[0196] In some embodiments of the present application, the time adjustment module 520 is further configured to perform a binary calculation on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time when the third number is greater than or equal to the second number threshold, and before obtaining the second value, use the first wake-up time as the lower limit of the time adjustment range of the advance wake-up time to obtain the first adjustment time range;
[0197] The time reset module is also used to reset the start time of the timer to 0 and restart the timing after the second wake-up time is obtained. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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, the second wake-up time and the lower limit value of the first adjustment time range are binary calculated to obtain the third wake-up time.
[0198] In some embodiments of the present application, the time adjustment module 520 is further configured to, before performing a binary calculation on the second wake-up time and the lower limit of the first adjustment time range to obtain the third wake-up time, use the second wake-up time as the upper limit of the first adjustment time range to obtain the second adjustment time range;
[0199] The time reset module is also used to reset the start time of the timer to 0 and restart the timing after the third wake-up time is obtained, and end the adjustment of the wake-up time when the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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.
[0200] In some embodiments of the present application, the time adjustment module 520 is specifically used to:
[0201] When the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally awakened, obtaining a wake-up reason for the abnormal awakening of the electronic device;
[0202] When the wake-up reason is not that the electronic device has not continuously received 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 has not continuously received the first beacon data packet within a first time period;
[0203] When the first number is greater than or equal to the first number threshold, the advance wake-up time is adjusted by using a binary method based on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
[0204] In some embodiments of the present application, the initialization module 510 is further configured to initialize the starting number of times that the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet before obtaining the awakening reason for the electronic device being abnormally awakened, and the initial value of the starting number of times is 0;
[0205] The above-mentioned device may also include:
[0206] An updating module, configured to, after obtaining the wake-up reason for the abnormal wake-up of the electronic device, update the starting number of times to obtain a fourth number of times when the wake-up reason is that the electronic device fails to receive the first beacon data packet continuously;
[0207] The acquisition module is further used to acquire, when the fourth number is greater than the third number threshold, the number of first data packets of the second beacon data packet sent by the electronic device to the test server, the number of second 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 packet fed back by the test server, wherein the first beacon data packet is obtained after the test server parses the second beacon data packet;
[0208] The time adjustment module 520 is further used to adjust the extracted wake-up time according to the number of the first data packets, the number of the second data packets, the transmission delay duration and the reference delay duration to obtain a fourth wake-up time.
[0209] In some embodiments of the present application, the time adjustment module 520 is specifically used to:
[0210] When the number of the first data packets is greater than or equal to a preset number threshold, according to the transmission delay of each first beacon data packet fed back by the test server, calculate the average delay of the first beacon data packets of the second number of data packets fed back by the test server;
[0211] Calculating a packet loss rate of the second beacon data packet according to the number of the first data packets and the number of the second data packets;
[0212] 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;
[0213] Updating the early wake-up time according to the average delay duration, the packet loss rate and the delay rate;
[0214] Based on the updated extracted wake-up time, a fourth wake-up time is determined.
[0215] In some embodiments of the present application, the time adjustment module 520 is specifically used to:
[0216] Selecting, from the first beacon data packets, a third beacon data packet whose transmission delay duration is greater than the reference delay duration;
[0217] 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 number of the first data packets.
[0218] In some embodiments of the present application, the time adjustment module 520 is specifically used to:
[0219] In a case where the updated advance wake-up time is within the time adjustment range of the advance wake-up time, the updated advance wake-up time is determined as the fourth wake-up time.
[0220] In some embodiments of the present application, the above-mentioned device may further include:
[0221] A disconnection module is used to disconnect the connection between the electronic device and the test server when the test server is in a connected state, before the fourth wake-up time is obtained by adjusting the extracted wake-up time according to the second number of data packets, the second number of data packets, the transmission delay duration and the reference delay duration.
[0222] In some embodiments of the present application, the early wake-up time is the time when the WLAN module is awakened before the DTIM, the lower limit of the time adjustment range for extracting the wake-up time is the early wake-up time, the first cumulative timing time threshold of the timer is a positive integer multiple of the DTIM, and the start time of the initialized timer is 0.
[0223] The wake-up device in the embodiment 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 it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a car-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0224] The information processing device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0225] The awakening device provided in the embodiment of the present application can achieve Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.
[0226] Alternatively, if Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be executed on the processor 601, and when the program or instruction is executed by the processor 601, the various steps of the above-mentioned wake-up method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0227] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0228] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0229] The electronic device 700 includes but is not limited to: 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.
[0230] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 7 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.
[0231] Among them, the processor 710 is used 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 of the timer; when the cumulative timing time of the timer reaches the delivery traffic indication information DTIM, and the first number of times that the electronic device has not continuously received the first beacon data packet in the first time period is greater than or equal to the first number threshold, based on the time adjustment range of the early wake-up time, the early wake-up time is adjusted by binary search to obtain the first wake-up time, and the first time period is the time period from the start time of the timer to the first cumulative timing time threshold; when the cumulative timing time of the timer reaches the first wake-up time, the WLAN module is woken up.
[0232] In this way, when adjusting the early wake-up time, based on the time adjustment range of the initialized early wake-up time, the initialized early wake-up time is adjusted in a binary manner to obtain a first wake-up time. Compared with the prior art in which the early wake-up time is gradually adjusted within the time adjustment range of the early wake-up time, the embodiment of the present application adjusts the early wake-up time in a binary manner, thereby improving the adjustment efficiency of the early wake-up time. In the embodiment of the present application, when adjusting the early wake-up time, the early wake-up time is adjusted when the accumulated timing time of the timer reaches DTIM and the first number of times that the electronic device has not continuously received the first beacon data packet in the first time period is greater than or equal to the first number threshold. In this way, the problem of abnormal awakening of the WLAN module of the electronic device caused by Beacon loss in the prior art can be solved, so as to accurately receive the Beacon sent by the AP and reduce the possibility of abnormal awakening of the WLAN module.
[0233] Optionally, the processor 710 is further configured to perform a binary calculation on a time adjustment range of the advance wake-up time to obtain a first wake-up time.
[0234] In this way, the first wake-up time is obtained by performing a binary calculation on the time adjustment range of the advance wake-up time. Compared with the method of gradually adjusting the advance wake-up time in the prior art, the solution of the embodiment of the present application improves the adjustment efficiency of the advance wake-up time.
[0235] Optionally, the processor 710 is also used to reset the start time of the timer to 0 and restart the timing. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, obtain the second number of times that the electronic device has not received the first beacon data packet continuously in a second time period, and the second time period is the time period between the restart of the timer and the first cumulative timing time threshold; when the second number is less than the first number threshold, obtain the third number of times that the electronic device has not received the first beacon data packet in a third time period, wherein the third time period is the time period between the restart of the timer and the second cumulative timing time threshold, the second cumulative timing time threshold is a positive integer multiple of the DTIM, and the second cumulative timing time threshold is greater than the first cumulative timing time threshold; when the third number is greater than or equal to the second number threshold, perform a 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 the second wake-up time.
[0236] In this way, by adopting a binary method to further adjust the first wake-up time after the previous round of adjustment, compared with the method of gradually adjusting the advance wake-up time in the prior art, the solution of the embodiment of the present application improves the adjustment efficiency of the advance wake-up time.
[0237] Optionally, the processor 710 is also used to use the first wake-up time as the lower limit value of the time adjustment range of the advance wake-up time to obtain a first adjustment time range; reset the start time of the timer to 0, and restart the timing. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and in the third time period, the third number of times that the electronic device has not received the first beacon data packet 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 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.
[0238] In this way, by further adjusting the second wake-up time after the previous round of adjustment in a binary manner, compared with the method of gradually adjusting the advance wake-up time in the prior art, the solution of the embodiment of the present application improves the adjustment efficiency of the advance wake-up time.
[0239] Optionally, the processor 710 is further used to use the second wake-up time as the upper limit value of the first adjustment time range to obtain the second adjustment time range; reset the start time of the timer to 0, restart the timing, and end the adjustment of the wake-up time when the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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.
[0240] In this way, 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 has not received the first beacon data packet continuously within the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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 third wake-up time can no longer be adjusted. At this time, the adjustment of the wake-up time can be ended, so the end time of the adjustment of the wake-up time can be accurately determined.
[0241] Optionally, the processor 710 is further used to obtain the wake-up reason for the electronic device being abnormally awakened when the cumulative timing time of the timer reaches the DTIM and the electronic device is abnormally awakened; obtain the first number of times the electronic device has not received the first beacon data packet continuously within the first time period when the wake-up reason is not that the electronic device has not received the first beacon data packet continuously, and the cumulative timing time of the timer is greater than the first cumulative timing time threshold; when the first number is greater than or equal to the first number threshold, adjust the early wake-up time based on the time adjustment range of the early wake-up time by using the binary search method to obtain the first wake-up time.
[0242] In this way, when adjusting the early wake-up time, the early wake-up time is adjusted only when it is determined that the electronic device is not abnormally awakened due to failure to receive the first beacon data packet, and the cumulative timing time of the timer is greater than the first cumulative timing time threshold, and the first number of times the electronic device has not received the first beacon data packet continuously within the first time period is greater than or equal to the first number threshold. This can solve the problem of abnormal awakening 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 awakening of the WLAN module.
[0243] Optionally, the processor 710 is further used to initialize the starting number of times the electronic device is abnormally awakened due to failure to receive the first beacon data packet continuously, and the initial value of the starting number is 0; when the wake-up reason is that the electronic device has not received the first beacon data packet continuously, the starting number is updated to obtain a fourth number; when the fourth number is greater than the third number threshold, the first number of packets of the second beacon data packet sent by the electronic device to the test server, the second number of packets 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 packet fed back by the test server, wherein the first beacon data packet is obtained after the test server parses the second beacon data packet; according to the first number of packets, the second number of packets, the transmission delay duration and the reference delay duration, the extracted wake-up time is adjusted to obtain a fourth wake-up time.
[0244] In this way, compared with the passive adjustment method in the prior art of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time, the solution of the embodiment of the present application does not need to set the time adjustment range of the early wake-up time, and adjusts the early wake-up time within the time adjustment range. Instead, when it is determined that the number of abnormal wake-ups of the electronic device due to failure to receive the first beacon data packet is greater than the third number threshold, the early wake-up time is directly adjusted in one step by actively adjusting the number of first data packets of the second beacon data packet sent by the electronic device to the test server, the second number of first beacon data packets 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, so as to obtain the fourth wake-up time, thereby improving the efficiency of determining the early wake-up time.
[0245] Optionally, the processor 710 is further used to calculate, when the number of the first data packets is greater than or equal to a preset number threshold, the average delay duration of the first beacon data packets of the second number of data packets fed back by the test server based on the transmission delay duration of each first beacon data packet fed back by the test server; calculate the packet loss rate of the second beacon data packets based on the first number of data packets and the second number of data packets; determine the delay rate of the first beacon data packet fed back by the test server based on 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 based on the average delay duration, the packet loss rate and the delay rate; and determine the fourth wake-up time based on the updated extracted wake-up time.
[0246] In this way, when the number of first data packets is greater than or equal to the preset number threshold, the advance wake-up time is updated according to the average delay duration of the first beacon data packet of the first number of data packets fed back to the electronic device by the test server, the packet loss rate of the second beacon data packet and the delay rate of the first beacon data packet, and the fourth wake-up time is obtained. In this way, the fourth wake-up time is determined in a quantitative manner, thereby improving the accuracy of determining the fourth wake-up time.
[0247] Optionally, the processor 710 is also used 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 the delay rate of the first beacon data packet fed back by the test server based on the number of the third beacon data packets and the number of the first data packets.
[0248] In this way, by selecting a third beacon data packet whose transmission delay duration is greater than a reference delay duration from the first beacon data packet, 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, thereby improving the accuracy of determining the fourth wake-up time.
[0249] Optionally, the processor 710 is further configured to, if 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 a fourth wake-up time.
[0250] In this way, 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. In this way, the early wake-up time can be adjusted only once. Compared with the passive adjustment method in the prior art of gradually adjusting the early wake-up time within the time adjustment range of the early wake-up time, the solution of the embodiment of the present application improves the efficiency of determining the wake-up time.
[0251] Optionally, the processor 710 is further configured to disconnect the electronic device from the test server when the electronic device and the test server are in a connected state.
[0252] In this way, the extracted wake-up time is adjusted according to the number of first data packets, the number of second data packets, the transmission delay duration and the reference delay duration. Before obtaining the fourth wake-up time, 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 subsequent calculation of the average delay duration of the first beacon data packet, the delay rate and the packet loss rate of the second beacon data packet can be directly executed in the electronic device, thereby saving the power consumption of the electronic device.
[0253] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a color camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and at least one of other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
[0254] The memory 709 can be used to store software programs and various data. The memory 709 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 709 may include a volatile memory or a non-volatile memory, or the memory 709 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 709 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.
[0255] The processor 710 may 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 application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 710.
[0256] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned wake-up method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0257] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.
[0258] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned wake-up method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0259] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0260] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned wake-up method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0261] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do 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 methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0262] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0263] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A wake-up method, characterized in that: The method comprises: 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 of the timer; When the accumulated timing time of the timer reaches the delivery traffic indication information DTIM, and the first number of times that the electronic device fails to continuously 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 a binary method based on the time adjustment range of the early wake-up time to obtain a first wake-up time, and the first time period is a time period from the start time of the timer to the first accumulated timing time threshold; When the accumulated timing time of the timer reaches the first wake-up time, the WLAN module is woken up.
2. The method according to claim 1, characterized in that The step of adjusting the early wake-up time based on the time adjustment range of the early wake-up time by using a binary method to obtain a first wake-up time includes: A dichotomy calculation is performed on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
3. The method according to claim 1 or 2, characterized in that: After the time adjustment range of the early wake-up time is adjusted by using a binary method based on the early wake-up time to obtain the first wake-up time, the method further includes: Reset the start time of the timer to 0 and restart the 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 fails to continuously receive the first beacon data packet within a second time period, where the second time period is a time period from when the timer restarts to the first accumulated timing time threshold; When the second number is less than the first number threshold, obtaining the third number of times that the electronic device does not receive the first beacon data packet within a third time period, wherein the third time period is a time period from when the timer restarts to a second cumulative timing time threshold, the second cumulative timing time threshold is a positive integer multiple of the DTIM, and the second cumulative timing time threshold is greater than the first cumulative timing time threshold; When the third number is greater than or equal to the second number threshold, a binary calculation is performed on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time to obtain a second wake-up time.
4. The method according to claim 3, characterized in that When the third number is greater than or equal to the second number threshold, performing a binary calculation on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time to obtain the second wake-up time, the method further includes: Taking the first wake-up time as the lower limit of the time adjustment range of the advance wake-up time, to obtain a first adjustment time range; After obtaining the second wake-up time, the method further includes: Reset the start time of the timer to 0 and restart the timing. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and in the third time period, the third number of times that the electronic device has not received the first beacon data packet 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 a 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.
5. The method according to claim 4, characterized in that Before performing a binary calculation on the second wake-up time and the lower limit of the first adjustment time range to obtain a third wake-up time, the method further includes: Taking the second wake-up time as the upper limit of the first adjustment time range, to obtain a second adjustment time range; After obtaining the third wake-up time, the method further includes: Reset the start time of the timer to 0 and restart the timing. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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, end the adjustment of the wake-up time.
6. The method according to claim 1, characterized in that When the accumulated timing time of the timer reaches the DTIM, and the first number of times that the electronic device fails to continuously receive the first beacon data packet within the first time period is greater than or equal to the first number threshold, based on the time adjustment range of the advance wake-up time, the advance wake-up time is adjusted by using a binary method to obtain a first wake-up time, including: When the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally awakened, obtaining a wake-up reason for the abnormal awakening of the electronic device; When the wake-up reason is not that the electronic device fails to continuously 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 fails to continuously receive the first beacon data packet within a first time period; When the first number is greater than or equal to the first number threshold, the advance wake-up time is adjusted by using a binary method based on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
7. The method according to claim 6, characterized in that Before obtaining the awakening reason of the electronic device being abnormally awakened, the method further includes: Initialize the starting number of times the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet, where the initial value of the starting number is 0; After obtaining the awakening reason of the electronic device being abnormally awakened, the method further includes: When the wake-up reason is that the electronic device fails to receive the first beacon data packet continuously, updating the starting number to obtain a fourth number; When the fourth number is greater than the third number threshold, obtaining 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 duration of the first beacon data packet fed back by the test server, and the reference delay duration of the first beacon data packet fed back by the test server, wherein the first beacon data packet is obtained after the test server parses the second beacon data packet; The advance wake-up time is adjusted according to the number of the first data packets, the number of the second data packets, the transmission delay duration and the reference delay duration to obtain a fourth wake-up time.
8. The method according to claim 7, characterized in that The step of adjusting 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 includes: When the number of the first data packets is greater than or equal to a preset number threshold, according to the transmission delay of each first beacon data packet fed back by the test server, calculate the average delay of the first beacon data packets of the second number of data packets fed back by the test server; Calculating a packet loss rate of the second beacon data packet according to the number of the first data packets and the number of the second 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; Updating the early wake-up time according to the average delay duration, the packet loss rate and the delay rate; Based on the updated advance wake-up time, a fourth wake-up time is determined.
9. The method according to claim 8, characterized in that The determining, according to the transmission delay duration of the first beacon data packet fed back by the test server and the reference delay duration, a delay rate of the first beacon data packet fed back by the test server comprises: Selecting, from the first beacon data packets, a third beacon data packet whose transmission delay duration is greater than the reference delay; 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 number of the first data packets.
10. The method according to claim 8, characterized in that The determining a fourth wake-up time based on the updated advance wake-up time includes: In a case where the updated advance wake-up time is within the time adjustment range of the advance wake-up time, the updated advance wake-up time is determined as the fourth wake-up time.
11. The method according to claim 7, characterized in that Before adjusting the advance 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, the method further includes: When 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 according to claim 1, characterized in that The early wake-up time is the time when the WLAN module is awakened 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 cumulative timing time threshold of the timer is a positive integer multiple of the DTIM, and the start time of the initialized timer is 0.
13. A wake-up device, characterized in that: The device comprises: An initialization module, used 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 of the timer; A time adjustment module, configured to adjust the early wake-up time by using a binary method to obtain a first wake-up time based on a time adjustment range of the early wake-up time when the accumulated timing time of the timer reaches the delivery traffic indication information DTIM and the first number of times that the electronic device has not continuously received the first beacon data packet within a first time period is greater than or equal to a first number threshold, wherein the first time period is a time period from the start time of the timer to the first accumulated timing time threshold; The wake-up module is used to wake up the WLAN module when the accumulated timing time of the timer reaches the first wake-up time.
14. The device according to claim 13, characterized in that The time adjustment module is specifically used for: A dichotomy calculation is performed on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
15. The device according to claim 13 or 14, characterized in that The device also includes: a time resetting module, configured to, after obtaining the first wake-up time, reset the start time of the timer to 0 and restart the 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 fails to continuously receive the first beacon data packet within a second time period, wherein the second time period is a time period from when the timer restarts to when the first accumulated timing time threshold ends; an acquisition module, configured to acquire, when 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 within a third time period, wherein the third time period is a time period from when the timer restarts to a second cumulative timing time threshold, the second cumulative timing time threshold is a positive integer multiple of the DTIM, and the second cumulative timing time threshold is greater than the first cumulative timing time threshold; The time adjustment module is further configured to, when the third number is greater than or equal to the second number threshold, perform a binary calculation on an upper limit value of a time adjustment range of the first wake-up time and the advance wake-up time to obtain a second wake-up time.
16. The device according to claim 15, characterized in that The time adjustment module is further configured to perform a binary calculation on the upper limit of the time adjustment range of the first wake-up time and the advance wake-up time when the third number is greater than or equal to the second number threshold, and before obtaining the second value, use the first wake-up time as the lower limit of the time adjustment range of the advance wake-up time to obtain a first adjustment time range; The time reset module is also used to reset the start time of the timer to 0 and restart the timing after the second wake-up time is obtained. When the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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, the second wake-up time and the lower limit value of the first adjustment time range are binary calculated to obtain the third wake-up time.
17. The device according to claim 16, characterized in that The time adjustment module is further configured to use the second wake-up time as the upper limit value of the first adjustment time range to obtain a second adjustment time range before 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; The time reset module is also used to reset the start time of the timer to 0 and restart the timing after the third wake-up time is obtained, and end the adjustment of the wake-up time when the cumulative timing time of the timer reaches the first cumulative timing time threshold, and the second number of times that the electronic device has not received the first beacon data packet continuously in the second time period is less than the first number threshold, and the third number of times that the electronic device has not received 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.
18. The device according to claim 13, characterized in that The time adjustment module is specifically used for: When the accumulated timing time of the timer reaches the DTIM and the electronic device is abnormally awakened, obtaining a wake-up reason for the abnormal awakening of the electronic device; When the wake-up reason is not that the electronic device has not continuously received 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 has not continuously received the first beacon data packet within a first time period; When the first number is greater than or equal to the first number threshold, the advance wake-up time is adjusted by using a binary method based on the time adjustment range of the advance wake-up time to obtain a first wake-up time.
19. The device according to claim 18, characterized in that The initialization module is further used to initialize the starting number of times that the electronic device is abnormally awakened due to failure to continuously receive the first beacon data packet before obtaining the awakening reason of the electronic device being abnormally awakened, and the initial value of the starting number is 0; The device also includes: An updating module, configured to, after obtaining the wake-up reason for the abnormal wake-up of the electronic device, update the starting number of times to obtain a fourth number of times when the wake-up reason is that the electronic device fails to receive the first beacon data packet continuously; The acquisition module is further used to acquire, when the fourth number is greater than the third number threshold, the number of first data packets of the second beacon data packet sent by the electronic device to the test server, the number of second 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 packet fed back by the test server, wherein the first beacon data packet is obtained after the test server parses the second beacon data packet; The time adjustment module is further used to adjust the advance wake-up time according to the number of the first data packets, the number of the second data packets, the transmission delay duration and the reference delay duration to obtain a fourth wake-up time.
20. The device according to claim 19, characterized in that The time adjustment module is specifically used for: When the number of the first data packets is greater than or equal to a preset number threshold, according to the transmission delay of each first beacon data packet fed back by the test server, calculate the average delay of the first beacon data packets of the second number of data packets fed back by the test server; Calculating a packet loss rate of the second beacon data packet according to the number of the first data packets and the number of the second 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; Updating the early wake-up time according to the average delay duration, the packet loss rate and the delay rate; Based on the updated advance wake-up time, a fourth wake-up time is determined.
21. The device according to claim 20, characterized in that The time adjustment module is specifically used for: Selecting, from the first beacon data packets, a third beacon data packet whose transmission delay duration is greater than the reference delay duration; 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 number of the first data packets.
22. The device according to claim 20, characterized in that The time adjustment module is specifically used for: In a case where the updated advance wake-up time is within the time adjustment range of the advance wake-up time, the updated advance wake-up time is determined as the fourth wake-up time.
23. The device according to claim 19, characterized in that The device also includes: A disconnection module is used to disconnect the connection between the electronic device and the test server when the test server is in a connected state, after adjusting the advance 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, and before obtaining a fourth wake-up time.
24. The device according to claim 13, characterized in that The early wake-up time is the time when the WLAN module is awakened 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 cumulative timing time threshold of the timer is a positive integer multiple of the DTIM, and the start time of the initialized timer is 0.
25. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the wake-up method according to any one of claims 1 to 12 are implemented.
Citation Information
Cited By
Wake-up method and apparatus, and electronic device
WO2026067427A1