Wireless sensing method, device, electronic device and storage medium
By combining smoothing of Wi-Fi sensing algorithm results with state switching indicator markers, the problem of abnormal sensing results caused by external environmental interference is solved, thus improving the accuracy of wireless sensing.
Patent Information
- Application Number
- CN202411412548.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-10
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2044-10-10
AI Technical Summary
In existing Wi-Fi presence perception solutions, algorithm results are easily affected by external environmental interference, resulting in abnormal and misjudgment of perception results.
By smoothing the results of the wireless sensing algorithm and combining them with state switching indicator marks, the impact of external environmental interference is reduced and the accuracy of the sensing results is improved.
It effectively reduces the impact of external environmental interference on the perception results and improves the accuracy of wireless perception results.
Smart Images

Figure CN119300073B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of network technology, and in particular to a wireless sensing method, apparatus, electronic device, and storage medium. Background Technology
[0002] Wi-Fi sensing is a technology that uses Wi-Fi signals to perform sensing tasks. Wi-Fi presence sensing is a Wi-Fi sensing technology that uses Wi-Fi signals to sense the presence of objects within a network environment. Current Wi-Fi presence sensing schemes use obtained Channel State Information (CSI) signals and other Wi-Fi signals to calculate an algorithmic result indicating the presence of objects. This algorithmic result is compared with a threshold to obtain the final sensing result, which has two states: an object is present, or an object is not present.
[0003] In the aforementioned Wi-Fi presence sensing schemes, the sensing results are all based on the current algorithm results. However, algorithm results are easily affected by the external environment, and occasional anomalies in the algorithm results can lead to anomalies in the sensing results, resulting in misjudgments. Summary of the Invention
[0004] The purpose of this application is to provide a wireless sensing method, apparatus, electronic device, and storage medium to reduce the impact of external environmental interference on sensing results and improve the accuracy of wireless sensing results. The specific technical solution is as follows:
[0005] In a first aspect, embodiments of this application provide a wireless sensing method, the method comprising:
[0006] Using the wireless signal at the current moment, determine the first algorithm result of wireless sensing at the current moment;
[0007] Using the current time and the first number of consecutive algorithm results before the current time, the first algorithm result is smoothed to obtain the first smoothing algorithm result;
[0008] Based on the result of the first algorithm or the result of the first smoothing algorithm, the first temporary sensing result at the current moment is determined, and the first temporary sensing result indicates the first state;
[0009] By comparing the results of the first smoothing algorithm and the second smoothing algorithm, a first state transition indicator flag is obtained at the current time. The second smoothing algorithm result is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm.
[0010] If the current moment and the third consecutive number of temporary sensing results before the current moment all indicate the first state, and the current moment and the third consecutive number of state switching indicator flags before the current moment all indicate switching to the first state, then the final sensing result at the current moment is determined to be the first state.
[0011] In some embodiments, the step of smoothing the first algorithm result using the current time and a first number of consecutive algorithm results prior to the current time to obtain a first smoothed algorithm result includes:
[0012] The first smoothing algorithm result is obtained by weighting the first number of consecutive algorithm results at the current time and before the current time.
[0013] In some embodiments, the sum of the weights corresponding to the first consecutive number of algorithm results is 1;
[0014] In the first consecutive number of algorithm results, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result.
[0015] In some embodiments, the step of determining the first temporary sensing result at the current moment based on the first algorithm result or the first smoothing algorithm result includes:
[0016] The result of the first algorithm is compared with a first perception threshold; if the result of the first algorithm is greater than the first perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first algorithm is less than or equal to the first perception threshold, the first temporary perception result indicates that an object does not exist; or,
[0017] The result of the first smoothing algorithm is compared with the second perception threshold; if the result of the first smoothing algorithm is greater than the second perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first smoothing algorithm is less than or equal to the second perception threshold, the first temporary perception result indicates that an object does not exist.
[0018] In some embodiments, the step of comparing the results of the first smoothing algorithm and the second smoothing algorithm to obtain the first state transition indicator flag at the current time includes:
[0019] Calculate the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm;
[0020] If the difference is greater than the first switching threshold, then the first state switching indicator flag at the current moment is determined to indicate a switch to the state of an existing object;
[0021] If the difference is less than the second switching threshold, then the first state switching indicator is determined to indicate a switch to a state where no object exists; the second switching threshold is less than the first switching threshold, and the sum of the first switching threshold and the second switching threshold is 0.
[0022] If the difference is less than or equal to the first switching threshold and the difference is greater than or equal to the second switching threshold, then the first state switching indicator is determined to be in an unswitched state.
[0023] In some embodiments, the method further comprises:
[0024] If the third consecutive number of temporary sensing results do not all indicate the first state, or / and the third consecutive number of state switching indicator flags do not all indicate switching to the first state, then the final sensing result is determined to indicate the second state, and the second state is the state indicated by the final sensing result at the previous moment.
[0025] In some embodiments, after determining the final perception result, the method further includes:
[0026] Clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary sensing result. The fourth algorithm result is the algorithm result with the earliest determined time among the first consecutive number of algorithm results. The second state switching indicator is the state switching indicator with the earliest determined time among the third consecutive number of state switching indicator indicators. The second temporary sensing result is the temporary sensing result with the earliest determined time among the third consecutive number of temporary sensing results.
[0027] Secondly, embodiments of this application provide a wireless sensing device, the device comprising:
[0028] The first determining module is used to determine the first algorithm result of wireless sensing at the current time using the wireless signal at the current time;
[0029] The smoothing module is used to smooth the first algorithm result by using the current time and a first number of consecutive algorithm results before the current time to obtain the first smoothed algorithm result.
[0030] The second determining module is used to determine the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm, wherein the state indicated by the first temporary sensing result is the first state.
[0031] The comparison module is used to compare the results of the first smoothing algorithm and the results of the second smoothing algorithm to obtain the first state switching indicator flag at the current time. The second smoothing algorithm result is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm.
[0032] The third determining module is used to determine that the final sensing result at the current moment indicates the first state if the current moment and the third consecutive number of temporary sensing results before the current moment all indicate the first state, and the current moment and the third consecutive number of state switching indicator flags before the current moment all indicate switching to the first state.
[0033] In some embodiments, the smoothing module is specifically used to perform weighted processing on a first number of consecutive algorithm results at the current time and before the current time to obtain a first smoothing algorithm result.
[0034] In some embodiments, the sum of the weights corresponding to the first consecutive number of algorithm results is 1; among the first consecutive number of algorithm results, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result.
[0035] In some embodiments, the second determining module is specifically used for:
[0036] The result of the first algorithm is compared with the first perception threshold; if the result of the first algorithm is greater than the first perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first algorithm is less than or equal to the first perception threshold, the first temporary perception result indicates that an object does not exist.
[0037] Alternatively, the result of the first smoothing algorithm is compared with the second perception threshold; if the result of the first smoothing algorithm is greater than the second perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first smoothing algorithm is less than or equal to the second perception threshold, the first temporary perception result indicates that an object does not exist.
[0038] In some embodiments, the comparison module is specifically used for:
[0039] Calculate the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm;
[0040] If the difference is greater than the first switching threshold, then the first state switching indicator flag at the current moment is determined to indicate a switch to the state of an existing object;
[0041] If the difference is less than the second switching threshold, then the first state switching indicator is determined to indicate a switch to a state where no object exists; the second switching threshold is less than the first switching threshold, and the sum of the first switching threshold and the second switching threshold is 0.
[0042] If the difference is less than or equal to the first switching threshold and the difference is greater than or equal to the second switching threshold, then the first state switching indicator is determined to be in an unswitched state.
[0043] In some embodiments, the third determining module is further configured to determine that the final sensing result indicates the second state if the third consecutive number of temporary sensing results do not all indicate the first state, or / and the third consecutive number of state switching indicator flags do not all indicate switching to the first state, and the second state is the state indicated by the final sensing result at the previous moment.
[0044] In some embodiments, the apparatus further includes:
[0045] The clearing module is used to clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary perception result after determining the final perception result. The fourth algorithm result is the algorithm result with the earliest determination time among the first consecutive number of algorithm results, the second state switching indicator is the state switching indicator with the earliest determination time among the third consecutive number of state switching indicator indicators, and the second temporary perception result is the temporary perception result with the earliest determination time among the third consecutive number of temporary perception results.
[0046] Thirdly, embodiments of this application provide an electronic device including a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, which in turn cause the processor to implement any of the wireless sensing methods provided in the first aspect.
[0047] Fourthly, embodiments of this application provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements any of the wireless sensing methods provided in the first aspect.
[0048] Fifthly, embodiments of this application provide a computer program product containing instructions that, when run on a computer, cause the computer to execute any of the wireless sensing methods provided in the first aspect.
[0049] Beneficial effects of the embodiments in this application:
[0050] In the technical solution provided in this application embodiment, after obtaining the algorithm result corresponding to wireless sensing, the algorithm result is smoothed to reduce the impact of accidental interference. After obtaining the smoothing algorithm result, the smoothing algorithm result at the current moment is compared with the smoothing algorithm result at a historical moment to determine whether the state indicated by the sensing result has switched from a state where an object exists to a state where an object does not exist, or from a state where an object does not exist to a state where an object exists; that is, a state switching indicator is determined. If multiple temporary sensing results all indicate a certain state, such as the first state, and multiple state switching indicator marks all indicate a switch to the first state, then the sensing result caused by excluding the influence of accidental interference is the first state, and the current final sensing result is determined to be the first state. By combining smoothing processing and the setting of state switching indicator marks, the impact of accidental interference is greatly reduced, the influence of external environmental interference on the sensing result is reduced, and the accuracy of wireless sensing results is improved.
[0051] Of course, implementing any product or method of this application does not necessarily require achieving all of the advantages described above at the same time. Attached Figure Description
[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other embodiments can be obtained based on these drawings.
[0053] Figure 1 This is a schematic diagram of a first flowchart of a wireless sensing method provided in an embodiment of this application;
[0054] Figure 2 This is a schematic diagram of the first implementation process of step S14 provided in an embodiment of this application;
[0055] Figure 3 This is a schematic diagram of a second implementation process for step S14 provided in an embodiment of this application;
[0056] Figure 4 This is a second flowchart illustrating the wireless sensing method provided in an embodiment of this application;
[0057] Figure 5 A schematic diagram of a third wireless sensing method provided in an embodiment of this application;
[0058] Figure 6 A schematic diagram of the structure of a wireless sensing device provided in an embodiment of this application;
[0059] Figure 7This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0060] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art based on this application are within the scope of protection of this application.
[0061] Wi-Fi sensing is a technology that utilizes Wi-Fi signals to perform sensing tasks. It leverages ubiquitous Wi-Fi infrastructure and signals to monitor and sense wireless network environments. Wi-Fi signals can reflect, penetrate, and bend across surfaces during propagation. Through appropriate signal processing, Wi-Fi signals can be used to sense the surrounding environment, detect obstacles, and interpret target movement. Currently, Wi-Fi sensing has been successfully applied in a wide range of residential, enterprise, indoor, and outdoor applications, such as gesture control, fall detection, tracking, imaging, activity recognition, and vital sign monitoring.
[0062] The IEEE Wi-Fi Sensing Working Group is responsible for standardizing Integrated Sensing and Communication (ISAC). The current IEEE 802.11bf standard specifies modifications to the IEEE 802.11 Physical Layer (PHY) and Media Access Control (MAC) layers, enhancing sensing capabilities and simplifying deployment. Notably, the IEEE 802.11bf revision only modifies the MAC layer for frequency bands below 7 GHz, while simultaneously modifying both the PHY and MAC layers for the 60 GHz band. By defining specific standard support, the reliability and efficiency of Wi-Fi sensing can be improved, promoting further innovation and enabling more applications.
[0063] Currently, the IEEE 802.11bf standard has not yet been finalized, but it has already specified the sensing methods and processes between access points (APs) and stations (STAs), and defined key technologies for the MAC and PHY layers. The industry has already begun exploring and researching sensing based on Wi-Fi 6 and Wi-Fi 7, hoping to bring Wi-Fi sensing services to market as soon as possible.
[0064] Current Wi-Fi sensing algorithms use acquired Wi-Fi signals, such as CSI signals, to calculate an algorithmic result indicating the presence of an object. This result is then compared with a threshold to obtain the final sensing result, which has two states: object present or object absent. The object can be a person, animal, robot, or other movable object.
[0065] This Wi-Fi sensing algorithm's performance is less than satisfactory under external interference. For example, in a glass-enclosed conference room, if no one is inside but people pass by outside, the Wi-Fi signal penetrates the glass and shines on the people outside, interfering with signal transmission inside the glass. The sensing device using the aforementioned Wi-Fi sensing algorithm may easily misjudge that someone is inside the glass room. As another example, when people are in a relatively remote Wi-Fi dead zone within the room, where the Wi-Fi signal cannot reach them, the sensing device using the aforementioned Wi-Fi sensing algorithm may easily misjudge that no one is in the room.
[0066] It is evident that the Wi-Fi presence sensing algorithm described above is susceptible to external environmental influences. When the algorithm results are occasionally abnormal, the sensing results will also be abnormal, leading to misjudgment.
[0067] To address the aforementioned problems, this application provides a wireless sensing method. This method can be applied to electronic devices capable of executing sensing algorithms, such as access controllers (ACs) or servers. For ease of understanding and explanation, the following description uses electronic devices as the execution subject and is not intended to be limiting. Figure 1 As shown, the above wireless sensing method includes the following steps:
[0068] Step S11: Using the wireless signal at the current moment, determine the first algorithm result of wireless sensing at the current moment;
[0069] Step S12: Using the current time and the first number of consecutive algorithm results before the current time, smooth the first algorithm result to obtain the first smoothed algorithm result;
[0070] Step S13: Determine the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm. The first temporary sensing result indicates the first state.
[0071] Step S14: Compare the results of the first smoothing algorithm and the second smoothing algorithm to obtain the first state switching indicator flag at the current time. The result of the second smoothing algorithm is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The results of the first smoothing algorithm and the second smoothing algorithm are obtained based on the same smoothing algorithm.
[0072] Step S15: If the current time and the third consecutive number of temporary sensing results before the current time all indicate the first state, and the current time and the third consecutive number of state switching indicator flags before the current time all indicate switching to the first state, then determine that the final sensing result at the current time indicates the first state.
[0073] In the technical solution provided in this application embodiment, after obtaining the algorithm result corresponding to wireless sensing, the algorithm result is smoothed to reduce the impact of accidental interference. After obtaining the smoothing algorithm result, the smoothing algorithm result at the current moment is compared with the smoothing algorithm result at a historical moment to determine whether the state indicated by the sensing result has switched from a state where an object exists to a state where an object does not exist, or from a state where an object does not exist to a state where an object exists; that is, a state switching indicator is determined. If multiple temporary sensing results all indicate a certain state, such as the first state, and multiple state switching indicator marks all indicate a switch to the first state, then the sensing result caused by excluding the influence of accidental interference is the first state, and the current final sensing result is determined to be the first state. By combining smoothing processing and the setting of state switching indicator marks, the impact of accidental interference is greatly reduced, the influence of external environmental interference on the sensing result is reduced, and the accuracy of wireless sensing results is improved.
[0074] In step S11 above, the access point (AP) in the wireless (Wi-Fi) network can collect wireless signals in real time, and these wireless signals can carry CSI data. The electronic device obtains the wireless signal from the AP. The electronic device is pre-configured with relevant Wi-Fi sensing algorithms, such as the WiBorder algorithm, the WiDetect algorithm, and the RoFi algorithm, etc., and there is no limitation on the specific Wi-Fi sensing algorithm.
[0075] After acquiring the wireless signal, the electronic device uses a pre-configured Wi-Fi sensing algorithm to process the data carried by the wireless signal and obtain the algorithm result of the wireless sensing at the current moment, namely the first algorithm result.
[0076] For example, at time t0, the electronic device obtains wireless signal 0 from the AP, processes wireless signal 0 using a pre-configured Wi-Fi sensing algorithm, and obtains algorithm result 0 at time t0; at time t1, the electronic device obtains wireless signal 1 from the AP, processes wireless signal 1 using a pre-configured Wi-Fi sensing algorithm, and obtains algorithm result 1 at time t1.
[0077] In step S12 above, the first quantity can be set according to actual needs. For example, the first quantity K can be 8, 9, 10, 15, 20, etc. To improve smoothness, the first quantity can be set to a larger value; to improve computational efficiency, the first quantity can be set to a smaller value.
[0078] After obtaining the first algorithm result at the current moment, the electronic device can obtain (a first number - 1) consecutive algorithm results from before the current moment. Combining these with the first algorithm result, a total of a first number of algorithm results are obtained. The electronic device uses these first number of algorithm results to smooth the first algorithm result at the current moment. The algorithm result obtained after smoothing is the first smoothed algorithm result at the current moment. These consecutive first number of algorithm results are obtained based on the same Wi-Fi sensing algorithm, such as the pre-configured Wi-Fi sensing algorithm mentioned above.
[0079] In this embodiment of the application, if there are fewer than (first number - 1) algorithm results before the current time, the electronic device can use all algorithm results before the current time and the first algorithm result to smooth the first algorithm result, and the algorithm result obtained after smoothing is used as the first smoothing algorithm result at the current time.
[0080] For example, if the first quantity is 10, then 10-1 = 9. At time t0, the electronic device obtains algorithm result 0. Before time t0, there were no algorithm results, so the electronic device can directly use algorithm result 0 as the smoothing algorithm result 0. At time t1, the electronic device obtains algorithm result 1. Before time t1, the electronic device obtained algorithm results including algorithm result 0, and the number of algorithm results is 1. Since 1 < 9, the electronic device uses algorithm results 0 to algorithm result 1 to smooth algorithm result 1, obtaining the smoothed algorithm result 1 at time t1.
[0081] At time t2, the electronic device obtains algorithm result 2. Before time t2, the electronic device obtained algorithm results including algorithm result 0 and algorithm result 1. The number of algorithm results is 2, and 2 < 9. Then, the electronic device uses algorithm results 0 to algorithm result 2 to smooth algorithm result 2 and obtains the smoothed algorithm result 2 at time t1.
[0082] Similarly, the electronic device obtains smoothing algorithm results 2 to 8 at times t2 to t8 respectively.
[0083] At time t9, the electronic device obtains algorithm result 9. Before time t9, the electronic device obtained algorithm results 0 to 8, totaling 9, where 9 = 9. The electronic device then uses algorithm results 0 to 9 to smooth algorithm result 9, obtaining the smoothed algorithm result 9 at time t9.
[0084] In t 10 At time t, the electronic device receives algorithm result 10. 10 Before time t, the electronic device received algorithm results ranging from 0 to 9, and the total number of results (10 > 9). Therefore, t 10 The nine consecutive algorithm results prior to time t are algorithm results 1 to 9. The electronic device uses algorithm results 1 to 9, along with algorithm result 10, to smooth algorithm result 10, thus obtaining t. 10 The smoothing algorithm result for time step 10. The same logic applies to subsequent steps.
[0085] In this embodiment of the application, the electronic device may use any of the following methods to smooth the algorithm results.
[0086] Method 1 employs a weighted processing algorithm to smooth the algorithm results. Specifically, the electronic device performs weighted processing on the current time and a first number of consecutive algorithm results prior to the current time to obtain the first smoothed algorithm result.
[0087] In this embodiment of the application, the electronic device can use the following formula (1) to smooth the first algorithm result at the current time to obtain the first smoothing algorithm result at the current time.
[0088]
[0089] Among them, SAR N This represents the smoothing algorithm result at the current time, i.e., the result of the first smoothing algorithm. N is the index of the algorithm result at the current time (i.e., the result of the first algorithm), K is the first quantity, and W... i For the weights corresponding to algorithm result i, AR i Let i be the algorithm result, and N be the algorithm result at the current time (i.e., the first algorithm result).
[0090] In this embodiment, the weights corresponding to the results of each algorithm can be the same, such as 1 / K for each result. In this case, smoothing can be understood as averaging the results of multiple algorithms. The weights of the results of each algorithm can also be different. Furthermore, the sum of the weights of the K results of the algorithms can be 1 or not, without limitation.
[0091] To improve the rationality of smoothing, in the first consecutive number of algorithm results up to and including the current time, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result. The second and third algorithm results can be any two algorithm results from the first consecutive number of algorithm results, and the second algorithm result can be the aforementioned first algorithm result. In this case, the closer the determination time of the algorithm result is to the current time, the greater the weight corresponding to that algorithm result, i.e., W. N-K+1 <W N-K+2 < <W N-1 <W N For example, if K is 10, then the weights of the 10 algorithm results are sorted from farthest to closest from the current time according to the distance from the current time, and the weights are [0.01, 0.03, 0.05, 0.07, 0.09, 0.11, 0.13, 0.15, 0.17, 0.19], where 0.19 is the weight of the first algorithm result at the current time.
[0092] The closer the determined moment of an algorithm's result is to the current moment, the greater the correlation between that result and the result of the first algorithm. Assigning weights based on the proximity of the determined moment to the current moment improves the rationality of the smoothing process.
[0093] Method 2 uses other smoothing filtering algorithms such as Gaussian smoothing algorithm and Savitzky-Golay filtering algorithm to smooth the algorithm results.
[0094] In this embodiment of the application, the electronic device may also use other smoothing filtering algorithms to smooth the result of the first algorithm, which does not serve as a limitation.
[0095] In step S13 above, the first temporary perception result is the temporary perception result at the current moment. The temporary perception result is a temporary perception result, which includes two states: the state where the object exists and the state where the object does not exist.
[0096] In this embodiment of the application, the electronic device can determine the first temporary sensing result at the current moment based on the first algorithm result at the current moment, or it can determine the first temporary sensing result at the current moment based on the first smoothing algorithm result at the current moment.
[0097] When the electronic device determines the first temporary sensing result based on the first algorithm result, the above step S13 can be executed after step S11 or step S12; when the electronic device determines the first temporary sensing result based on the first smoothing algorithm result, the above step S13 can be executed after step S12.
[0098] In this embodiment of the application, if the electronic device determines the first temporary sensing result based on the first algorithm result, the above step S13 can be: comparing the first algorithm result with the first sensing threshold; if the first algorithm result is greater than the first sensing threshold, then determining that the first temporary sensing result indicates the state of the existence of an object, that is, the first state is the state of the existence of an object; if the first algorithm result is less than or equal to the first sensing threshold, then determining that the first temporary sensing result indicates the state of the non-existence of an object, that is, the first state is the state of the non-existence of an object.
[0099] If the electronic device determines the first temporary sensing result based on the result of the first smoothing algorithm, then the above step S13 can be: comparing the result of the first smoothing algorithm with the second sensing threshold; if the result of the first smoothing algorithm is greater than the second sensing threshold, then determining that the first temporary sensing result indicates the state of the existence of an object, that is, the first state is the state of the existence of an object; if the result of the first smoothing algorithm is less than or equal to the second sensing threshold, then determining that the first temporary sensing result indicates the state of the absence of an object, that is, the first state is the state of the absence of an object.
[0100] The first and second perception thresholds can be set according to actual needs. The first and second perception thresholds can be the same or different.
[0101] For example, both the first and second perception thresholds are represented as Th sense Temporary sensing results (TSR) N It includes two states, 0 and 1, where 0 indicates that the object does not exist and 1 indicates that the object exists.
[0102] When the electronic device determines the first temporary sensing result based on the first algorithm result, at time t0, the electronic device obtains algorithm result 0 (e.g., AR0). If AR0 > Th sense Then the electronic device can set the temporary sensing result 0 at time t0 to 1, that is, TSR0 = 1, where TSR0 represents the temporary sensing result 0; if AR0 ≤ Th sense If so, the electronic device can set the temporary sensing result 0 at time t0 to 0, that is, TSR0 = 0. Similarly, the electronic device can set the temporary sensing results at other times, which will not be elaborated here.
[0103] When the electronic device determines the first temporary sensing result based on the first smoothing algorithm result, at time t0, the electronic device obtains the smoothing algorithm result 0 (e.g., SAR0) based on the algorithm result 0. If SAR0 > Th sense Then the electronic device can set the temporary sensing result 0 (such as TSR0) at time t0 to 1, that is, TSR0 = 1; if SAR0 ≤ Th senseIf so, the electronic device can set the temporary sensing result 0 at time t0 to 0, that is, TSR0 = 0. Similarly, the electronic device can set the temporary sensing results at other times, which will not be elaborated here.
[0104] In step S14 above, the second quantity can be set according to actual needs. For example, the second quantity Q can be 8, 9, 10, 15, 20, etc. The second smoothing algorithm result is a smoothing algorithm result at a historical time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm. For ease of subsequent processing, the second smoothing algorithm result, the first smoothing algorithm result, and a second number of smoothing algorithm results existing between the second and first smoothing algorithm results are obtained based on the same smoothing algorithm. This smoothing algorithm can be any of the smoothing algorithms in step S12 above.
[0105] In this embodiment, the second quantity Q can be less than or equal to K-2, where K is the first quantity. In this case, the second smoothing algorithm result is the smoothing algorithm result corresponding to a certain algorithm result on which the calculation of the first smoothing algorithm result was based. At this time, the second smoothing algorithm result is related to the first smoothing algorithm result, and using the second smoothing algorithm result can improve the accuracy of determining the state switching indicator flag.
[0106] The first state transition indicator is the state transition indicator at the current moment. The state transition indicator indicates the transition between the state of having an object and the state of not having an object. The state transition indicator can include three types: transitioning from the state of having an object to the state of not having an object, transitioning from the state of not having an object to the state of having an object, and no transition state.
[0107] The electronic device compares the result of the first smoothing algorithm at the current moment with the result of the second smoothing algorithm at a historical moment. Based on the comparison result, a state transition indicator flag for the current moment can be obtained, namely the first state transition indicator flag. The first state transition indicator flag can be any of the three state transition indicator flags mentioned above.
[0108] In this embodiment of the application, the electronic device may implement the above step S14 in any of the following ways.
[0109] Method 1, the electronic device adopts such as Figure 2 The process steps shown implement the above step S14.
[0110] Step S21: Calculate the absolute value of the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm; if the absolute value is greater than the third switching threshold, proceed to step S22; if the absolute value is less than or equal to the third switching threshold, proceed to step S23.
[0111] Step S22: Determine that the first state switching indicator flag at the current time indicates a switch to the first state;
[0112] Step S23: Determine that the first state switching indicator flag at the current time indicates that the state has not been switched.
[0113] In this embodiment of the application, the electronic device is pre-set with a third switching threshold Th. trans The electronic device calculates the absolute value of the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm according to the following formula (2).
[0114] U1 = |SAR N -SAR M | (2)
[0115] Where U1 is the absolute value of the difference between the results of the first smoothing algorithm and the results of the second smoothing algorithm, and SAR N The result of the first smoothing algorithm, SAR M This represents the result of the second smoothing algorithm. N and M are the sequence numbers of the results of the first and second smoothing algorithms, respectively, and NM-1 = Q, where Q is the second quantity.
[0116] If U1>Th trans If the first state is the state of an object existing, then the electronic device can determine the first state switching indicator TS. N The indication is a switch from a state where no object exists to a state where an object exists; if the first state is a state where no object exists, the electronic device can determine the first state switch indication flag TS. N This indicates a switch from a state where an object exists to a state where an object does not exist. If U1 ≤ Th trans Then the electronic device can determine the first state transition indicator TS. N The indicator shows that the state has not been switched.
[0117] In this embodiment of the application, the electronic device can quickly determine the first state switching indicator mark by combining the third switching threshold and the first state.
[0118] Method 2, the electronic device adopts such as Figure 3 The process steps shown implement the above step S14.
[0119] Step S31: Calculate the difference between the results of the first smoothing algorithm and the second smoothing algorithm. If the difference is greater than the first switching threshold, proceed to step S32. If the difference is less than the second switching threshold, proceed to step S33. If the difference is less than or equal to the first switching threshold and greater than or equal to the second switching threshold, proceed to step S34. The second switching threshold is less than the first switching threshold, and the sum of the first and second switching thresholds is 0. The first switching threshold can be the same as or different from the aforementioned third switching threshold.
[0120] Step S32: Determine that the first state switching indicator flag at the current moment indicates a switch to the state of an existing object;
[0121] Step S33: Determine that the first state switching indicator flag at the current moment indicates a switch to the state where no object exists.
[0122] Step S34: Determine that the first state switching indicator flag at the current moment indicates that the state has not been switched.
[0123] In this embodiment of the application, the electronic device can preset a first switching threshold and a second switching threshold. The first switching threshold and the second switching threshold are two opposite values, such as the first switching threshold being Th. trans The second switching threshold is -Th trans .
[0124] The electronic device calculates the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm according to the following formula (3).
[0125] U2 = SAR N -SAR M (3)
[0126] Where U2 is the difference between the results of the first smoothing algorithm and the results of the second smoothing algorithm, SAR N The result of the first smoothing algorithm, SAR M This represents the result of the second smoothing algorithm. N and M are the sequence numbers of the results of the first and second smoothing algorithms, respectively, and NM-1 = Q, where Q is the second quantity.
[0127] If U2>Th trans Then the electronic device can determine the first state transition indicator TS. N The instruction is to switch from a state where the object does not exist to a state where the object exists; if U2 <-Th trans Then the electronic device can determine the first state transition indicator TS. N This indicates a switch from a state where an object exists to a state where an object does not exist. If -Th trans ≤U2≤Th transThen the electronic device can determine the first state transition indicator TS. N The indicator shows that the state has not been switched.
[0128] In this embodiment of the application, the electronic device can more accurately determine the first state switching indicator mark by combining the first switching threshold and the second switching threshold.
[0129] In step S15 above, the third quantity can be set according to actual needs. For example, the third quantity P can be 8, 9, 10, 15, 20, etc. In this embodiment, the third quantity P can be less than or equal to K, where K is the first quantity. In this case, the third number of consecutive temporary sensing results are: temporary sensing results corresponding to the multiple algorithm results on which the first smoothing algorithm result is based. At this time, these multiple temporary sensing results are related, and using these multiple temporary sensing results can improve the accuracy of determining the final sensing result at the current moment.
[0130] In this embodiment of the application, the electronic device detects whether all of the following conditions are met:
[0131] Condition 1: The third consecutive set of temporary sensing results are all in the first state;
[0132] Condition 2: The third consecutive number of state switching indicator flags all indicate that the state has been switched to the first state.
[0133] If the above two conditions are met, the electronic device can determine that the final perception result at the current moment is the first state.
[0134] For example, the third quantity P = 3. At time t5, if the electronic device determines that the temporary sensing result TSR5 at time t5 indicates the state of object presence, and the electronic device determines that all three temporary sensing results from time t3 to t5 indicate the state of object presence, and all three state switching indicator flags from time t3 to t5 indicate a switch from the state of no object to the state of object presence, then the final sensing result SR5 at time t5 indicates the state of object presence, i.e., SR5 = TSR5.
[0135] At time t5, if the electronic device determines that the temporary sensing result TSR5 at time t5 indicates a state where no object exists, and the electronic device determines that all three temporary sensing results from time t3 to t5 indicate a state where no object exists, and all three state switching indicator flags from time t3 to t5 indicate a switch from a state where an object exists to a state where no object exists, then the final sensing result SR5 at time t5 indicates a state where no object exists, i.e., SR5 = TSR5.
[0136] In this embodiment of the application, if the electronic device detects that one or more of the above conditions 1 to 2 are not met, that is, a third consecutive number of temporary sensing results are not fully indicated as the first state, or / and a third consecutive number of state switching indicator flags are not fully indicated as switching to the first state, then the electronic device can determine that the final sensing result indicates the second state, and the second state is the state indicated by the final sensing result at the previous moment. The second state may be the same as the first state or different from the first state.
[0137] For example, the third quantity P = 3. At time t5, the electronic device determines that the provisional sensing result TSR5 at time t5 indicates the presence of an object.
[0138] If one of the temporary perception results at time t3 to t4 indicates that the object does not exist, such as the temporary perception result TSR3 at time t3 indicating that the object does not exist, and the temporary perception result TSR4 at time t4 indicating that the object exists, then not all three temporary perception results at time t3 to t5 indicate that the object exists. Therefore, the final perception result SR5 at time t5 is determined to be the final perception result SR4 at time t4, that is, SR5 = SR4.
[0139] If the state switching indicator flags at times t3 to t5 indicate that the state has not been switched, or indicate that the state has been switched to a state where no object exists, such as the state switching indicator flags at times t3 and / or t4 indicating that the state has not been switched, then the final perception result SR5 at time t5 is determined to be the final perception result SR4 at time t4, that is, SR5 = SR4.
[0140] In this embodiment of the application, in order to facilitate the determination of whether the above conditions 1 to 2 are met, -1, 0, and 1 can be used to represent the switching state (i.e., the value of the state switching indicator), and 0 and 1 can be used to represent the state indicated by the perception result. Based on the mathematical characteristics of -1, 0, and 1, it can be quickly determined whether the above conditions 1 to 2 are met.
[0141] Regarding the switched state:
[0142] In one example, the state transition indicator flag TS N =-1 indicates a transition from the state where an object exists to the state where an object does not exist; the state transition indicator flag TS N =0 indicates no state transition; state transition indicator TS N =1 indicates a switch from a state where no object exists to a state where an object exists.
[0143] The electronic device calculates the product of the third consecutive number P state transition indicator flags; if the product is 1, then condition 2 above is satisfied. The electronic device calculates the sum of the third consecutive number P state transition indicator flags; if the sum is -P, then condition 2 above is satisfied. Otherwise, the electronic device can determine that condition 2 above is not satisfied.
[0144] In another example, the state transition indicator is TS. N =1 indicates a transition from the state where an object exists to the state where an object does not exist; the state transition indicator flag TS N =0 indicates no state transition; state transition indicator TS N =-1 indicates a switch from a state where the object does not exist to a state where the object exists.
[0145] The electronic device calculates the sum of the third consecutive number of P state transition indicator flags; if the sum is -P, then condition 2 above is satisfied. The electronic device calculates the product of the third consecutive number of P state transition indicator flags; if the product is 1, then condition 2 above is satisfied. Otherwise, the electronic device can determine that condition 2 above is not satisfied.
[0146] Regarding the state indicated by the perception result:
[0147] In one example, a perception result of 1 indicates the presence of an object; a perception result of 0 indicates the absence of an object.
[0148] The electronic device calculates the product of the third consecutive number of P temporary sensing results; if the product is 1, it indicates that the first state is a state where an object exists, satisfying condition 1 above. The electronic device calculates the sum of the third consecutive number of P switching states; if the sum is 0, it indicates that the first state is a state where no object exists, satisfying condition 1 above. Otherwise, the electronic device can determine that condition 1 above is not satisfied.
[0149] In another example, a perception result of 0 indicates the presence of an object; a perception result of 1 indicates the absence of an object.
[0150] The electronic device calculates the sum of the third consecutive number of P temporary sensing results; if the sum is 0, it indicates that the first state is a state where an object exists, satisfying condition 1 above. The electronic device calculates the product of the third consecutive number of P switching states; if the product is 1, it indicates that the first state is a state where no object exists, satisfying condition 1 above. Otherwise, the electronic device can determine that condition 1 above is not satisfied.
[0151] In some embodiments, to save storage space in electronic devices, this application also provides a wireless sensing method, such as... Figure 4 As shown, it may include the following steps:
[0152] Step S41: Using the wireless signal at the current moment, determine the first algorithm result of wireless sensing at the current moment;
[0153] Step S42: Using the current time and the first number of consecutive algorithm results before the current time, smooth the first algorithm result to obtain the first smoothing algorithm result;
[0154] Step S43: Determine the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm. The first temporary sensing result indicates the first state.
[0155] Step S44: Compare the results of the first smoothing algorithm and the second smoothing algorithm to obtain the first state switching indicator flag at the current time. The second smoothing algorithm result is a smoothing algorithm result from a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm.
[0156] Step S45: If the current time and the third consecutive number of temporary sensing results before the current time all indicate the first state, and the current time and the third consecutive number of state switching indicator flags before the current time all indicate switching to the first state, then determine that the final sensing result at the current time indicates the first state.
[0157] Step S46: Clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary sensing result. The fourth algorithm result is the algorithm result with the earliest determined time among the first number of consecutive algorithm results. The second state switching indicator is the state switching indicator with the earliest determined time among the third number of consecutive state switching indicator indicators. The second temporary sensing result is the temporary sensing result with the earliest determined time among the third number of consecutive temporary sensing results.
[0158] Steps S41 to S45 are the same as steps S11 to S15, and will not be repeated here.
[0159] In step S46 above, the electronic device acquires the earliest determined algorithm result from the first consecutive number of algorithm results described in step S42, i.e., the fourth algorithm result; acquires the second smoothing algorithm result from step S44; acquires the earliest determined state switching indicator from the third consecutive number of state switching indicator indicators from step S45, i.e., the second state switching indicator; and acquires the earliest determined temporary sensing result from the third consecutive number of temporary sensing results from step S45, i.e., the second temporary sensing result. The fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary sensing result are information that will not be used in the next sensing process. The electronic device clears the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary sensing result to save storage space in the electronic device.
[0160] The following is in conjunction with the appendix Figure 5 The wireless sensing process illustrated herein provides a detailed description of the wireless sensing method provided in this application embodiment. Wherein, the first quantity K = 10, the second quantity Q = 10 - 2 = 8, and the third quantity P = 5. In this application embodiment, the indices of the algorithm result AR, the temporary sensing result TSR, the smoothing algorithm result SAR, the switching state TS, and the final sensing result SR are integers greater than or equal to 0, and the larger the index, the later the corresponding time.
[0161] Step S51, initialize the first sensing threshold Th sense and the first switching threshold Th trans .
[0162] Step S52: Calculate the temporary sensing result (TSR).
[0163] Electronic devices use the wireless signal reported by the AP at the current moment to calculate the AR (Analog and Sensor) algorithm result for the current moment. N AR N With Th sense In comparison, if AR N >Th sense Then TSR N Set to 1, i.e., TSR N =1; if AR N ≤Th sense Then TSR N Set to 0, i.e., TSR N =0. The electronic device saves the current moment's temporary sensing result (TSR). N TSR N =1 indicates that an object exists; TSR N =0 indicates that the object does not exist.
[0164] Step S53: Smooth the algorithm results to obtain the smoothed algorithm result SAR.
[0165] Electronic devices utilize AR N-9 ~AR N These 10 algorithm results are relevant to AR. N Smoothing is performed to obtain the smoothing algorithm result SAR. N The electronic device saves the SAR smoothing algorithm result at the current moment. N .
[0166] In this embodiment of the application, the electronic device can use a weighted processing method to process AR. N After smoothing, the closer the determination time of the algorithm result AR is to the current time, the greater the weight corresponding to the algorithm result AR, i.e., W. N-9 <W N-8 < <W N-1 <W N W i Let i be the weight corresponding to the algorithm result i, where i = N-9, N-8, ..., N.
[0167] Step S54: Determine the state transition indicator flag.
[0168] Poor SAR results from electronic device smoothing algorithm calculation diff =SAR N -SAR N-9 SAR N With SAR N-9 There are 8 smoothing algorithm results for SAR. If SAR diff >Th trans Then the state transition indicator TS will be set. N Set to 1, i.e., TS N =1; if SAR diff <-Th trans Then the state transition indicator TS will be set. N Set to -1, i.e., TS N = -1; otherwise, set the state transition indicator TS. N Set to 0, i.e., TS N =0. TS N =1 indicates switching from a non-existent object to an existing object; TS N =-1 indicates switching from an existing object to a non-existent object; TS N =0 indicates no state transition. The electronic device stores the current state transition indicator TS. N .
[0169] Step S55: Use the temporary sensing result TSR and the state transition indicator TS to make a sensing determination. The specific determination rules are as follows:
[0170] like and (Scenario 1) In this case, the electronic device can determine the final sensing result SR at the current moment. N =TSR N =1, meaning an object exists.
[0171] like and (Scenario 2) In this case, the electronic device can determine the final sensing result SR at the current moment. N =TSR N =0, meaning no object exists.
[0172] Otherwise (case 3), the final perception result SR at the current moment can be determined. N =SR N-1 .
[0173] After step S55 is completed, the electronic device can clear AR. N-9 SAR N-9 TS N-4 and TSR N-4 Afterwards, the electronic device can repeat step S52 to proceed with the next wireless sensing process.
[0174] In this embodiment, by combining smoothing processing and setting state switching indicator flags, the impact of accidental interference is greatly reduced, the impact of external environmental interference on the sensing results is reduced, and the accuracy of wireless sensing results is improved.
[0175] Corresponding to the above-described wireless sensing method, this application also provides a wireless sensing device, such as... Figure 6 As shown, the device includes:
[0176] The first determining module 61 is used to determine the first algorithm result of wireless sensing at the current time using the wireless signal at the current time;
[0177] The smoothing module 62 is used to smooth the first algorithm result using the current time and the first number of consecutive algorithm results before the current time to obtain the first smoothing algorithm result.
[0178] The second determining module 63 is used to determine the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm, wherein the first temporary sensing result indicates the first state;
[0179] The comparison module 64 is used to compare the results of the first smoothing algorithm and the results of the second smoothing algorithm to obtain the first state switching indicator flag at the current time. The result of the second smoothing algorithm is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the result of the second smoothing algorithm is determined and the current time. The results of the first smoothing algorithm and the results of the second smoothing algorithm are obtained based on the same smoothing algorithm.
[0180] The third determining module 65 is used to determine that the final sensing result at the current moment indicates the first state if the current moment and the third consecutive number of temporary sensing results before the current moment all indicate the first state, and the current moment and the third consecutive number of state switching indicator flags before the current moment all indicate switching to the first state.
[0181] In some embodiments, the smoothing module 62 can be specifically used to perform weighted processing on the current time and a first number of consecutive algorithm results before the current time to obtain a first smoothing algorithm result.
[0182] In some embodiments, the sum of the weights corresponding to a first number of consecutive algorithm results is 1; among the first number of consecutive algorithm results, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result.
[0183] In some embodiments, the second determining module 63 may be specifically used for:
[0184] The result of the first algorithm is compared with the first perception threshold; if the result of the first algorithm is greater than the first perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first algorithm is less than or equal to the first perception threshold, the first temporary perception result indicates that an object does not exist.
[0185] Alternatively, the result of the first smoothing algorithm is compared with the second perception threshold; if the result of the first smoothing algorithm is greater than the second perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first smoothing algorithm is less than or equal to the second perception threshold, the first temporary perception result indicates that an object does not exist.
[0186] In some embodiments, the comparison module 64 may be specifically used for:
[0187] Calculate the difference between the results of the first smoothing algorithm and the results of the second smoothing algorithm;
[0188] If the difference is greater than the first switching threshold, then the first state switching indicator flag at the current moment is determined to indicate that the state of the object exists.
[0189] If the difference is less than the second switching threshold, the first state switching indicator flag at the current moment is determined to indicate a switch to the state where no object exists; if the second switching threshold is less than the first switching threshold, the sum of the first switching threshold and the second switching threshold is 0.
[0190] If the difference is less than or equal to the first switching threshold and the difference is greater than or equal to the second switching threshold, then the first state switching indicator flag is determined to indicate an unswitched state.
[0191] In some embodiments, the third determining module 65 can also be used to determine that the final sensing result indicates the second state if a third consecutive number of temporary sensing results are not fully indicated as the first state, or / and a third consecutive number of state switching indicator flags are not fully indicated as switching to the first state, and the second state is the state indicated by the final sensing result at the previous moment.
[0192] In some embodiments, the wireless sensing device may further include:
[0193] The clearing module is used to clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary perception result after the final perception result is determined. The fourth algorithm result is the algorithm result with the earliest determination time among a first number of consecutive algorithm results. The second state switching indicator is the state switching indicator with the earliest determination time among a third number of consecutive state switching indicator. The second temporary perception result is the temporary perception result with the earliest determination time among a third number of consecutive temporary perception results.
[0194] In the technical solution provided in this application embodiment, after obtaining the algorithm result corresponding to wireless sensing, the algorithm result is smoothed to reduce the impact of accidental interference. After obtaining the smoothing algorithm result, the smoothing algorithm result at the current moment is compared with the smoothing algorithm result at a historical moment to determine whether the state indicated by the sensing result has switched from a state where an object exists to a state where an object does not exist, or from a state where an object does not exist to a state where an object exists; that is, the state switching indicator flag of the sensing result is determined. If multiple temporary sensing results all indicate a certain state, such as the first state, and multiple state switching indicator flags all indicate a switch to the first state, then the sensing result caused by excluding the influence of accidental interference is the first state, and the current final sensing result is determined to be the first state. By combining the smoothing process and the setting of the state switching indicator flag, the impact of accidental interference is greatly reduced, the influence of external environmental interference on the sensing result is reduced, and the accuracy of the wireless sensing result is improved.
[0195] Corresponding to the above-described wireless sensing method, this application also provides an electronic device, such as... Figure 7As shown, it includes a processor 71 and a machine-readable storage medium 72, the machine-readable storage medium 72 storing machine-executable instructions that can be executed by the processor 71, the processor 71 being prompted by the machine-executable instructions to implement any of the wireless sensing methods described above.
[0196] In this embodiment, the electronic device may further include a communication bus and a communication interface, wherein the communication interface, the processor 71 and the machine-readable storage medium 72 are connected via the communication bus.
[0197] The communication bus can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.
[0198] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0199] Machine-readable storage media may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the machine-readable storage medium may also be at least one storage device located remotely from the aforementioned processor.
[0200] The processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0201] In another embodiment provided in this application, a computer-readable storage medium is also provided, which stores a computer program that, when executed by a processor, implements any of the wireless sensing methods described above.
[0202] In another embodiment provided in this application, a computer program product containing instructions is also provided, which, when run on a computer, causes the computer to perform any of the wireless sensing methods described above.
[0203] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. 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 can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, 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. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0204] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0205] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the embodiments of apparatus, electronic devices, storage media, and program products are basically similar to the method embodiments, so the descriptions are relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0206] The above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application are included within the scope of protection of this application.
Claims
1. A wireless sensing method, characterized in that, The method comprises: Using the wireless signal at the current moment, determine the first algorithm result of wireless sensing at the current moment; Using the current time and the first number of consecutive algorithm results before the current time, the first algorithm result is smoothed to obtain the first smoothing algorithm result; Based on the result of the first algorithm or the result of the first smoothing algorithm, the first temporary sensing result at the current moment is determined, and the first temporary sensing result indicates the first state; By comparing the results of the first smoothing algorithm and the second smoothing algorithm, a first state transition indicator flag is obtained at the current time. The second smoothing algorithm result is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm. If the current moment and the third consecutive number of temporary sensing results before the current moment all indicate the first state, and the current moment and the third consecutive number of state switching indicator flags before the current moment all indicate switching to the first state, then the final sensing result at the current moment is determined to be the first state.
2. The method according to claim 1, characterized in that, The step of smoothing the first algorithm result using the current time and a first number of consecutive algorithm results prior to the current time to obtain the first smoothed algorithm result includes: The first smoothing algorithm result is obtained by weighting the first number of consecutive algorithm results at the current time and before the current time.
3. The method according to claim 2, characterized in that, The sum of the weights corresponding to the first consecutive number of algorithm results is 1; In the first consecutive number of algorithm results, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result.
4. The method according to claim 1, characterized in that, The step of determining the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm includes: The result of the first algorithm is compared with a first perception threshold; if the result of the first algorithm is greater than the first perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first algorithm is less than or equal to the first perception threshold, the first temporary perception result indicates that an object does not exist; or, The result of the first smoothing algorithm is compared with the second perception threshold; if the result of the first smoothing algorithm is greater than the second perception threshold, the first temporary perception result at the current moment indicates that an object exists; if the result of the first smoothing algorithm is less than or equal to the second perception threshold, the first temporary perception result indicates that an object does not exist.
5. The method according to claim 1, characterized in that, The step of comparing the results of the first smoothing algorithm and the results of the second smoothing algorithm to obtain the first state transition indicator flag at the current time includes: Calculate the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm; If the difference is greater than the first switching threshold, then the first state switching indicator flag at the current moment is determined to indicate a switch to the state of an existing object; If the difference is less than the second switching threshold, then the first state switching indicator is determined to indicate a switch to a state where no object exists; the second switching threshold is less than the first switching threshold, and the sum of the first switching threshold and the second switching threshold is 0. If the difference is less than or equal to the first switching threshold and the difference is greater than or equal to the second switching threshold, then the first state switching indicator is determined to be in an unswitched state.
6. The method according to claim 1, characterized in that, The method further includes: If the third consecutive number of temporary sensing results do not all indicate the first state, or / and the third consecutive number of state switching indicator flags do not all indicate switching to the first state, then the final sensing result is determined to indicate the second state, and the second state is the state indicated by the final sensing result at the previous moment.
7. The method according to any one of claims 1-6, characterized in that, After determining the final perception result, the method further includes: Clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary sensing result. The fourth algorithm result is the algorithm result with the earliest determined time among the first consecutive number of algorithm results. The second state switching indicator is the state switching indicator with the earliest determined time among the third consecutive number of state switching indicator indicators. The second temporary sensing result is the temporary sensing result with the earliest determined time among the third consecutive number of temporary sensing results.
8. A wireless sensing device, characterized in that, The device comprises: The first determining module is used to determine the first algorithm result of wireless sensing at the current time using the wireless signal at the current time; The smoothing module is used to smooth the first algorithm result by using the current time and a first number of consecutive algorithm results before the current time to obtain the first smoothed algorithm result. The second determining module is used to determine the first temporary sensing result at the current moment based on the result of the first algorithm or the result of the first smoothing algorithm, wherein the state indicated by the first temporary sensing result is the first state. The comparison module is used to compare the results of the first smoothing algorithm and the results of the second smoothing algorithm to obtain the first state switching indicator flag at the current time. The second smoothing algorithm result is a smoothing algorithm result at a historical time. There are a second number of smoothing algorithm results between the time when the second smoothing algorithm result is determined and the current time. The first smoothing algorithm result and the second smoothing algorithm result are obtained based on the same smoothing algorithm. The third determining module is used to determine that the final sensing result at the current moment indicates the first state if the current moment and the third consecutive number of temporary sensing results before the current moment all indicate the first state, and the current moment and the third consecutive number of state switching indicator flags before the current moment all indicate switching to the first state.
9. The apparatus according to claim 8, characterized in that, The smoothing module is specifically used to perform weighted processing on the first number of consecutive algorithm results at the current time and before the current time to obtain the first smoothing algorithm result.
10. The apparatus according to claim 9, characterized in that, The sum of the weights corresponding to the first consecutive number of algorithm results is 1; among the first consecutive number of algorithm results, the weight corresponding to the second algorithm result is less than the weight corresponding to the third algorithm result, and the determination time of the second algorithm result is earlier than the determination time of the third algorithm result.
11. The apparatus according to claim 8, characterized in that, The second determining module is specifically used for: The result of the first algorithm is compared with the first perception threshold; if the result of the first algorithm is greater than the first perception threshold, the first temporary perception result at the current moment indicates that an object exists. If the result of the first algorithm is less than or equal to the first perception threshold, then the first temporary perception result indicates that the object does not exist. Alternatively, the result of the first smoothing algorithm is compared with the second perception threshold; if the result of the first smoothing algorithm is greater than the second perception threshold, the first temporary perception result at the current moment indicates the state of the presence of an object; if the result of the first smoothing algorithm is less than or equal to the second perception threshold, the first temporary perception result indicates the state of the absence of an object.
12. The apparatus according to claim 8, characterized in that, The comparison module is specifically used for: Calculate the difference between the result of the first smoothing algorithm and the result of the second smoothing algorithm; If the difference is greater than the first switching threshold, then the first state switching indicator flag at the current moment is determined to indicate a switch to the state of an existing object; If the difference is less than the second switching threshold, then the first state switching indicator is determined to indicate a switch to a state where no object exists; the second switching threshold is less than the first switching threshold, and the sum of the first switching threshold and the second switching threshold is 0. If the difference is less than or equal to the first switching threshold and the difference is greater than or equal to the second switching threshold, then the first state switching indicator is determined to be in an unswitched state.
13. The apparatus according to claim 8, characterized in that, The third determining module is further configured to determine that the final sensing result indicates the second state if the third consecutive number of temporary sensing results do not all indicate the first state, or / and the third consecutive number of state switching indicator flags do not all indicate switching to the first state, and the second state is the state indicated by the final sensing result at the previous moment.
14. The apparatus according to any one of claims 8-13, characterized in that, The device further includes: The clearing module is used to clear the fourth algorithm result, the second smoothing algorithm result, the second state switching indicator, and the second temporary perception result after determining the final perception result. The fourth algorithm result is the algorithm result with the earliest determination time among the first consecutive number of algorithm results, the second state switching indicator is the state switching indicator with the earliest determination time among the third consecutive number of state switching indicator indicators, and the second temporary perception result is the temporary perception result with the earliest determination time among the third consecutive number of temporary perception results.
15. An electronic device, characterized in that, The method includes a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, the processor being prompted by the machine-executable instructions to perform the method of any one of claims 1-7.
16. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method described in any one of claims 1-7.
Citation Information
Patent Citations
User experience optimization method and device and storage medium
CN116744384A
Wireless sensing method and apparatus
WO2024153160A1