A dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things
By designing a dual-band low-power Wi-Fi keep-alive wake-up system in IoT devices, the problems of the device in network connection and power consumption management are solved, and efficient, low-power operation and fast response user experience are achieved.
Patent Information
- Application Number
- CN202411586479.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-08
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-08
AI Technical Summary
Existing IoT devices have problems in network connection and power consumption management, and cannot intelligently select the best Wi-Fi frequency band, resulting in unstable network connection, excessive power consumption, and rigid wake-up mechanism in low-power mode. Dynamic adjustments are made according to actual needs.
Design a dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things, intelligently select the best Wi-Fi frequency band through the control module, and use WPA3 encryption protocol to ensure data transmission security. The judgment unit determines the operating status and history. The data dynamically adjusts the sleep time, and the wake-up unit quickly restores the connection according to the GPIO pin state.
It realizes efficient connection of IoT devices in complex network environments, reduces power consumption, extends the battery life of the device, ensures that the device can respond to user instructions in a timely manner, and improves the user experience.
Smart Images

Figure CN119136288B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent management technology, and in particular to a dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things. Background Art
[0002] With the widespread use of Internet of Things (IoT) devices, Wi-Fi network connection has become an important means for these devices to achieve remote control, data transmission and information sharing. However, in practical applications, current IoT devices still face some problems in network connection and power consumption management.
[0003] The currently widely used Wi-Fi networks are mainly divided into two frequency bands: 2.4GHz and 5GHz. In actual applications, there is a large difference in the network quality of these two frequency bands. Existing IoT devices cannot intelligently select the best connection network in a dynamic network environment. In addition, in order to maintain connection stability, existing Wi-Fi connections remain connected even when network traffic is low or not frequently used, resulting in rapid consumption of battery power. After entering low-power mode, devices with a sleep mechanism usually wake up at a preset time interval, and cannot dynamically adjust the sleep duration according to actual usage needs, resulting in the inability to immediately restore the connection when the user needs to use it, affecting the user experience.
[0004] Therefore, it is necessary to design a dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things to solve the problems existing in the current technology. Summary of the invention
[0005] In view of this, the present invention proposes a dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things, aiming to solve the problem that the frequency band compatibility of current Internet of Things devices is low and the keep-alive wake-up mechanism cannot be dynamically adjusted according to actual needs.
[0006] In one aspect, the present invention proposes a dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things, which is applied to an Internet of Things device, wherein the Internet of Things device includes a Wi-Fi module and a data transmission module, wherein the Wi-Fi module is used to scan surrounding Wi-Fi networks, wherein the Wi-Fi networks include available networks in the 2.4 GHz and 5 GHz frequency bands; and the data transmission module is used to perform data transmission. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things includes:
[0007] A storage module and a control module, wherein the storage module is configured to store connection keys, identity authentication information, and historical sleep data;
[0008] The control module is connected to the Wi-Fi module, the storage module and the data transmission module, and the control module includes a collection unit, a processing unit, a judgment unit and a wake-up unit;
[0009] The acquisition unit is configured to scan surrounding Wi-Fi networks based on the Wi-Fi module, obtain Wi-Fi network quality according to the Wi-Fi signal and network load of each Wi-Fi network, and determine a network to be connected according to the Wi-Fi network quality;
[0010] The processing unit is configured to start a SAE handshake process with the network to be connected using the WPA3 encryption protocol, and store the connection key and identity authentication information in the storage module after the connection is successful;
[0011] The judgment unit is configured to collect the running state of the data transmission module, and judge whether to enter the low power mode according to the running state. When the judgment unit determines to enter the low power mode, the sleep mode is turned on and the keep-alive mechanism is run; the judgment unit is also configured to collect the current time period information, and obtain the sleep prediction duration according to the current time period information, the running state and the historical sleep data;
[0012] The wake-up unit is configured to monitor the GPIO pin state and start timing when entering the low power mode, wake up when the GPIO pin state changes or reaches the predicted sleep time, and restore the connection according to the connection key and identity authentication information.
[0013] Further, the determining of the network to be connected according to the Wi-Fi network quality includes:
[0014]
[0015] Where Q represents Wi-Fi network quality, S represents Wi-Fi signal strength, L represents network load, Smax represents the maximum signal strength in the current environment, and a and b represent weight coefficients.
[0016] The network with the highest Wi-Fi network quality value is selected as the network to be connected.
[0017] Further, judging whether to enter the low power mode according to the operating state includes:
[0018] The judgment unit collects the transmission tasks of the data transmission module within the past preset time based on the current time, and collects the amount of data transmitted each time and the time taken for transmission;
[0019] The running status evaluation value of each transmission task is calculated by the running status calculation formula, and the running status evaluation value with the highest probability is determined as the window evaluation value by the non-parametric estimation method;
[0020] Comparing the window evaluation value with the minimum operation evaluation value, and determining whether to enter the low power mode according to the comparison result;
[0021] The operating status evaluation value is calculated by the following formula:
[0022]
[0023] Where R represents the running status evaluation value, Di represents the amount of data transmitted for the i-th time, Dmax represents the maximum amount of data transmitted in the window, Fi represents the time used for the i-th transmission, Fmax represents the maximum transmission time in the window, and n represents the total number of transmissions in the window.
[0024] Further, when the judgment unit determines whether to enter the low power mode according to the comparison result, it includes:
[0025] When the window evaluation value is less than the minimum operation evaluation value, the judgment unit determines to enter the low power mode;
[0026] When the window evaluation value is greater than or equal to the minimum operation evaluation value, the determination unit determines not to enter the low power mode.
[0027] Furthermore, when the judgment unit obtains the predicted sleep duration according to the current time period information, the running state and the historical sleep data, it includes:
[0028] The judgment unit calculates the similarity between the current state and the historical state, and obtains the predicted sleep duration according to the similarity, wherein the current state includes the current time period information and the window evaluation value, and the historical state includes the historical time period information and the historical window evaluation value of each sleep in the historical sleep data;
[0029] The similarity is calculated by the following formula:
[0030]
[0031] in, represents similarity, Y represents the current period information, Yi represents the historical period information of the i-th historical sleep, X represents the window evaluation value, Xi represents the historical window evaluation value of the i-th historical sleep, α and β represent the period weight and evaluation value weight respectively, and α+β=1.
[0032] Furthermore, when the judgment unit obtains the predicted sleep duration according to the similarity, it includes:
[0033] When there is data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity value is selected as the sleep prediction duration;
[0034] When there is no data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity is selected as the initial sleep prediction duration, and the initial sleep prediction duration is processed according to the historical sleep data to obtain the sleep prediction duration.
[0035] Further, when the judgment unit processes the initial sleep prediction duration according to the historical sleep data to obtain the sleep prediction duration, it includes:
[0036] Filter the historical sleep data corresponding to the current time period information in the historical sleep data to establish a time period set;
[0037] Filter the data in the time period set that is greater than the initial sleep prediction duration to establish an increase set;
[0038] Filter the data in the time period set that is shorter than the initial sleep prediction duration to establish a downgrade set;
[0039] The initial predicted sleep duration is processed according to the increase set and the decrease set to obtain the predicted sleep duration.
[0040] Further, when the judgment unit processes the initial predicted sleep duration according to the increase set and the decrease set to obtain the predicted sleep duration, it includes:
[0041] ;
[0042] Among them, Y represents the predicted sleep duration, m is the number of historical sleep data in the up-adjustment set, Yj represents the j-th historical sleep duration in the up-adjustment set, Y0 is the initial sleep prediction duration, u is the number of historical sleep data in the down-adjustment set, and Yk is the k-th historical sleep duration in the down-adjustment set.
[0043] Furthermore, the awakening unit further includes:
[0044] When the GPIO pin state changes, the device wakes up and stops timing, and stores the current sleep period and sleep duration in the storage module.
[0045] Compared with the prior art, the beneficial effects of the present invention are: through the intelligent control module and the dynamically adjusted low-power sleep mechanism, the efficient and low-power operation of the Internet of Things devices is achieved. The acquisition unit determines the network to be connected according to the network quality to realize the intelligent selection of the best network between the 2.4GHz and 5GHz frequency bands, ensuring the stability and efficiency of the network connection. The processing unit controls the Wi-Fi module to use the WPA3 encryption protocol to ensure the security of data transmission. The judgment unit dynamically analyzes the operating status and current time period information of the data transmission module, and accurately predicts the sleep duration in combination with historical sleep data, so that after entering the low-power mode, the network connection is maintained through the keep-alive mechanism, while effectively reducing the power consumption of the device. When the device needs to be re-awakened, the wake-up unit quickly restores the original connection according to the GPIO pin status, ensuring that the Internet of Things device can respond to user instructions in a timely manner and improve the user experience.
[0046] On the other hand, the present application also provides a dual-band low-power Wi-Fi keep-alive wake-up method for the Internet of Things, which is applied to the above-mentioned dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things, including:
[0047] Scan the surrounding Wi-Fi networks, obtain Wi-Fi network quality according to the Wi-Fi signal and network load of each of the Wi-Fi networks, and determine a network to be connected according to the Wi-Fi network quality;
[0048] Using the WPA3 encryption protocol to start the SAE handshake process with the network to be connected, and storing the connection key and identity authentication information after the connection is successful;
[0049] Collect the running status of the device, determine whether to enter the low power mode according to the running status, and when it is determined to enter the low power mode, start the sleep mode and run the keep-alive mechanism; collect the current time period information, and obtain the sleep prediction duration according to the current time period information, the running status and the historical sleep data;
[0050] When entering the low power mode, the GPIO pin state is monitored and timing is started, and the system wakes up when the GPIO pin state changes or reaches the predicted sleep time, and restores the connection according to the connection key and identity authentication information.
[0051] It is understandable that the above-mentioned dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things have the same beneficial effects, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0053] Figure 1 A structural block diagram of a dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things provided by an embodiment of the present invention;
[0054] Figure 2 A flowchart of a dual-band low-power Wi-Fi keep-alive wake-up method for the Internet of Things provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0055] Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided in order to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, in the absence of conflict, the embodiments of the present invention and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0056] With the popularity of Internet of Things (IoT) devices, Wi-Fi networks have become the core connection method for these devices to achieve remote control, data transmission and information sharing. However, current IoT devices still face a series of challenges in terms of network connection intelligence and power consumption management, especially in the keep-alive wake-up mechanism in low-power mode.
[0057] The Wi-Fi networks currently in use are mainly divided into two frequency bands: 2.4GHz and 5GHz. These two frequency bands have their own advantages and disadvantages in terms of signal coverage, transmission speed and anti-interference ability, but existing IoT devices often lack intelligence in frequency band selection, and it is difficult to switch between the two frequency bands according to the real-time network quality. This single-band connection method is likely to cause the connection quality of the device to deteriorate when the network environment changes, affecting the stability of data transmission. At the same time, in order to maintain the stability of the network connection, the existing IoT devices still maintain a continuous connection state even when the data transmission frequency is low or the network is idle. Although this method ensures the stability of the connection, it leads to excessive consumption of battery power and shortens the battery life of the device. For devices with a sleep mechanism, the current low-power mode is often awakened at a fixed time interval, lacking the ability to dynamically adjust the sleep time according to actual usage requirements or external conditions. This rigid wake-up mechanism causes the device to waste power or fail to respond in time when the user actually needs it, affecting the user experience. Therefore, it is necessary to design a dual-band low-power Wi-Fi keep-alive wake-up method and system for the Internet of Things to solve the problems existing in the current technology.
[0058] In some embodiments of the present application, see Figure 1 As shown, a dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things is applied to an Internet of Things device, and the Internet of Things device includes a Wi-Fi module and a data transmission module. The Wi-Fi module is used to scan the surrounding Wi-Fi network, and the Wi-Fi network includes available networks in the 2.4GHz and 5GHz frequency bands; the data transmission module is used to perform data transmission. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things includes:
[0059] A storage module and a control module, the storage module is configured to store connection keys, authentication information, and historical sleep data;
[0060] The control module is connected with the Wi-Fi module, the storage module and the data transmission module, and the control module includes a collection unit, a processing unit, a judgment unit and a wake-up unit.
[0061] The collection unit is configured to scan surrounding Wi-Fi networks based on the Wi-Fi module, obtain Wi-Fi network quality according to the Wi-Fi signal and network load of each Wi-Fi network, and determine the network to be connected according to the Wi-Fi network quality.
[0062] The processing unit is configured to use the WPA3 encryption protocol to start the SAE handshake process with the network to be connected, and after the connection is successful, the connection key and identity authentication information are stored in the storage module.
[0063] The judgment unit is configured to collect the operating status of the data transmission module, and judge whether to enter the low power mode according to the operating status. When the judgment unit determines to enter the low power mode, it starts the sleep mode and runs the keep-alive mechanism. The judgment unit is also configured to collect the current time period information, and obtain the sleep prediction duration according to the current time period information, the operating status and the historical sleep data.
[0064] The wake-up unit is configured to monitor the GPIO (General-purpose input / output) pin status and start timing when entering low-power mode, wake up when the GPIO pin status changes or reaches the predicted sleep time, and restore the connection based on the connection key and authentication information.
[0065] Specifically, the main function of the Wi-Fi module is to scan and detect the surrounding Wi-Fi networks, including available networks in the 2.4GHz and 5GHz frequency bands. The module can obtain parameters such as the signal strength and current network load of each network as an important basis for subsequent judgment of network quality. The storage module is used to store key connection information, including Wi-Fi connection keys, authentication information, and historical sleep data. The purpose of storing this information is to ensure that the device can quickly restore the previous network connection state after waking up from low-power mode, avoiding the cumbersome authentication process again. At the same time, historical sleep data provides an important reference for subsequent sleep duration prediction. The data transmission module is the core component for data communication in the system. This module is responsible for sending and receiving data with the server or other IoT devices. The control module is the core management unit of the system. It connects and manages the Wi-Fi module, storage module, and data transmission module, and is divided into an acquisition unit, a processing unit, a judgment unit, and a wake-up unit.
[0066] Specifically, the acquisition unit obtains the signal strength and network load information of each network from the Wi-Fi module, and then processes this information to evaluate the quality of each Wi-Fi network. Based on this quality evaluation, the acquisition unit can intelligently select the best network to be connected to ensure that the device always runs on the network with the strongest signal and the smallest load, thereby improving the stability and efficiency of data transmission. The processing unit is responsible for controlling the Wi-Fi module to establish a secure connection with the Wi-Fi network selected by the acquisition unit. The SAE (Simultaneous Authentication of Equals) handshake process using the WPA3 encryption protocol improves the security of the connection and prevents unauthorized devices from accessing the network. After the connection is successful, the processing unit stores the connection key and authentication information in the storage module to ensure that the connection can be quickly restored after low-power wake-up. The judgment unit determines whether the device needs to enter the low-power mode by monitoring the operating status of the data transmission module. When the judgment unit detects that the data transmission frequency is low or the device is in a network idle state, it will enter the low-power sleep mode to run the keep-alive mechanism. The low-power mode is for the IoT device to only retain the basic power supply requirements and not perform data transmission tasks. The keep-alive mechanism is to maintain the connection with the server by periodically sending keep-alive signals. The keep-alive instruction adopts the strategy of minimizing the size of the data packet to reduce the amount of transmitted data and energy consumption. The judgment unit combines the current period information, operating status and historical sleep data to predict the appropriate sleep duration to achieve more accurate and efficient power consumption management. In low-power mode, the wake-up unit continuously monitors the status of the GPIO pin and starts timing. The unit can wake up the device when the GPIO pin status changes or when the predetermined sleep duration is reached. After waking up, the wake-up unit quickly restores the previous network connection by calling the connection key and authentication information in the storage module, ensuring that the device can re-enter the working state in time to meet operational requirements.
[0067] It can be understood that through this embodiment, the IoT device can intelligently select the best Wi-Fi frequency band in a complex network environment, effectively improving the stability of network connection and the efficiency of data transmission. At the same time, the low-power sleep mode is dynamically adjusted in combination with historical data, reducing battery consumption and extending the battery life of the device. The fast wake-up mechanism ensures that the device can quickly restore the connection when needed, improving the user experience.
[0068] In some embodiments of the present application, when determining a network to be connected according to the Wi-Fi network quality, the method includes:
[0069]
[0070] Among them, Q represents the Wi-Fi network quality, S represents the Wi-Fi signal strength, L represents the network load, Smax represents the maximum signal strength in the current environment, and a and b represent weight coefficients.
[0071] Select the network with the highest Wi-Fi quality value as the network to be connected.
[0072] Specifically, for example: Network A: signal strength S=80, maximum signal strength Smax=100, network load L=10%. Network B: signal strength S=90, maximum signal strength Smax=100, network load L=50%. Network C: signal strength S=70, maximum signal strength Smax=100, network load L=20%. a is preferably 2, b is preferably 1.5, and the quality Q of each network is calculated: QA≈0.6, QB≈0.4, QC≈0.3. Therefore, network A is selected for connection.
[0073] It is understandable that by comprehensively considering the two key indicators of signal strength and network load, the optimal Wi-Fi network connection is evaluated and selected. Compared with the simple signal strength or load single evaluation method, it can more comprehensively reflect the actual quality of the network. By reasonably setting the weight coefficients a and b, it has flexibility and can adjust the parameters according to different application scenarios to achieve the best connection selection and energy efficiency management. It improves the adaptability of IoT devices in complex network environments, effectively optimizes data transmission performance, and at the same time extends the battery life of the device, which has significant technical advantages.
[0074] In some embodiments of the present application, when determining whether to enter low power mode based on the operating status, it includes: the judgment unit collects the transmission tasks of the data transmission module within the past preset time based on the current moment, and collects the data volume and transmission time of each transmission.
[0075] The running status evaluation value of each transmission task is calculated by the running status calculation formula, and the running status evaluation value with the highest probability is determined as the window evaluation value by the non-parametric estimation method.
[0076] The window evaluation value is compared with the minimum operation evaluation value, and whether to enter the low power mode is determined according to the comparison result.
[0077] The operating status evaluation value is calculated by the following formula:
[0078]
[0079] Where R represents the running status evaluation value, Di represents the amount of data transmitted for the i-th time, Dmax represents the maximum amount of data transmitted in the window, Fi represents the time used for the i-th transmission, Fmax represents the maximum transmission time in the window, and n represents the total number of transmissions in the window.
[0080] In some embodiments of the present application, when the judgment unit determines whether to enter the low power mode according to the comparison result, the judgment unit determines to enter the low power mode when the window evaluation value is less than the minimum operation evaluation value. When the window evaluation value is greater than or equal to the minimum operation evaluation value, the judgment unit determines not to enter the low power mode.
[0081] Specifically, the non-parametric estimation method is preferably a Gaussian kernel function, and the probability of each operating state evaluation value is determined by the following formula.
[0082]
[0083] Wherein, Gt represents the probability when the running state evaluation value is x, h represents the bandwidth, xt represents the tth running state evaluation value, and x represents the specific value of the running state to be evaluated.
[0084] It is understandable that the analysis of the operating status evaluation value by non-parametric estimation method can more accurately reflect the operating status of the device within the window. It avoids the subjective consciousness of human judgment and decides whether to enter the low power mode based on real-time data, which is conducive to improving the battery usage efficiency and ensuring that the device can quickly resume working state when needed.
[0085] In some embodiments of the present application, when the judgment unit obtains the predicted sleep duration based on the current time period information, the operating status and combined with the historical sleep data, it includes: the judgment unit calculates the similarity between the current state and the historical state, and obtains the predicted sleep duration based on the similarity, the current state includes the current time period information and the window evaluation value, and the historical state includes the historical time period information and the historical window evaluation value of each sleep in the historical sleep data.
[0086] The similarity is calculated by the following formula:
[0087]
[0088] in, represents similarity, Y represents the current period information, Yi represents the historical period information of the i-th historical sleep, X represents the window evaluation value, Xi represents the historical window evaluation value of the i-th historical sleep, α and β represent the period weight and evaluation value weight respectively, and α+β=1.
[0089] In some embodiments of the present application, when the judgment unit obtains the predicted sleep duration according to the similarity, it includes: when there is data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity is selected as the predicted sleep duration. When there is no data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity is selected as the initial predicted sleep duration, and the initial predicted sleep duration is processed according to the historical sleep data to obtain the predicted sleep duration.
[0090] Specifically, when there is data in the historical state with a similarity greater than 0.8 to the current state, the historical sleep data corresponding to the maximum similarity will be selected as the sleep prediction duration. The current power consumption management is determined based on the device operation mode under similar historical conditions. This is beneficial to reducing the judgment processing time and reducing the energy consumption of device data processing. If no historical data with a similarity greater than 0.8 is found, the historical sleep data corresponding to the maximum similarity is selected as the initial sleep prediction duration. This initial value is further optimized and adjusted based on other historical sleep data to obtain a more accurate sleep prediction duration.
[0091] It is understandable that by introducing a similarity calculation mechanism, the sleep duration of the device can be predicted more quickly. The current operating status is taken into account and historical data is combined to make the prediction more accurate and able to adapt to the power consumption requirements of the device in different time periods and working states. Compared with the traditional fixed-time sleep method, it is beneficial to improve the battery life of the device and restore the connection in time when the user needs it, thereby improving the user experience. In addition, the solution also has the ability to adapt, and can gradually optimize the sleep duration prediction as the device is used, which is closer to complex application scenarios.
[0092] In some embodiments of the present application, when the judgment unit processes the initial sleep prediction duration according to the historical sleep data to obtain the sleep prediction duration, the method includes: filtering the historical sleep data corresponding to the current time period information in the historical sleep data to establish a time period set. Filtering the data in the time period set that is greater than the initial sleep prediction duration to establish an increase set. Filtering the data in the time period set that is less than the initial sleep prediction duration to establish a decrease set. Processing the initial sleep prediction duration according to the increase set and the decrease set to obtain the sleep prediction duration.
[0093] In some embodiments of the present application, when the determination unit processes the initial predicted sleep duration according to the increase set and the decrease set to obtain the predicted sleep duration, the method includes:
[0094] .
[0095] Among them, Y represents the predicted sleep duration, m is the number of historical sleep data in the up-adjustment set, Yj represents the j-th historical sleep duration in the up-adjustment set, Y0 is the initial sleep prediction duration, u is the number of historical sleep data in the down-adjustment set, and Yk is the k-th historical sleep duration in the down-adjustment set.
[0096] It is understandable that this embodiment can dynamically adjust the initial sleep prediction duration to more accurately match the actual sleep requirements of the device. Compared with the traditional fixed or preset sleep strategy, by analyzing historical data, the sleep duration can be intelligently adjusted according to the actual usage and time period information. Not only does it improve the battery life of the device, but it also optimizes the response time and power consumption management of the device in different states. It provides more adaptive power consumption control under different working conditions, improving the overall performance and user experience of the device.
[0097] In some embodiments of the present application, the wake-up unit further includes: waking up and stopping timing when the GPIO pin state changes, and storing the current sleep period and sleep duration in a storage module.
[0098] It is understandable that when a change in the GPIO pin state is detected, the wake-up unit immediately triggers the device to wake up from low-power mode. This ensures that the device can quickly resume working when needed without waiting for the preset sleep duration to expire. If the GPIO pin state does not change within the determined sleep prediction duration, an active wake-up is performed to establish a connection after the sleep prediction duration ends, and then the device continues to sleep. During this period, the timing is not stopped until the pin state changes.
[0099] It is understandable that by combining the real-time monitoring of the GPIO pin status and the active wake-up mechanism, the response speed and flexibility of the device in low power mode are improved. The device can wake up quickly when needed, and continue to maintain a low power state when not needed, thereby maximizing the battery life. In addition, the design of continuous timing and data recording also provides reliable data support for future optimization of sleep strategies. Through this embodiment, not only can efficient operation be maintained in a dynamic environment, but also more intelligent power consumption management can be achieved without affecting the user experience.
[0100] In the above embodiments, the efficient and low-power operation of the IoT device is achieved through an intelligent control module and a dynamically adjusted low-power sleep mechanism. The acquisition unit determines the network to be connected based on the network quality to intelligently select the best network between the 2.4GHz and 5GHz frequency bands to ensure the stability and efficiency of the network connection. The processing unit controls the Wi-Fi module to use the WPA3 encryption protocol to ensure the security of data transmission. The judgment unit dynamically analyzes the operating status and current time period information of the data transmission module, and accurately predicts the sleep duration in combination with historical sleep data, so that after entering the low-power mode, the network connection is maintained through the keep-alive mechanism, while effectively reducing the power consumption of the device. When the device needs to be re-awakened, the wake-up unit quickly restores the original connection according to the GPIO pin status, ensuring that the IoT device can respond to user instructions in a timely manner and improve the user experience.
[0101] In another preferred embodiment based on the above embodiment, refer to Figure 2 As shown, this embodiment provides a dual-band low-power Wi-Fi keep-alive wake-up method for the Internet of Things, which is applied to the above-mentioned dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things, including:
[0102] S100: Scan the surrounding Wi-Fi networks, obtain the Wi-Fi network quality according to the Wi-Fi signal and network load of each Wi-Fi network, and determine the network to be connected according to the Wi-Fi network quality;
[0103] S200: Use WPA3 encryption protocol to start the SAE handshake process with the network to be connected. After the connection is successful, the connection key and authentication information are stored;
[0104] S300: Collect the operating status of the device, determine whether to enter the low power mode based on the operating status, and when it is determined to enter the low power mode, turn on the sleep mode and run the keep-alive mechanism; collect the current time period information, and obtain the predicted sleep duration based on the current time period information, operating status and historical sleep data.
[0105] S400: When entering low power mode, monitor the GPIO pin status and start timing, wake up when the GPIO pin status changes or reaches the predicted sleep time, and restore the connection based on the connection key and authentication information.
[0106] It is understandable that the efficient and low-power operation of IoT devices is achieved through intelligent control modules and dynamically adjusted low-power sleep mechanisms. The acquisition unit determines the network to be connected based on the network quality to intelligently select the best network between the 2.4GHz and 5GHz frequency bands to ensure the stability and efficiency of the network connection. The processing unit controls the Wi-Fi module to use the WPA3 encryption protocol to ensure the security of data transmission. The judgment unit dynamically analyzes the operating status and current time period information of the data transmission module, and accurately predicts the sleep duration based on historical sleep data, so that after entering the low-power mode, the network connection is maintained through the keep-alive mechanism, while effectively reducing the power consumption of the device. When the device needs to be re-awakened, the wake-up unit quickly restores the original connection according to the GPIO pin status, ensuring that the IoT device can respond to user commands in a timely manner and improve the user experience.
[0107] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0108] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems) and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0109] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0110] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process in the computer or other programmable device. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0111] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the relevant field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered within the scope of protection of the claims of the present invention.
Claims
1. A dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things, applied to an Internet of Things device, wherein the Internet of Things device includes a Wi-Fi module and a data transmission module, wherein the Wi-Fi module is used to scan surrounding Wi-Fi networks, wherein the Wi-Fi networks include available networks in the 2.4 GHz and 5 GHz frequency bands; The data transmission module is used for data transmission, and is characterized in that: include: A storage module and a control module, wherein the storage module is configured to store connection keys, identity authentication information, and historical sleep data; The control module is connected to the Wi-Fi module, the storage module and the data transmission module, and the control module includes a collection unit, a processing unit, a judgment unit and a wake-up unit; The acquisition unit is configured to scan surrounding Wi-Fi networks based on the Wi-Fi module, obtain Wi-Fi network quality according to the Wi-Fi signal and network load of each Wi-Fi network, and determine a network to be connected according to the Wi-Fi network quality; The processing unit is configured to start a SAE handshake process with the network to be connected using the WPA3 encryption protocol, and store the connection key and identity authentication information in the storage module after the connection is successful; The judgment unit is configured to collect the running state of the data transmission module, and judge whether to enter the low power mode according to the running state. When the judgment unit determines to enter the low power mode, the sleep mode is turned on and the keep-alive mechanism is run; the judgment unit is also configured to collect the current time period information, and obtain the sleep prediction duration according to the current time period information, the running state and the historical sleep data; The wake-up unit is configured to monitor the GPIO pin state and start timing when entering the low power mode, wake up when the GPIO pin state changes or reaches the predicted sleep time, and restore the connection according to the connection key and identity authentication information; When judging whether to enter the low power mode according to the operating state, it includes: The judgment unit collects the transmission tasks of the data transmission module within the past preset time based on the current time, and collects the amount of data transmitted each time and the time taken for transmission; The running status evaluation value of each transmission task is calculated by the running status calculation formula, and the running status evaluation value with the highest probability is determined as the window evaluation value by the non-parametric estimation method; Comparing the window evaluation value with the minimum operation evaluation value, and determining whether to enter the low power mode according to the comparison result; The operating status evaluation value is calculated by the following formula: Where R represents the running status evaluation value, Di represents the data volume of the i-th transmission, Dmax represents the maximum data volume of transmission in the window, Fi represents the time used for the i-th transmission, Fmax represents the maximum transmission time in the window, and n represents the total number of transmissions in the window; When the judging unit judges whether to enter the low power mode according to the comparison result, it includes: When the window evaluation value is less than the minimum operation evaluation value, the judgment unit determines to enter the low power mode; When the window evaluation value is greater than or equal to the minimum operation evaluation value, the determination unit determines not to enter the low power mode.
2. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 1, characterized in that: The determining of the network to be connected according to the Wi-Fi network quality includes: Where Q represents Wi-Fi network quality, S represents Wi-Fi signal strength, L represents network load, Smax represents the maximum signal strength in the current environment, and a and b represent weight coefficients. The network with the highest Wi-Fi network quality value is selected as the network to be connected.
3. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 1, characterized in that: When the judgment unit obtains the predicted sleep duration according to the current time period information, the running state and the historical sleep data, it includes: The judgment unit calculates the similarity between the current state and the historical state, and obtains the predicted sleep duration according to the similarity, wherein the current state includes the current time period information and the window evaluation value, and the historical state includes the historical time period information and the historical window evaluation value of each sleep in the historical sleep data; The similarity is calculated by the following formula: Among them, S represents similarity, Y represents current time period information, Yi represents historical time period information of the i-th historical sleep, X represents window evaluation value, Xi represents historical window evaluation value of the i-th historical sleep, α and β represent time period weight and evaluation value weight respectively, and α+β=1.
4. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 3, characterized in that: When the judging unit obtains the predicted sleep duration according to the similarity, it includes: When there is data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity value is selected as the sleep prediction duration; When there is no data in the historical state with a similarity greater than 0.8 with the current state, the historical sleep data corresponding to the maximum similarity is selected as the initial sleep prediction duration, and the initial sleep prediction duration is processed according to the historical sleep data to obtain the sleep prediction duration.
5. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 4, characterized in that: When the judging unit processes the initial predicted sleep duration according to the historical sleep data to obtain the predicted sleep duration, it includes: Filter the historical sleep data corresponding to the current time period information in the historical sleep data to establish a time period set; Filter the data in the time period set that is greater than the initial sleep prediction duration to establish an increase set; Filter the data in the time period set that is shorter than the initial sleep prediction duration to establish a downgrade set; The initial predicted sleep duration is processed according to the increase set and the decrease set to obtain the predicted sleep duration.
6. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 5, characterized in that: When the determination unit processes the initial predicted sleep duration according to the increase set and the decrease set to obtain the predicted sleep duration, the method includes: Among them, Y represents the predicted sleep duration, m is the number of historical sleep data in the up-adjustment set, Yj represents the j-th historical sleep duration in the up-adjustment set, Y0 is the initial sleep prediction duration, u is the number of historical sleep data in the down-adjustment set, and Yk is the k-th historical sleep duration in the down-adjustment set.
7. The dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things according to claim 1, characterized in that: The wake-up unit further includes: When the GPIO pin state changes, the device wakes up and stops timing, and stores the current sleep period and sleep duration in the storage module.
8. A dual-band low-power Wi-Fi keep-alive wake-up method for the Internet of Things, applied to the dual-band low-power Wi-Fi keep-alive wake-up system for the Internet of Things as claimed in any one of claims 1 to 7, characterized in that: include: Scan the surrounding Wi-Fi networks, obtain Wi-Fi network quality according to the Wi-Fi signal and network load of each of the Wi-Fi networks, and determine a network to be connected according to the Wi-Fi network quality; Using the WPA3 encryption protocol to start the SAE handshake process with the network to be connected, and storing the connection key and identity authentication information after the connection is successful; Collect the running status of the device, determine whether to enter the low power mode according to the running status, and when it is determined to enter the low power mode, start the sleep mode and run the keep-alive mechanism; collect the current time period information, and obtain the sleep prediction duration according to the current time period information, the running status and the historical sleep data; When entering the low power mode, the GPIO pin state is monitored and timing is started, and the system wakes up when the GPIO pin state changes or reaches the predicted sleep time, and restores the connection according to the connection key and identity authentication information.
Citation Information
Patent Citations
Low-power-consumption data transmission method and system, transmitting equipment, and receiving equipment
CN106658372A
Internet of Things terminal and control method thereof
CN113873624A