Wireless communication method of low-power-consumption equipment and related hardware
By periodically collecting wireless communication signals and using a gated recurrent neural network to predict the probability of successful connection, the sleep backoff time is dynamically adjusted, which solves the battery life problem caused by frequent reconnection attempts after the wireless communication connection is lost in low-power devices, and achieves reduced power consumption and extended battery life.
Patent Information
- Application Number
- CN202511300224.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-09-11
- Publication Date
- 2025-11-18
AI Technical Summary
Low-power devices frequently attempt to re-establish a wireless communication connection after it is lost, resulting in prolonged operation or switching between sleep and wake-up states, thus reducing battery life.
By periodically collecting wireless communication signals, using a gated recurrent neural network to predict the probability of successful connection, determining the target RSSI and performing corresponding operations, and dynamically adjusting the sleep backoff duration, the number of invalid wake-ups is reduced.
It extends the battery life of low-power devices, reduces power consumption, and decreases the invalid wake-up rate.
Smart Images

Figure CN120980495A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of wireless communication connection, and in particular to a low-power device wireless communication method and related hardware. BACKGROUND
[0002] At present, wireless low-power devices have been widely applied in the fields of smart home, industrial production, etc. Some of the wireless low-power devices may work in a weak wireless communication signal connection environment, and are prone to repeatedly disconnecting the wireless communication connection with the peer device due to the fluctuation of wireless communication signal strength. In order to maintain the wireless communication connection of the device as much as possible, the prior art usually causes the wireless low-power device to try to reestablish the wireless communication connection as soon as possible and repeatedly after the wireless communication connection is disconnected. For some wireless low-power devices that do not need to work continuously and are not externally connected to a power supply, the operation of trying to reestablish the wireless communication connection as soon as possible and repeatedly after the wireless communication connection is disconnected will cause the wireless low-power device to be in a working state for a long time, or repeatedly switch between the sleep and wake-up working states, thereby greatly reducing the endurance time of the wireless low-power device. SUMMARY
[0003] The embodiments of the present application provide a low-power device wireless communication method and related hardware to solve the problem that the low-power device needs to try to recover the wireless communication connection as soon as possible after the wireless communication connection is disconnected in the prior art, and the low-power device is in a working state for a long time or frequently switches between the sleep and wake-up working states, resulting in a low endurance time of the low-power device.
[0004] In a first aspect, the embodiments of the present application provide a low-power device wireless communication method, comprising:
[0005] periodically collecting wireless communication signals between the low-power device and a peer device;
[0006] determining a target RSSI according to at least one actual RSSI determined based on the recently collected wireless communication signals and at least one connection success probability recently determined; wherein the connection success probability is determined according to the actual RSSI, and the connection success probability is periodically determined;
[0007] determining a first communication operation corresponding to the target RSSI according to a preset correspondence between the RSSI and the communication operation, and performing the first communication operation;
[0008] after performing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failure state, determining a backoff duration according to the target RSSI and the at least one connection success probability recently determined;
[0009] controlling the low-power device to sleep for the backoff duration, and then performing a second communication operation.
[0010] Optionally, the connection success probability is determined by:
[0011] The recently determined plurality of actual RSSIs are inputted into a pre-trained gated recurrent neural network (GRNN) model in time sequence to obtain a connection success probability output by the GRNN model.
[0012] Further optionally, the GRNN model comprises an input layer, an update gate layer, and an output layer.
[0013] The inputting of the recently determined plurality of actual RSSIs into the pre-trained GRNN model in time sequence to obtain the connection success probability output by the GRNN model comprises:
[0014] The input layer receives an actual RSSI sequence composed of a plurality of actual RSSIs determined by a recently collected wireless communication signal in time sequence.
[0015] The update gate layer sequentially and cyclically processes the actual RSSI sequence received by the input layer in time steps to determine a hidden state corresponding to each time step; for any time step, the hidden state corresponding to the time step is determined according to a previous state retention factor and a candidate state fusion factor, the previous state retention factor being a product of an update gate value and a hidden state corresponding to a previous time step of the time step, the candidate state fusion factor being a product of an update gate complementary coefficient and a candidate state of the time step, the sum of the update gate value and the update gate complementary coefficient being a preset value, and the previous state retention factor being determined according to a feature corresponding to the time step and the hidden state corresponding to the previous time step of the time step.
[0016] The output layer determines the connection success probability according to the hidden state of the last time step.
[0017] Optionally, the determining of the first wireless communication operation corresponding to the target RSSI according to a preset correspondence between RSSI and communication operation comprises:
[0018] If the target RSSI is less than a first threshold value, a reconnection data packet for reestablishing a wireless communication connection is sent to a peer device.
[0019] If the target RSSI is greater than or equal to the first threshold value and less than a second threshold value, a probe data packet for probing a wireless communication connection state is sent to the peer device.
[0020] If the target RSSI is greater than or equal to the second threshold value, a heartbeat data packet is sent to the peer device according to a preset heartbeat mechanism.
[0021] As an optional implementation, the target RSSI is determined according to the at least one actual RSSI determined based on the recently collected wireless communication signals, and the at least one connection success probability determined recently, comprising: determining the target RSSI according to the at least one actual RSSI determined based on the recently collected wireless communication signals, the at least one connection success probability determined recently, and the cumulative number of times of the wireless communication connection with the opposite end device being in the failure state within a set time period.
[0022] As another optional implementation, the target RSSI is determined according to the at least one actual RSSI determined based on the recently collected wireless communication signals, and the at least one connection success probability determined recently, comprising: determining the target RSSI according to the at least one actual RSSI determined based on the recently collected wireless communication signals, the at least one connection success probability determined recently, and the consecutive number of times of the wireless communication connection with the opposite end device being in the failure state recently.
[0023] Optionally, if the number of times of the wireless communication connection with the opposite end device being in the failure state is unchanged, and the average value of the preset first number of actual RSSIs determined recently is unchanged, then the target RSSI and the variance of the preset second number of connection success probabilities determined recently satisfy a monotone increasing relationship.
[0024] If the number of times of the wireless communication connection with the opposite end device being in the failure state is unchanged, and the variance of the preset second number of connection success probabilities determined recently is unchanged, then the target RSSI and the average value of the preset first number of actual RSSIs determined recently satisfy a monotone increasing relationship.
[0025] If the variance of the preset second number of connection success probabilities determined recently is unchanged, and the average value of the preset first number of actual RSSIs determined recently is unchanged, then the number of times of the wireless communication connection with the opposite end device being in the failure state and the target RSSI satisfy a monotone decreasing relationship.
[0026] The number of times of the wireless communication connection with the opposite end device being in the failure state is the cumulative number of times of the wireless communication connection with the opposite end device being in the failure state within a set time period, or the number of times of the wireless communication connection with the opposite end device being in the failure state is the consecutive number of times of the wireless communication connection with the opposite end device being in the failure state recently.
[0027] Optionally, the target RSSI is determined by the following way:
[0028]
[0029] wherein, is the target RSSI, μ RSSI is the average value of the preset first number of actual RSSIs determined recently, and σP The variance of the recently determined second preset number of successful connection probabilities is denoted as N, where N is the number of times the wireless communication connection with the peer device has failed, and α, β, and γ are preset parameters.
[0030] Optionally, determining the backoff duration based on the target RSSI and the probability of at least one recently determined connection success includes:
[0031] The backoff duration is determined based on the target RSSI and the average of the recently determined multiple connection success probabilities;
[0032] If the average value of the recently determined third number of successful connection probabilities remains unchanged, then the target RSSI and the backoff duration satisfy a monotonically non-increasing function relationship.
[0033] If the target RSSI remains unchanged, the average of the most recently determined third number of connection success probabilities and the backoff time satisfy a monotonically non-increasing function relationship.
[0034] Optionally, the backoff time T can be determined as follows:
[0035]
[0036] T1 > T2 > T3
[0037] in, For the target RSSI, μ P Let k1, k2, b1, b2, and λ be the average of the recently determined preset third number of successful connection probabilities. min , λ max These are preset parameters, where R1 and R2 are preset RSSI thresholds, and T1, T2, and T3 are preset duration values.
[0038] Optionally, the second communication operation is the same as the first communication operation;
[0039] Before determining the target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability, the method further includes:
[0040] It was determined that the wireless communication connection with the peer device failed after the last execution of the second communication operation.
[0041] Secondly, based on the same inventive concept, embodiments of the present invention also provide a low-power device, comprising:
[0042] The signal acquisition module is used to periodically acquire wireless communication signals between the device and the peer device.
[0043] A processing module is configured to determine a target RSSI based on at least one actual RSSI determined based on recently acquired wireless communication signals and at least one recently determined connection success probability; wherein the connection success probability is determined based on the actual RSSI and the connection success probability is determined periodically.
[0044] The decision execution module is used to determine and execute the first communication operation corresponding to the target RSSI based on the preset correspondence between RSSI and communication operations; after executing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failed state, the backoff time is determined based on the target RSSI and the probability of at least one recently determined successful connection; and after controlling its own sleep backoff time, the second communication operation is executed.
[0045] Thirdly, based on the same inventive concept, embodiments of the present invention also provide a low-power device, including: a processor and a memory for storing processor-executable instructions;
[0046] The processor is configured to execute the instructions to implement the low-power device wireless communication method as described in the first aspect.
[0047] Fourthly, based on the same inventive concept, embodiments of the present invention also provide a computer-readable storage medium storing computer program code that, when executed on a computer, causes the computer to perform the low-power device wireless communication method as described in the first aspect.
[0048] Fifthly, based on the same inventive concept, embodiments of the present invention also provide a computer program product, the computer program product comprising: computer program code, which, when the computer program code is run on a computer, causes the computer to execute the low-power device wireless communication method as described in the first aspect.
[0049] The beneficial effects of this invention are as follows:
[0050] The low-power device wireless communication method and related hardware provided in this invention predict the connection success probability based on the recently measured actual RSSI, and determine the target RSSI based on the recently measured actual RSSI and the predicted connection success probability. A first communication operation is determined and executed based on the target RSSI. After executing the first communication operation and determining that the wireless communication connection with the peer device is in a failed state, the backoff time for the low-power device to sleep is dynamically determined based on the target RSSI and the connection success probability. After the backoff time, the device is reawakened to attempt to execute a second communication operation again to try to establish a wireless communication connection with the peer device. Therefore, when the wireless communication connection between the low-power device and the peer device is in a failed state and needs to be restored as soon as possible, the low-power device can dynamically sleep during periods when it is predicted that a wireless communication connection with the peer device is unlikely to be established, thereby reducing power consumption and extending battery life. Attached Figure Description
[0051] Figure 1 A flowchart of a low-power device wireless communication method provided in an embodiment of the present invention;
[0052] Figure 2 This is one of the structural schematic diagrams of a low-power device provided in an embodiment of the present invention;
[0053] Figure 3 This is a second schematic diagram of the structure of a low-power device provided in an embodiment of the present invention. Detailed Implementation
[0054] To make the above-mentioned objects, features, and advantages of the present invention more apparent and understandable, the present invention will be further described below in conjunction with the accompanying drawings and embodiments. However, the exemplary embodiments can be implemented in many forms and should not be construed as limited to the embodiments set forth herein; rather, these embodiments are provided to make the present invention more comprehensive and complete, and to fully convey the concept of the exemplary embodiments to those skilled in the art. The same reference numerals in the figures denote the same or similar structures, and therefore repeated descriptions of them will be omitted. Terms describing position and direction in the present invention are illustrative based on the accompanying drawings, but changes can be made as needed, and all such changes are included within the scope of protection of the present invention. The accompanying drawings of the present invention are for illustrative purposes only and do not represent actual proportions.
[0055] It should be noted that specific details are set forth in the following description to provide a full understanding of the invention. However, the invention can be practiced in many ways other than those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below. The following description is a preferred embodiment for carrying out the present application; however, the description is for the purpose of illustrating the general principles of the application and is not intended to limit the scope of the application. The scope of protection of this application shall be determined by the appended claims.
[0056] The low-power device wireless communication method and related hardware provided in the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0057] In a first aspect, embodiments of the present invention provide a low-power device wireless communication method, applicable to low-power devices. The method can be applied to wireless communication technologies such as cellular mobile networks, Wireless Local Area Network (WLAN) communication, Bluetooth, Starlink, Narrow Band Internet of Things (NB-IoT), Zigbee, Long Range Radio (LoRa), infrared, EnOcean, and Z-Wave, and the present invention does not impose further limitations thereon.
[0058] In specific implementation, low-power devices can be IoT sensors, smart wearable devices, monitoring devices (such as outdoor surveillance cameras) for industrial and home use, etc., and can be devices using technologies such as OpenCPU. This embodiment of the invention does not impose too many limitations here.
[0059] like Figure 1 As shown, the method specifically includes the following steps:
[0060] S110. Periodically collect wireless communication signals between the device and the peer device, and determine the Received Signal Strength Indication (RSSI) based on at least one most recently collected wireless communication signal.
[0061] S120. Determine the target RSSI based on at least one recently determined actual RSSI and at least one recently determined connection success probability.
[0062] The connection success probability is determined based on the actual RSSI, and this probability is determined periodically. The target RSSI represents the predicted RSSI value at a specified future time relative to the current time. For example, the target RSSI represents the predicted RSSI value corresponding to a preset first duration (e.g., 3 seconds) after the current time.
[0063] In practical implementation, the interaction between parameters such as the actual RSSI and connection success probability and the target RSSI can be pre-defined to determine the target RSSI. Alternatively, a machine learning model can be used to learn the interaction between the actual RSSI, connection success probability, and the target RSSI. The actual RSSI and connection success probability can be used as training sample features, and the target RSSI can be used as the training sample label to train the machine learning model. The target RSSI is then determined based on the trained machine learning model. The machine learning model can be a linear regression model, a decision tree model, a random forest (RF) model, a neural network model, etc. This embodiment of the invention does not impose further limitations.
[0064] Optionally, step S120 specifically includes: determining the target RSSI based on at least one recently determined actual RSSI, at least one recently determined connection success probability, and the number of times the wireless communication connection with the peer device has failed.
[0065] As an optional implementation, the target RSSI is determined based on at least one recently determined actual RSSI, at least one recently determined connection success probability, and the cumulative number of times the wireless communication connection with the peer device has failed within a set time period.
[0066] As another alternative implementation, the target RSSI is determined based on at least one recently determined actual RSSI, at least one recently determined connection success probability, and the number of consecutive times the wireless communication connection with the peer device has failed recently.
[0067] Optionally, in the two embodiments described above, the interaction between the actual RSSI, the connection success probability, the number of times the wireless communication connection with the peer device failed, and the target RSSI satisfies the following:
[0068] If the number of times the wireless communication connection with the peer device fails remains unchanged, and the average value of the most recently determined preset first number of actual RSSIs remains unchanged, then the variance of the most recently determined preset second number of connection success probabilities satisfies a monotonically increasing relationship with the target RSSI.
[0069] If the number of times the wireless communication connection with the peer device fails remains unchanged, and the variance of the recently determined preset second number of successful connection probabilities remains unchanged, then the average value of the recently determined preset first number of actual RSSIs satisfies a monotonically increasing relationship with the target RSSI.
[0070] If the variance of the recently determined preset second number of successful connection probabilities remains unchanged, and the average value of the recently determined preset first number of actual RSSIs remains unchanged, then the number of times the wireless communication connection with the peer device is in a failed state satisfies a monotonically decreasing relationship with the target RSSI.
[0071] In the first implementation, the number of times the wireless communication connection with the peer device failed is the cumulative number of times the wireless communication connection with the peer device failed within a set time period. In the second implementation, the number of times the wireless communication connection with the peer device failed is the consecutive number of times the wireless communication connection with the peer device failed most recently.
[0072] Alternatively, the target RSSI can be determined as follows:
[0073]
[0074] in, For the target RSSI, μ RSSI σ is the average of the first preset number of actual RSSIs, which is the most recently determined value. P Let σ be the variance of the recently determined second preset number of connection success probabilities, N be the number of times the wireless communication connection with the peer device failed, and α, β, and γ be preset parameters, where α > 0, β > 0, and γ > 0. For the scenario where the target RSSI is determined based on the actual RSSI, connection success probability, and the number of times the wireless communication connection with the peer device failed in this embodiment of the invention, the optimal values were determined through experiments using the controlled variable method in environments with weak network fluctuations and frequent network outages: α = 5, β = 2, and γ = 3. During the calculation of the above formula, σ can be updated once each time a connection success probability is determined. P There is no need to store all historical data.
[0075] S130. Based on the preset correspondence between RSSI and communication operation, determine and execute the first communication operation corresponding to the target RSSI.
[0076] In practice, different communication operations can be pre-configured for different RSSIs. For example, when the target RSSI is low, the probability of a successful wireless communication connection between the low-power device and the peer device is low. The communication operation corresponding to a low target RSSI could be a communication operation to re-establish the wireless communication connection with the peer device (e.g., sending a reconnection data packet to the peer device to re-establish the wireless communication connection). When the target RSSI is high, the probability of a successful wireless communication connection between the low-power device and the peer device is high. The communication operation corresponding to a high RSSI could be a wireless communication operation performed by default to maintain a successful wireless communication connection with the peer device (e.g., sending data packets carrying relevant information to the peer device normally according to the needs of wireless communication, sending heartbeat data packets to the peer device based on a preset heartbeat mechanism, etc.).
[0077] In one possible embodiment, step S130 specifically includes:
[0078] If the target RSSI is less than the first threshold, a reconnection data packet is sent to the peer device to re-establish the wireless communication connection.
[0079] If the target RSSI is greater than or equal to the first threshold and less than the second threshold, a probe data packet for detecting the wireless communication connection status is sent to the peer device.
[0080] If the target RSSI is greater than or equal to the second threshold, a heartbeat data packet is sent to the peer device according to the preset heartbeat mechanism.
[0081] For example, the first threshold can be set to -80dBm, and the second threshold can be set to -75dBm. When the target RSSI is less than -80dBm, it can be assumed that the low-power device has lost its wireless communication connection with the peer device, and the low-power device needs to re-establish the wireless communication connection with the peer device. When the target RSSI is greater than or equal to -80dBm and less than -75dBm, it can be assumed that the wireless communication connection between the low-power device and the peer device may have been lost or may still be maintained. Therefore, the low-power device can send a probe data packet (e.g., the probe data packet is only 1 byte in size) to the peer device to detect the wireless communication connection status. In subsequent steps, the wireless communication connection status between the low-power device and the peer device can be determined based on the peer device's response to the probe data packet, and subsequent operations can be determined based on the wireless communication connection status. When the target RSSI is greater than or equal to -75dBm, it can be assumed that the wireless communication connection between the low-power device and the peer device is still maintained. In this case, a heartbeat data packet can be sent directly to the peer device based on a preset heartbeat mechanism (e.g., a heartbeat data packet is sent every 60 seconds) to continue maintaining the wireless communication connection with the peer device.
[0082] S140. After performing the first communication operation, determine whether the wireless communication connection status with the peer device is successful.
[0083] If the wireless communication connection with the peer device is confirmed to be successful, then subsequent wireless communication with the peer device will proceed normally. Since this part is not the focus of this embodiment of the invention, it will not be described further.
[0084] If it is determined that the wireless communication connection with the peer device is in a failed state, then proceed to step S150.
[0085] In this embodiment of the invention, the state in which a low-power device and a peer device are temporarily unable to establish a wireless communication connection is referred to as a failure state. Specifically, this includes situations such as a disconnection of the wireless communication connection and failure to send data packets to the peer device based on the wireless communication connection.
[0086] In the specific implementation process, the wireless communication connection status between the low-power device and the peer device can be detected according to the actual situation. For example, after performing the first communication operation, at least one wireless communication signal between the low-power device and the peer device is collected, and at least one actual RSSI is determined based on the collected wireless communication signal. If the actual RSSI determined after performing the first communication operation meets the RSSI failure state judgment condition (e.g., the preset number of actual RSSIs determined after performing the first communication operation are all less than a preset fourth threshold, or the average value of the preset number of actual RSSIs determined after performing the first communication operation is less than a preset average value threshold, etc.), then the wireless communication connection status between the low-power device and the peer device is determined to be a failure state; conversely, if the actual RSSI determined after performing the first communication operation does not meet the RSSI failure state judgment condition, then the wireless communication connection between the low-power device and the peer device is determined to be a success state. For example, if a timeout mechanism is used for the wireless communication connection between a low-power device and a peer device, then if the duration from the last time the low-power device and the peer device exchanged data packets (including the low-power device sending data packets to the peer device or the low-power device receiving data packets sent by the peer device) to the current time is greater than the timeout threshold of the timeout mechanism, then the wireless communication connection between the low-power device and the peer device is determined to be in a failed state; if the duration from the last time the low-power device and the peer device exchanged data packets to the current time is less than or equal to the timeout threshold of the timeout mechanism, then the wireless communication connection between the low-power device and the peer device is determined to be in a successful state. For example, the wireless communication connection between the low-power device and the peer device uses an acknowledgment (ACK) frame mechanism. The first communication operation is to send a data packet to the peer device. If no response data packet is received from the peer device within a preset time after the first communication operation, the wireless communication connection between the low-power device and the peer device is determined to be in a failed state. Conversely, if a response data packet is received from the peer device within a preset time after the first communication operation, the wireless communication connection between the low-power device and the peer device is determined to be in a successful state.
[0087] Alternatively, if the first communication operation is determined and executed using the embodiments described above, the success of the wireless communication connection with the peer device can be determined in the following way:
[0088] If the first communication operation is to send a reconnection data packet to the peer device to re-establish the wireless communication connection, then if a first response data packet sent by the peer device indicating successful re-establishment of the wireless communication connection is received within a preset second time period, the wireless communication connection status with the peer device is determined to be successful; if no first response data packet is received from the peer device within the preset second time period, the wireless communication connection status with the peer device is determined to be failed.
[0089] If the first communication operation is to send a probe data packet to the peer device to probe the wireless communication connection status, then if a second response data packet sent by the peer device indicating that the current wireless communication connection status with the peer device is successful is received within a preset third time period, the wireless communication connection status with the peer device is determined to be successful; if no second response data packet is received from the peer device within the preset third time period, or if a third response data packet sent by the peer device indicating that the current wireless communication connection status with the peer device is failed is received within the preset third time period, the wireless communication connection status with the peer device is determined to be failed.
[0090] If the first communication operation is to send a heartbeat data packet to the peer device according to the preset heartbeat mechanism, then the wireless communication connection status with the peer device is directly determined to be successful.
[0091] S150. Determine the backoff duration based on the target RSSI and the probability of at least one recently determined successful connection, control the self-sleep backoff duration, and then perform the second communication operation.
[0092] In practice, the backoff duration can be determined based on the target RSSI and the probability of a recently determined successful connection, or it can be determined based on the target RSSI and the probabilities of multiple recently determined successful connections.
[0093] In the specific implementation process, the interrelationship between the target RSSI, the connection success probability and the backoff time can be pre-defined to determine the backoff time.
[0094] As an optional implementation, when determining the interrelationship among the target RSSI, connection success probability, and backoff duration, the interrelationship among the three satisfies:
[0095] If the average of the recently determined third number of successful connection probabilities remains unchanged, then the target RSSI and the backoff duration satisfy a monotonically non-increasing function relationship.
[0096] If the target RSSI remains unchanged, the average of the most recently determined third number of connection success probabilities and the backoff time satisfy a monotonically non-increasing function relationship.
[0097] Optionally, the retreat time T can be determined as follows:
[0098]
[0099] in, For the target RSSI, μ P The average of the most recently determined preset third number of successful connection probabilities, where w1, w2, and b0 are preset parameters, w1 < 0, w2 < 0, and T max An upper limit is preset for the retreat time, and the retreat time T is not less than 0.
[0100] As another optional implementation, the backoff time T is determined as follows:
[0101]
[0102] T1 > T2 > T3
[0103] in, For the target RSSI, μ P Let k1, k2, b1, b2, and λ be the average of the recently determined preset third number of successful connection probabilities. min , λ max Here are the preset parameters: R1 and R2 are preset RSSI thresholds, and T1, T2, and T3 are preset duration values, all of which are not less than 0. Preferably, k1 < 0 and k2 < 0. For example, preferably, R1 = -80dBm, R2 = -75dBm, T1 = 30s, T2 = 10s, T3 = 0, k1 = -0.1, b1 = -7, k2 = -2, b2 = 2, λ min =0.3, λ max =3, so that in the extreme case of a sudden drop of 20dBm in actual RSSI, the backoff time can be determined and sleep can be entered within microseconds. After the second communication operation is performed, the average time for the wireless communication connection with the peer device to be restored to a successful state can also be shortened from 8.2s in the existing technology to about 1.5s, reducing power consumption waste.
[0104] Alternatively, a machine learning model can be used to learn the interrelationship among the target RSSI, connection success probability, and backoff duration. The target RSSI and connection success probability can be used as training sample features, and the backoff duration can be used as the training sample label to train the machine learning model. The backoff duration can then be determined based on the trained machine learning model. The machine learning model can be a linear regression model, decision tree model, random forest model, neural network model, etc. This embodiment of the invention does not impose further limitations.
[0105] Furthermore, the second communication operation can specifically take the following implementation methods, including but not limited to:
[0106] Implementation Method 1: The second communication operation is the same as the first communication operation. That is, after the low-power device determines and executes the first communication operation corresponding to the target RSSI, it sleeps for a backoff period because it determines that the wireless communication connection with the peer device is in a failed state, and then retryes the first communication operation after waking up. For example, after the low-power device determines that the first communication operation corresponding to the target RSSI is to send a probe data packet to the peer device to detect the wireless communication connection status and executes it, and then determines that the wireless communication connection with the peer device is in a failed state, it sleeps for a backoff period and then sends the probe data packet to the peer device to detect the wireless communication connection status again after waking up. This avoids misjudgment due to accidental factors by retrying multiple times.
[0107] Implementation Method 2: The second communication operation is a communication operation determined based on the first communication operation, and the second communication operation is a different communication operation from the first communication operation. For example, the first communication operation includes sending a reconnection data packet to the peer device for re-establishing the wireless communication connection and sending a probe data packet to the peer device for probing the wireless communication connection status. When the first communication operation is sending a reconnection data packet to the peer device for re-establishing the wireless communication connection, the second communication operation is sending a probe data packet to the peer device for probing the wireless communication connection status; when the first communication operation is sending a probe data packet to the peer device for probing the wireless communication connection status, the second communication operation is sending a reconnection data packet to the peer device for re-establishing the wireless communication connection.
[0108] Implementation Method 3: The second communication operation is a preset communication operation. That is, regardless of what the first communication operation is, after the low-power device determines and executes the first communication operation corresponding to the target RSSI, it will sleep for a backoff period due to the determination that the wireless communication connection with the peer device is in a failed state. After waking up, it will execute the same preset second communication operation. For example, if the second communication operation is to send a probe data packet to the peer device to detect the wireless communication connection status, then regardless of whether the low-power device determines that the first communication operation corresponding to the target RSSI is to send a probe data packet to the peer device to detect the wireless communication connection status or to send a reconnection data packet to the peer device to re-establish the wireless communication connection, after executing the first communication operation, if it determines that the wireless communication connection with the peer device is in a failed state, it will sleep for a backoff period and, after waking up, will again send a probe data packet to the peer device to detect the wireless communication connection status.
[0109] Implementation Method 4: The second communication operation is the same as the first communication operation determination method. That is, the second communication operation is determined as follows: after waking up from a controlled sleep / backoff period, the system periodically collects wireless communication signals with the peer device; the actual RSSI is determined based on at least one recently collected wireless communication signal; the target RSSI is determined based on at least one recently determined actual RSSI and at least one recently determined connection success probability; and the second communication operation corresponding to the target RSSI is determined based on a preset correspondence between RSSI and communication operations. In this implementation method, the specific implementation process of the second communication operation determination method is consistent with that of the first communication operation determination method, and therefore can be implemented by referring to the relevant content of the first communication operation determination method. This will not be repeated here.
[0110] The low-power device wireless communication method provided in this invention predicts the connection success probability based on the recently measured actual RSSI, determines the target RSSI based on the recently measured actual RSSI and the predicted connection success probability, determines and executes a first communication operation based on the target RSSI, and after determining that the wireless communication connection with the peer device has failed during the execution of the first communication operation, dynamically determines the backoff duration of the low-power device's sleep mode based on the target RSSI and the connection success probability, and re-wakes up after the backoff duration to attempt to execute a second communication operation again to try to establish a wireless communication connection with the peer device. Therefore, when the wireless communication connection between the low-power device and the peer device fails and needs to be restored as soon as possible, the low-power device can dynamically sleep during periods when it is predicted that a wireless communication connection with the peer device is unlikely, thereby reducing power consumption and extending battery life. Compared with a mechanism that uses a fixed backoff duration for sleep mode, this invention can dynamically adjust the sleep backoff duration according to the actual situation when the wireless communication connection between the low-power device and the peer device fails and needs to be restored as soon as possible, reducing the number of invalid wake-ups and further reducing power consumption. Through experiments, compared with the technical solution that uses a fixed backoff duration sleep mechanism, the invalid wake-up rate of the low-power device (i.e., the ratio of the number of times the wireless communication connection with the peer device is still in a failed state after the second communication operation is performed to the number of times the second communication operation is performed) in the embodiments of the present invention is reduced from 60% to 18%, and the battery life of the low-power device is extended by 3 times.
[0111] Alternatively, after step S150, the method further includes:
[0112] S160. After performing the second communication operation, determine whether the wireless communication connection status with the peer device is successful.
[0113] If the wireless communication connection with the peer device is confirmed to be successful, then subsequent wireless communication with the peer device will proceed normally. Since this part is not the focus of this embodiment of the invention, it will not be described further.
[0114] If it is determined that the wireless communication connection with the peer device is in a failed state, then return to step S110.
[0115] In specific implementation, the second communication operation can be the communication operation of Implementation Method 1, Implementation Method 2, and Implementation Method 3 described above.
[0116] In this way, when a low-power device fails to establish a wireless communication connection with the peer device after multiple communication operations, the actual RSSI is remeasured. Based on the remeasured actual RSSI and the predicted connection success probability, the target RSSI is determined. The first communication operation is then determined and executed based on the target RSSI. This allows the low-power device to readjust the communication operations to be performed and the sleep backoff time according to the current situation. Under the premise that the wireless communication connection between the low-power device and the peer device is in a failed state and needs to be restored as soon as possible, power consumption is further reduced and battery life is extended.
[0117] Furthermore, the connection success probability involved in the above steps can be determined in an appropriate manner according to actual needs. For example, when the wireless communication signal environment in which the low-power device operates is relatively simple, the numerical relationship between RSSI and connection success probability can be pre-defined (e.g., the numerical relationship between the average RSSI and connection success probability, the numerical relationship between the average RSSI, RSSI variance, and connection success probability, etc.). This numerical relationship can then be used to determine the connection success probability corresponding to at least one recently determined actual RSSI. Alternatively, a machine learning model can be used to learn and train the relationship between RSSI and connection success probability. Based on the trained machine learning model, the corresponding connection success probability can be determined according to at least one recently determined actual RSSI. Machine learning models can employ linear regression models, decision tree models, random forest (RF) models, neural network models, etc.
[0118] Optionally, the probability of a successful connection is determined as follows:
[0119] The actual RSSI determined by multiple recently acquired wireless communication signals is input into a pre-trained gated recurrent neural network (GRNN) model in chronological order to obtain the connection success probability output by the GRNN model.
[0120] Among them, the gated recurrent neural network is trained by using a sequence of multiple RSSIs arranged in chronological order as the training sample features and the connection success probability as the training sample label.
[0121] In practical implementation, the GRNN model can be implemented using models such as Gated Recurrent Unit (GRU) and Long Short-Term Memory (LSTM). Considering that the embodiments of this invention are applied to low-power devices, some low-power devices use hardware with low computing performance to achieve lower power consumption and cost, making it difficult to run machine learning models with high computing power requirements. Optionally, the embodiments of this invention propose to use a novel GRNN model architecture to reduce the performance requirements of low-power devices.
[0122] Specifically, the GRNN model proposed in this embodiment of the invention is a model obtained by further improving and simplifying the structure of the standard GRU model, which can be called a simplified GRU model or a single-update-gate GRNN model. Specifically, the specific structure of the model includes an input layer, an update gate layer, and an output layer.
[0123] in:
[0124] The input layer receives RSSI sequences arranged in chronological order. During model training, the input layer receives RSSI sequences that serve as features of the training samples; during the inference phase after model training is complete, the input layer receives actual RSSI sequences that serve as features of the inference samples, the actual RSSI sequences being composed of multiple recently determined actual RSSI sequences arranged in chronological order.
[0125] In the specific implementation process, before inputting the actual RSSI sequence into the input layer, data preprocessing operations such as filtering and numerical normalization can be performed on the RSSI sequence.
[0126] Numerical normalization can employ min-max normalization, Z-score normalization, exponential normalization, etc., and this embodiment of the invention does not impose further limitations. For example, the RSSI sequence can be normalized using the following min-max normalization formula:
[0127]
[0128] Among them, X norm X represents the normalized data, and X represents the original data before normalization. min X is the minimum value of the original data. max This represents the maximum value of the original data.
[0129] Normalizing the received RSSI sequence can eliminate dimensional differences and facilitate subsequent processing.
[0130] Filtering can employ sliding window filtering methods such as mean filtering and median filtering, which are not limited in this embodiment of the invention. Since the actual RSSI may exhibit short-term fluctuations due to multipath effects, environmental interference, etc., sliding window filtering can remove high-frequency noise (e.g., instantaneous drops or extreme values in the actual RSSI) while retaining trend information (e.g., a weak or strong trend in the actual RSSI), resulting in a smooth actual RSSI sequence. For the scenario in this embodiment of the invention where the probability of successful connection is predicted based on the actual RSSI sequence, the preferred filtering window width is 5.
[0131] The update gate layer is used to process the RSSI sequence received by the input layer in a time-step order in a cyclic manner to determine the hidden state corresponding to each time step.
[0132] Specifically, for any given time step, the hidden state corresponding to that time step is determined based on a preceding state preservation factor and a candidate state integration factor. The preceding state preservation factor is the product of the update gate value and the hidden state corresponding to the previous time step. The candidate state integration factor is the product of the update gate complementarity coefficient and the candidate state of that time step. The sum of the update gate complementarity coefficient and the update gate value is a preset value. The preceding state preservation factor is determined based on the feature corresponding to that time step and the hidden state corresponding to the previous time step.
[0133] Specifically, for any time step t, the hidden state h corresponding to time step t t The following relationship must be satisfied:
[0134]
[0135] Among them, Z t To update the gate value, W z To update the gate weight matrix, x t b represents the feature corresponding to time step t in the sequence features. z To update the gate bias term, For the candidate state corresponding to time step t, W h Let b be the candidate state weight matrix. h Z represents the candidate state bias term, and ⊙ represents element-wise matrix multiplication. t ⊙h t-1 Preserve factors for the preceding state. For candidate state integration factors, (1-Z t ) is used to update the gate complementarity coefficients.
[0136] For input X, the sigmoid function satisfies:
[0137]
[0138] In specific implementation, for scenarios where the probability of successful connection is predicted based on the actual RSSI sequence in this embodiment of the invention, it is preferable to set two hidden units for updating the gate layer. Then, [h t-1 ,x t [The hidden state h is a 2D representation of the previous time step t-1.] t-1 and the feature x corresponding to the current time step t in 1D t The concatenated 3D vector. The 2×3 dimension update gate weight matrix W. z Each row corresponds to a hidden unit, and the input and historical state are fused using three weights. The gate Z is then updated. t This is a 2D vector used to control the state update ratio of the two hidden units, and the feature x containing new information corresponds to the current time step t. t The larger the value, the more we update the gate Z. t The larger the value, the better. The 2×1 dimensional candidate state weight matrix W. h The feature x corresponding to the current time step t in 1D t Projecting into 2D space, each hidden unit corresponds to one weight parameter. The 2D candidate state bias term b... h A bias is attached to each hidden unit to adjust the activation threshold. A hyperbolic tangent function (tanh) is used to generate candidate states to fuse nonlinear features. Finally, the historical hidden states (h) are dynamically adjusted via a 2D update gate. t-1 With new candidate status We can use weights to achieve time series modeling.
[0139] The output layer is used to determine the output label based on the hidden state of the last time step. In this embodiment of the invention, the output label is the probability of a successful connection.
[0140] Specifically, output tags The following relationship must be satisfied:
[0141]
[0142] That is, the probability P of a successful connection satisfies the following relationship:
[0143]
[0144] Where W0 is the output weight. For the last time step t last The hidden state, b0 is the output bias term.
[0145] The output weight matrix W0 is used to map the multidimensional hidden states to the 1-dimensional output. The output bias term b0 is used to adjust the activation threshold of the output layer.
[0146] In the specific implementation process, during the model inference stage, after determining all the actual RSSIs that need to be input into the GRNN model, the actual RSSIs can be arranged into an actual RSSI sequence according to time order and input into the GRNN model; alternatively, during the process of determining multiple actual RSSIs sequentially based on the most recently collected wireless communication signals, each actual RSSI can be input into the GRNN model until the number of actual RSSIs input into the GRNN model reaches the number of RSSIs required for the model to predict the connection success probability, at which point the input stops; the embodiments of the present invention do not impose too many limitations here.
[0147] In the problem of predicting connection success probability based on actual RSSI involved in the embodiments of the present invention, research has found that the reset gate structure of the standard GRU model involves about half of the model parameters, but the contribution of the reset gate structure to the accuracy of the final prediction of connection success probability is less than 3%. In addition, the update gate in the standard GRU model can also achieve the fusion of the hidden state of the previous time step and the candidate state of the current time step. Therefore, the embodiments of the present invention remove the reset gate structure and improve the update gate structure based on the standard GRU model within an acceptable accuracy range to obtain the above-mentioned GRNN model, which significantly reduces the number of model parameters of the GRNN used to predict the connection success probability and reduces the hardware performance requirements of low-power devices.
[0148] Secondly, based on the same inventive concept, embodiments of the present invention also provide a low-power device, such as... Figure 2 As shown, it includes:
[0149] The signal acquisition module M1 is used to periodically acquire wireless communication signals between the device and the peer device.
[0150] Processing module M2 is used to determine a target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability; wherein the connection success probability is determined based on the actual RSSI and the connection success probability is determined periodically.
[0151] The decision execution module M3 is used to determine and execute the first communication operation corresponding to the target RSSI based on the preset correspondence between RSSI and communication operation; after executing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failed state, the backoff time is determined based on the target RSSI and the probability of at least one recently determined successful connection; and after controlling its own sleep backoff time, the second communication operation is executed.
[0152] Optionally, the probability of a successful connection is determined in the following manner:
[0153] The recently determined actual RSSIs are input into a pre-trained gated recurrent neural network (GRNN) model in chronological order to obtain the connection success probability output by the GRNN model.
[0154] Alternatively, the GRNN model may include an input layer, an update gate layer, and an output layer;
[0155] The step of inputting multiple recently determined actual RSSIs into a pre-trained gated recurrent neural network (GRNN) model in chronological order to obtain the connection success probability output by the GRNN model includes:
[0156] The input layer receives the actual RSSI sequence, wherein the actual RSSI sequence is composed of multiple actual RSSIs determined by the most recently acquired wireless communication signal in chronological order;
[0157] The actual RSSI sequence received by the input layer is processed sequentially in time step order by the update gate layer to determine the hidden state corresponding to each time step. For any time step, the hidden state corresponding to the time step is determined according to the previous state retention factor and the candidate state integration factor. The previous state retention factor is the product of the update gate value and the hidden state corresponding to the previous time step. The candidate state integration factor is the product of the update gate complement coefficient and the candidate state of the time step. The sum of the update gate complement coefficient and the update gate value is a preset value. The previous state retention factor is determined according to the feature corresponding to the time step and the hidden state corresponding to the previous time step.
[0158] The output layer determines the probability of a successful connection based on the hidden state of the last time step.
[0159] Optionally, determining the first wireless communication operation corresponding to the target RSSI based on a preset correspondence between RSSI and communication operations includes:
[0160] If the target RSSI is less than the first threshold, a reconnection data packet for re-establishing the wireless communication connection is sent to the peer device;
[0161] If the target RSSI is greater than or equal to the first threshold and less than the second threshold, a probe data packet for detecting the wireless communication connection status is sent to the peer device.
[0162] If the target RSSI is greater than or equal to the second threshold, a heartbeat data packet is sent to the peer device according to the preset heartbeat mechanism.
[0163] As an optional implementation, determining the target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability includes:
[0164] The target RSSI is determined based on at least one actual RSSI determined from the most recently acquired wireless communication signals, at least one recently determined connection success probability, and the cumulative number of times the wireless communication connection with the peer device has failed within a set time period.
[0165] As another optional implementation, determining the target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability includes:
[0166] The target RSSI is determined based on at least one actual RSSI determined from the most recently acquired wireless communication signals, at least one recently determined connection success probability, and the number of consecutive times the wireless communication connection with the peer device has failed recently.
[0167] Alternatively, if the number of times the wireless communication connection with the peer device fails remains unchanged, and the average value of the most recently determined preset first number of actual RSSIs remains unchanged, then the variance of the most recently determined preset second number of connection success probabilities satisfies a monotonically increasing relationship with the target RSSI.
[0168] If the number of times the wireless communication connection with the peer device fails remains unchanged, and the variance of the recently determined preset second number of successful connection probabilities remains unchanged, then the average value of the recently determined preset first number of actual RSSIs satisfies a monotonically increasing relationship with the target RSSI.
[0169] If the variance of the recently determined second number of successful connection probabilities remains unchanged, and the average value of the recently determined first number of actual RSSIs remains unchanged, then the number of times the wireless communication connection with the peer device is in a failed state satisfies a monotonically decreasing relationship with the target RSSI.
[0170] The number of times the wireless communication connection with the peer device failed is the cumulative number of times the wireless communication connection with the peer device failed within a set time period, or the number of times the wireless communication connection with the peer device failed is the most recent consecutive number of times the wireless communication connection with the peer device failed.
[0171] Alternatively, the target RSSI can be determined as follows:
[0172]
[0173] in, For the target RSSI, μ RSSI σ is the average of the first preset number of actual RSSIs, which is the most recently determined value. P The variance of the recently determined second preset number of successful connection probabilities is denoted as N, where N is the number of times the wireless communication connection with the peer device has failed, and α, β, and γ are preset parameters.
[0174] Optionally, determining the backoff duration based on the target RSSI and the probability of at least one recently determined connection success includes:
[0175] The backoff duration is determined based on the target RSSI and the average of the recently determined multiple connection success probabilities;
[0176] If the average value of the recently determined third number of successful connection probabilities remains unchanged, then the target RSSI and the backoff duration satisfy a monotonically non-increasing function relationship.
[0177] If the target RSSI remains unchanged, the average of the most recently determined third number of connection success probabilities and the backoff time satisfy a monotonically non-increasing function relationship.
[0178] Optionally, the retreat time T can be determined as follows:
[0179]
[0180] T1 > T2 > T3
[0181] in, For the target RSSI, μ P Let k1, k2, b1, b2, and λ be the average of the recently determined preset third number of successful connection probabilities. min , λ max These are preset parameters, where R1 and R2 are preset RSSI thresholds, and T1, T2, and T3 are preset duration values.
[0182] Optionally, the second communication operation is the same as the first communication operation;
[0183] The decision execution module is further configured to: determine that the wireless communication connection with the peer device after the last execution of the second communication operation is in a failed state before determining the target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability.
[0184] It should be understood that the device embodiments described above are merely illustrative. For example, the division of modules is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces, or indirect coupling or communication connection between devices or modules, and may be electrical, mechanical, or other forms.
[0185] The modules described as separate components may or may not be physically separate. The components shown as modules may or may not be physical modules; that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.
[0186] Furthermore, the functional modules in the various embodiments of the present invention can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can be stored in a computer-readable storage medium.
[0187] For example, the low-power device can be divided into a signal acquisition module M1, a processing module M2, a decision module M3-1, and an execution module M3-2 according to the needs of functional module development. The signal acquisition module M1 and processing module M2 are consistent with those described above. The decision module M3-1 is used to determine the first communication operation corresponding to the target RSSI based on a preset correspondence between RSSI and communication operations. The execution module M3-2 is used to execute the first communication operation; after executing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failed state, then a backoff time is determined based on the target RSSI and the probability of at least one recently determined successful connection; after controlling its own sleep backoff time, a second communication operation is executed. This embodiment of the invention does not impose further limitations here.
[0188] Since the specific methods by which each module of the low-power device performs its operations have been described in detail in the corresponding low-power device wireless communication methods, they will not be repeated here.
[0189] Based on the same inventive concept, embodiments of this application also provide a low-power device, such as... Figure 3As shown, it includes: a processor 110 and a memory 120 for storing executable instructions of the processor 110; wherein the processor 110 is configured to execute the instructions to implement the low-power device wireless communication method.
[0190] In specific implementations, the device may vary significantly due to differences in configuration or performance. It may include one or more processors 110, memory 120, and computer-readable storage media 130. The memory 120 and / or computer-readable storage media 130 may contain one or more application programs 131 or data 132. The memory 120 and / or computer-readable storage media 130 may also contain one or more operating systems 133, such as Windows, Mac OS, Linux, iOS, Android, Unix, FreeBSD, etc. The memory 120 and computer-readable storage media 130 may be temporary or persistent storage. The application program 131 may include one or more of the aforementioned modules (…). Figure 3 (Not shown in the image), each module may include a series of instruction operations. Furthermore, the processor 110 may be configured to communicate with the computer-readable storage medium 130 and execute a series of instruction operations in the computer-readable storage medium 130 on the device. The device may also include one or more power supplies (…). Figure 3 (not shown in the image); one or more network interfaces 140, including wired network interface 141 and / or wireless network interface 142; one or more input / output interfaces 143.
[0191] Based on the same inventive concept, embodiments of the present invention provide a computer-readable storage medium storing computer program code, which, when executed on a computer, enables the computer to implement the low-power device wireless communication method.
[0192] The computer-readable storage medium can be any available medium that a computer can store, or a data storage device such as a server or data center that integrates one or more available media. The available medium can be magnetic media (e.g., floppy disks, hard disks, USB flash drives, magnetic tapes, read-only memory (ROM), random access memory (RAM)), optical media (e.g., high-density digital video discs (DVDs), video compact discs (VCDs)), or semiconductor media (e.g., solid-state drives (SSDs)).
[0193] Since the principle of the computer-readable storage medium in solving the problem is the same as that of the low-power device wireless communication method described above, the implementation of the computer-readable storage medium can be found in the implementation of the method, and the repeated parts will not be described again.
[0194] Based on the same inventive concept, this application also provides a computer program product, which includes computer program code that, when executed on a computer, enables the computer to implement the low-power device wireless communication method.
[0195] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions may be transmitted from a website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means.
[0196] Since the principle by which the above computer program product solves the problem is the same as the low-power device wireless communication method described above, the implementation of the above computer program product can refer to the implementation of the method, and the repeated parts will not be described again.
[0197] The low-power device wireless communication method and related hardware provided in this invention predict the connection success probability based on the recently measured actual RSSI, and determine the target RSSI based on the recently measured actual RSSI and the predicted connection success probability. A first communication operation is determined and executed based on the target RSSI. After executing the first communication operation and determining that the wireless communication connection with the peer device is in a failed state, the backoff time for the low-power device to sleep is dynamically determined based on the target RSSI and the connection success probability. After the backoff time, the device is reawakened to attempt to execute a second communication operation again to try to establish a wireless communication connection with the peer device. Therefore, when the wireless communication connection between the low-power device and the peer device is in a failed state and needs to be restored as soon as possible, the low-power device can dynamically sleep during periods when it is predicted that a wireless communication connection with the peer device is unlikely to be established, thereby reducing power consumption and extending battery life.
[0198] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0199] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0200] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0201] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0202] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A low-power device wireless communication method, characterized in that, include: Periodically collect wireless communication signals between the device and the peer device; The target RSSI is determined based on at least one actual RSSI determined from recently acquired wireless communication signals and at least one recently determined connection success probability; wherein the connection success probability is determined based on the actual RSSI and is determined periodically. Based on the preset correspondence between RSSI and communication operations, determine and execute the first communication operation corresponding to the target RSSI; After performing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failed state, the backoff time is determined based on the target RSSI and the probability of at least one recently determined connection success. After controlling its own hibernation and retreat duration, it performs the second communication operation.
2. The method as described in claim 1, characterized in that, The probability of a successful connection is determined in the following way: The recently determined actual RSSIs are input into a pre-trained gated recurrent neural network (GRNN) model in chronological order to obtain the connection success probability output by the GRNN model.
3. The method as described in claim 2, characterized in that, The GRNN model includes an input layer, an update gate layer, and an output layer; The step of inputting multiple recently determined actual RSSIs into a pre-trained gated recurrent neural network (GRNN) model in chronological order to obtain the connection success probability output by the GRNN model includes: The input layer receives the actual RSSI sequence, wherein the actual RSSI sequence is composed of multiple actual RSSIs determined by the most recently acquired wireless communication signal in chronological order; The actual RSSI sequence received by the input layer is processed sequentially in time step order by the update gate layer to determine the hidden state corresponding to each time step. For any time step, the hidden state corresponding to the time step is determined according to the previous state retention factor and the candidate state integration factor. The previous state retention factor is the product of the update gate value and the hidden state corresponding to the previous time step. The candidate state integration factor is the product of the update gate complement coefficient and the candidate state of the time step. The sum of the update gate complement coefficient and the update gate value is a preset value. The previous state retention factor is determined according to the feature corresponding to the time step and the hidden state corresponding to the previous time step. The output layer determines the probability of a successful connection based on the hidden state of the last time step.
4. The method as described in claim 1, characterized in that, The step of determining and executing the first wireless communication operation corresponding to the target RSSI based on a preset correspondence between RSSI and communication operations includes: If the target RSSI is less than the first threshold, a reconnection data packet for re-establishing the wireless communication connection is sent to the peer device; If the target RSSI is greater than or equal to the first threshold and less than the second threshold, a probe data packet for detecting the wireless communication connection status is sent to the peer device. If the target RSSI is greater than or equal to the second threshold, a heartbeat data packet is sent to the peer device according to the preset heartbeat mechanism.
5. The method as described in claim 1, characterized in that, Determining the target RSSI based on at least one actual RSSI determined from recently acquired wireless communication signals and at least one recently determined connection success probability includes: The target RSSI is determined based on at least one actual RSSI determined from the most recently acquired wireless communication signals, at least one recently determined connection success probability, and the cumulative number of times the wireless communication connection with the peer device has failed within a set time period. Alternatively, the target RSSI can be determined based on at least one actual RSSI determined from the most recently acquired wireless communication signals, at least one recently determined connection success probability, and the number of consecutive times the wireless communication connection with the peer device has failed recently.
6. The method as described in claim 5, characterized in that, If the number of times the wireless communication connection with the peer device fails remains unchanged, and the average value of the most recently determined preset first number of actual RSSIs remains unchanged, then the variance of the most recently determined preset second number of connection success probabilities and the target RSSI satisfy a monotonically increasing relationship. If the number of times the wireless communication connection with the peer device fails remains unchanged, and the variance of the recently determined preset second number of successful connection probabilities remains unchanged, then the average value of the recently determined preset first number of actual RSSIs satisfies a monotonically increasing relationship with the target RSSI. If the variance of the recently determined second number of successful connection probabilities remains unchanged, and the average value of the recently determined first number of actual RSSIs remains unchanged, then the number of times the wireless communication connection with the peer device is in a failed state satisfies a monotonically decreasing relationship with the target RSSI. The number of times the wireless communication connection with the peer device failed is the cumulative number of times the wireless communication connection with the peer device failed within a set time period, or the number of times the wireless communication connection with the peer device failed is the most recent consecutive number of times the wireless communication connection with the peer device failed.
7. The method as described in claim 5, characterized in that, The target RSSI is determined as follows: in, For the target RSSI, μ RSSI σ is the average of the first preset number of actual RSSIs, which is the most recently determined value. P The variance of the recently determined second preset number of successful connection probabilities is denoted as N, where N is the number of times the wireless communication connection with the peer device has failed, and α, β, and γ are preset parameters.
8. The method as described in claim 1, characterized in that, The step of determining the backoff duration based on the target RSSI and the probability of at least one recently determined connection success includes: The backoff duration is determined based on the target RSSI and the average of the recently determined multiple connection success probabilities; If the average value of the recently determined third number of successful connection probabilities remains unchanged, then the target RSSI and the backoff duration satisfy a monotonically non-increasing function relationship. If the target RSSI remains unchanged, the average of the most recently determined third number of connection success probabilities and the backoff time satisfy a monotonically non-increasing function relationship.
9. The method as described in claim 1, characterized in that, The retreat duration T is determined as follows: T1 > T2 > T3 in, For the target RSSI, μ P Let k1, k2, b1, b2, and λ be the average of the recently determined preset third number of successful connection probabilities. min , λ max These are preset parameters, where R1 and R2 are preset RSSI thresholds, and T1, T2, and T3 are preset duration values.
10. The method according to any one of claims 1-9, characterized in that, The second communication operation is the same as the first communication operation; Before determining the target RSSI based on at least one actual RSSI determined based on the most recently acquired wireless communication signal and at least one recently determined connection success probability, the method further includes: It was determined that the wireless communication connection with the peer device failed after the last execution of the second communication operation.
11. A low-power device, characterized in that, include: The signal acquisition module is used to periodically acquire wireless communication signals between the device and the peer device. A processing module is configured to determine a target RSSI based on at least one actual RSSI determined based on recently acquired wireless communication signals and at least one recently determined connection success probability; wherein the connection success probability is determined based on the actual RSSI and the connection success probability is determined periodically. The decision execution module is used to determine and execute the first communication operation corresponding to the target RSSI based on the preset correspondence between RSSI and communication operations. After performing the first communication operation, if it is determined that the wireless communication connection with the peer device is in a failed state, the backoff duration is determined based on the target RSSI and the probability of at least one recently determined successful connection; after controlling its own sleep backoff duration, the second communication operation is performed.
12. A low-power device, characterized in that, include: A processor and a memory for storing processor-executable instructions; The processor is configured to execute the instructions to implement the low-power device wireless communication method as described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code that, when executed on a computer, causes the computer to perform the low-power device wireless communication method as described in any one of claims 1-10.
14. A computer program product, characterized in that, The computer program product includes: computer program code, which, when run on a computer, causes the computer to perform the low-power device wireless communication method as described in any one of claims 1-10.