Door lock motor assembly control method, smart door lock and computer readable medium
Through the combination of multiple recognition methods of smart door locks, including distance detection, palm, face and palm vein recognition, and light source adjustment, the problem of long smart door lock recognition and low accuracy is solved, achieving fast and accurate user identification. Identity verification and abnormal person identification improve user experience and security.
Patent Information
- Application Number
- CN202311048979.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-18
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2043-08-18
AI Technical Summary
When smart door locks use multiple recognition methods, distance limitations cause users to move multiple times for recognition verification, which is time-consuming and has low accuracy. Face recognition accuracy is poor especially under poor lighting conditions, and it fails to effectively identify abnormalities or dangers. personnel, affecting user safety.
The target environment image is collected through the distance detection device and camera device, combined with palm and face recognition. If the conditions are not met, the palm vein image is collected. If the matching fails, face recognition is performed, and the light source is adjusted when the light is insufficient to improve image clarity. ;At the same time, record the number of historical identification failures to identify abnormal or dangerous persons and issue alarms.
It improves the recognition speed and user experience of smart door locks, reduces user movement adjustment steps, enhances the accuracy of face recognition, and promptly identifies and warns abnormal or dangerous persons, improving user safety.
Smart Images

Figure CN117173813B
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technology, and in particular to a door lock motor assembly control method, a smart door lock, and a computer-readable medium. Background Art
[0002] With the rapid development of security technology, more and more families are starting to use smart door locks. At present, most of the relevant smart door locks have at least one of the following recognition methods: face recognition, fingerprint recognition, palm vein recognition, etc. When a smart door lock has at least two recognition methods, it is usually determined which recognition method to use based on the distance between the object to be identified and the smart door lock. For example, when the distance between the object to be identified and the smart door lock is less than or equal to 20 cm, the palm vein recognition method is used, and when the distance between the object to be identified and the smart door lock is greater than 20 cm and less than 50 cm, the face recognition method is used.
[0003] However, the inventors have found that when the above identification method is used to verify the user, the following technical problems often occur:
[0004] First, when a smart door lock has at least two identification methods, each identification method has a certain distance limitation. Only one identification method can be used for identification within a set distance. When using it, the user needs to move multiple times to reach the set distance for identification verification, which causes the identification verification to take a long time. Multiple verification failures will cause the identification method of the smart door lock to be locked and unable to continue identification, causing inconvenience to the user and resulting in a poor user experience.
[0005] Second, in dark or uneven light conditions, shadows may exist in the collected facial images, resulting in lower clarity of the collected facial images and lower accuracy of facial recognition.
[0006] Third, the smart door lock using the above-mentioned identification method fails to determine whether the person who failed to be identified is an abnormal person or even a dangerous person based on the historical identification times. When an abnormal person or even a dangerous person tries to unlock the door, the user is not warned, resulting in lower user safety.
[0007] The above information disclosed in this Background section is only for enhancement of understanding of the background of the inventive concept and therefore it may contain information that does not form the prior art that is already known in this country to a person of ordinary skill in the art. Summary of the invention
[0008] The content of this disclosure is used to introduce concepts in a brief form, which will be described in detail in the detailed implementation section below. The content of this disclosure is not intended to identify the key features or essential features of the technical solution claimed for protection, nor is it intended to limit the scope of the technical solution claimed for protection.
[0009] Some embodiments of the present disclosure propose a door lock motor assembly control method, a smart door lock, and a computer-readable medium to solve one or more of the technical problems mentioned in the above background technology section.
[0010] In a first aspect, some embodiments of the present disclosure provide a door lock motor assembly control method, which is applied to a smart door lock, the method comprising: in response to detecting the presence of an object within a preset identification distance through an associated distance detection device, photographing a target environment through an associated camera device to obtain a target environment image; performing palm recognition on the target environment image to obtain a palm recognition result; in response to determining that the palm result represents that the target environment image satisfies a preset palm condition, collecting a palm vein image through an associated infrared camera device, wherein the preset palm condition is that the target environment image includes and only includes an image representing a complete palm area; performing palm recognition on the palm vein image Perform matching processing to obtain a palm vein matching result; in response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates a matching failure, perform face recognition on the target environment image to obtain a face recognition result; in response to determining that the face recognition result indicates that the target environment image includes a face area, perform face area cropping processing on the target environment image to obtain a face image; perform matching processing on the face image to obtain a face matching result; in response to determining that the palm vein matching result or the face matching result indicates a matching success, control the door lock motor assembly included in the smart door lock to perform an unlocking operation.
[0011] Optionally, in response to determining that the face matching result indicates a matching failure, light intensities corresponding to the target environment are respectively collected by an associated first light intensity sensor and an associated second light intensity sensor, wherein the first light intensity sensor and the second light intensity sensor are respectively located on both sides of the smart door lock; determining whether the first light intensity and the second light intensity meet a preset light intensity condition; in response to determining that the first light intensity and the second light intensity do not meet the preset light intensity condition, determining a first target light intensity of the first light source and a second target light intensity of the second light source according to the first light intensity and the second light intensity, wherein In the embodiment, the first light source and the second light source are respectively located on both sides of the smart door lock; according to the first target light illumination and the second target light illumination, the first light source and the second light source are controlled to perform a light-emitting operation; the illuminated face images under the first light source and the second light source are collected by the camera device; feature extraction processing is performed on the illuminated face images to obtain illuminated face feature information; matching processing is performed on the face feature weighted information according to a pre-stored face feature information set to obtain a face feature matching result; in response to determining that the face feature matching result indicates a successful face match, the door lock motor assembly included in the smart door lock is controlled to perform an unlocking operation.
[0012] Optionally, in response to determining that the above-mentioned face matching result indicates a matching failure, feature extraction processing is performed on the above-mentioned face image to obtain face image feature information; according to the pre-stored abnormal face feature information set within the week, the above-mentioned face image feature information is matched and processed to obtain the abnormal matching result within the week; in response to determining that the above-mentioned abnormal matching result within the week indicates that the abnormal face matching within the week is successful, the pre-stored abnormal face feature information within the month corresponding to the above-mentioned face image feature information is filtered out from the pre-stored abnormal face feature information set within the month as the abnormal face feature information within the target month; the number of historical abnormal detections corresponding to the abnormal face feature information within the target month is determined; in response to determining that the above-mentioned historical abnormal detection number is greater than or equal to a preset historical abnormal detection number threshold, the location of the above-mentioned smart door lock is determined. point information; obtaining a set of facial feature information of dangerous persons corresponding to the above location information; for each piece of facial feature information of dangerous persons in the above set of facial feature information of dangerous persons, determining the facial feature similarity between the above facial feature information of dangerous persons and the above facial image feature information; in response to determining that there is a facial feature similarity greater than or equal to a preset facial feature similarity threshold value among the determined facial feature similarities, generating dangerous person alarm information according to the above facial image; in response to determining that there is no facial feature similarity greater than or equal to the preset facial feature similarity threshold value among the determined facial feature similarities, generating abnormal person alarm information according to the above facial image; sending the above dangerous person alarm information or the above abnormal person alarm information to the associated terminal device.
[0013] In the second aspect, some embodiments of the present disclosure provide a smart door lock, including: one or more processors; a distance detection device configured to detect whether there is an object within a preset identification distance; a camera device configured to capture images; an infrared camera device configured to capture palm vein images; a door lock motor assembly configured to perform an unlocking operation; and a storage device storing one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the method described in any implementation of the first aspect above.
[0014] In a third aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, wherein when the program is executed by a processor, the method described in any implementation manner of the first aspect is implemented.
[0015] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the door lock motor assembly control method of some embodiments of the present disclosure can improve the speed of smart door lock identification verification, thereby improving the user experience. Specifically, the reason for the poor user experience is that when a smart door lock has at least two identification methods, each identification method has a certain distance limit, and only one identification method can be used for identification within a set distance. When using it, the user needs to move multiple times to reach the set distance for identification verification, which causes the identification verification to take a long time, and multiple verification failures will cause the identification method of the smart door lock to be locked and unable to continue identification, causing inconvenience to the user. Based on this, the door lock motor assembly control method of some embodiments of the present disclosure, first, in response to the detection of the existence of an object within the preset identification distance by the associated distance detection device, the target environment is photographed by the associated camera device to obtain a target environment image. Thus, when there is an object at the preset identification distance, the target environment image can be collected for identification verification. Secondly, the palm recognition is performed on the above-mentioned target environment image to obtain a palm recognition result. Thus, the palm state of the user within the preset identification distance can be identified. Then, in response to determining that the palm result indicates that the target environment image meets the preset palm condition, a palm vein image is collected through an associated infrared camera device. The preset palm condition is that the target environment image includes and only includes an image representing a complete palm area. Therefore, when it is determined that there is one and only one complete palm in the target environment, a palm vein image can be collected for palm vein recognition. Afterwards, the palm vein image is matched to obtain a palm vein matching result. Therefore, the palm vein image can be identified and verified to determine whether the verification is successful. Then, in response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates that the matching fails, face recognition is performed on the target environment image to obtain a face recognition result. Therefore, when there is not one and only one complete palm in the target environment, or when the palm vein recognition is unsuccessful, it can be determined whether there is a face in the target environment. Then, in response to determining that the face recognition result indicates that the target environment image includes a face area, the face area is cropped on the target environment image to obtain a face image. Thus, when it is determined that there is a face in the target environment, a face image can be cropped from the target environment image, thereby reducing the size of the image for subsequent face matching, reducing the processing steps, and improving efficiency. Afterwards, in response to determining that the palm vein matching result or the face matching result indicates a successful match, the door lock motor assembly included in the smart door lock is controlled to perform an unlocking operation. Thus, the door can be unlocked when the palm vein recognition is successful or the face recognition is successful.Also, because it is only necessary to capture images within a preset recognition distance in order to identify the image and determine the recognition method, the user does not need to move and adjust to the corresponding distance range to determine the recognition method. This can reduce the steps of user movement and adjustment, reduce the time spent on recognition and verification, and make it easy to use, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that components and elements are not necessarily drawn to scale.
[0017] Figure 1 is a flow chart of some embodiments of a door lock motor assembly control method according to the present disclosure;
[0018] Figure 2 It is a schematic diagram of the structure of various electronic components included in a smart door lock suitable for implementing some embodiments of the present disclosure. DETAILED DESCRIPTION
[0019] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments set forth herein. On the contrary, these embodiments are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.
[0020] It should also be noted that, for ease of description, only the parts related to the invention are shown in the drawings. In the absence of conflict, the embodiments and features in the embodiments of the present disclosure can be combined with each other.
[0021] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.
[0022] It should be noted that the modifications of "one" and "plurality" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, it should be understood as "one or more".
[0023] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0024] With regard to the collection, storage, and use of user personal information (such as palm vein images and facial images) involved in this disclosure, before performing the corresponding operations, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, fulfilling the obligation to inform the personal information subject, and obtaining the authorization and consent of the personal information subject in advance.
[0025] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0026] refer to Figure 1 , shows a process 100 of some embodiments of the door lock motor assembly control method according to the present disclosure. The door lock motor assembly control method comprises the following steps:
[0027] Step 101 : in response to detecting the existence of an object within a preset identification distance through an associated distance detection device, photographing a target environment through an associated camera device to obtain an image of the target environment.
[0028] In some embodiments, in response to detecting the presence of an object within a preset identification distance through an associated distance detection device, the execution subject of the door lock motor assembly control method (e.g., a smart door lock) can shoot the target environment through an associated camera device to obtain a target environment image. Among them, the above-mentioned distance detection device can be a device for detecting whether there is an object within a preset identification distance. For example, the above-mentioned distance detection device can be a distance sensor. The above-mentioned preset identification distance can be a pre-set distance. For example, the above-mentioned preset identification distance can be 20 cm. The above-mentioned camera device can be a device connected to the above-mentioned smart door lock in communication. For example, the above-mentioned camera device can be a camera. The communication connection mode between the above-mentioned camera device and the above-mentioned smart door lock can be a wired connection mode or a wireless connection mode. It should be pointed out that the above-mentioned wireless connection mode can include but is not limited to 3G / 4G connection, WiFi connection, Bluetooth connection, WiMAX connection, Zigbee connection, UWB (ultra wideband) connection, and other wireless connection modes currently known or to be developed in the future. The above-mentioned target environment can be a photographable area of the above-mentioned camera device.
[0029] Step 102: Perform palm recognition on the target environment image to obtain a palm recognition result.
[0030] In some embodiments, the execution subject may perform palm recognition on the target environment image to obtain a palm recognition result. The palm recognition result may indicate whether the target environment image satisfies a preset palm condition. The preset palm condition may be that the target environment image includes and only includes an image representing a complete palm area.
[0031] In some optional implementations of some embodiments, the execution subject may perform palm recognition on the target environment image to obtain a palm recognition result by the following steps:
[0032] The first step is to perform skin color segmentation on the target environment image to obtain a skin image. The skin image may be an image corresponding to the human skin in the target environment image. In practice, the execution subject may perform skin color segmentation on the target environment image using a YCbCr color space model to obtain a skin image. Specifically, the execution subject may segment the area corresponding to the preset skin color in the target environment image to obtain a skin image.
[0033] In the second step, contour feature extraction is performed on the skin image to obtain contour feature information. The contour feature information may be information characterizing contour features of the skin image. For example, the contour feature information may be a contour feature vector. In practice, the execution subject may extract contour features from the skin image through an edge detection algorithm to obtain contour feature information. The edge detection algorithm may include but is not limited to at least one of the following: Sobel operator, Canny operator, Laplacian operator.
[0034] The third step is to input the above-mentioned contour feature information into a pre-trained palm recognition result generation model to obtain a palm recognition result. The above-mentioned pre-trained palm recognition result generation model may be a machine learning model that takes the contour feature information as input and the palm recognition result as output. For example, the above-mentioned pre-trained palm recognition result generation model may be a support vector machine.
[0035] Step 103 , in response to determining that the palm result representation target environment image meets a preset palm condition, a palm vein image is collected by an associated infrared camera device.
[0036] In some embodiments, in response to determining that the palm result indicates that the target environment image satisfies a preset palm condition, the execution subject may collect a palm vein image through an associated infrared camera device. The preset palm condition may be that the target environment image includes and only includes an image representing a complete palm area. The associated infrared camera device may be an infrared camera that is communicatively connected to the execution subject.
[0037] Step 104: Perform matching processing on the palm vein image to obtain a palm vein matching result.
[0038] In some embodiments, the execution subject may perform matching processing on the palm vein image to obtain a palm vein matching result, wherein the palm vein matching result may indicate that the palm vein matching is successful or that the palm vein matching fails.
[0039] In some optional implementations of some embodiments, the execution subject may perform matching processing on the palm vein image through the following steps to obtain a palm vein matching result:
[0040] In the first step, the region of interest is extracted from the palm vein image to obtain a palm vein effective region image. The palm vein effective region image may be an image portion with more palm veins. For example, the palm vein effective region image may be an image corresponding to the palm portion.
[0041] The second step is to perform image enhancement processing on the palm vein effective area image to obtain an image enhanced palm vein effective area image. In practice, the execution subject may perform image enhancement processing on the palm vein effective area image by an image enhancement algorithm to obtain an image enhanced palm vein effective area image. For example, the image enhancement algorithm may be histogram equalization.
[0042] The third step is to extract image features from the enhanced palm vein effective area image to obtain palm vein feature information. In practice, the execution subject may extract image features from the enhanced palm vein effective area image through an image feature extraction algorithm to obtain palm vein feature information. The image feature extraction algorithm may include but is not limited to at least one of the following: LBP (Local Binary Pattern), wavelet transform, and SIFT (Scale-invariant features transform).
[0043] The fourth step is to match the palm vein feature information according to the pre-stored palm vein feature information set to obtain a palm vein matching result. The pre-stored palm vein feature information set may be feature information of each palm vein image pre-stored in the storage device included in the execution subject. In practice, first, the execution subject may determine the similarity between each pre-stored palm vein feature information in the pre-stored palm vein feature information set and the palm vein feature information. As an example, the execution subject may determine the similarity between each pre-stored palm vein feature information in the pre-stored palm vein feature information set and the palm vein feature information by a cosine similarity algorithm. Then, in response to the presence of a similarity greater than or equal to a preset palm vein similarity threshold among the determined similarities, the preset palm vein matching information characterizing a successful match is determined as the palm vein matching result.
[0044] In some optional implementations of some embodiments, the execution subject may extract the region of interest from the palm vein image to obtain a palm vein effective region image by the following steps:
[0045] In the first step, the palm vein image is subjected to background segmentation processing to obtain a palm vein segmentation image. In practice, the execution subject may perform skin segmentation processing on the palm vein image using a YCbCr color space model to obtain a palm vein skin image as the palm vein segmentation image.
[0046] The second step is to perform smoothing filtering on the palm vein segmentation image to obtain a palm vein filtered image. In practice, the execution subject may perform smoothing filtering on the palm vein segmentation image by a mean filtering algorithm to obtain a palm vein filtered image.
[0047] The third step is to perform grayscale binarization processing on the palm vein filter image to obtain a palm vein grayscale image. In practice, the execution subject can perform grayscale binarization processing on the palm vein filter image using a grayscale binarization algorithm to obtain a palm vein grayscale image.
[0048] The fourth step is to rotate the palm vein grayscale image to obtain a rotated palm vein grayscale image, wherein the rotated palm vein grayscale image may be a forward palm vein grayscale image.
[0049] The fifth step is to crop the rotated palm vein grayscale image to obtain a palm vein effective area image.
[0050] In some optional implementations of some embodiments, the execution subject may perform rotation processing on the palm vein grayscale image through the following steps to obtain a rotated palm vein grayscale image:
[0051] The first step is to determine the midpoint position information of the bottom of the palm corresponding to the palm vein grayscale image. The midpoint position information of the bottom of the palm may be information representing the position of the midpoint of the wrist. For example, the midpoint position information of the bottom of the palm may be represented by coordinates. In practice, first, the execution subject may perform wrist recognition on the palm vein grayscale image to obtain a wrist recognition area. In practice, the execution subject may input the palm vein grayscale image into a pre-trained wrist recognition model to obtain a wrist recognition area. The pre-trained wrist recognition model may be a machine learning model that takes the palm vein grayscale image as input and the wrist recognition area as output. For example, the wrist recognition model may be a RetinaNet model. Then, the execution subject may determine the center point of the wrist recognition area as the midpoint position information of the bottom of the palm.
[0052] The second step is to perform contour detection processing on the palm vein grayscale image to obtain the position information of each hand contour boundary corresponding to the palm vein grayscale image. The position information of each hand contour boundary can be information representing each position of the hand contour. The position information of each hand contour boundary can be represented by coordinates. In practice, the execution subject can perform contour detection processing on the palm vein grayscale image by a contour tracking algorithm to obtain the position information of each hand contour boundary corresponding to the palm vein grayscale image.
[0053] In the third step, for each of the above-mentioned hand contour boundary position information, the above-mentioned palm bottom midpoint position information is used as the origin to perform coordinate transformation processing on the above-mentioned hand contour boundary position information to obtain the hand contour conversion position information. Among them, the above-mentioned hand contour conversion position information can be information representing the position of any contour after conversion with the palm bottom midpoint position information as the origin. In practice, according to the coordinate origin corresponding to the palm vein grayscale image and the position corresponding to the palm bottom midpoint position information, the above-mentioned execution subject can translate the original coordinate system to obtain a new coordinate system. Then, the above-mentioned execution subject can use the new coordinates corresponding to each hand contour boundary position information in the new coordinate system as the hand contour conversion position information. As an example, the coordinates represented by the palm bottom midpoint position information can be (10, 5). The coordinates represented by the hand contour boundary position information can be (7, 6). Then, with the palm bottom midpoint position information as the origin, the above-mentioned hand contour boundary position information is subjected to coordinate transformation processing to obtain the hand contour conversion position information represented by the coordinates (-3, 1).
[0054] The fourth step is to perform curve fitting processing on each determined hand contour conversion position information to obtain hand contour curve information. The hand contour curve information may be information characterizing a curve corresponding to each hand contour conversion position information. The hand contour curve information may be represented by a curve. In practice, the execution subject may perform curve fitting processing on each determined hand contour conversion position information by a curve fitting method to obtain hand contour curve information.
[0055] The fifth step is to determine each corresponding minimum value in the above hand contour curve information as a finger valley point position, and obtain a finger valley point position set. The finger valley point position may be information representing the position of the finger joints of the palm. For example, the finger valley point position may be represented by coordinates. In practice, the coordinates of each corresponding minimum value in the above hand contour curve information are determined as a finger valley point position, and a finger valley point position set is obtained.
[0056] Step 6: select two finger valley point positions that meet a preset median condition from the finger valley point position set. The preset median condition may be: the selected two finger valley point positions are the two finger valley point positions in the finger valley point position set that have the largest distance from the position corresponding to the midpoint position information of the bottom of the palm.
[0057] Step 7: Determine the finger joint tangent information corresponding to the two finger joint valley point positions. The finger joint tangent may be a tangent function corresponding to the two finger joint valley point positions.
[0058] Step 8: Rotate the palm vein filter image according to the slope corresponding to the tangent information between the fingers to obtain a forward palm vein image. In practice, first, the execution subject may determine the inclination angle corresponding to the slope corresponding to the tangent information between the fingers by an inverse tangent function. Then, the execution subject may rotate the palm vein filter image clockwise by the inclination angle to obtain a forward palm vein image.
[0059] In the ninth step, the above-mentioned forward palm vein image is determined as a rotated palm vein grayscale image.
[0060] In some optional implementations of some embodiments, the execution subject may perform cropping processing on the rotated palm vein grayscale image to obtain a palm vein effective area image by the following steps:
[0061] In the first step, the smallest finger valley point position in the finger valley point position set is determined as the palm mid-finger valley point position. In practice, the execution subject may determine the finger valley point position in the finger valley point position set with the smallest distance from the palm bottom midpoint position information as the palm mid-finger valley point position.
[0062] The second step is to determine the horizontal tangent information corresponding to the position of the finger gap point in the middle of the palm, wherein the horizontal tangent information may be a tangent function in the horizontal direction passing through the position of the finger gap point in the middle of the palm.
[0063] The third step is to determine the centerline information corresponding to the palm vein grayscale image based on the horizontal tangent information and the finger gap tangent information. In practice, the execution subject may determine the distance between the tangent corresponding to the horizontal tangent information and the tangent corresponding to the finger gap tangent information. Then, the execution subject may determine the horizontal line function at 1 / 4 of the distance from the tangent corresponding to the horizontal tangent information as the centerline information.
[0064] The fourth step is to determine the center position information corresponding to the palm vein grayscale image based on the center line information. The center position information may be information representing the midpoint position of the palm. In practice, the execution subject may determine the position of the midpoint of the line segment where the center line corresponding to the center line information coincides with the palm vein grayscale image as the center position information.
[0065] Step 5: Determine the cutting radius information corresponding to the palm vein grayscale image based on the palm vein grayscale image. The cutting radius information may be information characterizing the range of the effective area of the palm vein. In practice, the execution entity may determine the cutting radius information as 1 / 2 of the length of the line segment where the center line information and the palm vein grayscale image overlap.
[0066] Step 6: According to the above-mentioned cutting radius information and the above-mentioned center position information, the above-mentioned palm vein grayscale image is cut to obtain a palm vein effective area image. In practice, first, the above-mentioned execution subject can determine the area with the coordinates corresponding to the above-mentioned center position information as the origin and the length corresponding to the above-mentioned cutting radius information as the radius in the above-mentioned palm vein grayscale image as the palm vein effective area. Then, the above-mentioned execution subject can cut the palm vein effective area in the above-mentioned palm vein grayscale image to obtain a palm vein effective area image.
[0067] In some optional implementations of some embodiments, the execution subject may perform image enhancement processing on the palm vein effective area image through the following steps to obtain an image enhanced palm vein effective area image:
[0068] The first step is to perform contrast stretching on the palm vein effective area image to obtain a palm vein effective area stretched image. In practice, the execution subject performs contrast stretching on the palm vein effective area image through a contrast stretching transformation function to obtain a palm vein effective area stretched image.
[0069] The second step is to perform palmprint extraction processing on the above-mentioned stretched image of the effective area of palm veins to obtain a palmprint image. In practice, the above-mentioned execution subject may perform palmprint extraction processing on the above-mentioned stretched image of the effective area of palm veins through a Gabor filter to obtain a palmprint image. Specifically, first, the above-mentioned execution subject may perform texture recognition on the above-mentioned stretched image of the effective area of palm veins through a Gabor filter to obtain a palmprint recognition area. Then, the above-mentioned execution subject may crop the image corresponding to the palmprint recognition area in the above-mentioned stretched image of the effective area of palm veins to obtain a palmprint image.
[0070] The third step is to superimpose the palm print image with the palm vein effective area stretching image to obtain a superimposed palm vein effective area stretching image. In practice, the execution subject can superimpose the palm print image with the palm vein effective area stretching image through the cv2.add function to obtain a superimposed palm vein effective area stretching image.
[0071] In the fourth step, the superimposed stretched image of the effective area of the palm vein is determined as the image of the effective area of the palm vein after image enhancement.
[0072] Step 105, in response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates a matching failure, performing face recognition on the target environment image to obtain a face recognition result.
[0073] In some embodiments, in response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates that the matching fails, the execution subject may perform face recognition on the target environment image to obtain a face recognition result. The face recognition result may indicate that the target environment image includes a face area or that the target environment image does not include a face area. In practice, first, the execution subject may perform skin color segmentation on the target environment image through a YCbCr color space model to obtain a skin image. Then, the execution subject may perform contour feature extraction on the skin image through an edge detection algorithm to obtain contour feature information. Afterwards, the execution subject may input the contour feature information into a pre-trained face recognition result generation model to obtain a face recognition result. The pre-trained face recognition result generation model may be a machine learning model that takes contour feature information as input and takes face recognition results as output. For example, the pre-trained face recognition result generation model may be a support vector machine.
[0074] Step 106 , in response to determining that the face recognition result indicates that the target environment image includes a face region, performing face region cropping processing on the target environment image to obtain a face image.
[0075] In some embodiments, in response to determining that the face recognition result indicates that the target environment image includes a face region, the execution subject may perform face region cropping on the target environment image to obtain a face image. In practice, the execution subject may crop the face region in the target environment image to obtain a face image.
[0076] Step 107, performing matching processing on the face image to obtain a face matching result.
[0077] In some embodiments, the execution subject may perform matching processing on the face image to obtain a face matching result. Here, the way to obtain the face matching result is the same as the way to obtain the palm vein matching result, which will not be repeated here.
[0078] Step 108, in response to determining that the palm vein matching result or the face matching result indicates a successful match, controlling the door lock motor assembly included in the smart door lock to perform an unlocking operation.
[0079] In some embodiments, in response to determining that the palm vein matching result or the face matching result indicates a successful match, the execution subject may control the door lock motor assembly included in the smart door lock to perform an unlocking operation. The door lock motor assembly may be a motor that controls the door lock to open.
[0080] Optionally, the above execution entity may further perform the following steps:
[0081] In the first step, in response to determining that the face matching result indicates a match failure, the light intensity corresponding to the target environment is collected by the associated first light sensor and the associated second light sensor. The first light sensor and the second light sensor may be located on both sides of the smart door lock, respectively. The first light sensor and the second light sensor may be communicatively connected to the execution subject.
[0082] The second step is to determine whether the first illumination intensity and the second illumination intensity meet a preset illumination intensity condition. The preset illumination intensity condition may be that both the first illumination intensity and the second illumination intensity are less than or equal to a preset illumination intensity threshold, or that the illumination intensity difference between the first illumination intensity and the second illumination intensity is greater than or equal to a preset illumination intensity difference threshold.
[0083] In the third step, in response to determining that the above-mentioned illumination intensity does not meet the above-mentioned preset illumination intensity condition, the first target illumination of the first light source and the second target illumination of the second light source are determined according to the above-mentioned first illumination intensity and the above-mentioned second illumination intensity. Wherein, the above-mentioned first light source and the above-mentioned second light source can be located on both sides of the above-mentioned smart door lock, respectively. The above-mentioned first light source and the above-mentioned second light source can be devices for emitting light. For example, the above-mentioned first light source and the above-mentioned second light source can both be flashlights. In practice, the above-mentioned execution subject can determine the first target illumination of the first light source according to the preset first target illumination configuration information set. Wherein, each preset first target illumination configuration information in the above-mentioned preset first target illumination configuration information set can include a preset first illumination intensity and a preset first target illumination. Specifically, first, the above-mentioned execution subject can determine the preset first target illumination configuration information included in the above-mentioned preset first target illumination configuration information set, which has the same preset first illumination intensity as the above-mentioned first illumination intensity, as the target first target illumination configuration information. Second, the above-mentioned execution subject can determine the preset first target illumination included in the above-mentioned target first target illumination configuration information as the first target illumination. Here, the specific steps of determining the second target illuminance are the same as the specific steps of determining the first target illuminance, and will not be repeated here.
[0084] The fourth step is to control the first light source and the second light source to perform a light-emitting operation according to the first target light intensity and the second target light intensity. In practice, the execution subject may control the first light source to emit light according to the first target light intensity, and control the second light source to emit light according to the second target light intensity.
[0085] The fifth step is to collect the illuminated face images under the first light source and the second light source by the camera device. It can be understood that when the first light source and the second light source emit light, the illuminated face images are collected by the camera device.
[0086] Step 6: Perform feature extraction processing on the illuminated face image to obtain feature information of the illuminated face. In practice, the execution subject may perform feature extraction processing on the illuminated face image using an image feature extraction algorithm to obtain feature information of the illuminated face.
[0087] The seventh step is to match the above-mentioned facial feature weighted information according to the pre-stored facial feature information set to obtain the facial feature matching result. The above-mentioned pre-stored facial feature information set may be feature information of each facial image pre-stored in the storage device included in the above-mentioned execution subject. In practice, first, the above-mentioned execution subject may determine the similarity between each pre-stored facial feature information in the above-mentioned pre-stored facial feature information set and the above-mentioned facial feature information. As an example, the above-mentioned execution subject may determine the similarity between each pre-stored facial feature information in the above-mentioned pre-stored facial feature information set and the above-mentioned facial feature information by a cosine similarity algorithm. Then, in response to the presence of a similarity greater than or equal to a preset facial similarity threshold among the determined similarities, the preset facial matching information characterizing a successful match is determined as the facial feature matching result.
[0088] In the eighth step, in response to determining that the facial feature matching result indicates that the facial match is successful, the door lock motor assembly included in the smart door lock is controlled to perform an unlocking operation.
[0089] The above-mentioned related content, as an inventive point of an embodiment of the present disclosure, solves the second technical problem mentioned in the background technology: "In dark or uneven light conditions, shadows exist in the collected face images, resulting in low clarity of the collected face images, and low accuracy of face recognition." The factors that lead to low accuracy of face recognition are often as follows: In dark or uneven light conditions, shadows exist in the collected face images, resulting in low clarity of the collected face images. If the above-mentioned factors are solved, the effect of improving the accuracy of face recognition can be achieved. In order to achieve this effect, the door lock motor assembly control method disclosed in the present invention also includes: in response to determining that the above-mentioned face matching result indicates a matching failure, respectively collecting the light intensity corresponding to the above-mentioned target environment through the associated first light illumination sensor and the associated second light illumination sensor, wherein the above-mentioned first light illumination sensor and the above-mentioned second light illumination sensor are respectively located on both sides of the above-mentioned smart door lock; determining whether the above-mentioned first light intensity and the above-mentioned second light intensity meet the preset light intensity condition; in response to determining that the above-mentioned first light intensity and the above-mentioned second light intensity do not meet the above-mentioned preset light intensity condition, determining the first target light intensity of the first light source and the second light intensity according to the above-mentioned first light intensity and the above-mentioned second light intensity. a second target light illumination of the source, wherein the first light source and the second light source are respectively located on both sides of the smart door lock; according to the first target light illumination and the second target light illumination, the first light source and the second light source are controlled to perform a light-emitting operation; the illuminated face images under the first light source and the second light source are collected by the camera device; feature extraction processing is performed on the illuminated face images to obtain illuminated face feature information; according to a pre-stored face feature information set, matching processing is performed on the face feature weighted information to obtain a face feature matching result; in response to determining that the face feature matching result indicates that the face match is successful, the door lock motor assembly included in the smart door lock is controlled to perform an unlocking operation. Because when it is detected that the light intensity on both sides of the smart door lock is less than or equal to the preset light intensity threshold, or the light intensity deviation on both sides of the smart door lock is large, the illumination of the light sources on both sides of the smart door lock can be determined according to the detected light intensity on both sides of the smart door lock, and the light source can be controlled according to the determined illumination, so that the same light intensity can be provided on both sides of the smart door lock, reducing the shadows on the face, thereby improving the clarity of the collected facial image and improving the accuracy of face recognition.
[0090] Optionally, the above execution entity may further perform the following steps:
[0091] In the first step, in response to determining that the face matching result indicates a match failure, feature extraction is performed on the face image to obtain face image feature information. In practice, the execution subject may perform feature extraction on the face image using an image feature extraction algorithm to obtain face image feature information.
[0092] In the second step, the facial image feature information is matched according to the pre-stored abnormal facial feature information set within the week to obtain the abnormal matching result within the week. Among them, the pre-stored abnormal facial feature information set within the week can be the facial feature information of each recognition failure pre-stored in the storage device included in the execution subject within a week. The abnormal matching result within the week can represent the success of the abnormal face matching within the week or the failure of the abnormal face matching within the week. The successful abnormal face matching within the week can be understood as the situation where the facial recognition of the person corresponding to the facial image has failed within a week. In practice, first, the execution subject can determine the similarity between each pre-stored abnormal facial feature information within the week in the pre-stored abnormal facial feature information set and the facial image feature information. As an example, the execution subject can determine the similarity between each pre-stored abnormal facial feature information within the week in the pre-stored abnormal facial feature information set and the facial image feature information by the cosine similarity algorithm. Then, in response to the presence of a similarity greater than or equal to a preset similarity threshold among the determined similarities, preset intra-week abnormal matching information indicating successful intra-week abnormal face matching is determined as an intra-week abnormal matching result.
[0093] The third step, in response to determining that the above-mentioned abnormal matching result within the week indicates that the abnormal face matching within the week is successful, the pre-stored abnormal face feature information within the month corresponding to the above-mentioned face image feature information is screened out from the pre-stored abnormal face feature information set within the month as the abnormal face feature information within the target month. Among them, the above-mentioned pre-stored abnormal face feature information set within the month can be the facial feature information of each recognition failure pre-stored in the storage device included in the above-mentioned execution subject within one month. In practice, the above-mentioned execution subject can determine the similarity between each pre-stored abnormal face feature information within the month in the above-mentioned pre-stored abnormal face feature information set and the above-mentioned face image feature information by a cosine similarity algorithm. Then, the pre-stored abnormal face feature information within the month with the highest corresponding similarity is determined as the abnormal face feature information within the target month.
[0094] The fourth step is to determine the number of historical abnormal detections corresponding to the abnormal facial feature information in the target month. In practice, the execution subject may determine the number of historical recognitions corresponding to the abnormal facial feature information in the target month stored in the storage device as the number of historical abnormal detections.
[0095] The fifth step is to determine the location information of the smart door lock in response to determining that the number of historical anomaly detections is greater than or equal to the preset historical anomaly detection threshold. The preset historical anomaly detection threshold may be a preset historical anomaly detection threshold. For example, the preset historical anomaly detection threshold may be 3 times. The location information may be the province or city where the smart door lock is located. As an example, in response to determining that the number of historical anomaly detections is greater than or equal to the preset historical anomaly detection threshold, the execution subject may determine the location information of the smart door lock through an associated locator.
[0096] The sixth step is to obtain a set of facial feature information of dangerous persons corresponding to the above-mentioned location information. The above-mentioned set of facial feature information of dangerous persons may be information that characterizes the facial features of dangerous persons. In practice, the above-mentioned execution subject may obtain a set of facial feature information of dangerous persons corresponding to the above-mentioned location information from an associated smart door lock server. The above-mentioned smart door lock server may be a server corresponding to a smart door lock. The above-mentioned smart door lock server may download facial images of dangerous persons from various web pages and extract facial feature information of the downloaded facial images for storage.
[0097] Step 7: For each dangerous person's facial feature information in the dangerous person's facial feature information set, determine the facial feature similarity between the dangerous person's facial feature information and the facial image feature information. In practice, the execution subject may determine the similarity between the dangerous person's facial feature information and the facial image feature information as the facial feature similarity by using a cosine similarity algorithm.
[0098] In the eighth step, in response to determining that there is a facial feature similarity greater than or equal to a preset facial feature similarity threshold among the determined facial feature similarities, dangerous person alarm information is generated based on the above facial image. Among them, the above preset facial feature similarity threshold can be a preset facial feature similarity threshold. In practice, the above execution entity can splice the above facial image with the preset dangerous person alarm information template to obtain the dangerous person alarm information. Among them, the above preset dangerous person alarm information template can be "The person in the above image is suspected to be a dangerous person, and it is recommended to call the police."
[0099] In the ninth step, in response to determining that there is no facial feature similarity greater than or equal to a preset facial feature similarity threshold value among the determined facial feature similarities, abnormal person alarm information is generated based on the above facial image. In practice, the above execution subject may splice the above facial image with a preset abnormal person alarm information template to obtain abnormal person alarm information. Among them, the above preset abnormal person alarm information template may be "The person in the above image is suspected to be an abnormal person, please pay attention to safety."
[0100] The tenth step is to send the dangerous person alarm information or the abnormal person alarm information to the associated terminal device. The associated terminal device may be a terminal connected to the smart door lock. For example, the associated terminal device may be a mobile phone.
[0101] The above-mentioned related content, as an inventive point of an embodiment of the present disclosure, solves the third technical problem mentioned in the background technology: "The smart door lock using the above-mentioned identification method fails to determine whether the person who fails to be identified is an abnormal person or even a dangerous person based on the historical number of identifications. When an abnormal person or even a dangerous person tries to unlock the door, the user is not warned, resulting in lower user safety." The factors that lead to lower user safety are often as follows: The smart door lock using the above-mentioned identification method fails to determine whether the person who fails to be identified is an abnormal person or even a dangerous person based on the historical number of identifications. When an abnormal person or even a dangerous person tries to unlock the door, the user is not warned. If the above-mentioned factors are solved, the effect of improving user safety can be achieved. In order to achieve this effect, the door lock motor component control method disclosed in the present invention also includes: in response to determining that the above-mentioned face matching result indicates a matching failure, performing feature extraction processing on the above-mentioned face image to obtain face image feature information; matching processing is performed on the above-mentioned face image feature information according to a pre-stored abnormal face feature information set within the week to obtain an abnormal matching result within the week; in response to determining that the above-mentioned abnormal matching result within the week indicates a successful abnormal face match within the week, filtering out the pre-stored abnormal face feature information within the month corresponding to the above-mentioned face image feature information from the pre-stored abnormal face feature information set within the month as the abnormal face feature information within the target month; determining the number of historical abnormal detections corresponding to the abnormal face feature information within the target month; in response to determining that the above-mentioned historical abnormal detection number is greater than or equal to a preset historical abnormal detection number threshold , determine the location information of the above-mentioned smart door lock; obtain the face feature information set of dangerous persons corresponding to the above-mentioned location information; for each face feature information of dangerous persons in the face feature information set of dangerous persons, determine the face feature similarity between the face feature information of dangerous persons and the face image feature information; in response to determining that there is a face feature similarity greater than or equal to the preset face feature similarity threshold value among the determined face feature similarities, generate dangerous person alarm information according to the above-mentioned face image; in response to determining that there is no face feature similarity greater than or equal to the preset face feature similarity threshold value among the determined face feature similarities, generate abnormal person alarm information according to the above-mentioned face image; send the dangerous person alarm information or the abnormal person alarm information to the associated terminal device. Because after the face recognition fails, it is further determined whether the person corresponding to the above-mentioned face image has a face recognition situation within a week, and when it is determined that the person corresponding to the above-mentioned face image has a face recognition situation within a week, the number of times the person corresponding to the above-mentioned face image has failed to be recognized within a month is determined. When the number of recognition failures is small, the user can be reminded to pay attention to safety.When the number of recognition failures is large, it is further determined whether the person corresponding to the above facial image is a dangerous person. When it is determined that the person corresponding to the above facial image is a dangerous person, the user is reminded to raise the alarm. In this way, when an abnormal person or even a dangerous person tries to unlock the door, the user can be warned or even reminded to raise the alarm, thereby improving the user's safety.
[0102] The above-mentioned embodiments of the present disclosure have the following beneficial effects: the door lock motor assembly control method of some embodiments of the present disclosure can improve the speed of smart door lock identification verification, thereby improving the user experience. Specifically, the reason for the poor user experience is that when a smart door lock has at least two identification methods, each identification method has a certain distance limit, and only one identification method can be used for identification within a set distance. When using it, the user needs to move multiple times to reach the set distance for identification verification, which causes the identification verification to take a long time, and multiple verification failures will cause the identification method of the smart door lock to be locked and unable to continue identification, causing inconvenience to the user. Based on this, the door lock motor assembly control method of some embodiments of the present disclosure, first, in response to the detection of the existence of an object within the preset identification distance by the associated distance detection device, the target environment is photographed by the associated camera device to obtain a target environment image. Thus, when there is an object at the preset identification distance, the target environment image can be collected for identification verification. Secondly, the palm recognition is performed on the above-mentioned target environment image to obtain a palm recognition result. Thus, the palm state of the user within the preset identification distance can be identified. Then, in response to determining that the palm result indicates that the target environment image meets the preset palm condition, a palm vein image is collected through an associated infrared camera device. The preset palm condition is that the target environment image includes and only includes an image representing a complete palm area. Therefore, when it is determined that there is one and only one complete palm in the target environment, a palm vein image can be collected for palm vein recognition. Afterwards, the palm vein image is matched to obtain a palm vein matching result. Therefore, the palm vein image can be identified and verified to determine whether the verification is successful. Then, in response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates that the matching fails, face recognition is performed on the target environment image to obtain a face recognition result. Therefore, when there is not one and only one complete palm in the target environment, or when the palm vein recognition is unsuccessful, it can be determined whether there is a face in the target environment. Then, in response to determining that the face recognition result indicates that the target environment image includes a face area, the face area is cropped on the target environment image to obtain a face image. Thus, when it is determined that there is a face in the target environment, a face image can be cropped from the target environment image, thereby reducing the size of the image for subsequent face matching, reducing the processing steps, and improving efficiency. Afterwards, in response to determining that the palm vein matching result or the face matching result indicates a successful match, the door lock motor assembly included in the smart door lock is controlled to perform an unlocking operation. Thus, the door can be unlocked when the palm vein recognition is successful or the face recognition is successful.Also, because it is only necessary to capture images within a preset recognition distance in order to identify the image and determine the recognition method, the user does not need to move and adjust to the corresponding distance range to determine the recognition method. This can reduce the steps of user movement and adjustment, reduce the time spent on recognition and verification, and make it easy to use, thereby improving the user experience.
[0103] Reference below Figure 2 , which shows a schematic structural diagram of various electronic components included in a smart door lock 200 suitable for implementing some embodiments of the present disclosure. Figure 2 The smart door lock shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present disclosure.
[0104] like Figure 2 As shown, the smart door lock 200 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 201, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 202 or a program loaded from a storage device 208 to a random access memory (RAM) 203. In the RAM 203, various programs and data required for the operation of the smart door lock 200 are also stored. The processing device 201, the ROM 202, and the RAM 203 are connected to each other via a bus 204. An input / output (I / O) interface 205 is also connected to the bus 204.
[0105] Typically, the following devices can be connected to the I / O interface 205: an input device 206 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, a distance detection device, a camera device, an infrared camera device, etc.; the distance detection device can be a device for detecting whether an object exists within a preset identification distance. For example, the distance detection device can be a distance sensor. The camera device can be a device connected to the smart door lock for communication. For example, the camera device can be a camera. The associated infrared camera device can be an infrared camera connected to the execution subject for communication. An output device 207 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a communication device 209. The communication device 209 can allow the smart door lock 200 to communicate wirelessly or wired with other devices to exchange data; and a door lock motor assembly 210, which is configured to perform an unlocking operation. Among them, the door lock motor assembly can be a motor that controls the door lock to open. Although Figure 2 The smart door lock 200 with various devices is shown, but it should be understood that it is not required to implement or have all the devices shown. More or fewer devices can be implemented or have alternatively. Figure 2 Each block shown in the figure may represent one device, or may represent multiple devices as required.
[0106] In particular, according to some embodiments of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In some such embodiments, the computer program can be downloaded and installed from the network through the communication device 209, or installed from the storage device 208, or installed from the ROM 202. When the computer program is executed by the processing device 201, the above-mentioned functions defined in the method of some embodiments of the present disclosure are executed.
[0107] It should be noted that the computer-readable medium recorded in some embodiments of the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In some embodiments of the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0108] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (Hyper Text Transfer Protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0109] The computer-readable medium may be included in the smart door lock, or it may exist independently without being assembled into the smart door lock. The computer-readable medium carries one or more programs. When the one or more programs are executed by the smart door lock, the smart door lock: in response to detecting the presence of an object within a preset identification distance through an associated distance detection device, photographing the target environment through an associated camera device to obtain a target environment image; performing palm recognition on the target environment image to obtain a palm recognition result; in response to determining that the palm result indicates that the target environment image satisfies a preset palm condition, collecting a palm vein image through an associated infrared camera device, wherein the preset palm condition is that the target environment image includes and only includes an image representing a complete palm area; performing palm vein recognition on the palm vein image The image is matched and processed to obtain a palm vein matching result; in response to determining that the above palm recognition result indicates that the above target environment image does not meet the above preset palm condition, or determining that the above palm vein matching result indicates that the matching fails, face recognition is performed on the above target environment image to obtain a face recognition result; in response to determining that the above face recognition result indicates that the above target environment image includes a face area, the face area is cropped on the above target environment image to obtain a face image; matching processing is performed on the above face image to obtain a face matching result; in response to determining that the above palm vein matching result or the above face matching result indicates that the matching is successful, the door lock motor assembly included in the above smart door lock is controlled to perform an unlocking operation.
[0110] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0111] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0112] The units described in some embodiments of the present disclosure may be implemented by software or by hardware. The described units may also be provided in a processor, for example, may be described as: a processor including a shooting unit, a palm recognition unit, a collection unit, a first matching unit, a face recognition unit, a cutting unit, a second matching unit and a control unit. The names of these units do not, in some cases, constitute limitations on the units themselves, for example, the control unit may also be described as "a unit for controlling the door lock motor assembly included in the above-mentioned smart door lock to perform an unlocking operation".
[0113] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0114] The above descriptions are only some preferred embodiments of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but should also cover other technical solutions formed by any combination of the above-mentioned technical features or their equivalent features without departing from the above-mentioned inventive concept. For example, the above-mentioned features are replaced with the technical features with similar functions disclosed in the embodiments of the present disclosure (but not limited to) and the technical solutions formed.
Claims
1. A door lock motor assembly control method, applied to a smart door lock, comprising: In response to detecting the existence of an object within a preset identification distance through the associated distance detection device, photographing the target environment through the associated camera device to obtain an image of the target environment; Performing palm recognition on the target environment image to obtain a palm recognition result; In response to determining that the palm result represents that the target environment image satisfies a preset palm condition, a palm vein image is acquired by an associated infrared camera device, wherein the preset palm condition is that the target environment image includes and only includes one image representing a complete palm area; Performing matching processing on the palm vein image to obtain a palm vein matching result; In response to determining that the palm recognition result indicates that the target environment image does not meet the preset palm condition, or determining that the palm vein matching result indicates a matching failure, performing face recognition on the target environment image to obtain a face recognition result; In response to determining that the face recognition result indicates that the target environment image includes a face region, performing face region cropping processing on the target environment image to obtain a face image; Performing matching processing on the face image to obtain a face matching result; In response to determining that the palm vein matching result or the face matching result indicates a successful match, controlling a door lock motor assembly included in the smart door lock to perform an unlocking operation; wherein, in response to determining that the face matching result indicates a match failure, capturing an illuminated face image through the camera device; According to the pre-stored facial feature information set, matching processing is performed on the illuminated facial image to obtain the facial feature matching result; In response to determining that the face matching result indicates a successful match, the door lock motor assembly is controlled to perform an unlocking operation.
2. The method according to claim 1, wherein: The performing matching processing on the palm vein image to obtain a palm vein matching result includes: Extracting a region of interest from the palm vein image to obtain a palm vein effective region image; Performing image enhancement processing on the palm vein effective area image to obtain an image enhanced palm vein effective area image; Extracting image features from the enhanced palm vein effective area image to obtain palm vein feature information; According to the pre-stored palm vein feature information set, the palm vein feature information is matched to obtain a palm vein matching result.
3. The method according to claim 2, wherein: The step of extracting a region of interest from the palm vein image to obtain a palm vein effective region image includes: Performing background segmentation processing on the palm vein image to obtain a palm vein segmentation image; Performing smoothing filtering on the palm vein segmentation image to obtain a palm vein filtered image; Performing grayscale binarization processing on the palm vein filter image to obtain a palm vein grayscale image; Rotating the palm vein grayscale image to obtain a rotated palm vein grayscale image; The rotated palm vein grayscale image is cropped to obtain a palm vein effective area image.
4. The method according to claim 3, wherein: The step of rotating the palm vein grayscale image to obtain a rotated palm vein grayscale image includes: Determine the midpoint position information of the bottom of the palm corresponding to the palm vein grayscale image; Performing contour detection processing on the palm vein grayscale image to obtain position information of each hand contour boundary corresponding to the palm vein grayscale image; For each piece of hand contour boundary position information, taking the midpoint position information of the palm bottom as the origin, coordinate transformation processing is performed on the hand contour boundary position information to obtain hand contour conversion position information; Performing curve fitting processing on each determined hand contour conversion position information to obtain hand contour curve information; Determine each corresponding minimum value in the hand contour curve information as a finger gap valley point position, and obtain a finger gap valley point position set; Select two finger valley point positions that meet a preset median condition from the finger valley point position set, wherein the preset median condition is: the selected two finger valley point positions are the two finger valley point positions in the finger valley point position set that have the largest distance from the position corresponding to the midpoint position information of the bottom of the palm; Determine the finger joint tangent line information corresponding to the two finger joint valley point positions; According to the slope corresponding to the finger gap tangent information, the palm vein filter image is rotated to obtain a forward palm vein image; The forward palm vein image is determined as a rotated palm vein grayscale image.
5. The method according to claim 4, wherein: The step of cropping the rotated palm vein grayscale image to obtain a palm vein effective area image includes: Determine the smallest finger valley point position in the finger valley point position set as the middle finger valley point position of the palm; Determine the horizontal tangent information corresponding to the position of the mid-finger gap point of the palm; Determining centerline information corresponding to the palm vein grayscale image according to the horizontal tangent information and the finger gap tangent information; Determining the center position information corresponding to the palm vein grayscale image according to the center line information; Determining, according to the palm vein grayscale image, cutting radius information corresponding to the palm vein grayscale image; The palm vein grayscale image is cropped according to the cropping diameter information and the center position information to obtain a palm vein effective area image.
6. The method according to claim 2, wherein: The performing image enhancement processing on the palm vein effective area image to obtain the palm vein effective area image after image enhancement includes: Performing contrast stretching processing on the palm vein effective area image to obtain a palm vein effective area stretched image; Performing palmprint extraction processing on the palm vein effective area stretching image to obtain a palmprint image; Superimposing the palm print image with the palm vein effective area stretching image to obtain a superimposed palm vein effective area stretching image; The superimposed palm vein effective area stretched image is determined as the palm vein effective area image after image enhancement.
7. The method according to claim 1, wherein: The performing palm recognition on the target environment image to obtain a palm recognition result includes: Perform skin color segmentation on the target environment image to obtain a skin image; Extracting contour features from the skin image to obtain contour feature information; The contour feature information is input into a pre-trained palm recognition result generation model to obtain a palm recognition result.
8. A smart door lock, comprising: one or more processors; A distance detection device is configured to detect whether an object exists within a preset identification distance; A camera device configured to capture images; an infrared camera device configured to capture a palm vein image; a door lock motor assembly configured to perform an unlocking operation; a storage device having one or more programs stored thereon, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
9. A computer readable medium having a computer program stored thereon, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
