Intelligent lock control method, electronic device and computer readable storage medium
By working together with the control unit and the radar module, and by using sliding windows and multiple sub-windows to statistically analyze target signal values, the problems of high power consumption and cost of smart locks are solved, and low-power, low-cost smart lock recognition functions are realized.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU HUACHENG SOFTWARE TECH CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-26
AI Technical Summary
While existing smart locks meet diverse business needs, they also have high power consumption and equipment costs.
The control unit acquires the level signal from the radar module, and uses sliding windows and multiple sub-windows to count the target signal value. The smart lock's recognition function is activated only when the number of counts reaches a threshold, reducing unnecessary power consumption and sensor usage.
It effectively reduces the power consumption and equipment cost of smart locks, while meeting differentiated business needs and improving the accuracy and response speed of recognition functions.
Smart Images

Figure CN122290237A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of smart lock technology, and in particular to a smart lock control method, electronic device, and computer-readable storage medium. Background Technology
[0002] Smart locks are essentially traditional mechanical locks with more electronic components embedded in them, making them more intelligent in terms of security, identification, and management.
[0003] To meet diverse business needs, current smart locks typically integrate multiple sensors with varying performance levels. However, this approach increases equipment costs and consumes relatively high power. Therefore, effectively reducing power consumption and equipment costs while satisfying the differentiated business requirements of smart locks has become a pressing issue. Summary of the Invention
[0004] The main technical problem addressed by this application is to provide a smart lock control method, electronic device, and computer-readable storage medium that can effectively reduce the power consumption and equipment cost of smart locks while meeting the differentiated business needs of smart locks.
[0005] To address the aforementioned technical problems, this application provides a smart lock control method for use in a smart lock. The smart lock includes a radar module and a control unit. The method includes: using the control unit to acquire an electrical level signal sent by the radar module, and when the electrical level signal is a trigger signal, determining a target signal value of the radar module for a target object; acquiring a statistical count of the number of times the target signal value is not less than a signal threshold in multiple sub-windows of a sliding window, and when the statistical count is not less than a count threshold, using the control unit to activate the smart lock's recognition function to recognize the target object.
[0006] To address the aforementioned technical problems, a second aspect of this application provides an electronic device including a memory and a processor coupled to each other, wherein the memory stores program instructions and the processor executes the program instructions to implement the method described in the first aspect.
[0007] To address the aforementioned technical problems, a third aspect of this application provides a computer-readable storage medium storing program instructions executable by a processor, the program instructions being used to implement the method described in the first aspect.
[0008] The above solution utilizes the control unit to acquire the level signal sent by the radar module. When the level signal is a trigger signal, it determines the target signal value of the radar module for the target object. It then counts the number of times the target signal value in multiple sub-windows of the sliding window is not less than a signal threshold. When the count is not less than the threshold, the control unit activates the smart lock's recognition function to complete the identification of the target object. Under normal circumstances, the control unit only processes the level signal of the radar module. Through the sliding window and multi-sub-window statistics, it continuously and repeatedly judges the signal value of the radar module. Only when the value is not less than the threshold multiple times is the smart lock's recognition function activated. Furthermore, the smart lock only uses a single radar module and control unit, eliminating the need for additional sensors. This effectively reduces the power consumption and equipment cost of the smart lock while meeting its differentiated business needs. Attached Figure Description
[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Wherein: Figure 1 This is a flowchart illustrating one embodiment of the smart lock control method of this application; Figure 2 This is a structural schematic diagram of one embodiment of the smart lock of this application; Figure 3 This is a flowchart illustrating another embodiment of the smart lock control method of this application; Figure 4 This is a schematic diagram of the structure of one embodiment of the electronic device of this application; Figure 5 This is a schematic diagram of one embodiment of the computer-readable storage medium of this application. Detailed Implementation
[0010] 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, not all embodiments, and different implementation methods can be adaptively combined. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0011] In this paper, the terms "system" and "network" are often used interchangeably. The term "and / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. Additionally, the character " / " generally indicates that the preceding and following related objects have an "or" relationship. Furthermore, "many" in this paper means two or more.
[0012] Please see Figure 1 , Figure 1 This is a flowchart illustrating one embodiment of the smart lock control method of this application. Figure 2 This is a schematic diagram of one embodiment of the smart lock of this application. The smart lock includes a radar module and a control unit, and the smart lock control method includes: S101: The control unit acquires the level signal sent by the radar module, and when the level signal is a trigger signal, determines the target signal value of the radar module for the target object.
[0013] Specifically, the control unit acquires the level signal sent by the radar module, and when the level signal is a trigger signal, determines the target signal value of the radar module for the target object.
[0014] In one application, the radar module sends a level signal to the control unit at a fixed frequency. When the radar module detects a target object at a first distance, it sends a level transition trigger signal to the control unit. The control unit immediately triggers an interrupt and reads the target signal value of the radar module for the target object.
[0015] In another application, the control unit continuously monitors the level signal output by the radar module. When the radar module detects a target object at the first distance, it sends a trigger signal to the control unit. If the level signal remains a trigger signal for a preset time period, the control unit triggers an interrupt and reads the target signal value of the radar module for the target object.
[0016] In some application scenarios, when the radar module does not detect a target object, it will send a low level to the control unit at a fixed frequency as a sleep signal. When the radar module detects a target object at the first distance, it will send a high level to the control unit as a trigger signal.
[0017] In some application scenarios, the first distance is 3 meters, while in other application scenarios, the first distance can also be 2.5 meters, 3.5 meters, and 4 meters, etc. This application does not impose specific restrictions here.
[0018] In some applications, the control unit can be a microcontroller (MCU), a single-chip microcomputer, etc.
[0019] It is understandable that the magnitude of the target signal value is negatively correlated with the distance between the target and the radar module.
[0020] S102: Obtain the statistical number of times the target signal value in multiple sub-windows of the sliding window is not less than the signal threshold, and if the statistical number is not less than the number threshold, use the control unit to wake up the recognition function of the smart lock to identify the target object.
[0021] Specifically, the system obtains the number of times the target signal value in multiple sub-windows of the sliding window is not less than the signal threshold, and when the number of counts is not less than the threshold, the control unit is used to wake up the smart lock's recognition function to complete the recognition of the target object.
[0022] In one application, a fixed-length sliding window is pre-set and divided into multiple sub-windows. A fixed signal threshold is set for each sub-window. When a target signal value is obtained, it is recorded in the sub-window. Following the rule of enqueuing new values and dequeuing old values, the target signal value in each sub-window is compared with the signal threshold. The number of times the target signal value is not less than the signal threshold is obtained. When the number of times the count is not less than the threshold, the distance between the target object and the radar module is considered to be the second distance. At this time, the identification function of the smart lock is activated by the control unit, thereby completing the identification of the target object.
[0023] In one application scenario, considering the actual use of smart locks, it is necessary to balance the success rate and response speed of the control unit waking up the smart lock's recognition function at the second distance. The fixed length of the sliding window is set to 4, the number of attempts threshold is set to 2, and the sampling interval corresponding to the target signal value of the radar module for the target object can be selected as 250ms. Of course, in other application scenarios, the fixed length of the sliding window, the number of attempts threshold, and the sampling interval corresponding to the target signal value of the radar module for the target object can also be flexibly set according to the actual situation; this application does not impose specific restrictions here.
[0024] In another application, a fixed-length sliding window is pre-set and divided into multiple sub-windows. A fixed signal threshold is set for each sub-window. When a target signal value is obtained, it is recorded in the sub-window. Following the rule of enqueuing new values and dequeuing old values, the target signal value in each sub-window is compared with the signal threshold. If the target signal value in two consecutive sub-windows is not less than the signal threshold, the number of consecutive target signal values not less than the signal threshold is obtained. When the number of times the count is not less than the count threshold, the distance between the target object and the radar module is considered to be the second distance. At this time, the recognition function of the smart lock is activated by the control unit to complete the recognition of the target object.
[0025] In some application scenarios, smart locks are equipped with cameras and built-in recognition modules. When the control unit activates the smart lock's recognition function, the camera is turned on to capture images of the target object, and the recognition module is used to verify the target object. After obtaining the verification information of the target object, it is determined whether the target object is real, thereby reducing the probability of false alarms.
[0026] In some application scenarios, the second distance is 1 meter. In other application scenarios, the second distance can also be 1.5 meters, 1.25 meters, 0.75 meters, etc. This application does not impose specific restrictions here.
[0027] The above solution utilizes the control unit to acquire the level signal sent by the radar module. When the level signal is a trigger signal, it determines the target signal value of the radar module for the target object. It then counts the number of times the target signal value in multiple sub-windows of the sliding window is not less than a signal threshold. When the count is not less than the threshold, the control unit activates the smart lock's recognition function to complete the identification of the target object. Under normal circumstances, the control unit only processes the level signal of the radar module. Through the sliding window and multi-sub-window statistics, it continuously and repeatedly judges the signal value of the radar module. Only when the value is not less than the threshold multiple times is the smart lock's recognition function activated. Furthermore, the smart lock only uses a single radar module and control unit, eliminating the need for additional sensors. This effectively reduces the power consumption and equipment cost of the smart lock while meeting its differentiated business needs.
[0028] In one implementation, please refer to Figure 3 , Figure 3 This is a flowchart illustrating another embodiment of the smart lock control method of this application. The smart lock control method includes: S201: In response to the power-on of the control unit, the radar module is started using the control unit, and the preset noise floor value corresponding to the radar module is obtained.
[0029] Specifically, due to differences in hardware or structure among different smart lock devices, the noise floor of the radar signal is inconsistent. Therefore, it is necessary to calibrate the noise floor of the radar signal to compensate for it. When the control unit is powered on, the control unit starts the radar module. After the radar module is initialized, the preset noise floor value corresponding to the radar module is obtained. The preset noise floor value is related to the installation environment of the smart lock and its own device parameters.
[0030] S202: Use the control unit to collect the current noise floor value corresponding to the radar module.
[0031] Specifically, the current noise floor value corresponding to the radar module is obtained by using the control unit.
[0032] In one implementation scenario, step S202 specifically includes: acquiring the duration corresponding to the sleep signal as the level signal; the response duration meeting the time threshold condition, continuously acquiring multiple measurement noise values corresponding to the radar module within a preset time according to a preset time interval; and obtaining the current noise value based on the multiple measurement noise values.
[0033] Specifically, when the level signal is a sleep signal for a continuous period of time, it is assumed that there is no moving object in front of the smart lock. At this time, multiple measurement noise values corresponding to the radar module are continuously collected at preset time intervals within a preset time. Based on the collected multiple measurement noise values, the current noise value is calculated. By collecting the noise in a sleep state when there is no moving object in front of the smart lock, the interference of object movement on the noise measurement can be eliminated, resulting in a more realistic and stable environmental noise. Furthermore, it does not occupy the normal detection process of the smart lock, and while ensuring detection accuracy, it further reduces the overall power consumption of the smart lock.
[0034] In a specific implementation scenario, when the level signal is a sleep signal for 30 consecutive seconds, it is assumed that there is no moving object in front of the smart lock. At this time, multiple measurement noise values corresponding to the radar module are continuously collected within 1 second at 50ms time intervals, and the average of the multiple measurement noise values is calculated to obtain the current noise value.
[0035] In other implementation scenarios, the median value among multiple measured noise floor values can be selected as the current noise floor value, or the maximum and minimum values can be removed and then averaged to obtain the final current noise floor value. This application does not impose specific restrictions on how the current noise floor value is calculated.
[0036] S203: Determine the calibration noise level of the radar module based on the preset noise level and the current noise level.
[0037] Specifically, since it cannot be guaranteed that there are no moving objects in front of the smart lock when sampling, the current noise floor value is not entirely reliable. It is necessary to calculate the calibration noise floor value corresponding to the radar module based on the preset noise floor value and the current noise floor value.
[0038] It is understandable that each time the control unit is powered on again, the environment of the smart lock device may have changed, and the calibration noise floor value of the radar module needs to be re-determined.
[0039] In one implementation scenario, step S203 specifically includes: obtaining an updated current noise floor value based on a preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight; determining the noise floor difference between the current noise floor value and the updated current noise floor value; in response to the noise floor difference being less than a preset value, incrementing the original count value by one, otherwise clearing the count value to zero, and returning to the step of obtaining an updated current noise floor value based on a preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight; in response to the count value being not less than a set value, determining the calibration noise floor value corresponding to the radar module, otherwise returning to the step of obtaining an updated current noise floor value based on a preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight.
[0040] Specifically, based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight, the updated current noise floor value is calculated. Then, the noise floor difference between the current noise floor value and the updated current noise floor value is calculated. When the noise floor difference is less than the preset value, the original count value is incremented by one; otherwise, the count value is cleared to zero, and the updated current noise floor value is recalculated based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight. When the count value is not less than the set value, the calibrated noise floor value is considered to be stable, the calibration stops, and the final calibrated noise floor value for the radar module is obtained. Otherwise, the updated current noise floor value needs to be recalculated based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight.
[0041] S204: The control unit acquires the level signal sent by the radar module, and when the level signal is a trigger signal, determines the target signal value of the radar module for the target object.
[0042] Specifically, the control unit acquires the level signal sent by the radar module, and when the level signal is a trigger signal, determines the target signal value of the radar module for the target object.
[0043] In one implementation scenario, determining the target signal value of the radar module for the target object in step S204 specifically includes: acquiring the measurement signal value collected by the radar module; and determining the target signal value corresponding to the radar module based on the calibration noise floor value and the measurement signal value.
[0044] Specifically, the measurement signal value collected by the radar module is obtained, and the target signal value corresponding to the radar module is calculated based on the calibration noise floor value and the measurement signal value. By processing the measurement signal value collected by the radar module with the calibration noise floor value, invalid signal components such as environmental noise, circuit noise, and electromagnetic interference can be removed, resulting in a more realistic and clean target motion signal, which significantly improves signal reliability.
[0045] In one implementation scenario, after step S204, the following steps are included: using the control unit to wake up the smart lock's acquisition function, continuously acquiring multiple target images of the target object, determining the loitering detection result corresponding to the target object based on the multiple target images; and in response to the level signal being a sleep signal, using the control unit to set the radar module to sleep mode.
[0046] Specifically, by using the control unit to wake up the smart lock's data acquisition function, the target object is continuously acquired to obtain multiple target images. Based on these multiple target images, the loitering detection result corresponding to the target object is determined. The loitering detection result effectively identifies whether the target object exhibits abnormal behavior, thereby enabling timely early warning and improving the smart lock's protection capabilities.
[0047] Furthermore, when the level signal is a sleep signal, the control unit sets the radar module to sleep mode, thereby further reducing the overall power consumption of the smart lock.
[0048] It should be noted that the radar module has two modes: working mode and sleep mode. However, the radar module is still working in sleep mode; it is not powered off. It simply operates at a lower detection frequency and consumes less power. The radar module still sends level signals to the control unit at a lower detection frequency. Since no target object is detected at this time, it sends low-level sleep signals to the control unit. When the radar module detects a target object, it sends a high-level signal as a trigger signal to the control unit. The control unit then sets the radar module to working mode, and the radar module sends high-level trigger signals to the control unit at a higher detection frequency. At the same time, the radar module collects the measurement signal value corresponding to the target object. When the level signal becomes a sleep signal again, the control unit switches the radar module from working mode to sleep mode.
[0049] In one specific implementation scenario, when the radar module is in sleep mode, it will perform detection and send level signals to the control unit at a detection frequency of 0.5-2Hz, that is, 0.5-2 times per second. When the radar module is in working mode, it will perform detection and send level signals to the control unit at a detection frequency of 10-20Hz, that is, 10-20 times per second. In other implementation scenarios, the detection frequencies corresponding to the sleep mode and working mode of the radar module can be set according to the actual situation, and this application does not make specific limitations on this.
[0050] S205: Obtain the statistical number of times the target signal value in multiple sub-windows of the sliding window is not less than the signal threshold, and if the statistical number is not less than the number threshold, use the control unit to wake up the recognition function of the smart lock to identify the target object.
[0051] Specifically, the system obtains the number of times the target signal value in multiple sub-windows of the sliding window is not less than the signal threshold, and when the number of counts is not less than the threshold, the control unit is used to wake up the smart lock's recognition function to complete the recognition of the target object.
[0052] In one implementation scenario, step S205 specifically includes: pre-setting multiple consecutive and non-overlapping detection time periods as multiple sub-windows of the sliding window; obtaining the statistical number of times the target signal value in the multiple sub-windows is not less than the signal threshold; in response to the statistical number being not less than the number threshold, using the control unit to wake up the smart lock's recognition function to identify the target object.
[0053] Specifically, multiple consecutive and non-overlapping detection periods are pre-set as multiple sub-windows of the sliding window. The target signal value in each of the multiple sub-windows is compared with the signal threshold to determine the number of times the target signal value is not less than the signal threshold. When the number of times is not less than the threshold, the smart lock's recognition function is activated by the control unit to complete the recognition of the target object. By using multi-sub-window sliding detection and number of times triggering, false wake-ups caused by single signal abnormalities are avoided, thereby significantly reducing the overall power consumption of the smart lock.
[0054] In a specific implementation scenario, the sliding window has a length of 4, a count threshold of 2, and a signal threshold of 60. When the target signal value in the first sub-window is 20, the target signal value in the second sub-window is 65, the target signal value in the third sub-window is 50, and the target signal value in the fourth sub-window is 72, the target signal values in these four sub-windows are compared with the signal threshold of 60 respectively. The count is determined to be 2, which is not less than the count threshold. At this time, the recognition function of the smart lock is activated by the control unit to complete the recognition of the target object.
[0055] In one implementation, please refer to... Figure 2The radar module includes an interrupt pin and a signal output pin. The control unit includes a general-purpose input / output port and an analog-to-digital converter port. The interrupt pin is connected to the general-purpose input / output port. The control unit obtains the level signal sent by the radar module through the connected interrupt pin and general-purpose input / output port. The signal output pin is connected to the analog-to-digital converter port. The control unit determines the target signal value of the radar module for the target object through the connected signal output pin and analog-to-digital converter port.
[0056] Specifically, the radar module includes an interrupt pin and a signal output pin, and the control unit includes a general-purpose input / output port and an analog-to-digital converter port. Connecting the interrupt pin and the general-purpose input / output port enables the control unit to acquire the level signal sent by the radar module. Connecting the signal output pin and the analog-to-digital converter port enables the control unit to determine the target signal value of the radar module for the target object.
[0057] It is understandable that a level signal corresponds to an interrupt trigger, so the waveform is a square wave, while the measured target signal value will fluctuate continuously, so the waveform is a sine wave.
[0058] Please see Figure 4 , Figure 4 This is a schematic diagram of an embodiment of the electronic device of this application. The electronic device 40 includes a memory 400 and a processor 402 coupled to each other. The memory 400 stores program data (not shown). The processor 402 calls the program data to implement the method in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here. Specifically, the electronic device 40 includes: desktop computers, laptops, tablet computers, servers, etc., which are not limited here. In addition, the processor 402 can also be called a central processing unit (CPU). The processor 402 may be an integrated circuit chip with signal processing capabilities. The processor 402 can also be a general-purpose processor, 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. The general-purpose processor can be a microprocessor or any conventional processor. In addition, the processor 402 can be implemented by integrated circuit chips.
[0059] Please see Figure 5 , Figure 5This is a schematic diagram of a computer-readable storage medium according to an embodiment of the present application. The computer-readable storage medium 50 stores program data 500. When the program data 500 is executed by a processor, it implements the method in any of the above embodiments. For related descriptions, please refer to the detailed description of the above method embodiments, which will not be repeated here.
[0060] It should be noted that the units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0061] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0062] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute all or part of the steps of the methods of various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0063] The above description is merely an embodiment of this application and does not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.
Claims
1. A smart lock control method, characterized in that, Applied to a smart lock, the smart lock including a radar module and a control unit, the method includes: The control unit acquires the level signal sent by the radar module, and when the level signal is a trigger signal, determines the target signal value of the radar module for the target object. The system obtains the statistical number of times that the target signal value is not less than a signal threshold in multiple sub-windows within the sliding window, and when the statistical number is not less than the number threshold, the control unit activates the smart lock's recognition function to identify the target object.
2. The method according to claim 1, characterized in that, Before acquiring the level signal sent by the radar module using the control unit, the process includes: In response to the power-on of the control unit, the radar module is started using the control unit, and the preset noise floor value corresponding to the radar module is obtained; The control unit is used to collect the current noise floor value corresponding to the radar module; Based on the preset noise floor value and the current noise floor value, the calibration noise floor value corresponding to the radar module is determined.
3. The method according to claim 2, characterized in that, Determining the target signal value of the radar module for the target object includes: Acquire the measurement signal values collected by the radar module; Based on the calibration noise floor value and the measured signal value, the target signal value corresponding to the radar module is determined.
4. The method according to claim 2, characterized in that, The step of collecting the current noise floor value corresponding to the radar module using the control unit includes: The duration corresponding to the sleep signal is obtained from the level signal. In response to the duration meeting the time threshold condition, multiple measurement noise floor values corresponding to the radar module are continuously collected within a preset time period at preset time intervals; The current noise level is obtained based on multiple measured noise levels.
5. The method according to claim 2, characterized in that, The step of determining the calibration noise floor value corresponding to the radar module based on the preset noise floor value and the current noise floor value includes: Based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight, the updated current noise floor value is obtained; Determine the noise floor difference between the current noise floor value and the updated current noise floor value; In response to the noise floor difference being less than a preset value, the original count value is incremented by one; otherwise, the count value is cleared to zero, and the process returns to the step of obtaining the updated current noise floor value based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight. In response to the count value being not less than a set value, the calibration noise floor value corresponding to the radar module is determined; otherwise, the process returns to the step of obtaining the updated current noise floor value based on the preset noise floor value and its corresponding weight, and the current noise floor value and its corresponding weight.
6. The method according to claim 1, characterized in that, After acquiring the level signal sent by the radar module using the control unit, and determining the target signal value of the radar module for the target object when the level signal is a trigger signal, the method further includes: The control unit is used to activate the smart lock's acquisition function to continuously acquire multiple target images of the target object. Based on these multiple target images, the loitering detection result corresponding to the target object is determined. In response to the level signal being a sleep signal, the control unit sets the radar module to sleep mode.
7. The method according to claim 1, characterized in that, The method involves statistically analyzing the number of times the target signal value is not less than a signal threshold within multiple sub-windows of the sliding window, and, when the statistical count is not less than the threshold, using the control unit to activate the smart lock's recognition function to identify the target object, including: Multiple consecutive and non-overlapping detection time periods are pre-set as multiple sub-windows of the sliding window; Obtain the statistical number of times that the target signal value is not less than the signal threshold within multiple sub-windows; In response to the statistical count being no less than the count threshold, the control unit activates the smart lock's recognition function to identify the target object.
8. The method according to claim 1, characterized in that, The radar module includes an interrupt pin and a signal output pin. The control unit includes a general-purpose input / output port and an analog-to-digital converter port. The interrupt pin is connected to the general-purpose input / output port. The control unit obtains the level signal sent by the radar module through the connected interrupt pin and the general-purpose input / output port. The signal output pin is connected to the analog-to-digital converter port. The control unit determines the target signal value of the radar module for the target object through the connected signal output pin and the analog-to-digital converter port.
9. An electronic device, characterized in that, The method includes a memory and a processor coupled to each other, the memory storing program instructions, and the processor executing the program instructions to implement the method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that, The system stores program instructions that can be executed by a processor, the program instructions being used to implement the method according to any one of claims 1-8.