Door lock control method, device, electronic device and storage medium
Through a two-level detection system, combined with pyroelectric infrared sensors and ultrasonic sensors, it is determined whether the target object is close to the smart door lock, avoiding false triggering of face recognition, solving the problem of false triggering of the PIR wake-up system, and improving the battery life of the smart door lock. and security.
Patent Information
- Application Number
- CN202210312842.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-28
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2042-03-28
AI Technical Summary
The PIR wake-up system in existing smart door locks has false triggering conditions, resulting in unnecessary power consumption and affecting battery life.
A two-stage detection system is adopted. First, the first detection device (such as the presence detection mode of the pyroelectric infrared sensor and the ultrasonic sensor) is used to determine whether the target object appears in the sensing area. If it appears, the second detection device (the motion detection of the ultrasonic sensor) is used. Mode) determines whether the target object is close to the door lock. If it is close, face recognition is performed to open the door lock to avoid false triggering.
Through three-level detection (whether the target object appears, whether it is close, whether the face recognition is successful), unnecessary power consumption is reduced and the battery life and safety of the smart door lock are improved.
Smart Images

Figure CN114724281B
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent electrical appliance technology, and in particular to a door lock control method, device, electronic device and storage medium. Background Art
[0002] With the development of science and technology, people pay more attention to home safety and travel convenience. Door locks are a very important part of smart homes, and the categories of smart door locks are constantly being updated. From a security perspective, door lock status information can be synchronized to the user's mobile phone in real time through the network; from a convenience perspective, smart door locks can support multiple opening and closing methods such as face recognition and fingerprints, eliminating the trouble of users forgetting to bring their keys.
[0003] Currently, pyroelectric infrared sensors (PIR) are commonly used on the market to detect the presence of sensing objects. However, the existing PIR wake-up system has false triggering problems, resulting in unnecessary power consumption and affecting the battery life of smart door locks. Summary of the invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present application provides a door lock control method, device, electronic device and storage medium.
[0005] In a first aspect, the present application provides a door lock control method, comprising:
[0006] determining whether a target object appears in a sensing area of the first detection device based on first detection data output by the first detection device;
[0007] If a target object appears in the sensing area, determining whether the target object is close to the door lock based on second detection data output by the second detection device;
[0008] If the target object approaches the door lock, performing face recognition on the target object;
[0009] If the face recognition is successful, the transmission mechanism is controlled to unlock the door.
[0010] Optionally, determining whether the target object is close to the door lock based on the second detection data output by the second detection device includes:
[0011] Calculating a moving trajectory of the target object based on the second detection data;
[0012] Determining whether the movement trajectory meets a preset approach condition;
[0013] If the moving trajectory meets the preset approach condition, obtaining the trajectory end point of the moving trajectory;
[0014] Calculating the distance between the end point of the trajectory and the door lock;
[0015] If the distance is less than a preset threshold, it is determined that the target object is close to the door lock.
[0016] Optionally, calculating the movement trajectory of the target object based on the second detection data includes:
[0017] Extracting distance information and angle information corresponding to a plurality of moments from the second detection data;
[0018] Calculating the object position of the target object at multiple moments based on the distance information and angle information corresponding to each moment;
[0019] Determining whether the positions of multiple objects in the moving trajectory meet a preset interval condition;
[0020] If the positions of multiple objects in the moving trajectory meet a preset interval condition, the moving trajectory of the target object is generated based on the object positions at multiple moments.
[0021] Optionally, determining whether the positions of multiple objects in the moving trajectory meet a preset interval condition includes:
[0022] Calculating the distance between any two adjacent object positions in the moving trajectory;
[0023] If the interval distance between any two adjacent object positions is less than or equal to a preset interval threshold, it is determined that the multiple object positions in the movement trajectory meet the preset interval condition;
[0024] If there are any two adjacent object positions whose interval distance is greater than a preset interval threshold, it is determined that the later object position of the two adjacent object positions does not meet the preset interval condition.
[0025] Optionally, determining whether the movement trajectory satisfies a preset approach condition includes:
[0026] Determining whether the movement trajectory is an approach trajectory from being away from the door lock to being close to the door lock;
[0027] If the moving trajectory is the approaching trajectory, it is determined that the moving trajectory satisfies a preset approaching condition.
[0028] Optionally, determining whether the movement trajectory satisfies a preset approach condition includes:
[0029] If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition;
[0030] Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition;
[0031] Alternatively, if the moving trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the moving trajectory does not satisfy the preset approach condition.
[0032] Optionally, determining whether the movement trajectory is a wandering trajectory that moves repeatedly around the door lock includes:
[0033] Determining whether the movement trajectory includes a trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock;
[0034] If the moving trajectory includes the trajectory segment, determining that the moving trajectory is the wandering trajectory;
[0035] If the moving trajectory does not include the trajectory segment, it is determined that the moving trajectory is not the wandering trajectory.
[0036] In a second aspect, the present application provides a door lock control device, comprising:
[0037] A first determination module, configured to determine whether a target object appears in a sensing area of the first detection device based on first detection data output by the first detection device;
[0038] A second determination module, configured to determine whether the target object is close to the door lock based on second detection data output by a second detection device if the target object appears in the sensing area;
[0039] A face recognition module, used for performing face recognition on the target object if the target object approaches the door lock;
[0040] The unlocking module is used to control the transmission mechanism to unlock the door if face recognition is successful.
[0041] Optionally, the second determining module includes:
[0042] a first calculation unit, configured to calculate a moving trajectory of the target object based on the second detection data;
[0043] A first determining unit, configured to determine whether the moving trajectory satisfies a preset approach condition;
[0044] an acquisition unit, configured to acquire a trajectory end point of the movement trajectory if the movement trajectory meets a preset approach condition;
[0045] A second calculation unit, used for calculating the distance between the end point of the trajectory and the door lock;
[0046] The second determining unit is configured to determine that the target object is close to the door lock if the distance is less than a preset threshold.
[0047] Optionally, the first computing unit includes:
[0048] an extraction subunit, configured to extract distance information and angle information corresponding to a plurality of moments from the second detection data;
[0049] A calculation subunit, used for calculating the object position of the target object at multiple moments based on the distance information and angle information corresponding to each moment;
[0050] A determination subunit, used to determine whether the positions of multiple objects in the moving trajectory meet a preset interval condition;
[0051] The generating subunit is used to generate the moving trajectory of the target object based on the object positions at multiple moments if the multiple object positions in the moving trajectory meet a preset interval condition.
[0052] Optionally, the determining subunit is further used for:
[0053] Calculating the distance between any two adjacent object positions in the moving trajectory;
[0054] If the interval distance between any two adjacent object positions is less than or equal to a preset interval threshold, it is determined that the multiple object positions in the movement trajectory meet the preset interval condition;
[0055] If there are any two adjacent object positions whose interval distance is greater than a preset interval threshold, it is determined that the later object position of the two adjacent object positions does not meet the preset interval condition.
[0056] Optionally, the first determining unit is further configured to:
[0057] Determining whether the movement trajectory is an approach trajectory from being away from the door lock to being close to the door lock;
[0058] If the moving trajectory is the approaching trajectory, it is determined that the moving trajectory satisfies a preset approaching condition.
[0059] Optionally, the first determining unit is further configured to:
[0060] If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition;
[0061] Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition;
[0062] Alternatively, if the moving trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the moving trajectory does not satisfy the preset approach condition.
[0063] Optionally, the first determining unit is further configured to:
[0064] Determining whether the movement trajectory includes a trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock;
[0065] If the moving trajectory includes the trajectory segment, determining that the moving trajectory is the wandering trajectory;
[0066] If the moving trajectory does not include the trajectory segment, it is determined that the moving trajectory is not the wandering trajectory.
[0067] In a third aspect, the present application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;
[0068] Memory, used to store computer programs;
[0069] The processor is used to implement any door lock control method described in the first aspect when executing the program stored in the memory.
[0070] In a fourth aspect, the present application provides a computer-readable storage medium, on which a program of a door lock control method is stored. When the program of the door lock control method is executed by a processor, the steps of the door lock control method described in any one of the first aspects are implemented.
[0071] The above technical solution provided by the embodiment of the present application has the following advantages compared with the prior art:
[0072] The embodiment of the present invention first determines whether a target object appears in the sensing area of the first detection device based on first detection data output by the first detection device; if the target object appears in the sensing area, determines whether the target object is close to the door lock based on second detection data output by the second detection device; if the target object is close to the door lock, performs facial recognition on the target object; if facial recognition is successful, the transmission mechanism can be controlled to open the door lock.
[0073] In the embodiment of the present invention, the first detection device performs a first level detection to determine whether a target object appears, and then performs a second level detection by the second detection device to determine whether the target object is close to the door lock, and finally performs a third level detection to determine whether the face recognition of the target object is successful.
[0074] Through three-level detection, the next level of detection is triggered only when the conditions for entering the next level of detection are met, avoiding starting face recognition at the first detection, avoiding false triggering of the system, and saving power consumption.
[0075] Improve the battery life and, after multi-level testing, improve the safety of the door lock. BRIEF DESCRIPTION OF THE DRAWINGS
[0076] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and, together with the description, serve to explain the principles of the invention.
[0077] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0078] Figure 1 A flow chart of a door lock control method provided in an embodiment of the present application;
[0079] Figure 2 A schematic diagram of each detection area in a sensing area provided in an embodiment of the present application;
[0080] Figure 3 A schematic diagram of a radial distance provided in an embodiment of the present application;
[0081] Figure 4 A schematic diagram of distance information and angle information provided in an embodiment of the present application;
[0082] Figure 5 A schematic diagram of angle information provided in an embodiment of the present application;
[0083] Figure 6 A schematic diagram of a target object at different positions provided in an embodiment of the present application;
[0084] Figure 7 A structural diagram of a door lock control device provided in an embodiment of the present application;
[0085] Figure 8 A structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0086] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0087] Since PIR detection is commonly used on the market to sense the presence of objects and then activate the face recognition function, when an object passes in front of the door, the PIR wake-up system may be triggered by mistake, resulting in unnecessary power consumption and affecting the battery life of the smart door lock. To this end, the embodiments of the present application provide a door lock control method, device, electronic device and storage medium.
[0088] like Figure 1 As shown, the door lock control method can be applied to a smart door lock, or to a control module independent of the smart door lock. The door lock control method may include the following steps:
[0089] Step S101, determining whether a target object appears in a sensing area of a first detection device based on first detection data output by the first detection device;
[0090] In the embodiment of the present invention, the first detection device may include a pyroelectric infrared sensor (PIR) and / or an ultrasonic sensor. The ultrasonic sensor has two detection modes, namely, an existence detection mode and a motion detection mode. The existence detection mode can only be used to generate a trigger signal after an object appears in the sensing area, that is, to determine whether an object appears, and its characteristic is low power consumption; the motion detection mode is used to measure the distance and angle of the detected object from the sensor, and its characteristic is high power consumption. In the first detection device in the embodiment of the present invention, the existence detection mode of the ultrasonic sensor can be used to detect the target object. Accordingly, the first detection data may include infrared detection data output by the pyroelectric infrared sensor and / or ultrasonic detection data output by the ultrasonic sensor.
[0091] In order to avoid missed detection and improve the accuracy of detection, a combination of pyroelectric infrared sensors and ultrasonic sensors can be used. The reason is that pyroelectric infrared sensors have a small working current and a wide detection coverage range, but a high false trigger rate, which makes them suitable for use with ultrasonic sensors to detect whether a target object appears in the sensing area. Ultrasonic sensors are active working devices that emit detection signals, that is, short radio pulses with high pulse power. When these electromagnetic waves encounter the surface of an object, the pulse energy will scatter in all directions, and part of the energy signal will be reflected back to the sensor. The antenna can determine the presence of an object in the propagation direction by receiving the energy signal, and then obtain the object's position. Ultrasonic sensors have certain emission and reception opening angles, forming a fan-shaped working area (such as Figure 2 As shown in the figure, radial moving objects can be detected. However, as a passive sensing device, PIR has the defect of being insensitive to radial moving objects, so it can detect objects moving in directions other than radial.
[0092] The sensing area of the first detection device (such as Figure 2) can be determined based on the sensing range of the pyroelectric infrared sensor and / or ultrasonic sensor. The sensing range of the ultrasonic sensor is the fan-shaped working area formed by the opening angle between its transmitting signal and receiving signal. Different transmitting powers can be selected according to the needs of the usage scenario. Different transmitting powers determine the detectable distance, that is, the fan-shaped radius, and the working range (that is, the angle between the transmitting signal and the receiving signal). Figure 2 As shown, Figure 2 The object appears in the detection area, that is, the sensing area of the first detection device.
[0093] In this step, when the first detection data output by the first detection device determines that an obstacle is detected, it can be determined that a target object appears in the sensing area.
[0094] Step S102, if a target object appears in the sensing area, determining whether the target object is close to the door lock based on second detection data output by a second detection device;
[0095] In an embodiment of the present invention, the second detection device may be a separate ultrasonic sensor or a motion detection mode of the ultrasonic sensor in the first detection device. The second detection device is used to detect the distance and angle between the target object and itself. Since the power consumption of the motion detection mode of the ultrasonic sensor is higher than that of the presence detection mode, the motion detection mode of the ultrasonic sensor may be activated only after the PIR sensor and / or the presence detection mode of the ultrasonic sensor determines that a target object appears in the sensing area, so as to reduce power consumption.
[0096] Since the second detection device can detect the distance and angle between the target object and itself, the distance and angle between the target object and itself can be determined based on the second detection data output by the second detection device, and further, it can be determined whether the target object is gradually approaching the door lock or staying in a position close to the door lock.
[0097] The detection area of the second detection device can be Figure 2 The distance in the proximity detection area, such as Figure 2 As shown, the object appearance detection area includes a distance approach detection area.
[0098] If the radial distance between the target object and the door lock is greater than the threshold within a certain period of time after the target object appears in the sensing area, it is considered that the object has no intention of approaching the door lock, and the movement of such objects can be filtered out. The straight-line distance of the object in front of the position sensor (that is, in front of the door lock) is recorded as the radial distance. The radial distance is as follows: Figure 3 shown.
[0099] Step S103, if the target object is close to the door lock, perform face recognition on the target object;
[0100] Since the face recognition module consumes a large amount of working current and is not suitable to be in working state for a long time, the face recognition module can be started only after it is determined that the target object is close to the door lock, and the face recognition of the target object can be started to reduce power consumption.
[0101] like Figure 2 The effective detection area for face recognition is the effective detection area for the face recognition module, and the proximity detection area includes the effective detection area for face recognition. So far, the embodiment of the present invention starts the detection devices with higher and higher power consumption step by step from the detection devices with low power consumption according to the different power consumption of different detection devices, so as to save energy and improve the battery life.
[0102] When it is determined that the target object is close to the door lock, the face module is started for face recognition. If no valid face is detected and it fails after several attempts, the face recognition module is silenced (i.e. the module is stopped for a period of time).
[0103] Step S104, if the face recognition is successful, control the transmission mechanism to unlock the door.
[0104] In the embodiment of the present invention, the transmission mechanism may refer to a structure such as a motor that can drive the door lock to open.
[0105] The embodiment of the present invention first determines whether a target object appears in the sensing area of the first detection device based on first detection data output by the first detection device; if the target object appears in the sensing area, determines whether the target object is close to the door lock based on second detection data output by the second detection device; if the target object is close to the door lock, performs facial recognition on the target object; if facial recognition is successful, the transmission mechanism can be controlled to open the door lock.
[0106] The embodiment of the present invention performs a first level detection through a first detection device to determine whether a target object appears, and then performs a second level detection through a second detection device to determine whether the target object is close to the door lock, and finally performs a third level detection to determine whether the face recognition of the target object is successful. Through the three-level detection, the next level of detection is triggered only when the conditions for entering the next level of detection are met, avoiding starting face recognition at the first detection, avoiding false triggering of the system, saving power consumption, and improving battery life. Moreover, after multiple levels of detection, the security of the door lock is improved.
[0107] In another embodiment of the present invention, step S102 determines whether the target object is close to the door lock based on the second detection data output by the second detection device, including:
[0108] Step 201, calculating the moving trajectory of the target object based on the second detection data;
[0109] Since the second detection data includes the distance and angle between the target object and the ultrasonic sensor itself detected at multiple moments, the position of the object at multiple moments can be calculated, and then the moving trajectory of the target object can be obtained.
[0110] Since radio waves travel at a constant speed (the speed of light c 0 ) propagation, so the distance is determined by the running time of the transmitted signal. Since the wave reaches the target and returns, the round-trip time t divided by 2 gives the time it takes for the wave to reach the target, and the distance R between the object and the sensor is:
[0111]
[0112] Step 202, determining whether the movement trajectory meets a preset approach condition;
[0113] In the embodiment of the present invention, the preset proximity condition can be used to exclude scenarios where unlocking is not necessary, such as wandering near the door lock, moving away from the door lock, or standing near the door lock.
[0114] In this step, it is possible to determine whether the movement trajectory satisfies the preset approach condition by identifying what kind of movement the movement trajectory belongs to.
[0115] Step 203, if the moving trajectory meets the preset approach condition, obtaining the trajectory end point of the moving trajectory;
[0116] Since the moving trajectory is composed of multiple object position points, the object position corresponding to the moment closest to the current moment (that is, the latest moment) can be obtained, and this object position is the end point of the trajectory.
[0117] Step 204, calculating the distance between the end point of the trajectory and the door lock;
[0118] Step 205: If the distance is less than a preset threshold, it is determined that the target object is close to the door lock.
[0119] The embodiment of the present invention can automatically determine whether the target object is close to the door lock based on the moving trajectory of the target object and the distance between the end point of the trajectory and the door lock. Through two methods of double verification, the judgment of whether the target object is close to the door lock is more accurate.
[0120] In another embodiment of the present invention, step 201 calculates the moving trajectory of the target object based on the second detection data, including:
[0121] Step 301, extracting distance information and angle information corresponding to multiple moments from the second detection data;
[0122] Step 302, calculating the object position of the target object at multiple moments based on the distance information and angle information corresponding to each moment;
[0123] Distance information Figure 4 The distance D in the image is Figure 4 The angle A in Figure 4 The coordinates of the object are marked as (D, A) in the image. By continuously recording the coordinates of the object, the motion trajectory of the object in the sensing area can be obtained.
[0124] like Figure 5 , since the transmitter emits a detection wave, when the detection wave encounters an object and is reflected back to form an echo, the echo E 1 (t) and E 2 The distances from the two receiving antennas Rx1 and Rx2 are different, resulting in a time difference, called the phase difference Y(t). Figure 5 It can be seen that the distance the echo signal reaches the receiving antenna Rx2 is dsinθ more than the distance to the receiving antenna Rx1. d is the distance between the two receiving antennas. Using trigonometric functions, we can get the angle θ between the object and the sensor, which is A in polar coordinates.
[0125] The position of an object in the sensing area can be known by polar coordinates. The transmitter of the position sensor transmits a detection signal at a fixed time interval of 250ms, that is, 4 times per second. After the receiving antenna processes the echo signal (internal processing of the sensor, signal processing is performed according to the energy intensity of the echo signal, such as FFT transformation, etc.), it will send distance information and angle information to the main controller.
[0126] Step 303, determining whether the positions of multiple objects in the moving trajectory meet a preset interval condition;
[0127] According to the law that the moving trajectory of an object must change continuously, the distance and angle changes should also change continuously, which is reflected in the polar coordinate information as the interval distance between the object positions. If the interval distance is too large, it can be considered as an interference source, and the object position is filtered out to reduce the error. Then, the moving trajectory of the target object is generated by using the remaining multiple object positions after filtering out the object position in the moving trajectory.
[0128] Step 304: If the positions of the multiple objects in the moving trajectory meet a preset interval condition, generate the moving trajectory of the target object based on the positions of the objects at multiple moments.
[0129] The embodiment of the present invention can automatically calculate multiple object positions of a target object within a period of time and obtain a movement trajectory, and filter out the error points using a preset interval condition, thereby improving the accuracy of the obtained movement trajectory.
[0130] In another embodiment of the present invention, step 202 determines whether the positions of multiple objects in the moving trajectory meet a preset interval condition, including:
[0131] Step 401, calculating the distance between any two adjacent object positions in the moving trajectory;
[0132] Step 402: if the interval between any two adjacent object positions is less than or equal to a preset interval threshold, it is determined that the multiple object positions in the moving trajectory meet the preset interval condition;
[0133] Step 403: If the interval distance between any two adjacent object positions is greater than a preset interval threshold, it is determined that the later object position of the two adjacent object positions does not meet the preset interval condition.
[0134] For example, Figure 6 , the position P1 (D1, A1) at time 1 and the position P2 at time 2
[0135] If the distance between the positions (D2, A2) is less than the set threshold, and the distance between the positions P2 (D2, A2) at time 2 and P3 (D3, A3) at time 3 is also less than the set threshold, it can be considered that the object has moved from position P1 to position P2, and then to position P3, thus achieving object motion trajectory tracking. Figure 6 The distance between the middle position P3 and the position P4 (D4, A4) at time 4 is greater than the set threshold. The object position obtained later does not meet the preset interval condition. The position P4 is regarded as an interference source and is filtered out.
[0136] In another embodiment of the present invention, step 202 of determining whether the movement trajectory satisfies a preset approach condition includes:
[0137] Step 501, determining whether the movement trajectory is an approach trajectory from being away from the door lock to being close to the door lock;
[0138] In an embodiment of the present invention, the distance between any two adjacent object positions in the moving trajectory and the door lock can be calculated. If the distance between each later object position and the door lock is smaller than the distance between the earlier object position and the door lock (such as the case where the target object approaches the door lock directly), or the distance between the latest object position and the door lock is smaller than the distance between the earliest object position and the door lock (such as the case where the target object returns slightly in the middle but eventually approaches the door lock), then the moving trajectory can be determined to be an approaching trajectory.
[0139] Step 502: If the moving trajectory is the approaching trajectory, determine whether the moving trajectory satisfies a preset approaching condition.
[0140] The embodiment of the present invention can automatically determine that the moving trajectory meets the preset approach condition when the moving trajectory is an approach trajectory, and determine that the target object is approaching the door lock, and the intention may be to open the door lock.
[0141] In another embodiment of the present invention, step 202 of determining whether the movement trajectory satisfies a preset approach condition includes:
[0142] If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition;
[0143] When the ultrasonic sensor is awakened to detect the position of an object in the proximity detection area, a target object in the proximity detection area is often repeatedly detected at the same position, and when tracking the motion trajectory of the target object, the moving trajectory of the target object is monitored to be a stationary trajectory. The moving trajectory of the target object does not meet the preset proximity condition, and the object position of the target object is removed from the sensing area, and the trigger signal generated by the target object detected by the ultrasonic sensor at the object position is regarded as an invalid trigger.
[0144] Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition;
[0145] If the moving trajectory of a target object is detected to linger repeatedly in front of the door lock for a period of time, it is judged as abnormal behavior. At this time, the video recording can be turned on to record the situation within the monitoring range in front of the door, and an early warning message can be actively pushed to the user.
[0146] Alternatively, if the moving trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the moving trajectory does not satisfy the preset approach condition.
[0147] If it is detected that an object gradually moves away from the door lock from a position close to the door lock within a certain period of time, it is considered that the object has no intention of unlocking the door. It can be determined that the movement trajectory of the target object does not meet the preset approach condition, and the movement of the target object can be filtered out.
[0148] In yet another embodiment of the present invention, determining whether the movement trajectory is a wandering trajectory that moves repeatedly around the door lock includes:
[0149] Step 601, determining whether the movement trajectory includes a trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock;
[0150] In the embodiment of the present invention, the trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock may refer to any segment in the moving trajectory in which there are three object positions in chronological order, and the distance from the door lock is first away, then close, and then away.
[0151] Step 602, if the moving trajectory includes the trajectory segment, determining that the moving trajectory is the wandering trajectory;
[0152] Step 603: If the moving trajectory does not include the trajectory segment, determine that the moving trajectory is not the wandering trajectory.
[0153] The embodiment of the present invention can automatically identify wandering trajectories so as to filter out movement trajectories that do not meet the preset approach conditions.
[0154] In another embodiment of the present invention, a door lock control device is also provided. Figure 7 As shown, including:
[0155] A first determination module 11, configured to determine whether a target object appears in a sensing area of the first detection device based on first detection data output by the first detection device;
[0156] A second determination module 12, configured to determine whether a target object is close to the door lock based on second detection data output by a second detection device if the target object appears in the sensing area;
[0157] A face recognition module 13, used to perform face recognition on the target object if the target object approaches the door lock;
[0158] The unlocking module 14 is used to control the transmission mechanism to unlock the door if the face recognition is successful.
[0159] Optionally, the second determining module includes:
[0160] a first calculation unit, configured to calculate a moving trajectory of the target object based on the second detection data;
[0161] A first determining unit, configured to determine whether the moving trajectory satisfies a preset approach condition;
[0162] an acquisition unit, configured to acquire a trajectory end point of the movement trajectory if the movement trajectory meets a preset approach condition;
[0163] A second calculation unit, used for calculating the distance between the end point of the trajectory and the door lock;
[0164] The second determining unit is configured to determine that the target object is close to the door lock if the distance is less than a preset threshold.
[0165] Optionally, the first computing unit includes:
[0166] an extraction subunit, configured to extract distance information and angle information corresponding to a plurality of moments from the second detection data;
[0167] A calculation subunit, used for calculating the object position of the target object at multiple moments based on the distance information and angle information corresponding to each moment;
[0168] A determination subunit, used to determine whether the positions of multiple objects in the moving trajectory meet a preset interval condition;
[0169] The generating subunit is used to generate the moving trajectory of the target object based on the object positions at multiple moments if the multiple object positions in the moving trajectory meet a preset interval condition.
[0170] Optionally, the determining subunit is further used for:
[0171] Calculating the distance between any two adjacent object positions in the moving trajectory;
[0172] If the interval distance between any two adjacent object positions is less than or equal to a preset interval threshold, it is determined that the multiple object positions in the movement trajectory meet the preset interval condition;
[0173] If there are any two adjacent object positions whose interval distance is greater than a preset interval threshold, it is determined that the later object position of the two adjacent object positions does not meet the preset interval condition.
[0174] Optionally, the first determining unit is further configured to:
[0175] Determining whether the movement trajectory is an approach trajectory from being away from the door lock to being close to the door lock;
[0176] If the moving trajectory is the approaching trajectory, it is determined that the moving trajectory satisfies a preset approaching condition.
[0177] Optionally, the first determining unit is further configured to:
[0178] If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition;
[0179] Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition;
[0180] Alternatively, if the moving trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the moving trajectory does not satisfy the preset approach condition.
[0181] Optionally, the first determining unit is further configured to:
[0182] Determining whether the movement trajectory includes a trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock;
[0183] If the moving trajectory includes the trajectory segment, determining that the moving trajectory is the wandering trajectory;
[0184] If the moving trajectory does not include the trajectory segment, it is determined that the moving trajectory is not the wandering trajectory.
[0185] In another embodiment of the present invention, there is also provided an electronic device, comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;
[0186] Memory, used to store computer programs;
[0187] The processor is used to implement the door lock control method described in any of the above method embodiments when executing the program stored in the memory.
[0188] In the electronic device provided by an embodiment of the present invention, the processor implements the method of executing a program stored in the memory by first determining whether a target object appears in the sensing area of the first detection device based on first detection data output by the first detection device; if the target object appears in the sensing area, determining whether the target object is close to the door lock based on second detection data output by the second detection device; if the target object is close to the door lock, performing face recognition on the target object; if the face recognition is successful, the transmission mechanism can be controlled to open the door lock.
[0189] The embodiment of the present invention performs a first level detection through a first detection device to determine whether a target object appears, and then performs a second level detection through a second detection device to determine whether the target object is close to the door lock, and finally performs a third level detection to determine whether the face recognition of the target object is successful. Through the three-level detection, the next level of detection is triggered only when the conditions for entering the next level of detection are met, avoiding starting face recognition at the first detection, avoiding false triggering of the system, saving power consumption, and improving battery life. Moreover, after multiple levels of detection, the security of the door lock is improved.
[0190] The communication bus 1140 mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The communication bus 1140 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0191] The communication interface 1120 is used for communication between the above electronic device and other devices.
[0192] The memory 1130 may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0193] The above-mentioned processor 1110 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 gates or transistor logic devices, discrete hardware components.
[0194] In another embodiment of the present invention, a computer-readable storage medium is also provided, on which a program of a door lock control method is stored. When the program of the door lock control method is executed by a processor, the steps of the door lock control method described in any of the aforementioned method embodiments are implemented.
[0195] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0196] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.
Claims
1. A door lock control method, characterized in that: include: determining whether a target object appears in a sensing area of the first detection device based on first detection data output by the first detection device, wherein the first detection device includes a pyroelectric infrared sensor and an ultrasonic sensor; If a target object appears in the sensing area, the second detection device is controlled to start, and based on the second detection data output by the second detection device, it is determined whether the target object is close to the door lock, wherein the second detection device is used to detect the distance and angle between the target object and itself; The determining whether the target object is close to the door lock based on the second detection data output by the second detection device includes: calculating the moving trajectory of the target object based on the second detection data; determining whether the moving trajectory meets the preset approach condition; if the moving trajectory meets the preset approach condition, obtaining the trajectory end point of the moving trajectory; calculating the distance between the trajectory end point and the door lock; if the distance is less than a preset threshold, determining that the target object is close to the door lock; The determining whether the movement trajectory satisfies a preset approach condition includes: determining whether the moving trajectory is an approaching trajectory from being away from the door lock to being close to the door lock; if the moving trajectory is the approaching trajectory, determining that the moving trajectory satisfies a preset approaching condition; or, If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition; Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition; Alternatively, if the movement trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the movement trajectory does not meet the preset approach condition; If the target object approaches the door lock, the face recognition module is controlled to start, and the face recognition module is used to perform face recognition on the target object; If the face recognition is successful, the transmission mechanism is controlled to unlock the door; Among them, the power consumption of the first detection device is less than the power consumption of the second detection device, and the power consumption of the second detection device is less than the power consumption of the face recognition module.
2. The door lock control method according to claim 1, characterized in that: Calculating the moving trajectory of the target object based on the second detection data includes: Extracting distance information and angle information corresponding to a plurality of moments from the second detection data; Calculating the object position of the target object at multiple moments based on the distance information and angle information corresponding to each moment; Determining whether the positions of multiple objects in the moving trajectory meet a preset interval condition; If the positions of multiple objects in the moving trajectory meet a preset interval condition, the moving trajectory of the target object is generated based on the object positions at multiple moments.
3. The door lock control method according to claim 2, characterized in that: Determining whether the positions of multiple objects in the moving trajectory meet a preset interval condition includes: Calculating the distance between any two adjacent object positions in the moving trajectory; If the interval distance between any two adjacent object positions is less than or equal to a preset interval threshold, it is determined that the multiple object positions in the movement trajectory meet the preset interval condition; If there are any two adjacent object positions whose interval distance is greater than a preset interval threshold, it is determined that the later object position of the two adjacent object positions does not meet the preset interval condition.
4. The door lock control method according to claim 1, characterized in that: Determining whether the movement trajectory is a wandering trajectory that moves repeatedly around the door lock includes: Determining whether the movement trajectory includes a trajectory segment from being away from the door lock to being close to the door lock and then away from the door lock; If the moving trajectory includes the trajectory segment, determining that the moving trajectory is the wandering trajectory; If the moving trajectory does not include the trajectory segment, it is determined that the moving trajectory is not the wandering trajectory.
5. A door lock control device, characterized in that: include: A first determination module, configured to determine whether a target object appears in a sensing area of a first detection device based on first detection data output by the first detection device, wherein the first detection device includes a pyroelectric infrared sensor and an ultrasonic sensor; A second determination module, configured to control a second detection device to start if a target object appears in the sensing area, and determine whether the target object is close to the door lock based on second detection data output by the second detection device, wherein the second detection device is configured to detect a distance and an angle between the target object and the second detection device; The determining whether the target object is close to the door lock based on the second detection data output by the second detection device includes: calculating the moving trajectory of the target object based on the second detection data; determining whether the moving trajectory meets the preset approach condition; if the moving trajectory meets the preset approach condition, obtaining the trajectory end point of the moving trajectory; calculating the distance between the trajectory end point and the door lock; if the distance is less than a preset threshold, determining that the target object is close to the door lock; The determining whether the movement trajectory satisfies a preset approach condition includes: determining whether the moving trajectory is an approaching trajectory from being away from the door lock to being close to the door lock; if the moving trajectory is the approaching trajectory, determining that the moving trajectory satisfies a preset approaching condition; or, If the moving trajectory is a stationary trajectory, determining that the moving trajectory does not meet the preset approach condition; Alternatively, if the movement trajectory is a wandering trajectory that repeatedly moves around the door lock, it is determined that the movement trajectory does not meet the preset approach condition; Alternatively, if the movement trajectory is a moving trajectory from approaching the door lock to moving away from the door lock, it is determined that the movement trajectory does not meet the preset approach condition; A face recognition module, used for controlling the face recognition module to start if the target object approaches the door lock, and performing face recognition on the target object through the face recognition module; The unlocking module is used to control the transmission mechanism to unlock the door if the face recognition is successful; Among them, the power consumption of the first detection device is less than the power consumption of the second detection device, and the power consumption of the second detection device is less than the power consumption of the face recognition module.
6. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; The processor is used to implement the door lock control method described in any one of claims 1 to 4 when executing the program stored in the memory.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program of a door lock control method, and when the program of the door lock control method is executed by a processor, the steps of the door lock control method described in any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Full-automatic electric door lock for vehicle
CN101109246A
Multifunctional digital door
CN101438020A
Door lock and doorbell control method based on active security and protection and control system
CN107093245A
High safety face recognition intelligent lock
CN108777011A
Intelligent door lock non-inductive door-opening system based on face recognition and control method thereof
CN109147126A
