Height detection method and device for intelligent door lock, computer equipment and storage medium

Through the motion feature detection and image recognition technology of smart door locks, children's height can be accurately measured and identified, and the problem of face recognition smart locks inaccurate recognition of children is solved, and the growth monitoring function is realized, which improves user experience and security.

CN119810956AActive Publication Date: 2025-04-11DESSMANN CHINA MACHINERY & ELECTRONICS +1
View PDF 17 Cites 0 Cited by

Patent Information

Application Number
CN202411861962.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-17
Publication Date
2025-04-11
Estimated Expiration
2044-12-17

AI Technical Summary

Technical Problem

Face recognition smart locks cannot accurately identify children with insufficient height, resulting in failure of verification and entering the banned protection mode, affecting the user experience, and lacking the function of monitoring and recording for children's growth.

Method used

By detecting the motion characteristics of the target object within the preset range of the smart door lock, obtaining and identifying the human body features in the image frame sequence, determining the current height value of the target object, and controlling the smart door lock to perform corresponding operations, including triggering growth monitoring function and face recognition.

Benefits of technology

Accurate measurement of children's height is achieved, verification failure and the emergence of banned protection mode, and growth monitoring functions are provided, improving user experience and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119810956A_ABST
    Figure CN119810956A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of intelligent locks, and discloses a height detection method and device of an intelligent door lock, computer equipment and a storage medium, and the method comprises the following steps: detecting motion characteristics of a target object in a preset range of the intelligent door lock; when the motion feature accords with a preset feature, acquiring an image frame sequence of the target object acquired by the intelligent door lock; identifying an image frame of which the human body feature of the target object meets a preset condition in the image frame sequence to obtain at least one effective image frame; and determining a current height value of the target object according to the effective image frame, and controlling the intelligent door lock to execute a control operation corresponding to the current height value. The problems that a face recognition intelligent lock cannot accurately recognize a child with insufficient height, verification fails to enter a forbidden test protection mode, inconvenience is brought to a user, and a child growth monitoring and recording function is lacked are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of smart locks, and in particular to a height detection method, device, computer equipment and storage medium for a smart door lock. Background Art

[0002] With the rapid advancement of technology, smart locks are increasingly used in modern homes, gradually replacing traditional mechanical locks. Among them, face recognition smart door locks have become a popular choice in the market due to their convenience and high security. This type of smart lock usually relies on radar to sense the approach of a human body. Once a human body is detected, it automatically wakes up the lock and quickly activates the face recognition function to achieve a quick unlocking operation, providing users with a convenient door entry experience.

[0003] However, current face recognition smart locks have obvious flaws. When a child who is not tall enough approaches the smart lock, the radar will mistakenly identify him as a normal user and wake up the lock. Due to the limited height of children, the camera can usually only capture half of the face, which causes the face recognition verification to fail. After multiple verification failures, the lock will enter the no-test protection mode, and it will not be possible to verify and open the door again for a period of time. This not only brings great inconvenience to children using smart locks, but also causes trouble to parents, seriously affecting the user experience of smart locks. In addition, the existing smart lock technology lacks attention to children's growth, and fails to make full use of its own functions to provide auxiliary monitoring and recording functions for the healthy growth of children. Summary of the invention

[0004] In view of this, the embodiments of the present invention provide a height detection method, device, computer equipment and storage medium for a smart door lock to solve the problem that a face recognition smart lock cannot accurately identify children with insufficient height, resulting in verification failure and entering a no-test protection mode, causing inconvenience to the user, and lacks a child growth monitoring and recording function.

[0005] In a first aspect, an embodiment of the present invention provides a height detection method for a smart door lock, the method comprising:

[0006] Detect the motion characteristics of the target object within the preset range of the smart door lock;

[0007] When the motion feature meets the preset feature, obtaining the image frame sequence of the target object captured by the smart door lock;

[0008] Identify the image frames whose human features of the target object meet the preset conditions in the image frame sequence, and obtain at least one valid image frame;

[0009] The current height value of the target object is determined according to the valid image frame, and the smart door lock is controlled to perform a control operation corresponding to the current height value.

[0010] Furthermore, the step of identifying an image frame in the image frame sequence whose human features of the target object meet a preset condition to obtain at least one valid image frame includes:

[0011] Identifying a target object in an image frame of the image frame sequence;

[0012] Determining key part features of the target object in the image frame, and comparing the key part features with preset features to obtain a comparison result;

[0013] An image frame in the image frame sequence that meets a preset condition is determined according to the comparison result to obtain at least one valid image frame.

[0014] Further, determining the current height value of the target object according to the valid image frame includes:

[0015] Obtaining the installation height value of the target lens on the smart door lock;

[0016] Detecting the distance between the target object and the target lens, and measuring the angle between the center of the effective image frame and the top of the head of the target object;

[0017] A current height value of the target object is calculated based on the installation height value, the distance value, and the angle value.

[0018] Further, the controlling the smart door lock to perform the control operation corresponding to the current height value includes:

[0019] Comparing the current altitude value with a preset altitude value;

[0020] If the current height value is less than or equal to the preset height value, the growth monitoring function of the smart door lock is triggered, and a growth curve of the target object is constructed according to the current height value;

[0021] Alternatively, if the current height value is greater than the preset height value, the wake-up operation of the smart door lock is executed and the face recognition function of the smart door lock is triggered.

[0022] Further, the triggering of the growth monitoring function of the smart door lock and constructing the growth curve of the target object according to the current height value include:

[0023] Obtaining the historical height value of the target object;

[0024] Analyze the current height value and the historical height value to obtain the height change trend of the target object;

[0025] A growth curve is constructed based on the height change trend, and the growth curve of the target object is displayed on the smart door lock.

[0026] Furthermore, after determining the current height value of the target object according to the valid image frame, the method further includes:

[0027] Detecting a target object in the effective image frame, wherein the target object is an object that can elevate a human body and has a load-bearing function;

[0028] Matching the appearance features of the target object with the preset appearance features in the preset object database to obtain a matching result;

[0029] If the matching result is a successful match, the current height value is corrected based on the appearance characteristics of the target object to obtain a corrected current height value.

[0030] Furthermore, the current height value is corrected based on the shape feature of the target object to obtain a corrected current height value, including:

[0031] Marking the edge of the target object according to the shape feature to obtain a first marking position and a second marking position, wherein the first marking position is used to represent the upper edge position of the target object, and the second marking position is used to represent the lower edge position of the target object;

[0032] Calculating a marking distance between the first marking position and the second marking position;

[0033] The current height value is corrected according to the marking distance to obtain a corrected current height value.

[0034] In a second aspect, an embodiment of the present invention provides a face recognition method for a smart door lock, the method comprising:

[0035] Obtain the current height value of the target object within the preset range of the smart door lock;

[0036] Determine whether the current height value reaches a preset height value;

[0037] If the preset height value is reached, the face recognition function of the smart door lock is enabled, and the face recognition is performed on the target object to obtain a first recognition result; or, if the preset height value is not reached, the auxiliary recognition function of the smart door lock is enabled, and the pan / tilt of the smart door lock is controlled to perform a moving operation until the facial area of ​​the target object is in the recognition position to obtain a second recognition result.

[0038] Further, the pan / tilt that controls the smart door lock performs a moving operation until the facial area of ​​the target object is at a recognition position, and obtains a second recognition result, including:

[0039] Acquire valid image frames captured by the smart door lock;

[0040] Detecting the absence of facial features in the valid image frame;

[0041] The moving direction of the pan / tilt in the smart door lock is determined according to the missing situation, and the pan / tilt is controlled to perform a moving operation according to the moving direction until the facial feature is located in the recognition area of ​​the smart door lock, thereby obtaining a second recognition result.

[0042] In a third aspect, an embodiment of the present invention provides a height detection device for a smart door lock, the device comprising:

[0043] A detection module, used to detect the motion characteristics of a target object within a preset range of the smart door lock;

[0044] A first acquisition module, configured to acquire an image frame sequence of the target object captured by the smart door lock when the motion feature meets a preset feature;

[0045] A recognition module, used to recognize image frames whose human features of the target object meet preset conditions in the image frame sequence, and obtain at least one valid image frame;

[0046] A determination module is used to determine the current height value of the target object according to the valid image frame, and control the smart door lock to perform a control operation corresponding to the current height value.

[0047] In a fourth aspect, an embodiment of the present invention provides a face recognition device for a smart door lock, the device comprising:

[0048] A second acquisition module is used to obtain a current height value of a target object within a preset range of the smart door lock;

[0049] A judging module, used to judge whether the current height value reaches a preset height value;

[0050] An enabling module is used to enable the face recognition function of the smart door lock if a preset height value is reached, perform face recognition on the target object, and obtain a first recognition result; or, if the preset height value is not reached, enable the auxiliary recognition function of the smart door lock, control the pan / tilt of the smart door lock to perform a moving operation until the facial area of ​​the target object is in a recognition position, and obtain a second recognition result.

[0051] In a fifth aspect, an embodiment of the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, computer instructions being stored in the memory, and the processor executing the method of the above-mentioned first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0052] In a sixth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0053] The method provided in the embodiment of the present application has the following beneficial effects:

[0054] The method provided in the embodiment of the present application helps to accurately locate objects that may need height detection by detecting the motion characteristics of target objects within the preset range of the smart door lock, reducing unnecessary waste of computing resources and improving detection efficiency. When the motion characteristics meet the preset characteristics, the image frame sequence is obtained, and effective data can be obtained in a targeted manner to avoid interference from invalid data. Identifying image frames that meet the preset conditions to obtain valid image frames can improve the accuracy of subsequent height calculations and ensure the reliability of the data source. Determining the current height value based on the valid image frame can achieve accurate measurement of the height of the target object, effectively solving the problem that the face recognition smart lock cannot accurately identify children with insufficient height and fails to enter the no-test protection mode. At the same time, it also provides a data basis for the growth monitoring function, which helps to pay attention to the growth of children and record their height change trends to construct a growth curve, providing parents with intuitive information about their children's growth.

[0055] The method provided in the embodiment of the present application further improves the accuracy of height measurement by obtaining the installation height value of the target lens on the smart door lock, detecting the distance value between the target object and the target lens, and measuring the angle value between the center of the effective image frame and the top of the target object's head when determining the current height value. In the step of identifying the image frame whose human body features meet the preset conditions in the image frame sequence, the effective image frame is determined by determining the key part features and comparing them with the preset features, thereby enhancing the accuracy and reliability of recognition. In addition, detecting the target object in the effective image frame and correcting the current height value by matching the appearance features can eliminate the misjudgment of height caused by raising the object, making the height detection result more real and accurate, and further improving the stability and practicality of the height detection function of the entire smart door lock.

[0056] The method provided in the embodiment of the present application can provide basic data for subsequent judgment by obtaining the current height value of the target object within the preset range of the smart door lock, so that the smart door lock can flexibly adjust the recognition strategy according to the actual height of the target object. By judging whether the current height value reaches the preset height value, different height scenes are distinguished to avoid confusion or failure of the recognition process due to height mismatch, and improve the stability and reliability of recognition. When the preset height value is reached, the face recognition function is enabled, and identity authentication can be completed in conventional height scenes, simplifying the unlocking process and enhancing the convenience and fluency of daily use. When the preset height value is not reached, the auxiliary recognition function is enabled and the movement of the pan-tilt is controlled, fully considering children or short people, ensuring smooth use by special height groups, expanding the scope of application, reflecting humanized design, and automatically adjusting the pan-tilt to accurately locate the facial area, effectively reducing the risk of recognition failure caused by manual or deviation, further improving the recognition accuracy and success rate, and enhancing the adaptability and stability of the product in complex scenes. BRIEF DESCRIPTION OF THE DRAWINGS

[0057] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0058] Figure 1 is a flow chart of a height detection method for a smart door lock according to an embodiment of the present invention;

[0059] Figure 2 Schematic diagram of height detection from the perspective of a smart door lock lens according to an embodiment of the present invention.

[0060] Figure 3 is a structural block diagram of a height detection system for a smart door lock according to an embodiment of the present invention;

[0061] Figure 4 is a flow chart of a face recognition method for a smart door lock according to an embodiment of the present invention;

[0062] Figure 5 is a structural block diagram of a height detection device for a smart door lock according to an embodiment of the present invention;

[0063] Figure 6 is a structural block diagram of a face recognition device for a smart door lock according to an embodiment of the present invention;

[0064] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0065] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0066] According to an embodiment of the present invention, a height detection method, apparatus, computer device and storage medium for a smart door lock are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0067] In this embodiment, a height detection method for a smart door lock is provided. Figure 1 : is a flow chart of a height detection method for a smart door lock according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0068] Step S11, detecting the motion characteristics of the target object within the preset range of the smart door lock.

[0069] In the embodiment of the present application, the radar device of the smart door lock continuously monitors the situation within a preset range. When an object approaches, it analyzes its movement speed, trajectory and other information to detect movement characteristics. If the movement speed is within the normal human walking speed range (such as between 0.5 meters and 2 meters per second) and the movement trajectory presents regular straight lines or slight curve changes, similar to the path of a human walking to the door, it is easy to determine that it meets the preset characteristics, providing a basis for the subsequent accurate acquisition of image frame sequences, avoiding unnecessary operations caused by non-human targets (such as small animals running fast, wind-blown debris, etc.), and improving system resource utilization efficiency and detection accuracy.

[0070] Step S12, when the motion feature meets the preset feature, obtain the image frame sequence of the target object captured by the smart door lock.

[0071] In the embodiment of the present application, when it is detected that the motion characteristics of the target object meet the preset characteristics, that is, when it is determined that an object similar to human walking is approaching the smart door lock, the smart lock control system activates the camera to shoot at a specific frame rate (for example, 20 frames per second) to obtain a continuous sequence of image frames in front of the door. This sequence can record the state changes of the target object in front of the door, providing a data basis for subsequent identification of human features and calculation of height. The shooting timestamp of each frame of the image will be recorded during the acquisition, which is convenient for time series association and data screening during multi-frame image analysis, so as to improve the accuracy and reliability of the height detection process, so that the smart door lock can accurately judge the height and perform corresponding operations.

[0072] Step S13, identifying image frames whose human body features of the target object meet preset conditions in the image frame sequence, and obtaining at least one valid image frame.

[0073] In the embodiment of the present application, step S13 includes the following steps A1-A3:

[0074] Step A1, identifying a target object in an image frame in an image frame sequence.

[0075] Specifically, after obtaining the target object image frame sequence collected by the smart door lock, the target object in each frame image is first identified to provide a basis for subsequent related human feature analysis operations. In specific implementation, the target detection module of the computer vision algorithm can be used to process each frame image. The YOLO series algorithm or the deep learning target detection algorithm such as Faster R-CNN can be used to run these algorithms on the high-performance embedded processor of the smart lock, and each frame image is scanned using a pre-trained model containing a large number of human images, and the area where the target object (human body) is located is selected to achieve target object recognition.

[0076] Step A2, determining key part features of the target object in the image frame, and comparing the key part features with preset features to obtain a comparison result.

[0077] Specifically, after identifying the target object in the image frame, it is necessary to determine the key part features of the target object and compare them with the preset features. Key part features may include the position and shape of the head, shoulders, waist, knees, feet and other parts, which are used to judge the human posture and calculate the height. The preset features are the pre-set standard feature ranges of the corresponding key parts of the normal human body. The comparison can determine whether the key parts are normal. In terms of implementation, the key part features are determined by using the human posture estimation related technology in the computer vision algorithm. For example, the OpenPose algorithm is used to detect the key points of the human body and give information such as the coordinate position. Based on this, the key part morphology, relative position relationship and other features are analyzed. The preset features are obtained by statistically analyzing a large amount of key part data under normal human postures to obtain a reasonable range value, and the key part features actually detected are compared with them. The key part features are judged to be normal within the preset range, and abnormal if they exceed the range.

[0078] Step A3, determining an image frame in the image frame sequence that meets a preset condition according to the comparison result, and obtaining at least one valid image frame.

[0079] Specifically, the image frames that meet the preset conditions in the image frame sequence are determined based on the comparison results, and these image frames are screened out as valid image frames for subsequent analysis and processing. The preset conditions are set based on the key part feature comparison results. For example, image frames whose key part features meet the preset feature range are considered to meet the preset conditions. The implementation method is to write the screening logic code according to the set comparison judgment rules, run the code on the embedded processor of the smart lock, traverse and judge each frame in the image frame sequence, and if the key part features of the human body in a certain frame are within the preset normal feature range after comparison, it is determined that the frame meets the preset conditions, and it is marked as a valid image frame and collected to form a valid image frame set for subsequent operations such as determining the current height value of the target object.

[0080] Step S14, determining the current height value of the target object according to the valid image frame, and controlling the smart door lock to perform a control operation corresponding to the current height value.

[0081] In the embodiment of the present application, determining the current height value of the target object according to the valid image frame includes the following steps B1-B3:

[0082] Step B1, obtaining the installation height value of the target lens on the smart door lock.

[0083] Specifically, first obtain the installation height value of the target lens on the smart door lock. It is a known fixed parameter, which plays a fundamental role in calculating the height of the target object using geometric relationships and is an important reference data for the height calculation process. The implementation method is that after the smart door lock is installed, the installer can use a tape measure or other precise measuring tool to measure the distance from the ground to the center of the lens vertically and record it, and store it in the configuration parameter storage area for subsequent reading and use when calculating the height; or pre-set the standard installation height value corresponding to the conventional door body in the production process and solidify it in the program code as the default value, and then calibrate and update it according to the actual installation situation to ensure that the value used for height calculation is accurate.

[0084] Step B2, detecting the distance between the target object and the target lens, and measuring the angle between the center of the effective image frame and the top of the target object's head.

[0085] Specifically, detect the distance between the target object and the target lens, and measure the angle between the center of the effective image frame and the top of the target object's head. The two factors affect the height calculation result under the geometric relationship, and are necessary elements for building a right triangle model to infer the height. Only by combining the two factors can the height be calculated according to geometric principles. Specifically, the distance value can be detected by using the radar ranging function that comes with the smart lock. After the target object enters the preset range, the radar calculates the distance value according to the corresponding principles (such as the speed of light and the round-trip time of the signal) by transmitting and receiving signals and analyzing the propagation time. The angle value is measured using the angle measurement module of the computer vision algorithm. First, determine the coordinate position of the center of the picture and the top of the target object's head, and then use trigonometric functions to calculate the angle value, which provides support for accurate height calculation.

[0086] Step B3, calculating the current height value of the target object based on the installation height value, the distance value and the angle value.

[0087] Specifically, after obtaining the relevant values, the current height of the target object, that is, the current height value, can be calculated according to the right triangle geometry principle and specific mathematical formulas to achieve quantitative calculation. The implementation method is based on the relationship between the trigonometric function, the tangent function and the side length of the right triangle. The height calculation formula is as follows:

[0088]

[0089] Wherein, H is the current height value of the target object; Y is the installation height value; θ is the angle value; and X is the distance value.

[0090] As an example, Figure 2 As shown, assuming that the installation height Y of the cat's eye camera is 110 cm, if the target object's height exceeds the door lock installation height value Y, the target object's distance value X from the door lock is 150 cm, and the picture taken by the cat's eye camera can calculate the angle value θ=30° between the center of the picture and the top of the target object's head, then the target object's height H=110+tan30°*150=196 cm can be calculated; if the target object's height does not exceed the door lock installation height value Y, the target object's distance value X from the door lock is 100 cm, and the picture taken by the cat's eye camera can calculate the angle value θ=-10° between the center of the picture and the top of the target object's head, then the target object's height H=100+tan|-10°|*100=92.4 cm can be calculated.

[0091] In the embodiment of the present application, controlling the smart door lock to perform a control operation corresponding to the current height value includes the following steps C1-C3:

[0092] Step C1, comparing the current altitude value with the preset altitude value.

[0093] Specifically, the preset height value is a standard height value pre-set to distinguish different situations. The preset height value can be configured in the smart door lock system settings. Users can set it according to actual scene requirements (such as the height limit of children at home), or set the default value according to the common height classification standard at the factory and store it in the configuration parameter storage area. By comparing the actual measured current height value with it, the height range of the target object can be determined, and then the subsequent corresponding operations of the smart door lock can be determined.

[0094] Step C2: If the current height value is less than or equal to the preset height value, the growth monitoring function of the smart door lock is triggered, and a growth curve of the target object is constructed according to the current height value.

[0095] Specifically, when the current height value is less than or equal to the preset height value after comparison, the growth monitoring function of the smart door lock is triggered, and a growth curve of the target object is constructed based on the current height value. This is because if the target object's height is within this range, it is likely to be a child or other group of people whose growth needs to be paid attention to. By constructing a growth curve, the trend of their height changes over time can be intuitively recorded, making it easier for users to understand their growth status.

[0096] In the embodiment of the present application, step C2 includes the following steps C21-C23:

[0097] Step C21, obtaining the historical height value of the target object.

[0098] Specifically, historical height values ​​are the height data of the target object at different time points previously recorded in the same measurement method, which is an important basic data for constructing a growth curve. The smart door lock storage area will create a special space to store the height data measured in the past. These data can be stored in order by time sequence or measurement sequence number. When constructing a growth curve, the system will read the corresponding historical height value information from it to prepare for subsequent analysis.

[0099] Step C22, analyzing the current height value and the historical height values ​​to obtain the height change trend of the target object.

[0100] Specifically, the current height value and the acquired historical height value are analyzed, and the height data at different time points are statistically analyzed, such as calculating the height difference between adjacent time points, observing the change in growth rate, etc., so as to obtain the height change trend of the target object and determine whether it is steady growth, rapid growth or slow growth, etc. The implementation method is to use simple mathematical statistical methods, such as calculating the difference between two adjacent height measurements and dividing it by the corresponding time interval to obtain the height growth rate, or drawing a scatter plot to observe the distribution law of data points, etc. to determine the height change trend. These analysis operations can be implemented by running the corresponding data analysis code in the embedded processor of the smart door lock.

[0101] Step C23, constructing a growth curve based on the height change trend, and displaying the growth curve of the target object on the smart door lock.

[0102] Specifically, a growth curve is constructed based on the height change trend obtained through analysis. The growth curve of the target object can be displayed on a smart door lock with a display function, or transmitted to an external device such as a mobile phone APP connected to it through communication methods such as Bluetooth and Wi-Fi for display, so that users can intuitively understand the height change of the target object. The implementation method is to use a graphics drawing algorithm, with time as the horizontal axis and height value as the vertical axis, to connect the height data points corresponding to each time point to form a curve to show the change trend. When displayed on the smart door lock, the display driver is called to present the curve image, and when transmitted to the APP end, the APP displays the relevant data according to the established interface layout and drawing rules.

[0103] Step C3, if the current height value is greater than the preset height value, the wake-up operation of the smart door lock is executed and the face recognition function of the smart door lock is triggered.

[0104] Specifically, after determining the current height value of the target object, it is compared with the preset height value. If the current height value is greater than the preset height value, the wake-up operation of the smart door lock is executed, that is, the system sends instructions to activate the relevant functional modules, so that they can switch from standby or low-power state to normal working state, such as lighting up the display screen, starting the sensor, etc., to prepare for subsequent face recognition and other operations. Then the face recognition function is triggered, and the smart door lock uses built-in cameras and other image acquisition devices to obtain the facial image of the target object again, and analyzes and compares it through pre-stored face recognition algorithms and models to determine the legitimacy of the identity. If the recognition is successful, unlocking and other operations are performed according to the preset permissions and settings. If it fails, an alarm is issued or the user is prompted to perform other identity authentication methods.

[0105] In the embodiment of the present application, after determining the current height value of the target object according to the valid image frame, the method further includes the following steps S21-S23:

[0106] Step S21 , detecting a target object in a valid image frame, wherein the target object is an object that can elevate a human body and has a load-bearing function.

[0107] In the embodiment of the present application, after determining the current height value of the target object according to the effective image frame, the target object in the effective image frame can also be detected, wherein the target object refers to those objects that can raise the human body and have a load-bearing function, such as cartons and stools commonly seen in daily life. In order to achieve this detection, the object detection technology in the computer vision algorithm can be used to identify and classify each object in the effective image frame, and select the target objects that meet the above characteristics.

[0108] Step S22, matching the appearance features of the target object with the preset appearance features in the preset object database to obtain a matching result.

[0109] In an embodiment of the present application, the appearance features of the target object are matched with the preset appearance features in the preset object database. First, the preset appearance feature information of various common raised objects such as cartons, stools, etc. is extracted from the preset object database, wherein the feature information may include various visual features such as the shape, contour, and texture of the object. Then, the corresponding appearance features of the target object detected in the effective image frame are compared with them one by one, and by calculating the similarity between the features and other methods, it is determined whether the two match, and finally a matching result is obtained. For example, if the detected object contour, shape and other features are highly similar to the preset appearance features of the carton in the database, it can be determined that the match is successful; otherwise, the match fails.

[0110] Step S23: If the matching result is successful, the current height value is corrected based on the appearance characteristics of the target object to obtain a corrected current height value.

[0111] In the embodiment of the present application, step S23 includes the following steps D1-D3:

[0112] Step D1, marking the edge of the target object according to the shape feature to obtain a first marking position and a second marking position, wherein the first marking position is used to represent the upper edge position of the target object, and the second marking position is used to represent the lower edge position of the target object.

[0113] Specifically, the target object in the image is first identified using a computer vision algorithm to determine its specific position and range in the image. This process involves a variety of technologies such as image segmentation algorithms. The target object is separated from the background by analyzing the color, texture, edge and other features of the image. After the target object is identified, the edge is further detected using edge detection operators such as the Sobel operator and the Canny operator to highlight the pixel changes at the edge of the object to more clearly determine the contour. The top and bottom boundary points are then found by analyzing the contour of the target object, which are used as the first mark position and the second mark position, respectively. Finally, the determined first mark position and the second mark position are marked and recorded as (x1, y1) and (x2, y2) in the form of image coordinates with the upper left corner of the two-dimensional image plane as the origin, the horizontal right as the positive direction of the x-axis, and the vertical downward as the positive direction of the y-axis.

[0114] Step D2, calculating the marking distance between the first marking position and the second marking position.

[0115] Specifically, when calculating the marker distance between the first marker position (x1, y1) and the second marker position (x2, y2), the calculation methods include but are not limited to the following: Euclidean distance: The straight-line distance between the two points can be obtained, which is applicable in most cases. Manhattan distance: When the target object has a regular shape and is distributed approximately horizontally or vertically in the image, it can be used to approximately calculate the marker distance. Compared with the Euclidean distance, it focuses more on the sum of the horizontal and vertical distances, is simple to calculate, and can more intuitively reflect the size characteristics of the object in specific scenarios. Actual distance conversion: The distance calculated above is mostly the image pixel distance. To obtain the marker distance corresponding to the actual height of the target object, it is necessary to convert according to the image scale. If it is known that each pixel represents an actual length of a centimeters, the actual marker distance is the pixel distance multiplied by a centimeters / pixel, thereby obtaining a marker distance value in centimeters for unified calculation and comparison with other actual measured height values.

[0116] Step D3, correcting the current height value according to the marked distance to obtain a corrected current height value.

[0117] Specifically, after calculating the marker distance, it is necessary to subtract the height of the target object corresponding to the marker distance from the current height value obtained previously. First, determine the height correspondence. Since the marker distance represents the vertical size of the target object in the image, the actual height value corresponding to it can be determined using a known image scale or other geometric relationship. For example, when the marker distance is b pixels and each pixel represents an actual height of h centimeters, the actual height of the target object is b*h centimeters, and the corrected current height value is H′=Hb*h centimeters. Through this correction, the height measurement error caused by the target object raising the human body can be effectively eliminated, making the height value closer to the actual height, thereby improving the accuracy and reliability of height measurement.

[0118] In this embodiment, a height detection system for a smart door lock is provided. Figure 3 is a structural block diagram of a height detection system for an intelligent door lock according to an embodiment of the present invention. Figure 3 As shown, the system includes: an image acquisition unit 100, an image processing unit 200, a height detection unit 300 and a door lock control unit 400;

[0119] The image acquisition unit 100 is used to acquire an image frame sequence containing a target object in the area in front of the door through the camera of the smart door lock, and send the image frame sequence to the image processing unit 200;

[0120] The image processing unit 200 is used to process the acquired image frame sequence and filter out valid image frames for height detection, and send the valid image frames to the height detection unit 300;

[0121] The height detection unit 300 is used to calculate the current height value of the target object according to the valid image frame and related parameters, and send the current height value to the door lock control unit 400;

[0122] The door lock control unit 400 is used to perform corresponding door lock control operations according to the current height value of the target object, such as triggering growth monitoring or face recognition functions.

[0123] In this embodiment, a method for unlocking a smart door lock is also provided. Figure 4 : is a flow chart of a height detection method for a smart door lock according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0124] Step S31, obtaining the current height value of the target object within the preset range of the smart door lock.

[0125] It should be noted that under normal use of smart door locks, the distance between the user and the door lock when performing identity authentication is relatively fixed, generally within 1 meter. If the height of a child is in a certain situation, so that only part of his face is within the camera recognition range, it is easy to cause recognition deviation. At this time, the camera recognition angle needs to be adjusted, for example, with the help of a pan / tilt. The effective recognition angle of the door lock camera is roughly between 155 degrees and 185 degrees. Only when the face is within this angle range can it recognize the face.

[0126] In the embodiment of the present application, the smart door lock can obtain the current height value of the target object in a variety of ways. For example, using the built-in distance sensor and image analysis technology of the door lock, first measure the approximate distance between the target object and the door lock, and then identify the body outline or key parts (such as the top of the head) of the target object in the captured image frame, and calculate its relative height value by combining the preset geometric relationship and algorithm. This step is like building a basic framework for the subsequent recognition process. Only by first knowing the height of the target object can we carry out accurate recognition operations in a targeted manner, avoiding blindly adopting a single recognition mode and causing recognition errors or inefficiencies.

[0127] Step S32, determining whether the current altitude value reaches a preset altitude value.

[0128] In the embodiment of the present application, the preset height value is a key threshold value determined through a large number of experiments and data analysis. Its setting comprehensively considers many factors such as the installation height of the door lock camera, the common height distribution range of adults and children, and the optimal recognition area of ​​the face recognition algorithm. By comparing the acquired current height value with it, the door lock system can quickly determine the height type of the target object, whether it is an adult of regular height or a shorter height group (such as children) that requires special treatment. This judgment process is like an intelligent diverter, which can guide the recognition process to the most suitable path according to different situations, thereby improving the flexibility and accuracy of the entire recognition system and reducing recognition failures or resource waste due to misjudgments.

[0129] Step S33, if the preset height value is reached, the face recognition function of the smart door lock is enabled, and the face recognition of the target object is performed to obtain a first recognition result; or, if the preset height value is not reached, the auxiliary recognition function of the smart door lock is enabled, and the pan / tilt of the smart door lock is controlled to perform a moving operation until the facial area of ​​the target object is in the recognition position to obtain a second recognition result.

[0130] In the embodiment of the present application, if the target object is as tall as the preset height value, and the face area is usually in the regular recognition area of ​​the door lock camera, it is most efficient and convenient to directly enable the face recognition function. It uses the image acquisition device to capture the face image, extracts and analyzes the facial features, contours, texture and other information with a specific algorithm, and compares and matches it with the stored legitimate user face data to obtain the first recognition result to determine whether to unlock. This method can quickly and accurately verify the identity of adults in daily scenes, significantly improving the user experience.

[0131] In the embodiment of the present application, if the preset height value is not reached, the auxiliary recognition function of the smart door lock is enabled, and the pan / tilt of the smart door lock is controlled to perform a moving operation until the facial area of ​​the target object is at the recognition position, and a second recognition result is obtained, including the following steps E1-E3:

[0132] Step E1, obtaining valid image frames captured by the smart door lock.

[0133] Specifically, after the auxiliary recognition function is enabled, the smart door lock screens out valid image frames, which may be the valid image frames mentioned in step A3, and will not be elaborated on here.

[0134] Step E2, detecting the absence of facial features in the valid image frame.

[0135] Specifically, the image recognition and analysis algorithm is used to detect the facial area in each valid image frame to see if there is a problem of missing some facial features. For example, only half of the face is captured, resulting in the failure to fully present key facial organs such as the eyes and nose; or due to angle problems, the mouth and other parts do not appear in the image. These are all cases of missing facial features. The smart door lock carefully compares the various features that a normal and complete face should have, marks which specific facial elements are missing in the current valid image frame, and through detection and analysis, clarifies the completeness of the facial presentation in the current image, thereby providing a key basis for the next step of determining how the gimbal should move to fill in the missing facial features and allow the face to be fully presented in the recognition area.

[0136] Step E3, determine the moving direction of the pan / tilt in the smart door lock according to the missing situation, and control the pan / tilt to perform a moving operation according to the moving direction until the facial features are located in the recognition area of ​​the smart door lock, and obtain a second recognition result.

[0137] Specifically, based on the missing facial features in the valid image frames detected earlier, the system begins to formulate a pan-tilt movement strategy. If the facial features of the forehead are missing in the image, it means that the camera shooting angle is too low, and the pan-tilt needs to move up a certain angle to raise the shooting angle so that the forehead can be photographed; if the features of the chin are missing, it means that the shooting angle is too high, and the pan-tilt should move down to adjust the angle. Moreover, during the movement process, it is not a one-time large-scale movement, but a gradual small-amplitude and high-frequency adjustment according to the intelligent search path. For example, initially, it swings up and down with a small amplitude and high frequency to scan, while cooperating with the camera to continuously collect images and detect whether the facial area has entered a better recognition range. When the facial area is close to the center of the image but not yet in the best recognition position, the PID control algorithm is used to calculate the motor rotation angle and speed according to the deviation amount for fine-tuning, so that the camera can track the face until it is stably in the center of the best recognition area. During the whole process, keep paying attention to whether the facial features are fully presented. When the facial area is stable in the standard recognition area in the center of the image, and the facial features are complete and clear after multiple frames of images have verified, it means that the conditions for accurate recognition have been met. The auxiliary recognition function will stop the movement of the gimbal and trigger the face recognition process. Based on the complete and clear facial image, feature extraction is performed, and matching with the facial data of legitimate users is compared and matched. Finally, the second recognition result is obtained to determine whether the phone is unlocked.

[0138] In this embodiment, a height detection device for a smart door lock and an unlocking device for a smart door lock are also provided. The devices are used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0139] This embodiment provides a height detection device for a smart door lock. Figure 5 As shown, including:

[0140] A detection module 51 is used to detect the motion characteristics of a target object within a preset range of the smart door lock;

[0141] The first acquisition module 52 is used to acquire an image frame sequence of the target object captured by the smart door lock when the motion feature meets the preset feature;

[0142] An identification module 53 is used to identify an image frame whose human body features of the target object meet preset conditions in the image frame sequence, and obtain at least one valid image frame;

[0143] The processing module 54 is used to determine the current height value of the target object according to the valid image frame, and control the smart door lock to perform a control operation corresponding to the current height value.

[0144] In an optional embodiment of the present application, the first acquisition module 52 is used to identify the target object of an image frame in an image frame sequence; determine the key part features of the target object in the image frame, and compare the key part features with preset features to obtain a comparison result; determine the image frame in the image frame sequence that meets the preset conditions based on the comparison result, and obtain at least one valid image frame.

[0145] In an optional embodiment of the present application, the processing module 54 further includes an acquisition submodule and a control submodule;

[0146] The acquisition submodule is used to obtain the installation height value of the target lens on the smart door lock; detect the distance value between the target object and the target lens, and measure the angle value between the center of the effective image frame and the top of the target object's head; calculate the current height value of the target object based on the installation height value, distance value and angle value.

[0147] The control submodule is used to compare the current height value with the preset height value; if the current height value is less than or equal to the preset height value, the growth monitoring function of the smart door lock is triggered, and the growth curve of the target object is constructed according to the current height value; or, if the current height value is greater than the preset height value, the wake-up operation of the smart door lock is executed, and the face recognition function of the smart door lock is triggered.

[0148] The control submodule is used to obtain the historical height value of the target object; analyze the current height value and the historical height value to obtain the height change trend of the target object; construct a growth curve based on the height change trend, and display the growth curve of the target object to the smart door lock.

[0149] In an optional embodiment of the present application, the device also includes: a correction module, used to detect the target object in the effective image frame, wherein the target object is an object that can elevate the human body and has a load-bearing function; matching the appearance features of the target object with preset appearance features in a preset object database to obtain a matching result; if the matching result is a successful match, then correcting the current height value based on the appearance features of the target object to obtain a corrected current height value.

[0150] In an optional embodiment of the present application, a correction module is used to mark the edge of the target object according to the shape characteristics to obtain a first marking position and a second marking position, wherein the first marking position is used to represent the upper edge position of the target object and the second marking position is used to represent the lower edge position of the target object; calculate the marking distance between the first marking position and the second marking position; and correct the current height value according to the marking distance to obtain a corrected current height value.

[0151] This embodiment provides a face recognition device for a smart door lock. Figure 6 As shown, including:

[0152] The second acquisition module 61 is used to obtain the current height value of the target object within the preset range of the smart door lock;

[0153] A judging module 62 is used to judge whether the current height value reaches a preset height value;

[0154] The enabling module 63 is used to enable the face recognition function of the smart door lock if the preset height value is reached, perform face recognition on the target object, and obtain a first recognition result; or, if the preset height value is not reached, enable the auxiliary recognition function of the smart door lock, control the pan / tilt of the smart door lock to perform a moving operation until the facial area of ​​the target object is in the recognition position, and obtain a second recognition result.

[0155] In an optional embodiment of the present application, module 63 is enabled to obtain valid image frames captured by the smart door lock; detect the missing of facial features in the valid image frames; determine the moving direction of the gimbal in the smart door lock based on the missing situation, and control the gimbal to perform moving operations in the moving direction until the facial features are located in the recognition area of ​​the smart door lock, thereby obtaining a second recognition result.

[0156] See also Figure 7 , Figure 7is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 7 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).

[0157] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0158] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0159] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0160] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0161] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0162] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0163] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A height detection method for a smart door lock, characterized in that: The method comprises: Detect the motion characteristics of the target object within the preset range of the smart door lock; When the motion feature meets the preset feature, obtaining the image frame sequence of the target object captured by the smart door lock; Identify the image frames whose human features of the target object meet the preset conditions in the image frame sequence, and obtain at least one valid image frame; The current height value of the target object is determined according to the valid image frame, and the smart door lock is controlled to perform a control operation corresponding to the current height value.

2. The method according to claim 1, characterized in that The step of identifying an image frame in the image frame sequence whose human features of the target object meet a preset condition, and obtaining at least one valid image frame, comprises: Identifying a target object in an image frame of the image frame sequence; Determining key part features of the target object in the image frame, and comparing the key part features with preset features to obtain a comparison result; An image frame in the image frame sequence that meets a preset condition is determined according to the comparison result to obtain at least one valid image frame.

3. The method according to claim 1, characterized in that The determining the current height value of the target object according to the valid image frame comprises: Obtaining the installation height value of the target lens on the smart door lock; Detecting the distance between the target object and the target lens, and measuring the angle between the center of the effective image frame and the top of the head of the target object; A current height value of the target object is calculated based on the installation height value, the distance value, and the angle value.

4. The method according to claim 1, characterized in that: The controlling the smart door lock to perform a control operation corresponding to the current height value includes: Comparing the current altitude value with a preset altitude value; If the current height value is less than or equal to the preset height value, the growth monitoring function of the smart door lock is triggered, and a growth curve of the target object is constructed according to the current height value; Alternatively, if the current height value is greater than the preset height value, the wake-up operation of the smart door lock is executed and the face recognition function of the smart door lock is triggered.

5. The method according to claim 4, characterized in that The triggering of the growth monitoring function of the smart door lock and constructing the growth curve of the target object according to the current height value includes: Obtaining the historical height value of the target object; Analyze the current height value and the historical height value to obtain the height change trend of the target object; A growth curve is constructed based on the height change trend, and the growth curve of the target object is displayed on the smart door lock.

6. The method according to claim 3, characterized in that: After determining the current height value of the target object according to the valid image frame, the method further includes: Detecting a target object in the effective image frame, wherein the target object is an object that can elevate a human body and has a load-bearing function; Matching the appearance features of the target object with the preset appearance features in the preset object database to obtain a matching result; If the matching result is a successful match, the current height value is corrected based on the appearance characteristics of the target object to obtain a corrected current height value.

7. The method according to claim 6, characterized in that The correcting the current height value based on the shape feature of the target object to obtain a corrected current height value includes: Marking the edge of the target object according to the shape feature to obtain a first marking position and a second marking position, wherein the first marking position is used to represent the upper edge position of the target object, and the second marking position is used to represent the lower edge position of the target object; Calculating a marking distance between the first marking position and the second marking position; The current height value is corrected according to the marking distance to obtain a corrected current height value.

8. A face recognition method for a smart door lock, characterized in that: The method comprises: Obtain the current height value of the target object within the preset range of the smart door lock; Determine whether the current height value reaches a preset height value; If the preset height value is reached, the face recognition function of the smart door lock is enabled, and the face recognition is performed on the target object to obtain a first recognition result; or, if the preset height value is not reached, the auxiliary recognition function of the smart door lock is enabled, and the pan / tilt of the smart door lock is controlled to perform a moving operation until the facial area of ​​the target object is in the recognition position to obtain a second recognition result.

9. The method according to claim 8, characterized in that The pan / tilt that controls the smart door lock performs a moving operation until the facial area of ​​the target object is at a recognition position, and obtains a second recognition result, including: Acquire valid image frames captured by the smart door lock; Detecting the absence of facial features in the valid image frame; The moving direction of the pan / tilt in the smart door lock is determined according to the missing situation, and the pan / tilt is controlled to perform a moving operation according to the moving direction until the facial feature is located in the recognition area of ​​the smart door lock, thereby obtaining a second recognition result.

10. A height detection device for a smart door lock, characterized in that: The device comprises: A detection module, used to detect the motion characteristics of a target object within a preset range of the smart door lock; A first acquisition module, configured to acquire an image frame sequence of the target object captured by the smart door lock when the motion feature meets a preset feature; A recognition module, used to recognize image frames whose human features of the target object meet preset conditions in the image frame sequence, and obtain at least one valid image frame; A determination module is used to determine the current height value of the target object according to the valid image frame, and control the smart door lock to perform a control operation corresponding to the current height value.

11. A face recognition device for a smart door lock, characterized in that: The device comprises: A second acquisition module is used to obtain a current height value of a target object within a preset range of the smart door lock; A judging module, used to judge whether the current height value reaches a preset height value; An enabling module is used to enable the face recognition function of the smart door lock if a preset height value is reached, perform face recognition on the target object, and obtain a first recognition result; or, if the preset height value is not reached, enable the auxiliary recognition function of the smart door lock, control the pan / tilt of the smart door lock to perform a moving operation until the facial area of ​​the target object is in a recognition position, and obtain a second recognition result.

12. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 9 by executing the computer instructions.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Adjusting device and method of face recognition equipment

    CN110032921A

  • Object detection method and related device

    CN110160579A

  • Intelligent door lock control method and device, intelligent door lock, and electronic equipment

    CN110533805A

  • Image processing method and device, image processing equipment and storage medium

    CN110852933A

  • Posture detection method and device, electronic equipment and storage medium

    CN112733799A