Intelligent door lock face recognition encryption method and system based on deep learning

By using an improved MagFace network and a fractal dimension adaptive embedding mechanism, combined with fractal spectrum coding and feature stability analysis, the feature stability and security issues of the smart door lock face recognition system in complex environments are solved, achieving highly accurate and attack-resistant identity authentication.

CN122369079APending Publication Date: 2026-07-10JIANGSU ZHONGKE XINCHUANGYUAN INTELLIGENT TECHNOLOGY CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
JIANGSU ZHONGKE XINCHUANGYUAN INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-04-02
Publication Date
2026-07-10

Smart Images

  • Figure CN122369079A_ABST
    Figure CN122369079A_ABST
Patent Text Reader

Abstract

This invention discloses a deep learning-based intelligent door lock face recognition encryption method and system, comprising: Step 1: acquiring face images and performing face detection, key point localization, and affine alignment processing to obtain standardized face images; Step 2: inputting the standardized face images into an improved MagFace network and introducing a fractal dimension adaptive embedding mechanism to generate fractal modulated face feature vectors; Step 3: performing fractal spectrum encoding processing on the fractal modulated face feature vectors to generate fractal structure feature vectors; Step 4: calculating feature stability indices and dividing the feature set into stable and sensitive feature sets; Step 5: generating binary identity codes and environmental disturbance verification codes; Step 6: generating authentication encoding sequences based on challenge parameters; Step 7: performing consistency matching and generating door lock control commands. This invention improves the stability and authentication security of face recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of biometric recognition and deep learning technology, and in particular to a deep learning-based intelligent door lock face recognition encryption method and system. Background Technology

[0002] With the development of smart home technology and the increasing demand for access control security, smart door locks have gradually become important devices for access control management in residences, offices, and public places. Among them, contactless identity authentication based on facial recognition is widely used due to its convenience and fast recognition speed. In existing technologies, facial recognition smart door locks typically capture user facial images through a camera, extract facial features using deep learning models, and then complete identity authentication through feature matching. However, in practical applications, existing technologies still have some shortcomings.

[0003] Traditional facial recognition methods mostly utilize deep convolutional neural networks to extract facial feature vectors and perform similarity matching. However, under complex environmental conditions such as changes in facial pose, lighting, and partial occlusion, the extracted facial features are unstable, easily leading to fluctuations in recognition results and affecting the reliability of door lock recognition. Furthermore, existing methods typically use facial feature vectors directly as identity credentials for matching and recognition, lacking a filtering mechanism for differences in feature stability. This makes it difficult to effectively distinguish between stable and sensitive features, making them susceptible to environmental disturbances and resulting in false recognition or rejection. In addition, most existing systems rely solely on a single feature matching method during identity authentication, lacking secure encoding and perturbation verification mechanisms for biometric data. When the facial feature data stored in the system is illegally obtained, there is a security risk of forgery or replay attacks.

[0004] Therefore, how to provide a face recognition encryption method and system for smart door locks based on deep learning is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention

[0005] One objective of this invention is to propose a deep learning-based intelligent door lock face recognition encryption method and system. This invention constructs a face feature extraction framework using an improved MagFace network and a fractal dimension adaptive embedding mechanism, and combines fractal spectral coding and feature stability analysis to enhance the representation of facial feature structure information. Simultaneously, it generates identity codes through stable feature quantization, generates perturbation verification codes through sensitive feature interval mapping, and introduces a challenge parameter bit rearrangement authentication mechanism to improve the stability and security of face recognition in complex environments, thereby achieving high accuracy and anti-attack capability for intelligent door lock identity authentication.

[0006] A deep learning-based smart door lock face recognition encryption method according to an embodiment of the present invention includes the following steps: Step 1: Acquire a face image, and perform face detection, key point localization and affine alignment processing on the face image to obtain a standardized face image; Step 2: Input the standardized face image into the improved MagFace network. The improved MagFace network introduces a fractal dimension adaptive embedding mechanism to perform fractal dimension embedding processing and generate a fractal modulated face feature vector. Step 3: Perform fractal spectrum encoding processing based on the fractal modulated face feature vector to generate a fractal structure feature vector; Step 4: Calculate the stability index of each feature dimension based on the fractal structure feature vector, and divide the stable feature set and sensitive feature set according to the stability index; Step 5: Perform symbolic quantization on the feature components corresponding to the stable feature set to generate binary identity codes, and perform interval mapping on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes; Step Six: Generate challenge parameters during the identity authentication phase, perform bit rearrangement processing on the binary identity code based on the challenge parameters, and generate an authentication code sequence by combining the environmental perturbation check code; Step 7: Perform a consistency matching calculation between the authentication code sequence and the preset stored reference identity code, and generate a door lock control command based on the matching calculation result.

[0007] Optionally, step one includes: The face image frame sequence of the preset collection area in front of the smart lock is obtained by a face capture camera set on the front side of the lock housing, and the current image frame is extracted from the face image frame sequence; Perform face detection processing on the current image frame, determine the pixel coordinate range corresponding to the bounding rectangle region of the face, and perform region cropping processing on the current image frame based on the pixel coordinate range to obtain a local image of the face; Facial key point localization processing is performed on a partial image of a face to determine the two-dimensional pixel coordinates of the center point of the left eye, the center point of the right eye, the tip of the nose, the left corner of the mouth, and the right corner of the mouth; The tilt angle of the line connecting the two eyes is calculated based on the two-dimensional pixel coordinates of the center point of the left eye and the center point of the right eye. The distance between the centers of the two eyes is calculated based on the pixel distance between the center points of the left eye and the center point of the right eye. The coordinates of the center point of the face are determined based on the geometric relationship between the tip of the nose and the center points of the two eyes. Based on the coordinates of key points in the preset standard face template, the local face image is subjected to affine transformation processing. The affine transformation processing includes rotation processing based on the tilt angle of the line connecting the eyes, scaling processing based on the ratio between the distance between the centers of the two eyes and the preset standard distance between the eyes, and translation processing based on the coordinate difference between the coordinates of the face center point and the standard center point. A boundary cropping process is performed on the face image after affine transformation to obtain a face-aligned image of a preset size. Then, the pixel value normalization process is performed on the face-aligned image to convert the image pixel values ​​to a preset value range, resulting in a standardized face image.

[0008] Optionally, step two includes: Standardized face images are input into the improved MagFace network; The improved MagFace network has an image feature embedding module at the input end, performs convolutional feature extraction processing on the standardized face image, and performs convolution operation, batch normalization processing and nonlinear activation processing on the image pixel matrix in sequence through a multi-layer convolutional neural network to generate a multi-layer face feature map. Global average pooling is performed on the multi-layer face feature map, and the pooled features are mapped to a preset dimension vector space through a linear mapping layer to generate basic face feature vectors. The basic facial feature vector is input into the fractal dimension adaptive embedding mechanism module, which includes a fractal neighborhood construction unit, a fractal dimension calculation unit, and a fractal spectrum embedding unit. The fractal neighborhood construction unit uses the basic face feature vector as the target feature vector, retrieves a preset number of neighborhood feature vectors in the feature space according to the feature distance from small to large, uses the target feature vector and each neighborhood feature vector as graph nodes, and establishes graph connection edges based on the feature distance between the target feature vector and each neighborhood feature vector to generate a fractal neighborhood graph structure. The fractal dimension calculation unit performs multi-scale meshing processing on the fractal neighborhood graph structure, specifically including: performing multi-scale meshing on the feature space according to a preset scale sequence, with each scale corresponding to a mesh edge length; performing spatial landing point mapping on the graph nodes in the fractal neighborhood graph structure at each scale, counting the number of non-empty mesh units containing at least one graph node, and generating mesh count values ​​for the corresponding scale; recording the mesh count values ​​corresponding to each scale according to the scale sequence to form a scale count sequence; and calculating the fractal dimension value based on the logarithmic relationship between the mesh count value in the scale count sequence and the reciprocal of the corresponding mesh edge length. The fractal spectrum embedding unit constructs an adjacency relation matrix based on the fractal neighborhood graph structure, constructs a degree matrix based on the connectivity of each graph node, constructs a graph Laplacian matrix based on the adjacency relation matrix and the degree matrix, performs eigenvalue decomposition on the graph Laplacian matrix, extracts a preset number of low-order spectral vectors, and constructs fractal spectrum embedding vectors according to the vector dimension splicing method. The fractal modulation coefficient is calculated based on the difference between the fractal dimension value and the preset fractal dimension benchmark value. The spectral weight of the fractal spectrum embedding vector and the feature weight of the basic face feature vector are determined based on the fractal modulation coefficient. A weighted fusion operation is then performed according to the spectral weight and the feature weight to generate the fractal modulated face feature vector.

[0009] Optionally, step three includes: Each feature component in the fractal modulated face feature vector is used as a feature node. The feature distance value is calculated based on the numerical difference between each feature node, and a feature relationship matrix is ​​constructed based on the feature distance value. The connectivity degree of each feature node is calculated based on the feature relation matrix, and a degree matrix is ​​constructed based on the connectivity degree values. The degree matrix is ​​a diagonal matrix, and the diagonal elements are the connectivity degree values ​​of the corresponding feature nodes. The spectral structure matrix is ​​calculated from the degree matrix and the eigenvalue relation matrix. The spectral structure matrix is ​​obtained by subtracting the eigenvalue relation matrix from the degree matrix. Perform eigenvalue decomposition on the spectral structure matrix to obtain the set of eigenvalues ​​and the corresponding set of eigenvectors, and select a preset number of low-order eigenvectors in ascending order of eigenvalues; The selected low-order feature vectors are concatenated according to their vector dimensions to obtain the fractal structure feature vectors.

[0010] Optionally, step four includes: Multiple frames of standardized face images of the same registered user are collected and input into an improved MagFace network and subjected to fractal spectral encoding to obtain multiple sets of fractal structure feature vectors. The feature vectors of the multi-component morphological structure are extracted dimension by dimension, and a corresponding feature value sequence is formed for each feature dimension. For each feature dimension, a stability index value is calculated for the feature value sequence, including: The mean is obtained by summing all feature values ​​in the feature value sequence for the corresponding feature dimension and dividing by the number of feature values. The squared difference is calculated based on the difference between each feature value and the mean, and the variance is obtained by summing all the squared differences and dividing by the number of feature values. The standard deviation is obtained by performing a square root operation on the variance, and the stability index value is calculated based on the ratio between the standard deviation and the mean. The features are sorted according to the stability index values ​​corresponding to each feature dimension, and feature dimensions with stability index values ​​less than the stability threshold are divided into stable feature sets according to the preset stability threshold. Feature dimensions whose stability index values ​​are greater than or equal to the stability threshold are classified into a set of sensitive features.

[0011] Optionally, step five includes: Extract the corresponding stable feature dimension values ​​from the stable feature set, and construct a stable feature vector sequence according to the feature dimension order; A quantization threshold is determined for each feature dimension value in the stable feature vector sequence. The quantization threshold is the mean value of the corresponding feature dimension value in the stable feature set. Each feature dimension value in the stable feature vector sequence is compared with the corresponding quantization threshold. When the feature dimension value is greater than or equal to the corresponding quantization threshold, it is assigned a binary value of 1. When the feature dimension value is less than the corresponding quantization threshold, it is assigned a binary value of 0. The obtained binary values ​​are arranged sequentially according to the feature dimension to form a binary sequence, and the binary sequence is used as a binary identity code. Extract the corresponding sensitive feature dimension values ​​from the sensitive feature set and arrange them in order of feature dimension to form a sensitive feature vector sequence; Determine the maximum and minimum values ​​of each feature dimension in the sensitive feature set, and divide the value range between the maximum and minimum values ​​into multiple continuous numerical intervals, while determining the interval number corresponding to each numerical interval. Map each feature dimension value in the sensitive feature vector sequence to its corresponding numerical range and record the corresponding range number; The interval numbers are arranged sequentially according to the feature dimensions to form an interval number sequence, and the interval number sequence is used as an environmental disturbance check code.

[0012] Optionally, step six includes: During the identity authentication phase, challenge parameters are generated, which include a random integer sequence and a shift parameter, and a rearranged index sequence is determined based on the random integer sequence. The target position corresponding to each binary bit in the binary identity code is determined based on the rearranged index sequence, and a position mapping table is constructed. Based on the position mapping table, the positions of each binary bit in the binary identity code are rearranged to obtain the rearranged identity code sequence; The environmental disturbance check code is converted into a check code sequence according to the feature dimension order, and the insertion position of the check code sequence in the rearranged identity code sequence is determined according to the displacement parameter. The verification code sequence and the rearranged identity code sequence are concatenated sequentially according to the insertion position to generate the authentication code sequence.

[0013] Optionally, step seven includes: Obtain the preset stored reference identity code, and align the authentication code sequence with the reference identity code according to the order of the code bits; Perform a bit-by-bit comparison operation between the authentication encoding sequence and the corresponding encoding bits in the reference identity encoding. When the two encoding bits have the same value, they are recorded as a matching bit; when the two encoding bits have different values, they are recorded as a mismatch bit. The number of matching bits in all encoded bits is counted, and the consistency matching value is determined based on the ratio of the number of matching bits to the total number of bits in the certified encoded sequence. The consistency matching value is compared with the preset matching threshold. When the consistency matching value is greater than or equal to the matching threshold, an unlocking control command is generated. A rejection unlock command is generated when the consistency matching value is less than the matching threshold.

[0014] A deep learning-based smart door lock face recognition encryption system according to an embodiment of the present invention includes: The face acquisition module is used to acquire face images and perform face detection, key point localization and affine alignment processing on the face images to generate standardized face images; The feature embedding module is used to input standardized face images into the improved MagFace network, perform fractal dimension embedding processing on the standardized face images, and generate fractal modulated face feature vectors. The spectral coding module is used to perform fractal spectral coding processing based on the fractal modulated face feature vector to generate a fractal structure feature vector. The stability analysis module is used to calculate the stability index of each feature dimension based on the fractal structure feature vector, and to divide the stable feature set and the sensitive feature set according to the stability index. The identity encoding module is used to perform symbol quantization processing on the feature components corresponding to the stable feature set to generate binary identity codes, and to perform interval mapping processing on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes. The authentication encoding module is used to generate challenge parameters during the identity authentication stage, perform bit rearrangement processing on the binary identity encoding based on the challenge parameters, and generate an authentication encoding sequence by combining the environmental perturbation check code. The matching control module is used to perform consistency matching calculations between the authentication code sequence and the preset stored reference identity code, and generate door lock control commands based on the matching calculation results.

[0015] The beneficial effects of this invention are: This invention constructs a face feature extraction framework based on an improved MagFace network and a fractal dimension adaptive embedding mechanism. Combining fractal spectral coding, feature stability analysis, and biometric encryption coding in a collaborative design, it addresses the problems of insufficient feature stability, susceptibility of identity features to environmental disturbances, and lack of secure coding mechanisms in existing smart door lock face recognition systems under complex environmental conditions. The invention proposes a face recognition method that integrates fractal structure feature modeling and identity encryption authentication. In the feature extraction stage, a fractal dimension adaptive embedding mechanism is introduced. By constructing a feature neighborhood structure and calculating the fractal dimension, the basic face features are structurally modulated, maintaining high discrimination stability even under complex environmental changes. In the feature coding stage, a fractal spectral coding mechanism is introduced. By constructing a feature relation matrix and performing spectral structure decomposition, low-order spectral features are extracted to enhance the ability to express the hidden structural information in the face feature vector, thereby improving the system's ability to handle complex conditions such as pose changes, illumination changes, and local occlusion. Adaptability: A stability analysis mechanism is constructed during the feature selection stage. By statistically calculating multi-frame facial features, a stable feature set and a sensitive feature set are divided based on stability indicators. Stable features are used for identity encoding, while sensitive features are used for environmental disturbance verification, thereby reducing the impact of environmental changes on the accuracy of identity recognition. During the identity encoding stage, binary identity codes are generated through symbol quantization, and environmental disturbance verification codes are generated by combining them with an interval mapping mechanism, forming a dual-channel identity encoding structure with structural stability and security. During the authentication stage, challenge parameters and bit rearrangement mechanisms are introduced to dynamically rearrange the identity codes and combine them with the environmental disturbance verification codes to generate authentication codes, effectively improving the system's defense capabilities against replay attacks and forgery attacks. Finally, identity authentication and door lock control command generation are achieved through consistency matching calculation, thereby realizing feature stability enhancement, structural information strengthening, and secure encryption authentication in the smart door lock facial recognition process, improving the system's recognition accuracy and security in complex application scenarios. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is a schematic diagram of a face recognition encryption method for smart door locks based on deep learning proposed in this invention; Figure 2 This is a schematic diagram of the structure of a deep learning-based smart door lock face recognition encryption system proposed in this invention; Figure 3 This is a schematic diagram of the structure of the improved MagFace network and the fractal dimension adaptive embedding mechanism in this invention. Detailed Implementation

[0017] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.

[0018] refer to Figures 1-3 A deep learning-based face recognition encryption method for smart door locks includes the following steps: Step 1: Acquire face images, perform face detection, key point localization and affine alignment processing on the face images to obtain standardized face images; Step 2: Input the standardized face image into the improved MagFace network. The improved MagFace network introduces a fractal dimension adaptive embedding mechanism to perform fractal dimension embedding processing and generate a fractal modulated face feature vector. Step 3: Perform fractal spectrum encoding processing based on the fractal modulation face feature vector to generate fractal structure feature vector; Step 4: Calculate the stability index of each feature dimension based on the fractal structure feature vector, and divide the stable feature set and sensitive feature set according to the stability index; Step 5: Perform symbolic quantization on the feature components corresponding to the stable feature set to generate binary identity codes, and perform interval mapping on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes; Step Six: Generate challenge parameters during the identity authentication phase, perform bit rearrangement processing on the binary identity code based on the challenge parameters, and generate an authentication code sequence by combining the environmental perturbation check code; Step 7: Perform a consistency matching calculation between the authentication code sequence and the preset stored reference identity code, and generate door lock control instructions based on the matching calculation results.

[0019] In this embodiment, step one includes: The face image frame sequence of the preset collection area in front of the smart lock is obtained by a face capture camera set on the front side of the lock housing, and the current image frame is extracted from the face image frame sequence; Perform face detection processing on the current image frame, determine the pixel coordinate range corresponding to the bounding rectangle region of the face, and perform region cropping processing on the current image frame based on the pixel coordinate range to obtain a local image of the face; Facial key point localization processing is performed on a partial image of a face to determine the two-dimensional pixel coordinates of the center point of the left eye, the center point of the right eye, the tip of the nose, the left corner of the mouth, and the right corner of the mouth; The tilt angle of the line connecting the two eyes is calculated based on the two-dimensional pixel coordinates of the center point of the left eye and the center point of the right eye. The distance between the centers of the two eyes is calculated based on the pixel distance between the center points of the left eye and the center point of the right eye. The coordinates of the center point of the face are determined based on the geometric relationship between the tip of the nose and the center points of the two eyes. Based on the coordinates of key points in the preset standard face template, the local face image is subjected to affine transformation processing. The affine transformation processing includes rotation processing based on the tilt angle of the line connecting the eyes, scaling processing based on the ratio between the distance between the centers of the two eyes and the preset standard distance between the eyes, and translation processing based on the coordinate difference between the coordinates of the face center point and the standard center point. A boundary cropping process is performed on the face image after affine transformation to obtain a face-aligned image of a preset size. Then, the pixel value normalization process is performed on the face-aligned image to convert the image pixel values ​​to a preset value range, resulting in a standardized face image.

[0020] In this implementation, a visible light camera with a resolution of 1920×1080 pixels is used for face capture. The camera is installed at a height of 1.2m to 1.5m, and the acquisition distance is set to 0.5m to 1.2m. During the face detection stage, the smallest face size in the current image frame, 80×80 pixels, is used as the detection threshold. In the key point localization stage, the coordinates of five key points are extracted, including the center point of the left eye, the center point of the right eye, the tip of the nose, the left corner of the mouth, and the right corner of the mouth. The standard distance between the center points of the two eyes in the standard face template is set to 60 pixels, and the face center point is located at the center of the standard template image. During the affine transformation, the rotation angle is calculated based on the tilt angle of the line connecting the eyes, and the scaling ratio is calculated based on the ratio of the current distance between the center points of the two eyes to 60 pixels. The size of the aligned face image after boundary cropping is set to 112×112 pixels. Pixel value normalization is performed using a linear mapping method, converting the RGB channel pixel values ​​from the 0-255 range to the 0-1 range.

[0021] In this embodiment, step two includes: Standardized face images are input into the improved MagFace network; The improved MagFace network sets up an image feature embedding module at the input end, performs convolutional feature extraction processing on the standardized face image, and generates multi-layer face feature maps by sequentially performing convolution operation, batch normalization processing and nonlinear activation processing on the image pixel matrix through a multi-layer convolutional neural network. Global average pooling is performed on the multi-layer face feature map, and the pooled features are mapped to a preset dimension vector space through a linear mapping layer to generate basic face feature vectors. The basic facial feature vector is input into the fractal dimension adaptive embedding mechanism module, which includes a fractal neighborhood construction unit, a fractal dimension calculation unit, and a fractal spectrum embedding unit. The fractal neighborhood construction unit uses the basic face feature vector as the target feature vector, retrieves a preset number of neighborhood feature vectors in the feature space according to the feature distance from smallest to largest, uses the target feature vector and each neighborhood feature vector as graph nodes, and establishes graph connection edges based on the feature distance between the target feature vector and each neighborhood feature vector to generate a fractal neighborhood graph structure. The fractal dimension calculation unit performs multi-scale meshing processing on the fractal neighborhood graph structure, specifically including: performing multi-scale meshing on the feature space according to a preset scale sequence, with each scale corresponding to a mesh edge length; performing spatial landing point mapping on the graph nodes in the fractal neighborhood graph structure at each scale, counting the number of non-empty mesh cells containing at least one graph node, and generating mesh count values ​​for the corresponding scale; recording the mesh count values ​​corresponding to each scale according to the scale sequence to form a scale count sequence; and calculating the fractal dimension value based on the logarithmic relationship between the mesh count value in the scale count sequence and the reciprocal of the corresponding mesh edge length. The fractal spectrum embedding unit constructs an adjacency relation matrix based on the fractal neighborhood graph structure, constructs a degree matrix based on the connectivity of each graph node, constructs a graph Laplacian matrix based on the adjacency relation matrix and the degree matrix, performs eigenvalue decomposition on the graph Laplacian matrix, extracts a preset number of low-order spectral vectors, and constructs fractal spectrum embedding vectors according to the vector dimension splicing method. The fractal modulation coefficient is calculated based on the difference between the fractal dimension value and the preset fractal dimension benchmark value. The spectral weight of the fractal spectrum embedding vector and the feature weight of the basic face feature vector are determined based on the fractal modulation coefficient. A weighted fusion operation is then performed according to the spectral weight and the feature weight to generate the fractal modulated face feature vector.

[0022] In this implementation, the improved MagFace network adopts a deep convolutional structure with 8 to 16 convolutional layers, each with a 3×3 kernel size and a stride of 1. The feature vector dimension obtained after global average pooling is set to 256 dimensions. During the fractal neighborhood construction process, the number of neighborhood feature vectors is set to 8 to 16, and the neighborhood relationship is determined by calculating the Euclidean distance between feature vectors. In the fractal dimension calculation stage, four scale parameters are set, with grid side lengths of 0.25, 0.125, 0.0625, and 0.03125, respectively. At each scale, the number of non-empty grid cells is counted, and the local fractal dimension is calculated based on the logarithmic relationship between the reciprocal of the grid side length and the corresponding number of grid cells. During the eigenvalue decomposition of the graph Laplacian matrix, the first 32 low-order spectral vectors are extracted to form the fractal spectrum embedding vector. The fractal modulation coefficient is set to a value range of 0.3 to 0.7, and the ratio of spectral weight to feature weight is determined based on the difference between the fractal dimension value and the preset baseline fractal dimension of 1.5. The improved MagFace network maintains the same overall structure as the traditional MagFace network, both employing a deep convolutional neural network as the backbone for feature extraction. It performs multi-layer convolution operations, batch normalization, and non-linear activation on the input face image to extract texture and structural features layer by layer. Simultaneously, at the end of the network, global average pooling is used to compress the spatial dimension of the feature map, and a linear mapping layer is used to map the compressed features to a fixed-dimensional feature vector space, thereby generating a basic face feature vector to represent facial identity information. Unlike the traditional MagFace network, this implementation introduces a fractal dimension adaptive embedding mechanism after the basic face feature vector is generated. This mechanism includes a fractal neighborhood construction unit, a fractal dimension calculation unit, and a fractal spectrum embedding unit. The fractal neighborhood construction unit retrieves neighborhood feature vectors in the feature space based on feature distance and constructs a fractal neighborhood graph structure. The fractal dimension calculation unit counts the number of non-empty grids at different scales through multi-scale grid partitioning and calculates the fractal dimension value based on the relationship between the number of grids. The fractal spectrum embedding unit constructs a graph Laplacian matrix based on the fractal neighborhood graph structure and extracts low-order spectral vectors. It then performs a fusion process between the spectral vectors and the basic face feature vectors to generate a fractal-modulated face feature vector. By introducing a fractal dimension adaptive embedding mechanism into the MagFace network, fractal structure information can be incorporated into the original facial feature representation, enabling the generated facial features to contain not only identity discrimination information but also structural complexity information of the feature space. The fractal neighborhood graph and spectral embedding structure can enhance the stability of facial features in complex environments and reduce the impact of illumination changes, pose changes, and occlusion factors on feature expression, thereby improving the stability and security of the facial recognition encryption process in smart door lock scenarios.

[0023] In this embodiment, step three includes: Each feature component in the fractal modulated face feature vector is used as a feature node. The feature distance value is calculated based on the numerical difference between each feature node, and a feature relationship matrix is ​​constructed based on the feature distance value. Calculate the connectivity value of each feature node based on the feature relation matrix, and construct a degree matrix based on each connectivity value. The degree matrix is ​​a diagonal matrix, and the diagonal elements are the connectivity values ​​of the corresponding feature nodes. The spectral structure matrix is ​​calculated from the degree matrix and the eigenvalue relation matrix. The spectral structure matrix is ​​obtained by subtracting the eigenvalue relation matrix from the degree matrix. Perform eigenvalue decomposition on the spectral structure matrix to obtain the set of eigenvalues ​​and the corresponding set of eigenvectors, and select a preset number of low-order eigenvectors in ascending order of eigenvalues; The selected low-order feature vectors are concatenated according to their vector dimensions to obtain the fractal structure feature vectors.

[0024] In this implementation, the fractal modulation face feature vector is set to 256 dimensions, with each feature component corresponding to a feature node. Feature distance values ​​are calculated based on the numerical differences between feature nodes, and a 256×256-dimensional feature relation matrix is ​​constructed. The connectivity value is calculated by counting the number of connections for each feature node in the feature relation matrix, and a degree matrix is ​​constructed based on the connectivity value. The spectral structure matrix is ​​obtained by subtracting the feature relation matrix from the degree matrix. When performing eigenvalue decomposition on the spectral structure matrix, the first 32 low-order feature vectors are extracted, and concatenation is performed according to the vector dimensions to obtain the structural spectral feature vector. The structural spectral feature vector is set to 128 dimensions to represent the structural relationship information in the face feature vector.

[0025] In this embodiment, step four includes: Multiple frames of standardized face images of the same registered user are collected and input into an improved MagFace network and subjected to fractal spectral encoding to obtain multiple sets of fractal structure feature vectors. The feature vectors of the multi-component morphological structure are extracted dimension by dimension, and a corresponding feature value sequence is formed for each feature dimension. For each feature dimension, a stability index value is calculated for the feature value sequence, including: The mean is obtained by summing all feature values ​​in the feature value sequence for the corresponding feature dimension and dividing by the number of feature values. The variance is obtained by calculating the squared difference between each feature value and the mean, summing all squared differences and dividing by the number of feature values. The standard deviation is obtained by performing a square root operation on the variance, and the stability index value is calculated based on the ratio between the standard deviation and the mean. The features are sorted according to the stability index values ​​corresponding to each feature dimension, and feature dimensions with stability index values ​​less than the stability threshold are divided into stable feature sets according to the preset stability threshold. Feature dimensions whose stability index values ​​are greater than or equal to the stability threshold are classified into a set of sensitive features.

[0026] In this implementation, the number of frames for capturing face images of the same registered user is set to 20 to 40 frames. Each frame is processed using an improved MagFace network and fractal spectrum coding to obtain a fractal structure feature vector. The fractal structure feature vector is set to 128 or 256 dimensions, with each dimension corresponding to a feature dimension sequence. For each feature dimension, the corresponding feature value sequence is extracted, and the mean and standard deviation are calculated. The stability index is calculated by the ratio of the standard deviation to the mean. The stability threshold is set to 0.15 to 0.25. When the stability index is less than 0.2, the corresponding feature dimension is classified as a stable feature dimension; when the stability index is greater than or equal to 0.2, the corresponding feature dimension is classified as a sensitive feature dimension. The number of stable feature dimensions is typically 60 to 120.

[0027] In this embodiment, step five includes: Extract the corresponding stable feature dimension values ​​from the stable feature set, and construct a stable feature vector sequence according to the feature dimension order; A quantization threshold is determined for each feature dimension value in the stable feature vector sequence. The quantization threshold is the mean value of the corresponding feature dimension value in the stable feature set. Each feature dimension value in the stable feature vector sequence is compared with the corresponding quantization threshold. When the feature dimension value is greater than or equal to the corresponding quantization threshold, it is assigned a binary value of 1. When the feature dimension value is less than the corresponding quantization threshold, it is assigned a binary value of 0. The obtained binary values ​​are arranged sequentially according to the feature dimensions to form a binary sequence, and the binary sequence is used as a binary identity code. Extract the corresponding sensitive feature dimension values ​​from the sensitive feature set and arrange them in order of feature dimension to form a sensitive feature vector sequence; Determine the maximum and minimum values ​​of each feature dimension in the sensitive feature set, and divide the value range between the maximum and minimum values ​​into multiple continuous numerical intervals, while determining the interval number corresponding to each numerical interval; Map each feature dimension value in the sensitive feature vector sequence to its corresponding numerical range and record the corresponding range number; The interval numbers are arranged sequentially according to the feature dimensions to form an interval number sequence, and the interval number sequence is used as the environmental disturbance check code.

[0028] In this implementation, the number of dimensions in the stable feature set is set to 64 to 128, with each stable feature dimension corresponding to a feature value. The length of the stable feature vector sequence is consistent with the number of stable feature dimensions. The quantization threshold is taken as the average of multiple feature values ​​collected during the registration phase for the corresponding feature dimension. The length of the binary identity code is 64 to 128 bits. The number of dimensions in the sensitive feature set is set to 16 to 64. For each sensitive feature dimension, the numerical range is determined based on the maximum and minimum values ​​of the feature value for that dimension, and this numerical range is divided into 4 to 8 consecutive intervals, each interval corresponding to an interval number. The interval numbers are represented by integers from 0 to 7. All interval numbers are arranged in the order of feature dimensions to generate an environmental disturbance check code.

[0029] In this embodiment, step six includes: During the identity authentication phase, challenge parameters are generated, including a random integer sequence and a shift parameter, and the rearranged index sequence is determined based on the random integer sequence. The target position corresponding to each binary bit in the binary identity code is determined based on the rearranged index sequence, and a position mapping table is constructed. Based on the position mapping table, perform a position rearrangement operation on each binary bit in the binary identity code to obtain the rearranged identity code sequence; The environmental disturbance check code is converted into a check code sequence according to the feature dimension order, and the insertion position of the check code sequence in the rearranged identity code sequence is determined according to the displacement parameter. The verification code sequence and the rearranged identity code sequence are concatenated sequentially according to the insertion position to generate the authentication code sequence.

[0030] In this implementation, the challenge parameters are generated by the smart lock control module during the identity authentication phase. The length of the random integer sequence is set to 32 to 128 integers, with each integer ranging from 0 to 255. The length of the rearranged index sequence is consistent with the number of bits in the binary identity code; for example, when the identity code length is 128 bits, the rearranged index sequence length is 128. The shift parameter ranges from 1 to 16 and is used to determine the insertion position of the environmental disturbance check code in the authentication code. The binary identity code length is 64 to 128 bits, and the environmental disturbance check code length is 16 to 64 bits. The identity code is bit rearranged according to the rearranged index sequence, and the insertion position of the check code sequence is determined according to the shift parameter, ultimately generating an authentication code with a length of 80 to 192 bits.

[0031] In this embodiment, step seven includes: Obtain the preset stored reference identity code, and align the authentication code sequence with the reference identity code according to the order of the code bits; Perform a bit-by-bit comparison operation between the authentication encoding sequence and the corresponding encoding bits in the reference identity encoding. When the two encoding bits have the same value, they are recorded as a matching bit; when the two encoding bits have different values, they are recorded as a mismatch bit. The number of matching bits in all encoded bits is counted, and the consistency matching value is determined based on the ratio of the number of matching bits to the total number of bits in the certified encoded sequence. The consistency matching value is compared with the preset matching threshold. When the consistency matching value is greater than or equal to the matching threshold, an unlocking control command is generated. A rejection unlock command is generated when the consistency matching value is less than the matching threshold.

[0032] In this implementation, the reference identity code is stored in the smart lock's internal storage module during the registration phase, with a code length set to 64 to 128 bits. The authentication code sequence is obtained by combining the identity code and the environmental disturbance check code, with an authentication code length set to 80 to 192 bits. Bit-by-bit comparison operations are performed sequentially according to the code bit order, with each code bit taking only a value of 0 or 1. When two code bits have the same value, they are recorded as a matching bit. The number of matching bits is obtained by counting the comparison results of all code bits. The consistency matching value is the ratio of the number of matching bits to the total number of bits in the authentication code sequence. The matching threshold is set to 0.75 to 0.90. When the consistency matching value is greater than or equal to 0.80, an unlocking control command is generated; when the consistency matching value is less than 0.80, an unlocking refusal command is generated.

[0033] A deep learning-based smart door lock facial recognition encryption system includes: The face acquisition module is used to acquire face images and perform face detection, key point localization and affine alignment processing on the face images to generate standardized face images; The feature embedding module is used to input standardized face images into the improved MagFace network, perform fractal dimension embedding processing on the standardized face images, and generate fractal modulated face feature vectors. The spectral coding module is used to perform fractal spectral coding processing based on the fractal modulated face feature vector to generate a fractal structure feature vector. The stability analysis module is used to calculate the stability index of each feature dimension based on the fractal structure feature vector, and to divide the stable feature set and the sensitive feature set according to the stability index. The identity encoding module is used to perform symbol quantization processing on the feature components corresponding to the stable feature set to generate binary identity codes, and to perform interval mapping processing on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes. The authentication encoding module is used to generate challenge parameters during the identity authentication stage, perform bit rearrangement processing on the binary identity encoding based on the challenge parameters, and generate an authentication encoding sequence by combining the environmental perturbation check code. The matching control module is used to perform consistency matching calculations between the authentication code sequence and the preset stored reference identity code, and generate door lock control commands based on the matching calculation results.

[0034] Example 1: To verify the feasibility of this invention in practice, it was applied to a smart access control system for a residential community produced by a smart lock company. The community consists of three residential buildings, each equipped with 20 smart lock terminals based on facial recognition, totaling 60 devices. Each device is equipped with a front-facing high-definition facial recognition camera, connected to both the lock control module and the local identity authentication processing module. The system uses the camera to capture real-time facial images of users entering the access control area and utilizes the deep learning-based smart lock facial recognition encryption method proposed in this invention for identity authentication and lock control.

[0035] In practical applications, community residents need to have their facial information collected upon initial registration. The smart lock terminal acquires the user's frontal facial image through a face capture camera located on the front of the lock housing, continuously acquiring multiple frames to form an image frame sequence. The system extracts the current image frame from the image frame sequence and performs face detection processing on that frame to determine the bounding rectangle region of the face. Subsequently, the image is cropped based on the pixel coordinate range of the bounding rectangle region to obtain a partial facial image. The system further performs key point localization processing on the partial facial image, identifying the positions of the center points of the left and right eyes, the tip of the nose, the left corner of the mouth, and the right corner of the mouth, and calculates the tilt angle of the line connecting the eyes and the distance between the centers of the two eyes based on these key points. On this basis, affine transformation operations are performed, including rotation, scaling, and translation, to align the positions of the facial key points with a preset standard facial template, thereby obtaining a standardized facial image.

[0036] Standardized face images are input into an improved MagFace network for feature extraction. Unlike traditional deep learning face recognition methods, this invention introduces a fractal dimension adaptive embedding mechanism into the MagFace network. This mechanism modulates the structure of basic face features by constructing a feature neighborhood structure and calculating the fractal dimension, enabling the features to maintain good stability under complex environmental conditions. The system first performs convolutional feature extraction processing on the image, generating multi-layer face feature maps through a multi-layer convolutional neural network, and then performs global average pooling on the feature maps to obtain basic face feature vectors. Subsequently, a fractal neighborhood map structure is constructed in the feature space, multi-scale grid partitioning is performed on the neighborhood nodes, and grid counts at different scales are counted. The fractal dimension is calculated based on the relationship between the grid counts, and the features are adaptively modulated according to the fractal dimension. This approach enhances the structural expressiveness of face features, thereby reducing the impact of pose and illumination changes on feature stability.

[0037] After obtaining the fractal-modulated facial feature vector, the system further performs fractal spectral encoding processing. Specifically, each feature component in the feature vector is used as a graph node, and a feature relationship matrix is ​​constructed based on the numerical differences between the nodes. A spectral structure matrix is ​​then constructed based on this matrix. Subsequently, eigenvalue decomposition is performed on the spectral structure matrix, and low-order spectral feature vectors are selected and concatenated to obtain the fractal structure feature vector. This structural feature reflects the structural relationships of facial features in high-dimensional space, thereby further enhancing feature discrimination capabilities.

[0038] During the identity encoding phase, the system performs symbolic quantization on the feature components in the stable feature set. Specifically, each feature dimension value is compared with its corresponding quantization threshold; a value of 1 is assigned when the feature value is greater than or equal to the threshold, and a value of 0 is assigned when it is less than the threshold, thus generating a binary identity code. Simultaneously, interval mapping is performed on the sensitive feature set, generating interval numbers based on the intervals where the feature values ​​lie, and arranging them in order of feature dimension to form an environmental disturbance check code. This method constructs a dual-channel identity encoding structure, ensuring that the identity code is both stable and able to reflect environmental disturbance information.

[0039] During the authentication phase, the system further introduces a challenge parameter mechanism. The door lock terminal randomly generates challenge parameters, including a random integer sequence and a displacement parameter, and determines a rearranged index sequence based on the random integer sequence. Subsequently, bit rearrangement processing is performed on the binary identity code according to the index sequence to obtain a rearranged identity code sequence. The system then inserts an environmental disturbance checksum into the rearranged identity code sequence based on the displacement parameter to generate the final authentication code sequence. This dynamic rearrangement mechanism can effectively prevent the identity code from being copied or replayed, thereby improving system security.

[0040] During the door lock authentication phase, the system reads the pre-stored reference identity code and compares the authentication code sequence with the reference code bit by bit. The system counts the number of matching bits and calculates the consistency score. When the consistency score is greater than a preset threshold, the system generates an unlocking control command and drives the door lock to perform an unlocking operation; when the consistency score is lower than the threshold, the unlocking request is rejected.

[0041] To more comprehensively verify the actual effect of the method of the present invention, the researchers selected 120 residents in the community access control system for testing. Each resident under different time periods, different lighting conditions and different postures underwent access control authentication tests. The method of the present invention was compared with the traditional deep learning-based face recognition access control method. The experimental results are shown in Table 1.

[0042] Table 1 Performance Test Table of Smart Lock Facial Recognition Encryption Method in Community Access Control System

[0043] As shown in Table 1, under different test environments, the method of this invention significantly outperforms traditional face recognition methods in both success rate and false recognition rate. In standard indoor lighting conditions, the success rate of this invention reaches 99.1%, an improvement of approximately 2.9 percentage points compared to the traditional method's 96.2%, while the false recognition rate decreases from 2.8% to 0.7%, indicating that this invention has higher recognition accuracy under stable environmental conditions. In complex lighting environments such as low light, strong light, and outdoor natural light, the method of this invention still maintains a success rate of over 96%, while the success rate of traditional methods is generally below 91%, demonstrating that the fractal dimension embedding and fractal spectrum coding mechanism can effectively enhance the stable expression of facial features. Under interference conditions such as wearing glasses, wearing masks, and side-profile postures, the success rates of this invention reach 97.3%, 92.8%, and 90.2%, respectively, significantly higher than traditional methods, while the false recognition rate is controlled below 3.6%. Furthermore, the average authentication time of this invention is maintained between 185ms and 201ms, which can meet the real-time authentication requirements of smart door locks. Overall, this invention significantly improves recognition accuracy and reduces false recognition rate under complex environmental conditions, verifying its effectiveness and practicality in facial recognition security authentication.

[0044] The above embodiments demonstrate that by introducing a fractal dimension adaptive embedding mechanism, fractal spectrum coding, and a dual-channel identity coding structure, the present invention significantly improves the stability and recognition accuracy of facial features under complex environmental conditions. At the same time, it enhances system security through challenge parameters and bit rearrangement mechanisms, thereby effectively solving the problems of poor recognition stability and insufficient security of existing smart door lock facial recognition systems under environmental changes.

[0045] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.

Claims

1. A deep learning-based face recognition encryption method for smart door locks, characterized in that, Includes the following steps: Step 1: Acquire a face image, and perform face detection, key point localization and affine alignment processing on the face image to obtain a standardized face image; Step 2: Input the standardized face image into the improved MagFace network. The improved MagFace network introduces a fractal dimension adaptive embedding mechanism to perform fractal dimension embedding processing and generate a fractal modulated face feature vector. Step 3: Perform fractal spectrum encoding processing based on the fractal modulated face feature vector to generate a fractal structure feature vector; Step 4: Calculate the stability index of each feature dimension based on the fractal structure feature vector, and divide the stable feature set and sensitive feature set according to the stability index; Step 5: Perform symbolic quantization on the feature components corresponding to the stable feature set to generate binary identity codes, and perform interval mapping on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes; Step Six: Generate challenge parameters during the identity authentication phase, perform bit rearrangement processing on the binary identity code based on the challenge parameters, and generate an authentication code sequence by combining the environmental perturbation check code; Step 7: Perform a consistency matching calculation between the authentication code sequence and the preset stored reference identity code, and generate a door lock control command based on the matching calculation result.

2. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step one includes: The face image frame sequence of the preset collection area in front of the smart lock is obtained by a face capture camera set on the front side of the lock housing, and the current image frame is extracted from the face image frame sequence; Perform face detection processing on the current image frame, determine the pixel coordinate range corresponding to the bounding rectangle region of the face, and perform region cropping processing on the current image frame based on the pixel coordinate range to obtain a local image of the face; Facial key point localization processing is performed on a partial image of a face to determine the two-dimensional pixel coordinates of the center point of the left eye, the center point of the right eye, the tip of the nose, the left corner of the mouth, and the right corner of the mouth; The tilt angle of the line connecting the two eyes is calculated based on the two-dimensional pixel coordinates of the center point of the left eye and the center point of the right eye. The distance between the centers of the two eyes is calculated based on the pixel distance between the center points of the left eye and the center point of the right eye. The coordinates of the center point of the face are determined based on the geometric relationship between the tip of the nose and the center points of the two eyes. Based on the coordinates of key points in the preset standard face template, the local face image is subjected to affine transformation processing. The affine transformation processing includes rotation processing based on the tilt angle of the line connecting the eyes, scaling processing based on the ratio between the distance between the centers of the two eyes and the preset standard distance between the eyes, and translation processing based on the coordinate difference between the coordinates of the face center point and the standard center point. A boundary cropping process is performed on the face image after affine transformation to obtain a face-aligned image of a preset size. Then, the pixel value normalization process is performed on the face-aligned image to convert the image pixel values ​​to a preset value range, resulting in a standardized face image.

3. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step two includes: Standardized face images are input into the improved MagFace network; The improved MagFace network has an image feature embedding module at the input end, performs convolutional feature extraction processing on the standardized face image, and performs convolution operation, batch normalization processing and nonlinear activation processing on the image pixel matrix in sequence through a multi-layer convolutional neural network to generate a multi-layer face feature map. Global average pooling is performed on the multi-layer face feature map, and the pooled features are mapped to a preset dimension vector space through a linear mapping layer to generate basic face feature vectors. The basic facial feature vector is input into the fractal dimension adaptive embedding mechanism module, which includes a fractal neighborhood construction unit, a fractal dimension calculation unit, and a fractal spectrum embedding unit. The fractal neighborhood construction unit uses the basic face feature vector as the target feature vector, retrieves a preset number of neighborhood feature vectors in the feature space according to the feature distance from small to large, uses the target feature vector and each neighborhood feature vector as graph nodes, and establishes graph connection edges based on the feature distance between the target feature vector and each neighborhood feature vector to generate a fractal neighborhood graph structure. The fractal dimension calculation unit performs multi-scale meshing processing on the fractal neighborhood graph structure, specifically including: performing multi-scale meshing on the feature space according to a preset scale sequence, with each scale corresponding to a mesh edge length; performing spatial landing point mapping on the graph nodes in the fractal neighborhood graph structure at each scale, counting the number of non-empty mesh units containing at least one graph node, and generating mesh count values ​​for the corresponding scale; recording the mesh count values ​​corresponding to each scale according to the scale sequence to form a scale count sequence; and calculating the fractal dimension value based on the logarithmic relationship between the mesh count value in the scale count sequence and the reciprocal of the corresponding mesh edge length. The fractal spectrum embedding unit constructs an adjacency relation matrix based on the fractal neighborhood graph structure, constructs a degree matrix based on the connectivity of each graph node, constructs a graph Laplacian matrix based on the adjacency relation matrix and the degree matrix, performs eigenvalue decomposition on the graph Laplacian matrix, extracts a preset number of low-order spectral vectors, and constructs fractal spectrum embedding vectors according to the vector dimension splicing method. The fractal modulation coefficient is calculated based on the difference between the fractal dimension value and the preset fractal dimension benchmark value. The spectral weight of the fractal spectrum embedding vector and the feature weight of the basic face feature vector are determined based on the fractal modulation coefficient. A weighted fusion operation is then performed according to the spectral weight and the feature weight to generate the fractal modulated face feature vector.

4. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step three includes: Each feature component in the fractal modulated face feature vector is used as a feature node. The feature distance value is calculated based on the numerical difference between each feature node, and a feature relationship matrix is ​​constructed based on the feature distance value. The connectivity degree of each feature node is calculated based on the feature relation matrix, and a degree matrix is ​​constructed based on the connectivity degree values. The degree matrix is ​​a diagonal matrix, and the diagonal elements are the connectivity degree values ​​of the corresponding feature nodes. The spectral structure matrix is ​​calculated from the degree matrix and the eigenvalue relation matrix. The spectral structure matrix is ​​obtained by subtracting the eigenvalue relation matrix from the degree matrix. Perform eigenvalue decomposition on the spectral structure matrix to obtain the set of eigenvalues ​​and the corresponding set of eigenvectors, and select a preset number of low-order eigenvectors in ascending order of eigenvalues; The selected low-order feature vectors are concatenated according to their vector dimensions to obtain the fractal structure feature vectors.

5. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step four includes: Multiple frames of standardized face images of the same registered user are collected and input into an improved MagFace network and subjected to fractal spectral encoding to obtain multiple sets of fractal structure feature vectors. The feature vectors of the multi-component morphological structure are extracted dimension by dimension, and a corresponding feature value sequence is formed for each feature dimension. For each feature dimension, a stability index value is calculated for the feature value sequence, including: The mean is obtained by summing all feature values ​​in the feature value sequence for the corresponding feature dimension and dividing by the number of feature values. The squared difference is calculated based on the difference between each feature value and the mean, and the variance is obtained by summing all the squared differences and dividing by the number of feature values. The standard deviation is obtained by performing a square root operation on the variance, and the stability index value is calculated based on the ratio between the standard deviation and the mean. The features are sorted according to the stability index values ​​corresponding to each feature dimension, and feature dimensions with stability index values ​​less than the stability threshold are divided into stable feature sets according to the preset stability threshold. Feature dimensions whose stability index values ​​are greater than or equal to the stability threshold are classified into a set of sensitive features.

6. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step five includes: Extract the corresponding stable feature dimension values ​​from the stable feature set, and construct a stable feature vector sequence according to the feature dimension order; A quantization threshold is determined for each feature dimension value in the stable feature vector sequence. The quantization threshold is the mean value of the corresponding feature dimension value in the stable feature set. Each feature dimension value in the stable feature vector sequence is compared with the corresponding quantization threshold. When the feature dimension value is greater than or equal to the corresponding quantization threshold, it is assigned a binary value of 1. When the feature dimension value is less than the corresponding quantization threshold, it is assigned a binary value of 0. The obtained binary values ​​are arranged sequentially according to the feature dimension to form a binary sequence, and the binary sequence is used as a binary identity code. Extract the corresponding sensitive feature dimension values ​​from the sensitive feature set and arrange them in order of feature dimension to form a sensitive feature vector sequence; Determine the maximum and minimum values ​​of each feature dimension in the sensitive feature set, and divide the value range between the maximum and minimum values ​​into multiple continuous numerical intervals, while determining the interval number corresponding to each numerical interval. Map each feature dimension value in the sensitive feature vector sequence to its corresponding numerical range and record the corresponding range number; The interval numbers are arranged sequentially according to the feature dimensions to form an interval number sequence, and the interval number sequence is used as an environmental disturbance check code.

7. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step six includes: During the identity authentication phase, challenge parameters are generated, which include a random integer sequence and a shift parameter, and a rearranged index sequence is determined based on the random integer sequence. The target position corresponding to each binary bit in the binary identity code is determined based on the rearranged index sequence, and a position mapping table is constructed. Based on the position mapping table, the positions of each binary bit in the binary identity code are rearranged to obtain the rearranged identity code sequence; The environmental disturbance check code is converted into a check code sequence according to the feature dimension order, and the insertion position of the check code sequence in the rearranged identity code sequence is determined according to the displacement parameter. The verification code sequence and the rearranged identity code sequence are concatenated sequentially according to the insertion position to generate the authentication code sequence.

8. The face recognition encryption method for smart door locks based on deep learning according to claim 1, characterized in that, Step seven includes: Obtain the preset stored reference identity code, and align the authentication code sequence with the reference identity code according to the order of the code bits; Perform a bit-by-bit comparison operation between the authentication encoding sequence and the corresponding encoding bits in the reference identity encoding. When the two encoding bits have the same value, they are recorded as a matching bit; when the two encoding bits have different values, they are recorded as a mismatch bit. The number of matching bits in all encoded bits is counted, and the consistency matching value is determined based on the ratio of the number of matching bits to the total number of bits in the certified encoded sequence. The consistency matching value is compared with the preset matching threshold. When the consistency matching value is greater than or equal to the matching threshold, an unlocking control command is generated. A rejection unlock command is generated when the consistency matching value is less than the matching threshold.

9. A deep learning-based smart lock face recognition encryption system, comprising the deep learning-based smart lock face recognition encryption method according to any one of claims 1 to 8, characterized in that, include: The face acquisition module is used to acquire face images and perform face detection, key point localization and affine alignment processing on the face images to generate standardized face images; The feature embedding module is used to input standardized face images into the improved MagFace network, perform fractal dimension embedding processing on the standardized face images, and generate fractal modulated face feature vectors. The spectral coding module is used to perform fractal spectral coding processing based on the fractal modulated face feature vector to generate a fractal structure feature vector. The stability analysis module is used to calculate the stability index of each feature dimension based on the fractal structure feature vector, and to divide the stable feature set and the sensitive feature set according to the stability index. The identity encoding module is used to perform symbol quantization processing on the feature components corresponding to the stable feature set to generate binary identity codes, and to perform interval mapping processing on the feature components corresponding to the sensitive feature set to generate environmental disturbance check codes. The authentication encoding module is used to generate challenge parameters during the identity authentication stage, perform bit rearrangement processing on the binary identity encoding based on the challenge parameters, and generate an authentication encoding sequence by combining the environmental perturbation check code. The matching control module is used to perform a consistency matching calculation between the authentication code sequence and the preset stored reference identity code, and generate door lock control instructions based on the matching calculation results.