Method, device, electronic device and readable storage medium for receiving beacon frames

By calculating and predicting the beacon cycle, adjusting the reception time to match the predicted beacon cycle, the problem of inaccurate beacon frame reception in communication between the terminal and the AP device is solved, the reception success rate is improved, and power consumption is reduced, ensuring stable communication.

CN116249182BActive Publication Date: 2025-08-22BEIJING ESWIN COMPUTING TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211612748.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-15
Publication Date
2025-08-22
Estimated Expiration
2042-12-15

AI Technical Summary

Technical Problem

During communication between the terminal and the AP device, it is difficult for the prior art to accurately receive beacon frames without increasing power consumption, especially when the beacon period of the AP device is inaccurate or the device aging causes the actual interval to be inconsistent with the indicated interval, resulting in the reception failure.

Method used

By obtaining the reception time of multiple received beacon frames, the beacon period within the reference period is predicted using the weighted average or weight difference value, and the reception time is adjusted to match the prediction period. It is suitable for low power consumption modes or when the beacon period deviation is greater than the threshold.

Benefits of technology

The success rate of beacon frame reception is improved, the possibility of increased power consumption is reduced, and the stable communication connection between the terminal and the AP device is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116249182B_ABST
    Figure CN116249182B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device, electronic device and readable storage medium for receiving beacon frames, which belongs to the field of communication technology. The method includes: obtaining multiple first beacon periods based on the reception time of multiple received beacon frames, and any one of the multiple first beacon periods is the difference between the reception time of two adjacent received beacon frames; predicting the second beacon period within the reference time period based on the multiple first beacon periods, and the reference time period is the time period after the reception time of the last received beacon frame; receiving a new beacon frame at a target time within the reference time period, and the difference between the target time and the reception time of the last received beacon frame is the second beacon period. Since the second beacon period is predicted based on multiple first beacon periods, the second beacon period is more accurate, and the success rate of receiving new beacon frames according to the second beacon period is higher, thereby improving the success rate of receiving beacon frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of communication technology, and in particular to a method, device, electronic device and readable storage medium for receiving a beacon frame. Background Art

[0002] During the communication process between a terminal and an AP (Access Point, wireless access point) device, the terminal often needs to periodically receive beacon frames sent by the AP device to achieve communication with the AP device. Summary of the Invention

[0003] The embodiments of the present application provide a method, apparatus, electronic device, and readable storage medium for receiving beacon frames to implement communication between a terminal and an AP device. The technical solution provided by the embodiments of the present application includes the following aspects.

[0004] In one aspect, a method for receiving a beacon frame is provided, the method comprising:

[0005] Acquire a plurality of first beacon periods according to reception times of a plurality of received beacon frames, wherein any one of the plurality of first beacon periods is a difference between reception times of two adjacent received beacon frames;

[0006] Predicting a second beacon period within a reference period based on the multiple first beacon periods, where the reference period is a period after a reception time of a last received beacon frame;

[0007] A new beacon frame is received at a target time within the reference period, and a difference between the target time and a receiving time of the last received beacon frame is the second beacon period.

[0008] In an exemplary embodiment, the receiving a new beacon frame at a target time within the reference period includes: when in a low power consumption mode, performing the receiving of a new beacon frame at a target time within the reference period.

[0009] In an exemplary embodiment, the last received beacon frame carries a third beacon period; the receiving of a new beacon frame at a target moment within the reference time period includes: when the difference between the second beacon period and the third beacon period is greater than a reference threshold, executing the receiving of a new beacon frame at a target moment within the reference time period.

[0010] In an exemplary embodiment, predicting the second beacon period within the reference time period based on the multiple first beacon periods includes: obtaining the weight corresponding to each first beacon period in the multiple first beacon periods; performing weighted average calculation on each first beacon period according to the weight corresponding to each first beacon period, and predicting the second beacon period within the reference time period.

[0011] In an exemplary embodiment, the weights corresponding to the respective first beacon periods are the same.

[0012] In an exemplary embodiment, the weights corresponding to at least two of the multiple first beacon periods are different; wherein, the difference between the reception time of the two adjacent received beacon frames of any one of the first beacon periods and the target time is negatively correlated with the weight corresponding to the any one of the first beacon periods.

[0013] In one aspect, a device for receiving a beacon frame is provided, the device comprising:

[0014] An acquisition module, configured to acquire a plurality of first beacon periods according to reception times of a plurality of received beacon frames, wherein any one of the plurality of first beacon periods is a difference between reception times of two adjacent received beacon frames;

[0015] a prediction module, configured to predict a second beacon period within a reference period based on the plurality of first beacon periods, the reference period being a period after a reception time of a last received beacon frame;

[0016] The receiving module is configured to receive a new beacon frame at a target time within the reference time period, wherein the difference between the target time and the receiving time of the last received beacon frame is the second beacon period.

[0017] In an exemplary embodiment, the receiving module is configured to receive a new beacon frame at a target time within the reference period when in the low power consumption mode.

[0018] In an exemplary embodiment, the last received beacon frame carries a third beacon period; the receiving module is used to execute the reception of a new beacon frame at a target time within the reference time period when the difference between the second beacon period and the third beacon period is greater than a reference threshold.

[0019] In an exemplary embodiment, the prediction module is used to obtain the weight corresponding to each first beacon period in the multiple first beacon periods; perform weighted average calculation on each first beacon period according to the weight corresponding to each first beacon period, and predict the second beacon period within the reference time period.

[0020] In an exemplary embodiment, the weights corresponding to the respective first beacon periods are the same.

[0021] In an exemplary embodiment, the weights corresponding to at least two of the multiple first beacon periods are different; wherein, the difference between the reception time of the two adjacent received beacon frames of any one of the first beacon periods and the target time is negatively correlated with the weight corresponding to the any one of the first beacon periods.

[0022] On the one hand, an electronic device is provided, which includes a memory and a processor; at least one instruction is stored in the memory, and the at least one instruction is loaded and executed by the processor to enable the electronic device to implement the method for receiving a beacon frame provided by any exemplary embodiment of the present application.

[0023] On the one hand, a computer-readable storage medium is provided, in which at least one instruction is stored. The instruction is loaded and executed by a processor to enable a computer to implement the method for receiving a beacon frame provided by any exemplary embodiment of the present application.

[0024] On the other hand, a computer program or computer program product is provided, which includes: computer instructions, which, when executed by a computer, enable the computer to implement the method for receiving a beacon frame provided by any exemplary embodiment of the present application.

[0025] The beneficial effects of the technical solutions provided in the embodiments of the present application include at least:

[0026] By obtaining multiple first beacon periods based on the reception time of the received beacon frame, and then predicting the second beacon period within the reference time period after the reception time of the last received beacon frame based on the multiple first beacon periods, a new beacon frame can be received according to the predicted second beacon period within the reference time period, that is, the difference between the target time for receiving the new beacon frame and the reception time of the last received beacon frame is the second beacon period. Since the second beacon period is predicted based on multiple first beacon periods, the second beacon period is more accurate, the success rate of receiving the new beacon frame according to the second beacon period is higher, and the possibility of extending the opening time of the window for receiving beacon frames is smaller. As a result, the success rate of beacon frame reception can be improved without increasing power consumption. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0028] Figure 1 This is a schematic diagram of an implementation environment provided by an embodiment of the present application;

[0029] Figure 2 This is a schematic diagram of sending and receiving beacon frames in a related technology provided by an embodiment of the present application;

[0030] Figure 3 is a schematic diagram of sending and receiving beacon frames in another related technology provided by an embodiment of the present application;

[0031] Figure 4 This is a flowchart of a method for receiving a beacon frame provided by an embodiment of the present application;

[0032] Figure 5 This is a schematic diagram of sending and receiving beacon frames provided in an embodiment of the present application;

[0033] Figure 6 is a schematic diagram of another method of sending and receiving beacon frames provided in an embodiment of the present application;

[0034] Figure 7 1 is a schematic structural diagram of a device for receiving a beacon frame provided in an embodiment of the present application;

[0035] Figure 8 This is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] In order to make the objectives, technical solutions and advantages of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0037] The embodiment of the present application provides a method for receiving a beacon frame. The method can be applied to Figure 1 In the implementation environment shown. Figure 1 In the embodiment, at least one terminal 11 and an AP device 2 are included. The terminal 11 can be communicatively connected with the AP device 12 to receive a beacon frame sent by the AP device 12.

[0038] For example, the terminal 11 includes, but is not limited to, any electronic product capable of human-computer interaction with a user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction, or handwriting device, such as a PC (Personal Computer), a mobile phone, a smart phone, a PDA (Personal Digital Assistant), a wearable device, a Pocket PC (PPC), a tablet computer, a smart car computer, a smart TV, a smart speaker, etc. Optionally, the AP device 12 may be a router.

[0039] Those skilled in the art should understand that the above-mentioned terminal 11 and AP device 12 are only examples. Other existing or future terminals or AP devices that are applicable to this application should also be included in the scope of protection of this application and are included here by reference.

[0040] Based on the above Figure 1 In the implementation environment shown, in the related art, the beacon frame sent by the AP device to the terminal carries a beacon period, which is used to indicate the difference between the sending time of the next beacon frame and the sending time of the current beacon frame carrying the beacon period. In other words, the beacon period indicates how long it will take for the AP device to send the next beacon frame after sending the current beacon frame carrying the beacon period. Therefore, the terminal can receive the beacon frame according to the beacon period. Among them, after opening the RF (Radio Frequency) window and receiving a beacon frame, the terminal can close the RF window and then obtain the beacon period carried by the beacon frame. Then, when the beacon period has passed since the last time the RF window was opened, the terminal opens the RF window again and receives the next beacon frame, thereby realizing the reception of the beacon frame.

[0041] Under normal circumstances, the actual interval of the AP device sending beacon frames is consistent with the interval indicated by the beacon period, so the terminal can normally receive beacon frames according to the beacon period. Figure 2 As shown in the figure, the actual interval of the AP device sending beacon frames and the interval indicated by the beacon period are both 102ms (unit: milliseconds). The terminal opens the RF window every 102ms according to the interval indicated by the beacon period, and closes it after a period of time. The beacon frame can be received normally during the period when the RF window is open.

[0042] However, in abnormal situations, the actual interval at which the AP sends beacon frames is inconsistent with the interval indicated by the beacon period, and the terminal cannot receive beacon frames normally according to the beacon period. Figure 3As shown in the figure, the actual interval for the AP to send beacon frames is 96ms, but the interval indicated by the beacon period is 102ms. The terminal then opens the RF window every 102ms according to the interval indicated by the beacon period and closes it after a period of time. However, the terminal cannot receive beacon frames during the open RF window. To enable the terminal to receive beacon frames, the RF window must be opened for a longer period of time. However, since opening the RF window requires power consumption, extending the opening period of the terminal increases the power consumption required by the terminal and shortens the terminal's battery life.

[0043] For example, this abnormality may be caused by an inaccurate beacon period on the AP device. Specifically, the AP device transmits beacon frames at an actual interval, but the beacon period indicates a different interval than the actual interval. Alternatively, this abnormality may be caused by a shift in the actual interval between beacon frame transmissions after the AP device has been in use for a long time, or by aging components of the AP device, which may cause the actual interval between beacon frame transmissions to shift.

[0044] Therefore, see Figure 4 , the embodiment of the present application provides a method for receiving a beacon frame, which can be applied to Figure 1 In the terminal shown. Figure 4 As shown, the method includes the following steps 401 to 403.

[0045] Step 401: Acquire multiple first beacon periods according to the reception times of multiple received beacon frames, where any first beacon period among the multiple first beacon periods is the difference between the reception times of two adjacent received beacon frames.

[0046] Among them, the terminal can receive multiple beacon frames within the historical period, and the historical period is also the period that has passed. The terminal can record the time when each beacon frame is received, thereby obtaining the reception time of multiple received beacon frames. It should be understood that the multiple received beacon frames are ordered, so the terminal can subtract the reception time of each two adjacent received beacon frames in the ordered multiple received beacon frames, thereby obtaining multiple first beacon periods. The multiple first beacon periods are beacon periods within the historical period, and the multiple first beacon periods are also ordered. For example, if there are 11 received beacon frames in total, the terminal can obtain 10 first beacon periods.

[0047] In some embodiments, the terminal may use all first beacon periods in the historical period as the multiple first beacon periods. In other embodiments, the terminal may select some first beacon periods from all first beacon periods as the multiple first beacon periods using a sliding window method to avoid an excessive number of selected multiple first beacon periods, which would affect the efficiency of subsequent predictions based on the multiple first beacon periods.

[0048] Exemplarily, if the sliding window corresponds to a reference number of first beacon periods, selecting a portion of the first beacon periods from all first beacon periods using the sliding window method may include selecting the reference number of first beacon periods adjacent to the current moment from all ordered first beacon periods. Furthermore, as the current moment continues to change, the number of received beacon frames continues to increase, the total number of first beacon periods also continues to increase, and the selected first beacon period also changes accordingly. This method ensures that the selected first beacon period is calculated using the reception time of the most recently received beacon frame. Consequently, the selected multiple first beacon periods are also relatively recent and timely, and subsequent predictions using such multiple first beacon periods have a higher accuracy rate.

[0049] For example, the reference number is 10, the total number of first beacon periods is 20, and the 20 first beacon periods are obtained based on the reception times of the 21 received beacon frames. Before the 22nd beacon frame is received, the 10 first beacon periods selected from the 20 first beacon periods are the 11th first beacon period to the 20th first beacon period. After the 22nd beacon frame is received, the total number of first beacon periods is updated to 21, and the 10 first beacon periods selected from the 21 first beacon periods are correspondingly updated to the 12th first beacon period to the 21st first beacon period. And so on, examples are not repeated.

[0050] Of course, the above implementations are examples and are not intended to limit the manner in which the terminal obtains multiple first beacon periods. Regardless of the manner in which the terminal obtains multiple first beacon periods, step 402 may be entered after obtaining multiple first beacon periods.

[0051] Step 402: predict a second beacon period within a reference period based on a plurality of first beacon periods, where the reference period is a period after a reception time of a last received beacon frame.

[0052] After obtaining multiple first beacon periods in the historical period, the terminal can predict the second beacon period in the reference period based on the multiple first beacon periods. The reference period is the period after the reception time of the last received beacon frame, or in other words, the reference period is a future period. It can be seen that the embodiment of the present application comprehensively considers multiple first beacon periods in the historical period to accurately predict the second beacon period in the future period, or to predict which second beacon period to use subsequently.

[0053] In an exemplary embodiment, predicting the second beacon period within a reference time period based on multiple first beacon periods includes: obtaining the weight corresponding to each first beacon period in the multiple first beacon periods; performing weighted average calculation on each first beacon period according to the weight corresponding to each first beacon period, and predicting the second beacon period within the reference time period.

[0054] The embodiments of the present application do not restrict the weights associated with each first beacon period; the weights associated with each first beacon period can be set based on experience or actual needs. In some embodiments, the weights associated with each first beacon period are the same. In this embodiment, a weighted average is calculated for each first beacon period according to the weights associated with each first beacon period, which is equivalent to calculating the average value of each first beacon period. The predicted second beacon period within the reference time period is then the average value of each first beacon period. Alternatively, in other embodiments, the weights associated with at least two of the multiple first beacon periods are different. For example, the weight associated with one of the multiple first beacon periods is different from the weights associated with the other first beacon periods. In another example, the weights associated with any two of the multiple first beacon periods are different. In this embodiment, different weights can be assigned to each first beacon period based on their different reference values, for example, assigning a higher weight to a first beacon period with a higher reference value.

[0055] Exemplarily, the difference between the reception times of two adjacent received beacon frames of any first beacon period and the target time is negatively correlated with the weight corresponding to any first beacon period. That is, for a first beacon period, the newer the two received beacon frames used to calculate the first beacon period, or in other words, the first beacon period is the most recent of multiple first beacon periods, the higher the reference value of the first beacon period, and thus the first beacon period is assigned a larger weight.

[0056] For example, in an embodiment of the present application, the first weight may be used as the weight corresponding to the latest first beacon period in multiple first beacon periods. Furthermore, the average value of the first beacon periods other than the latest first beacon period in the multiple first beacon periods is calculated, and the second weight is used as the weight corresponding to the average value, and the first weight is greater than the second weight. Taking a total of 10 ordered first beacon periods as an example, the second weight corresponding to the average value of the first 9 first beacon periods can be 0.3, and the first weight corresponding to the 10th latest first beacon period can be 0.7.

[0057] Of course, the embodiment of the present application can also make the difference between the reception time and the target time used to obtain two adjacent received beacon frames of any first beacon period positively correlated with the weight corresponding to any first beacon period, which is not limited in the embodiment of the present application.

[0058] Step 403: Receive a new beacon frame at a target time within the reference period, where the difference between the target time and the receiving time of the last received beacon frame is the second beacon period.

[0059] Since the second beacon period within the reference time period is predicted in step 402, the second beacon period can be used within the reference time period, so that the moment for receiving the new beacon frame is the target moment within the reference time period, and the difference between the target moment and the reception moment of the last received beacon frame is the second beacon period.

[0060] It should be noted that the process of the terminal receiving the beacon frame includes: opening the RF window and starting to receive the beacon frame, completing the reception of the beacon frame and closing the RF window in a period of time (for example, 7ms, which is related to the byte length occupied by the beacon frame to be received). In other words, the reception of the beacon frame is not completed instantaneously at one moment, but requires a period of time to complete. Based on this, the embodiment of the present application is based on the moment when the beacon frame starts to be received for statistics. The difference between the target moment and the reception moment of the last received beacon frame is the second beacon period, which means: based on the reception moment when the last beacon frame starts to be received, the target moment is reached after the second beacon period, the RF window is opened again at the target moment, and a new beacon frame is started to be received.

[0061] In other words, there are multiple moments in sequence on the time axis: start receiving the previous beacon frame, end receiving the previous beacon frame, start receiving a new beacon frame, and end receiving a new beacon frame. The difference between the moment of starting to receive the new beacon frame and the moment of starting to receive the previous beacon frame is the second beacon period. The difference between the moment of starting to receive the new beacon frame and the moment of ending to receive the previous beacon frame is the time when the terminal closes the RF window, or the sleep time of the terminal. In addition, the difference between the moment of ending to receive the previous beacon frame and the moment of starting to receive the previous beacon frame is the above-mentioned period of time, or the wake-up time of the terminal. Similarly, the difference between the moment of ending to receive the new beacon frame and the moment of starting to receive the new beacon frame is also the above-mentioned period of time, which also belongs to the wake-up time of the terminal. The terminal will go into sleep once after waking up and receiving a beacon frame. This method is also called DTIM (Delivery Traffic Indication Message) 1 method.

[0062] In some implementations, the embodiment of the present application may perform step 403 in any case. Alternatively, in other implementations, the embodiment of the present application performs step 403 only when certain conditions are met, and the certain conditions that need to be met include but are not limited to the following two.

[0063] The first condition: The terminal is in low-power mode. Receiving a new beacon frame at a target time within a reference period includes: when in low-power mode, executing the process of receiving a new beacon frame at a target time within the reference period. Since the new beacon frame is received at a target time within the reference period, the terminal can accurately open and close the RF window and accurately receive new beacon frames while the RF window is open. As a result, the terminal does not need to extend the RF window opening time to receive new beacon frames, thereby not increasing the terminal's power consumption. This is applicable to situations where the terminal is in low-power mode.

[0064] Exemplarily, if the first condition is not met, that is, the terminal is not in low power mode, then the terminal may not execute the reception of a new beacon frame at the target time within the reference time period. The reason is that when the terminal is not in low power mode, the RF window of the terminal is always open, and it is not necessary to close the RF window after opening it as in low power mode. Therefore, there will be no increase in power consumption due to extending the opening time of the RF window. Therefore, when the terminal is not in low power mode, the embodiment of the present application can enable the terminal to periodically execute step 401, that is, the terminal periodically obtains multiple first beacon periods, so that the terminal can enter step 402 after entering low power mode, and continue to execute step 403 accordingly.

[0065] The second condition is that the last received beacon frame carries the third beacon period, and the difference between the second beacon period and the third beacon period is greater than the reference threshold. Then, a new beacon frame is received at the target time within the reference time period, including: when the difference between the second beacon period and the third beacon period is greater than the reference threshold, the new beacon frame is received at the target time within the reference time period. The last received beacon frame may include an information element, which is used to carry the third beacon period. If the difference between the predicted second beacon period and the third beacon period is greater than the reference threshold, it means that the accuracy of the third beacon period is poor, and thus the terminal cannot receive a new beacon frame according to the third beacon period, but needs to execute step 403 to receive a new beacon frame according to the predicted second beacon period.

[0066] Exemplarily, if the second condition is not met, that is, the difference between the second beacon period and the third beacon period is less than or equal to the reference threshold, then the terminal may not receive a new beacon frame at the target time within the reference period, but instead receive a new beacon frame according to the third beacon period carried by the last received beacon frame. For example, the terminal receives a new beacon frame at the reference time, and the difference between the reference time and the reception time of the last received beacon frame is equal to the third beacon period. The reason is that in this case, the accuracy of the third beacon period is better. Since the terminal will continue to open the RF window for a period of time, even if there are some slight deviations in the third beacon period, it can ensure that the terminal accurately receives the new beacon frame during the opening of the RF window.

[0067] Next, the method for receiving beacon frames provided in the embodiment of the present application is further explained in combination with two application scenarios.

[0068] Application scenario 1: The beacon period of the AP device is inaccurate. In other words, the AP device sends beacon frames at an actual interval, but the beacon period indicates an interval that is different from the actual interval. Figure 5 As shown, the actual interval is, for example, 108 ms, and the interval indicated by the beacon period is, for example, 102 ms.

[0069] In application scenario 1, although the interval indicated by the beacon period differs from the actual interval at which the AP transmits beacon frames, the terminal receives multiple first beacon periods (i.e., multiple actual intervals). Therefore, the terminal accurately predicts the second beacon period to be 108ms based on these multiple first beacon periods. Therefore, the terminal does not receive new beacon frames at the 102ms interval indicated by the beacon period, but instead receives new beacon frames at the predicted 108ms second beacon period, thus ensuring accurate beacon frame reception.

[0070] Application scenario 2: After the AP device has been used for a long time, the actual interval of sending beacon frames has shifted, and the actual interval of sending beacon frames has shifted due to the aging of the components of the AP device. For example, see Figure 6 , the actual interval is 96ms, and the interval indicated by the beacon period is 102ms.

[0071] In the second application scenario, although the actual interval between beacon frames sent by the AP gradually changes from 102ms to 96ms due to factors such as aging of the AP's components, the terminal receives multiple first beacon periods, i.e., multiple actual intervals. Therefore, the terminal can accurately predict the second beacon period to be 96ms based on these multiple first beacon periods. Therefore, the terminal no longer receives new beacon frames according to the 102ms indicated by the beacon period, but instead receives new beacon frames according to the predicted 96ms second beacon period, thus ensuring accurate beacon frame reception.

[0072] In addition, actual tests were conducted on the methods for receiving beacon frames provided by the related technologies and the embodiments of the present application. During the actual tests, the DTIM1 method was adopted for both the related technologies and the embodiments of the present application, thereby obtaining the test data shown in Tables 1 and 2 below.

[0073] Among them, first, the opening time of the RF window is fixed to 7ms, and the test time is set to 60s (unit: seconds), so as to obtain the test data shown in Table 1. It can be seen from Table 1 that in this case, the related technology only received 212 beacon frames in the test time of 60s. Then, there is a large delay in the downlink communication direction (i.e., from the AP device to the terminal) in the related technology, and the downlink communication quality is poor. The AP device may interrupt the communication connection with the terminal. However, the embodiment of the present application can receive 574 beacon frames within the test time of 60s, which improves the success rate of receiving beacon frames. Then, the delay in the downlink communication direction is small, and the communication connection between the AP device and the terminal can be stably established. Therefore, it can be explained that the method provided by the embodiment of the present application can receive beacon frames more accurately, improve the success rate of receiving beacon frames, and ensure normal communication between the AP device and the terminal.

[0074] Table 1

[0075]

[0076]

[0077] In addition, the opening duration of the RF window is set dynamically, that is, if no beacon frame is received during the opening period of the RF window, the opening time of the RF window can be flexibly extended, thereby obtaining the test data shown in Table 2. As can be seen from Table 2, when the opening duration of the RF window can be dynamically set, the number of beacon frames received by the embodiment of the present application is slightly more than the number of beacon frames received in the related art. However, the average power consumption in the related art is very high, which is 3.53mA (unit: milliampere), indicating that the opening duration of the RF window is extended many times in the related art. The average power consumption of the embodiment of the present application is lower, which is 2.65mA, indicating that the embodiment of the present application can receive the beacon frame more accurately. Even if the opening time of the RF window needs to be extended, the number of times it needs to be extended is less than the number of times it needs to be extended in the related art. It also shows that the solution provided by the embodiment of the present application will not increase power consumption, thereby ensuring that the embodiment of the present application improves the success rate of receiving beacon frames when the required power consumption is low.

[0078] Table 2

[0079] plan First beacon period Test duration Number of beacon frames Average power consumption Related technologies 96ms 120s 1072 3.53mA Embodiments of the present application 96ms 120s 1131 2.65mA

[0080] In summary, the embodiment of the present application obtains multiple first beacon periods based on the reception time of the received beacon frame, and then predicts the second beacon period within the reference time period after the reception time of the last received beacon frame based on the multiple first beacon periods, so that a new beacon frame can be received according to the predicted second beacon period within the reference time period, that is, the difference between the target time for receiving the new beacon frame and the reception time of the last received beacon frame is the second beacon period. Since the second beacon period is predicted based on multiple first beacon periods, the second beacon period is more accurate, the success rate of receiving a new beacon frame according to the second beacon period is higher, and the possibility of extending the opening time of the RF window is smaller. Therefore, the success rate of receiving beacon frames can be improved without increasing power consumption.

[0081] The embodiment of the present application provides a device for receiving a beacon frame, see Figure 7 ,The device includes the following modules.

[0082] An acquisition module 701 is configured to acquire a plurality of first beacon periods according to reception times of a plurality of received beacon frames, wherein any first beacon period among the plurality of first beacon periods is a difference between reception times of two adjacent received beacon frames;

[0083] A prediction module 702 is configured to predict a second beacon period within a reference period based on the plurality of first beacon periods, where the reference period is a period after a reception time of a last received beacon frame;

[0084] The receiving module 703 is configured to receive a new beacon frame at a target time within the reference period, where the difference between the target time and the receiving time of the last received beacon frame is the second beacon period.

[0085] In an exemplary embodiment, the receiving module 703 is configured to receive a new beacon frame at a target time within a reference period when in the low power consumption mode.

[0086] In an exemplary embodiment, the last received beacon frame carries the third beacon period; the receiving module 703 is configured to receive a new beacon frame at a target time within the reference period when the difference between the second beacon period and the third beacon period is greater than a reference threshold.

[0087] In an exemplary embodiment, the prediction module 702 is used to obtain the weight corresponding to each first beacon period in multiple first beacon periods; perform weighted average calculation on each first beacon period according to the weight corresponding to each first beacon period, and predict the second beacon period within the reference time period.

[0088] In an exemplary embodiment, the weights corresponding to the respective first beacon periods are the same.

[0089] In an exemplary embodiment, the weights corresponding to at least two first beacon periods among multiple first beacon periods are different; wherein, the difference between the reception time and the target time used to obtain two adjacent received beacon frames of any first beacon period is negatively correlated with the weight corresponding to any first beacon period.

[0090] It should be noted that the above Figure 7 The technical effects of the device shown can be found in Figure 4 The technical effects of the method embodiments shown are not described in detail here. In addition, the device provided in the above embodiment only uses the division of the above functional modules as an example to illustrate when implementing its functions. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept. The specific implementation process is detailed in the method embodiment and is not described here.

[0091] In an exemplary embodiment, an embodiment of the present application further provides an electronic device, such as the aforementioned terminal. The electronic device includes a memory and a processor; the memory stores at least one instruction, which is loaded and executed by the processor to enable the electronic device to implement the method for receiving a beacon frame provided in any exemplary embodiment of the present application.

[0092] See also Figure 8, which shows a schematic structural diagram of an electronic device 800 provided in an embodiment of the present application. The electronic device 800 can be a portable mobile electronic device, such as a smartphone, a tablet computer, an MP3 player (Moving Picture Experts Group Audio Layer III), an MP4 player (Moving Picture Experts Group Audio Layer IV), a laptop computer, or a desktop computer. The electronic device 800 may also be referred to as a user device, a portable electronic device, a laptop electronic device, a desktop electronic device, or other similar names.

[0093] Typically, the electronic device 800 includes a processor 801 and a memory 802 .

[0094] The processor 801 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 801 may be implemented using at least one hardware form selected from the group consisting of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), and a PLA (Programmable Logic Array). The processor 801 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 801 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen 805. In some embodiments, the processor 801 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0095] The memory 802 may include one or more computer-readable storage media, which may be non-transitory. The memory 802 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices and flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 802 is used to store at least one instruction, which is executed by the processor 801 to implement the method for receiving a beacon frame provided in the method embodiment of the present application.

[0096] In some embodiments, electronic device 800 may optionally include a peripheral device interface 803 and at least one peripheral device. Processor 801, memory 802, and peripheral device interface 803 may be connected via a bus or signal lines. Each peripheral device may be connected to peripheral device interface 803 via a bus, signal lines, or circuit boards. Specifically, the peripheral device may include at least one of the group consisting of a radio frequency circuit 804, a display screen 805, a camera assembly 806, an audio circuit 807, a positioning assembly 808, and a power supply 809.

[0097] The peripheral device interface 803 can be used to connect at least one I / O (Input / Output)-related peripheral device to the processor 801 and the memory 802. In some embodiments, the processor 801, the memory 802, and the peripheral device interface 803 are integrated on the same chip or circuit board; in some other embodiments, any one or two of the processor 801, the memory 802, and the peripheral device interface 803 can be implemented on separate chips or circuit boards, which is not limited in this embodiment.

[0098] The radio frequency circuit 804 is used to receive and transmit RF (Radio Frequency) signals, also known as electromagnetic signals. The radio frequency circuit 804 communicates with communication networks and other communication devices via electromagnetic signals. The radio frequency circuit 804 converts electrical signals into electromagnetic signals for transmission, or converts received electromagnetic signals into electrical signals. Optionally, the radio frequency circuit 804 includes: an antenna system, an RF transceiver, one or more amplifiers, a tuner, an oscillator, a digital signal processor, a codec chipset, a user identity module card, etc. The radio frequency circuit 804 can communicate with other electronic devices via at least one wireless communication protocol. Such wireless communication protocols include, but are not limited to, metropolitan area networks, various generations of mobile communication networks (2G, 3G, 4G, and 5G), wireless local area networks, and / or Wi-Fi (Wireless Fidelity) networks. In some embodiments, the radio frequency circuit 804 may also include circuits related to NFC (Near Field Communication), which is not limited in this application.

[0099] The display screen 805 is used to display a UI (User Interface). The UI may include graphics, text, icons, videos, or any combination thereof. When the display screen 805 is a touch screen display, the display screen 805 is also capable of collecting touch signals on or above the surface of the display screen 805. The touch signals can be input as control signals to the processor 801 for processing. In this case, the display screen 805 can also be used to provide virtual buttons and / or virtual keyboards, also known as soft buttons and / or soft keyboards. In some embodiments, there can be one display screen 805, disposed on the front panel of the electronic device 800; in other embodiments, there can be at least two display screens 805, disposed on different surfaces of the electronic device 800 or in a foldable design; in other embodiments, the display screen 805 can be a flexible display, disposed on a curved or foldable surface of the electronic device 800. The display screen 805 can even be configured as a non-rectangular irregular shape, i.e., a special-shaped screen. The display screen 805 can be made of materials such as LCD (Liquid Crystal Display) and OLED (Organic Light-Emitting Diode).

[0100] The camera assembly 806 is used to capture images or videos. Optionally, the camera assembly 806 includes a front camera and a rear camera. Typically, the front camera is arranged on the front panel of the electronic device, and the rear camera is arranged on the back of the electronic device. In some embodiments, there are at least two rear cameras, which are any one of a main camera, a depth of field camera, a wide-angle camera, and a telephoto camera, so as to realize the fusion of the main camera and the depth of field camera to realize the background blur function, the fusion of the main camera and the wide-angle camera to realize panoramic shooting and VR (Virtual Reality) shooting function or other fusion shooting functions. In some embodiments, the camera assembly 806 may also include a flash. The flash can be a single-color temperature flash or a dual-color temperature flash. A dual-color temperature flash refers to a combination of a warm light flash and a cold light flash, which can be used for light compensation at different color temperatures.

[0101] The audio circuit 807 may include a microphone and a speaker. The microphone is used to collect sound waves from the user and the environment, and convert the sound waves into electrical signals to be input into the processor 801 for processing, or input into the radio frequency circuit 804 to achieve voice communication. For the purpose of stereo sound collection or noise reduction, there can be multiple microphones, which are respectively arranged in different parts of the electronic device 800. The microphone can also be an array microphone or an omnidirectional collection microphone. The speaker is used to convert the electrical signals from the processor 801 or the radio frequency circuit 804 into sound waves. The speaker can be a traditional thin film speaker or a piezoelectric ceramic speaker. When the speaker is a piezoelectric ceramic speaker, it can not only convert the electrical signals into sound waves audible to humans, but also convert the electrical signals into sound waves inaudible to humans for purposes such as ranging. In some embodiments, the audio circuit 807 may also include a headphone jack.

[0102] Positioning component 808 is used to locate the current geographic location of electronic device 800 to implement navigation or LBS (Location Based Service). Positioning component 808 can be a positioning component based on the US GPS (Global Positioning System), China's Beidou system, Russia's Greninja system, or the European Union's Galileo system.

[0103] Power supply 809 is used to power the various components of electronic device 800. Power supply 809 can be AC ​​power, DC power, disposable batteries, or rechargeable batteries. When power supply 809 includes a rechargeable battery, the rechargeable battery can support wired charging or wireless charging. The rechargeable battery can also be used to support fast charging technology.

[0104] In some embodiments, the electronic device 800 further includes one or more sensors 810 , including but not limited to: an acceleration sensor 811 , a gyroscope sensor 812 , a pressure sensor 813 , a fingerprint sensor 814 , an optical sensor 815 , and a proximity sensor 816 .

[0105] The accelerometer 811 can detect the magnitude of acceleration along the three coordinate axes of the coordinate system established by the electronic device 800. For example, the accelerometer 811 can be used to detect the components of gravity acceleration along the three coordinate axes. The processor 801 can control the display screen 805 to display the user interface in a landscape or portrait view based on the gravity acceleration signal collected by the accelerometer 811. The accelerometer 811 can also be used to collect game or user motion data.

[0106] The gyroscope sensor 812 can detect the orientation and rotation angle of the electronic device 800. It can work in conjunction with the accelerometer 811 to capture the user's 3D movements of the electronic device 800. Based on the data collected by the gyroscope sensor 812, the processor 801 can implement the following functions: motion sensing (for example, changing the UI based on the user's tilt operation), image stabilization during shooting, game control, and inertial navigation.

[0107] The pressure sensor 813 can be set on the side frame of the electronic device 800 and / or the lower layer of the display screen 805. When the pressure sensor 813 is set on the side frame of the electronic device 800, it can detect the user's grip signal of the electronic device 800, and the processor 801 performs left and right hand recognition or shortcut operations based on the grip signal collected by the pressure sensor 813. When the pressure sensor 813 is set on the lower layer of the display screen 805, the processor 801 controls the operable controls on the UI interface based on the user's pressure operation on the display screen 805. The operable controls include at least one of the group consisting of button controls, scroll bar controls, icon controls, and menu controls.

[0108] The fingerprint sensor 814 is used to collect the user's fingerprint. The processor 801 identifies the user's identity based on the fingerprint collected by the fingerprint sensor 814, or the fingerprint sensor 814 identifies the user's identity based on the collected fingerprint. When the user's identity is identified as a trusted identity, the processor 801 authorizes the user to perform relevant sensitive operations, such as unlocking the screen, viewing encrypted information, downloading software, making payments, and changing settings. The fingerprint sensor 814 can be set on the front, back, or side of the electronic device 800. When a physical button or manufacturer logo is set on the electronic device 800, the fingerprint sensor 814 can be integrated with the physical button or manufacturer logo.

[0109] Optical sensor 815 is used to detect ambient light intensity. In one embodiment, processor 801 can control the display brightness of display screen 805 based on the ambient light intensity detected by optical sensor 815. Specifically, when the ambient light intensity is high, the display brightness of display screen 805 is increased; when the ambient light intensity is low, the display brightness of display screen 808 is decreased. In another embodiment, processor 801 can also dynamically adjust the shooting parameters of camera assembly 806 based on the ambient light intensity detected by optical sensor 815.

[0110] Proximity sensor 816, also known as a distance sensor, is typically located on the front panel of electronic device 800. Proximity sensor 816 is used to detect the distance between the user and the front of electronic device 800. In one embodiment, when proximity sensor 816 detects that the distance between the user and the front of electronic device 800 is gradually decreasing, processor 801 controls display screen 805 to switch from the screen-on state to the screen-off state. When proximity sensor 816 detects that the distance between the user and the front of electronic device 800 is gradually increasing, processor 801 controls display screen 805 to switch from the screen-off state to the screen-on state.

[0111] Those skilled in the art will understand that Figure 8 The structure shown in the figure does not constitute a limitation on the electronic device 800, and the electronic device 800 may include more or fewer components than shown in the figure, or combine certain components, or adopt a different component arrangement.

[0112] An embodiment of the present application provides a computer-readable storage medium, which stores at least one instruction. The instruction is loaded and executed by a processor to enable a computer to implement the method for receiving a beacon frame provided by any exemplary embodiment of the present application.

[0113] An embodiment of the present application provides a computer program or computer program product, which includes: computer instructions. When the computer instructions are executed by a computer, the computer implements the method for receiving a beacon frame provided by any exemplary embodiment of the present application.

[0114] All of the above optional technical solutions can be combined in any way to form optional embodiments of the present application, and will not be described in detail here.

[0115] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or by a program to instruct the relevant hardware, and the program may be stored in a computer-readable storage medium, which may be a read-only memory, a disk, or an optical disk, etc.

[0116] The above description is merely an embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.

Claims

1. A method for receiving a beacon frame, characterized in that: The method comprises: Acquire a plurality of ordered first beacon periods according to the reception times of the plurality of received beacon frames, wherein any one of the plurality of ordered first beacon periods is a difference between the reception times of two adjacent received beacon frames; Selecting a reference number of first beacon periods adjacent to the current moment from the ordered plurality of first beacon periods; Predicting a second beacon period within a reference period based on the reference number of first beacon periods, the reference period being a period after a reception time of a last received beacon frame; A new beacon frame is received at a target time within the reference period, and a difference between the target time and a receiving time of the last received beacon frame is the second beacon period.

2. The method according to claim 1, characterized in that The receiving a new beacon frame at a target time within the reference period includes: When in the low power consumption mode, receiving a new beacon frame at a target time within the reference period is performed.

3. The method according to claim 1, characterized in that The last received beacon frame carries the third beacon period; The receiving a new beacon frame at a target time within the reference period includes: When the difference between the second beacon period and the third beacon period is greater than a reference threshold, receiving a new beacon frame at a target time within the reference period is performed.

4. The method according to any one of claims 1 to 3, characterized in that: The predicting a second beacon period within a reference period according to the reference number of first beacon periods includes: Obtaining a weight corresponding to each first beacon period in the reference number of first beacon periods; A weighted average calculation is performed on each of the first beacon periods according to the weights corresponding to the first beacon periods to predict and obtain a second beacon period within the reference time period.

5. The method according to claim 4, characterized in that The weights corresponding to the first beacon periods are the same.

6. The method according to claim 4, characterized in that At least two first beacon periods in the reference number of first beacon periods have different corresponding weights; The difference between the reception times of the two adjacent received beacon frames and the target time used to obtain any one first beacon period is negatively correlated with the weight corresponding to the any one first beacon period.

7. A device for receiving a beacon frame, characterized in that: The device comprises: an acquisition module, configured to acquire a plurality of ordered first beacon periods based on reception times of a plurality of received beacon frames, wherein any first beacon period in the plurality of ordered first beacon periods is a difference between reception times of two adjacent received beacon frames; and select a reference number of first beacon periods adjacent to a current time from the plurality of ordered first beacon periods; a prediction module, configured to predict a second beacon period within a reference period based on the reference number of first beacon periods, the reference period being a period after a reception time of a last received beacon frame; The receiving module is configured to receive a new beacon frame at a target time within the reference time period, wherein the difference between the target time and the receiving time of the last received beacon frame is the second beacon period.

8. The device according to claim 7, characterized in that The prediction module is used to obtain the weight corresponding to each first beacon period in the reference number of first beacon periods; perform weighted average calculation on each first beacon period according to the weight corresponding to each first beacon period, and predict the second beacon period within the reference time period.

9. An electronic device, characterized in that: The electronic device includes a memory and a processor; the memory stores at least one instruction, and the at least one instruction is loaded and executed by the processor, so that the electronic device implements the method for receiving a beacon frame described in any one of claims 1-6.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores at least one instruction, which is loaded and executed by a processor to enable a computer to implement the method for receiving a beacon frame according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Network analysis method, information processing device, and storage medium

    US20130329585A1

  • Beacon jitter prediction for wireless local area network (LAN) devices

    US20140376432A1