Face verification access method and device for a storage cabinet
By processing facial features with a unique device key, local authentication and access operations for lockers are achieved, solving the problems of low efficiency and reliance on third-party platforms when there are no mobile terminals, thus improving user experience and security.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SHENZHEN XIAOTIE INFORMATION TECHNOLOGY CO LTD
- Filing Date
- 2026-03-26
- Publication Date
- 2026-06-09
Smart Images

Figure CN122176839A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart locker technology, specifically to a method and device for facial recognition access to lockers. Background Technology
[0002] With the development of smart terminals and unmanned equipment, locker systems are gradually evolving towards "contactless and rapid response." Currently, lockers typically rely on QR code scanning, mini-programs, or mobile login to complete storage and retrieval operations. In scenarios where users' hands are limited or they lack mobile devices (such as shopping malls or airport baggage check-in), reliance on mobile interaction significantly reduces efficiency and impacts user experience. Secondly, existing systems often heavily depend on third-party platforms (such as apps or mini-programs) for identity authentication, resulting in longer system response times, again affecting user experience. Summary of the Invention
[0003] In view of the aforementioned problems, this application is made to provide a method and apparatus for facial verification access to a locker that overcomes or at least partially solves the aforementioned problems, comprising: A method for facial recognition access to a locker, the method being applied to a locker terminal, the locker terminal being equipped with an image acquisition device, a storage unit, an input device, and a processing unit, the processing unit storing a unique device key; the method comprising: When the processing unit receives a storage or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector. The processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. When the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data and stores it in the storage unit; When the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data. When the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
[0004] Preferably, the step of extracting features from the target face image to generate a target face feature vector includes: The processing unit determines the face region and the location information of key facial points in each frame of face image based on multiple frames of face images continuously acquired within a preset time window. The processing unit aligns the facial key point position information in each frame of facial image according to a preset standard coordinate template to obtain an aligned initial facial image. The processing unit determines the image sharpness of each initial face image based on the Laplacian operator response value of each initial face image, and determines the initial face image with an image sharpness greater than a preset image sharpness threshold as the target face image. The processing unit obtains multiple initial face feature vectors from all the target face images using a preset face feature extraction model, and performs a weighted average operation on the corresponding initial face feature vectors based on the image clarity of each frame of the target face image to generate the target face feature vector.
[0005] Preferably, the processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data, including: The processing unit inputs the device's unique key into a preset pseudo-random number generation algorithm to generate a set of real number sequences; The processing unit constructs a feature transformation matrix from the real number sequence based on the dimension of the target face feature vector; The processing unit constructs the target linear mapping function based on the feature transformation matrix, and transforms the target face feature vector through the target linear mapping function to generate target feature data.
[0006] Preferably, the transformation processing of the target face feature vector through the target linear mapping function includes: The processing unit performs matrix multiplication on the target face feature vector and the feature transformation matrix using the target linear mapping function, and normalizes the result of the matrix multiplication to generate the target feature data.
[0007] Preferably, the transformation processing of the target face feature vector through the target linear mapping function includes: The processing unit orthogonals the feature transformation matrix to generate a set of orthogonal basis vectors with the same dimension as the target face feature vector. The processing unit constructs a target linear mapping function based on the orthogonal basis vectors, and projects the target face feature vectors onto each orthogonal basis vector through the target linear mapping function to obtain multiple projection components. The processing unit compares each projection component with a preset binary reference value, generates a target binary sequence based on the comparison results, and determines the target binary sequence as target feature data.
[0008] Preferably, the step of determining the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data in the storage unit, and controlling the opening of the cabinet corresponding to the cabinet identifier when the smallest vector distance is less than a preset distance threshold, includes: The processing unit retrieves a set of candidate historical feature data similar to the target feature data in the storage unit using a preset vector indexing algorithm based on the target feature data. The processing unit performs vector distance calculations between each historical feature data in the candidate historical feature data set and the target feature data, determines the historical feature data with the smallest vector distance, and obtains the cabinet identifier associated with the historical feature data. When the minimum vector distance is less than a preset distance threshold, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier.
[0009] Preferably, the control to open the cabinet corresponding to the cabinet identifier includes: The processing unit determines the charging information of the corresponding cabinet based on the cabinet identifier, and controls the touch screen to display the payment QR code corresponding to the charging information; After receiving the payment success information, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier, and establishes an association between the cabinet identifier, the target feature data, and the payment success information and stores them in the storage unit.
[0010] A facial recognition access device for a locker, the device being applied to a locker terminal, the locker terminal being equipped with an image acquisition device, a storage unit, an input device, and a processing unit, the processing unit storing a unique device key; the device includes: The vector extraction module is used by the processing unit to control the image acquisition device to acquire the user's target face image when it receives a storage request or retrieval request initiated by the user, and to extract features from the target face image to generate a target face feature vector. The vector processing module is used by the processing unit to construct a target linear mapping function based on the device's unique key, and to perform feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. The cabinet control module is used to control the opening of an empty cabinet and determine the cabinet identifier when the processing unit receives a storage request, establish an association between the cabinet identifier and the target feature data and store it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and when the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
[0011] A computer electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When executed by the processor, the computer program implements the steps of a face verification access method for a locker as described above.
[0012] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of a face verification access method for a locker as described above.
[0013] This application has the following advantages: In the embodiments of this application, addressing the problem that existing lockers heavily rely on mobile terminal interaction, this application provides a scheme for controlling locker access based on facial features processed by a unique device key. Specifically, when the processing unit receives a user's request to store or retrieve an item, it controls the image acquisition device to acquire the user's target facial image, extracts features from the target facial image, and generates a target facial feature vector. The processing unit constructs a target linear mapping function based on the unique device key and performs feature transformation processing on the target facial feature vector through the target linear mapping function to generate target feature data. When the processing unit receives a storage request, it controls the opening of an empty locker and determines a locker identifier, establishes an association between the locker identifier and the target feature data, and stores it in the storage unit. When the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the locker identifier associated with the historical feature data. When the smallest vector distance is less than a preset distance threshold, it controls the opening of the locker corresponding to the locker identifier. On the one hand, by using the same unique key for the same device during the storage and retrieval stages, the processing unit performs feature transformation on the target facial feature vectors at different stages. Although this changes the original spatial structure of the target facial feature vectors, the facial features collected from the same user at different times still maintain a high degree of similarity after transformation. This ensures the stability of feature data recognition and verification within the same device while achieving feature space isolation between different devices, allowing the same user to be represented by different features on different devices, thereby achieving the technical effect of preventing cross-system association attacks. On the other hand, by using the above method to store only the target feature data locally and not the original facial information, privacy is protected, and the retrieval process does not require network transmission or third-party interfaces. This completely eliminates the dependence on mobile login, apps, or mini-programs, compressing the authentication link to the local terminal for processing. At the same time, real-time retrieval through the local storage unit greatly shortens the response time and improves the efficiency of users using the lockers. Attached Figure Description
[0014] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0015] Figure 1 This is a flowchart illustrating the steps of a face verification access method for a locker according to an embodiment of this application; Figure 2This is a structural block diagram of a face verification access device for a locker provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer electronic device provided in an embodiment of the present invention; 1. Computer electronic device; 2. External device; 3. Processing unit; 4. Bus; 5. Network adapter; 6. I / O interface; 7. Display; 8. Memory; 9. Random access memory; 10. Cache memory; 11. Storage system; 12. Program / utility; 13. Program module. Detailed Implementation
[0016] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0017] The inventors discovered through analysis of existing technologies that in high-frequency scenarios such as shopping malls and airport baggage check-in, users often find it difficult to scan codes in front of lockers because they are holding items with both hands or do not have a mobile device, resulting in a sharp drop in storage and retrieval efficiency. On the other hand, most lockers rely heavily on third-party platforms, which lengthens the response chain and makes the scanning operation time-consuming.
[0018] It should be noted that, in any embodiment of the present invention, when a user initiates a storage or retrieval request, the locker terminal informs the user in real time via displayed text or voice announcement that facial recognition is required. The announcement clearly states that the purpose of the data collection is for storage and retrieval verification to ensure the safety of the items, that the data processing method involves de-identifying facial features and not storing the original image, and that privacy protection measures ensure the collected data is used only locally. In this embodiment, facial recognition is performed only after obtaining the user's explicit consent.
[0019] Reference Figure 1 This document illustrates a flowchart of a face verification access method for a locker according to an embodiment of this application. The method is applied to a locker terminal, which is equipped with an image acquisition device, a storage unit, an input device, and a processing unit. The processing unit stores a unique device key.
[0020] It should be noted that the input devices include a touch screen, a voice input module, and a barcode scanner. Typically, after a user clicks the "store" or "retrieve" button on the touch screen, a privacy notice automatically pops up, informing the user that subsequent procedures require facial recognition, the purpose of the data collection, the data processing method, and privacy protection measures. Once the user actively clicks the "agree" button, it indicates that the user has initiated a storage or retrieval request to the locker.
[0021] Specifically, the method includes the following steps: S110. When the processing unit receives a storage request or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector. S120. The processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. S130. When the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data and stores it in the storage unit. When the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data. When the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
[0022] In the embodiments of this application, addressing the problem that existing lockers heavily rely on mobile terminal interaction, this application provides a scheme for controlling locker access based on facial features processed by a unique device key. Specifically, when the processing unit receives a user's request to store or retrieve an item, it controls the image acquisition device to acquire the user's target facial image, extracts features from the target facial image, and generates a target facial feature vector. The processing unit constructs a target linear mapping function based on the unique device key and performs feature transformation processing on the target facial feature vector through the target linear mapping function to generate target feature data. When the processing unit receives a storage request, it controls the opening of an empty locker and determines a locker identifier, establishes an association between the locker identifier and the target feature data, and stores it in the storage unit. When the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the locker identifier associated with the historical feature data. When the smallest vector distance is less than a preset distance threshold, it controls the opening of the locker corresponding to the locker identifier. On the one hand, by using the same unique key for the same device during the storage and retrieval stages, the processing unit performs feature transformation on the target facial feature vectors at different stages. Although this changes the original spatial structure of the target facial feature vectors, the facial features collected from the same user at different times still maintain a high degree of similarity after transformation. This ensures the stability of feature data recognition and verification within the same device while achieving feature space isolation between different devices, allowing the same user to be represented by different features on different devices, thereby achieving the technical effect of preventing cross-system association attacks. On the other hand, by using the above method to store only the target feature data locally and not the original facial information, privacy is protected, and the retrieval process does not require network transmission or third-party interfaces. This completely eliminates the dependence on mobile login, apps, or mini-programs, compressing the authentication link to the local terminal for processing. At the same time, real-time retrieval through the local storage unit greatly shortens the response time and improves the efficiency of users using the lockers.
[0023] The following will further describe a face verification access method for a locker in this exemplary embodiment.
[0024] In one embodiment of the present invention, the specific process of step S110, "when the processing unit receives a storage request or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector," can be further explained in conjunction with the following description.
[0025] It should be noted that when a user initiates a request to store or retrieve an item, it indicates that the user has consented to facial recognition.
[0026] In one embodiment of the present invention, the specific process of "extracting features from the target face image and generating a target face feature vector" can be further described in conjunction with the following description.
[0027] In this embodiment, the processing unit determines the face region and facial key point location information in each frame of face image based on multiple frames of face images continuously acquired within a preset time window; the processing unit aligns the facial key point location information in each frame of face image according to a preset standard coordinate template to obtain an aligned initial face image; the processing unit determines the image sharpness of each frame of initial face image based on the Laplacian operator response value of each frame of initial face image, and determines the initial face image with an image sharpness greater than a preset image sharpness threshold as the target face image; the processing unit obtains multiple initial face feature vectors in all the target face images through a preset face feature extraction model, and performs a weighted average operation on the corresponding initial face feature vectors according to the image sharpness of each frame of target face image to generate the target face feature vector.
[0028] In the above embodiments, the alignment of facial key point location information can be achieved by using affine transformation to geometrically normalize the acquired facial images. This eliminates the influence of differences in facial pose, position, and scale under different acquisition conditions on the subsequent feature extraction results, thereby ensuring the stability and comparability of the generated facial feature vectors. Affine transformation refers to performing linear and translational transformations on the pixel coordinates in an image. A two-dimensional transformation matrix maps the original coordinates, ensuring that the transformed positions of points in the image satisfy a linear relationship.
[0029] Specifically, the processing unit first determines the face region based on a face detection algorithm and obtains the location information of facial key points through a key point detection algorithm. These facial key points include the center points of the eyes, the tip of the nose, and the center point of the mouth. Subsequently, the processing unit calculates the affine transformation matrix based on the actual coordinates of these key points in the current image and the target coordinates of the corresponding key points in a pre-defined standard coordinate template. For example, the processing unit selects the center points of the left eye, right eye, and mouth; for instance, the center point of the left eye is located at coordinates (120, 200), the center point of the right eye at (220, 210), and the center point of the mouth at (170, 300); while the corresponding points in the pre-defined standard coordinate template are located at (100, 150), (200, 150), and (150, 250), respectively. The processing unit calculates the affine transformation matrix based on the three sets of corresponding points mentioned above, and performs the transformation on the entire image so that the eyes are on the same horizontal line in the aligned initial face image and the face size is uniform, thereby eliminating tilt, offset and scale differences.
[0030] It should be noted that the alignment process using affine transformation described above is used to eliminate geometric deviations caused by the same user under different acquisition conditions, without changing the distinguishing relationship of facial features between different users. After obtaining the aligned initial face images, the sharpness of each frame is evaluated using the Laplacian operator response value to select face images with higher quality for feature extraction, thereby improving the stability and recognition accuracy of the final face feature vector. The Laplacian operator is an image processing operator based on the second derivative, used to detect edges and details in images. Its basic principle is to reflect the richness of detail in an image by calculating the degree of second-order change in its grayscale values in space. The sharper the edges and the richer the details in an image, the greater the change in its Laplacian response value; conversely, if the image is blurry, the grayscale change is slower, and the Laplacian response value is smaller.
[0031] Specifically, the processing unit converts the initial face image into a grayscale image, then applies a Laplacian operator filter to the grayscale image to obtain the corresponding response image. Subsequently, it calculates the variance of the response image, which reflects the overall edge intensity distribution of the image. A larger variance indicates more sharp edges and higher image quality; a smaller variance indicates blurred edges and lower image quality. For example, for two aligned face images A and B, the processing unit calculates the variance of their Laplacian response values. If the variance of image A is 120, the variance of image B is 25, and the preset sharpness threshold is 50, then the processing unit determines image A as a sharp image and retains it as the target face image, while determining image B as a blurry image and discarding it.
[0032] Next, the target face image is input into a pre-defined face feature extraction model. Specifically, the face feature extraction model is trained based on a deep neural network, with the face image as input and a fixed-dimensional face feature vector as output.
[0033] Although the above has already selected target face images whose clarity meets the threshold, there are still differences between the target face images. In order to ensure that the face feature vector output by the face feature extraction model can represent the highest quality face information, the clarity value of the target face image is used as the weight of the face feature extraction model. For example, in three target images with clarity of 200, 150 and 120 respectively, the feature vectors are extracted and then weighted and averaged according to the weights [0.4, 0.3, 0.3]. The face feature vector is found to be most sensitive to the target face image with a clarity of 200, thus outputting the target face feature vector that best represents the high quality face information.
[0034] After obtaining the face feature vector through weighted averaging, normalization processing is required to ensure that the face feature vector lengths corresponding to each high-quality target face image are uniform. This ensures that the obtained target face feature vectors can provide a more stable input for subsequent feature transformation processing based on the device's unique key.
[0035] In one embodiment of the present invention, the specific process of step S120, "the processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data," can be further explained in conjunction with the following description.
[0036] In this embodiment, the processing unit inputs the device's unique key into a preset pseudo-random number generation algorithm to generate a set of real number sequences; the processing unit constructs a feature transformation matrix from the real number sequence based on the dimension of the target face feature vector; the processing unit constructs a target linear mapping function based on the feature transformation matrix, and transforms the target face feature vector through the target linear mapping function to generate target feature data.
[0037] In the above embodiments, the feature transformation matrix, as the feature transformation parameter, is generated by combining the device's unique key with a pseudo-random number generation algorithm. Its purpose is to map the target face feature vector into a new feature space. Specifically, the pseudo-random number generation algorithm is a deterministic parameter generation algorithm. It takes the device's unique key as input and outputs a sequence of real numbers. This sequence of real numbers has a preset length and can be stored in floating-point format. For example, if the target face feature vector is a 128-dimensional vector, the device's unique key can be a 256-bit binary sequence. The processing unit first inputs the device's unique key into the pseudo-random number generation algorithm, which outputs 16384 real numbers according to the dimensions of the target face feature vector. A deterministic algorithm is used because when the same device inputs the same device's unique key at different times, it must generate the same feature transformation parameters to ensure consistent transformation results during the storage and retrieval stages. Different devices, due to their different device unique keys, output different real number sequences, thus ensuring that the real number sequence generated by each device is unique and unpredictable, and that the feature spaces of different devices are isolated from each other.
[0038] Next, since the target face feature vector has a dimension of 128, the generated real number sequence will be reconstructed into a 128×128 dimensional feature transformation matrix. Here, the real number sequence can be written into each row and column of the matrix in a left-to-right, top-to-bottom order according to a preset row-first or column-first filling rule. Using the feature transformation matrix as the feature transformation parameter defines how the input target face feature vector is mapped to a new feature space.
[0039] Then, the target linear mapping function operates on the input target face feature vector and the feature transformation matrix, mapping the target face feature vector to a new feature space, thereby obtaining the target feature data, which provides a stable and uncorrelated feature representation for subsequent identity verification.
[0040] It should be noted that the unique device key is generated by a hardware random number generator during the initialization of the locker terminal and stored in the security chip. Different locker terminals have different unique device keys, ensuring that the same facial feature vector generates different target feature data after processing by the target linear mapping function on different devices, thus preventing comparability of target feature data between different devices. In one embodiment of the present invention, the specific process of "transforming the target face feature vector through the target linear mapping function" can be further explained in conjunction with the following description.
[0041] In this embodiment, the processing unit performs matrix multiplication on the target face feature vector and the feature transformation matrix using the target linear mapping function, and normalizes the result of the matrix multiplication to generate the target feature data.
[0042] In the above embodiments, the matrix multiplication operation refers to treating the target facial feature vector as a column vector or row vector and performing a dimension-matching multiplication calculation with the feature transformation matrix to obtain a new vector representation. For example, assuming the target facial feature vector is x and the feature transformation matrix is W, the processing unit performs the matrix multiplication operation y = W·x, obtaining a 128-dimensional result vector y. Through matrix multiplication, similar facial feature vectors acquired by the same user and the same device at different times still have high matching after transformation, while similar facial feature vectors acquired by the same user and different devices will have different target feature data after transformation, thus preventing cross-device association.
[0043] In an additional embodiment, the processing unit orthogonals the feature transformation matrix to generate a set of orthogonal basis vectors with the same dimension as the target face feature vector; the processing unit constructs a target linear mapping function based on the orthogonal basis vectors, and projects the target face feature vector onto each of the orthogonal basis vectors through the target linear mapping function to obtain multiple projection components; the processing unit compares each projection component with a preset binary reference value, generates a target binary sequence based on the comparison result, and determines the target binary sequence as target feature data.
[0044] In the above embodiments, the target linear function is defined by orthogonal basis vectors obtained through orthogonalization, and then the target feature data is obtained through vector projection and binary comparison. Specifically, the row vectors or column vectors in the feature transformation matrix are converted into a set of pairwise orthogonal vectors with a magnitude of 1. The inner product value between the target face feature vector and each orthogonal basis vector is calculated, and each inner product value is used as the corresponding projection component. Here, the projection component refers to the coordinate value of the target face feature vector along a certain orthogonal basis vector direction. Then, the preset binary reference value can be 0. The projection component is compared with the binary reference value. If the result is greater than or equal to the result, 1 is generated; if it is less than the result, 0 is generated. For example, the processing unit performs orthogonalization on the 128 column vectors of the feature transformation matrix to obtain 128 orthogonal basis vectors u1 to u128. For the 128-dimensional target face feature vector x, the processing unit calculates the inner product between x and u1, u2, ..., u128 in sequence to obtain 128 projection components p1, p2, ..., p128. Each projected component is then compared with 0: if pi is greater than or equal to 0, the corresponding position is output as "1"; if pi is less than 0, the corresponding position is output as "0". This results in a 128-bit binary sequence b1b2…b128, which is then used as the target feature data. More specifically, if a target face feature vector x = [0.5, 0.8, 0.2], after orthogonal basis vector projection, the resulting projected components are p1 = 0.6, p2 = −0.3, and p3 = 0.1. Since the set binary reference value is 0, p1 = 0.6 is greater than 0, generating "1"; p2 = −0.3 is less than 0, generating "0"; and p3 = 0.1 is greater than 0, generating "1". Therefore, the final symbolization result is 101, and this result is used as one of the target feature data.
[0045] The orthogonalization process described above compresses the amplitude information in the original features while preserving information features in different directions. This makes the generated target feature data not only efficient but also ensures that the feature data is de-identified, thereby increasing the system's privacy protection.
[0046] In one embodiment of the present invention, the specific process of step S130, which involves "when the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data and stores it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and when the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier", can be further explained in conjunction with the following description.
[0047] In one embodiment of the present invention, the specific process of "determining the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data in the storage unit, and controlling the opening of the cabinet corresponding to the cabinet identifier when the smallest vector distance is less than a preset distance threshold" can be further described in conjunction with the following description.
[0048] In this embodiment, the processing unit searches the storage unit based on the target feature data using a preset vector indexing algorithm to obtain a set of candidate historical feature data similar to the target feature data; the processing unit calculates the vector distance between each historical feature data in the candidate historical feature data set and the target feature data, determines the historical feature data with the smallest vector distance, and obtains the cabinet identifier associated with the historical feature data; when the smallest vector distance is less than a preset distance threshold, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier.
[0049] It's important to note that historical feature data is neither pre-built into the system nor imported from external sources. Instead, it's data actually generated and stored by the user during the storage phase. More precisely, when a user initiates a storage request, the processing unit acquires a target facial image, generates a target facial feature vector, and then performs feature transformation on this vector using a target linear mapping function built based on the device's unique key. This yields the target feature data, which is then used to open an available storage compartment, determine its identifier, and associate it with the target feature data corresponding to that storage request, storing this association in the storage unit. This stored target feature data constitutes the historical feature data for subsequent retrieval phases. When any subsequent retrieval request arrives, the processing unit reads this saved target feature data from the storage unit, using it as a candidate comparison object. This existing data used for comparison constitutes the historical feature data.
[0050] In one specific embodiment, when the processing unit receives a storage request, the target feature data generated for the current user is written into the storage unit as a storage record; the storage record includes at least the target feature data, the cabinet identifier, and the record generation time; when a retrieval request is received, the processing unit extracts the target feature data for matching from the storage record, so as to retrieve it as historical feature data.
[0051] In the above embodiments, after the processing unit receives a user's request to retrieve an item and generates target feature data, it first performs a similarity search in the storage unit based on the target feature data. Specifically, the processing unit uses a preset vector indexing algorithm to quickly filter the historical feature data stored in the storage unit, obtaining a set of historical feature data that is close to the target feature data in the feature space, forming a candidate historical feature data set. Preferably, the vector indexing algorithm uses an inverted index algorithm to group the historical feature data by feature category. When a user requests to retrieve an item, the system quickly filters out the closest candidate historical feature data set by querying the index of the corresponding group. In practice, the vector indexing algorithm is not limited here.
[0052] Subsequently, the processing unit performs precise vector distance calculations between each historical feature data in the candidate set and the target feature data. The vector distance calculation uses either Euclidean distance or cosine distance, preferably Euclidean distance. Based on the calculation results, the historical feature data with the smallest vector distance to the target feature data is determined, and the cabinet identifier associated with that historical feature data is obtained. For example, if the smallest Euclidean distance to a historical feature data in the candidate historical feature data set is determined to be 0.4, and the preset distance threshold is 0.5, then user authentication is deemed successful, and the cabinet is opened.
[0053] In an additional embodiment of the present invention, the specific process of "controlling the opening of the cabinet corresponding to the cabinet identifier" can be further described in conjunction with the following description.
[0054] In this embodiment, the processing unit determines the charging information of the corresponding cabinet based on the cabinet identifier, and controls the touch screen to display the payment QR code corresponding to the charging information; after receiving the payment success information, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier, and establishes an association between the cabinet identifier, the target feature data and the payment success information and stores them in the storage unit.
[0055] It should be noted that the charging information refers to the billing data for the locker corresponding to the locker identifier, which may include the basic fee, billing duration rules, fees corresponding to locker specifications, or pre-authorized amounts. After user authentication is verified, the system first queries the preset billing rules in the locker terminal, and then generates the charging information for this storage based on the specifications of the locker corresponding to the current locker identifier. Subsequently, the QR code generation module is invoked to encode the charging information and order identifier into a payment QR code, which is displayed on the touch screen. The user scans the payment QR code using any payment tool that supports QR code payment to complete the payment. The locker terminal receives the payment success information returned by the payment server through the communication module, and the processing unit controls the opening of the corresponding locker based on the locker identifier in the payment success information. Using this method, the locker does not require the development of a dedicated mobile application; users only need to scan the code to pay, resulting in a short interaction path, low deployment costs, and good payment compatibility.
[0056] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0057] Reference Figure 2 This illustration shows a structural schematic diagram of a face verification access device for a locker according to an embodiment of this application. The device is applied to a locker terminal, which is equipped with an image acquisition device, a storage unit, an input device, and a processing unit. The processing unit stores a unique device key. Specifically, it includes the following modules: Specifically, it includes: The vector extraction module 110 is used to control the image acquisition device to acquire the user's target face image when the processing unit receives a storage request or retrieval request initiated by the user, and to extract features from the target face image to generate a target face feature vector. The vector processing module 120 is used by the processing unit to construct a target linear mapping function based on the device's unique key, and to perform feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. The cabinet control module 130 is used to control the opening of an empty cabinet and determine the cabinet identifier when the processing unit receives a storage request, establish an association between the cabinet identifier and the target feature data and store it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and controls the opening of the cabinet corresponding to the cabinet identifier when the smallest vector distance is less than a preset distance threshold.
[0058] Reference Figure 3The illustration shows a computer electronic device for implementing a face verification access method for a locker according to the present invention, which may specifically include the following: The aforementioned computer electronic device 1 is manifested in the form of a general-purpose computing device. The components of the computer electronic device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).
[0059] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0060] Computer electronic device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer electronic device 1, including volatile and non-volatile media, removable and non-removable media.
[0061] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. Computer electronic device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 3 As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.
[0062] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.
[0063] The computer electronic device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, display 7, camera, etc.), and with one or more devices that enable an operator to interact with the computer electronic device 1, and / or with any device that enables the computer electronic device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through the I / O interface 6. Furthermore, the computer electronic device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) through the network adapter 5. Figure 3 As shown, network adapter 5 communicates with other modules of computer electronic device 1 via bus 4. It should be understood that, although... Figure 3 Not shown, it may be combined with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 3, external disk drive array, RAID system, tape drive and data backup storage system 11, etc.
[0064] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a face verification access method for a locker provided in the embodiments of this application.
[0065] That is, when the processing unit 3 executes the above program, it implements the following: When the processing unit receives a storage request or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector; the processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data; when the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data, and stores it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and when the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
[0066] In this application embodiment, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a method for face verification access to a locker as provided in all embodiments of this application.
[0067] That is, when the program is executed by the processor, the following is implemented: When the processing unit receives a storage request or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector; the processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data; when the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data, and stores it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and when the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
[0068] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0069] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0070] Computer program code for performing the operations of this application can be written in one or more programming languages or a combination thereof. These programming languages include object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.
[0071] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.
[0072] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0073] The foregoing has provided a detailed description of a face verification access method and apparatus for a locker provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A method for facial recognition access to a locker, characterized in that, The method is applied to a locker terminal, which is equipped with an image acquisition device, a storage unit, an input device, and a processing unit, wherein the processing unit stores a unique device key; the method includes: When the processing unit receives a storage or retrieval request initiated by the user, it controls the image acquisition device to acquire the user's target face image, extracts features from the target face image, and generates a target face feature vector. The processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. When the processing unit receives a storage request, it controls the opening of an empty cabinet and determines the cabinet identifier, establishes an association between the cabinet identifier and the target feature data and stores it in the storage unit; When the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data. When the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
2. The method for facial recognition access to a locker according to claim 1, characterized in that, The step of extracting features from the target face image to generate a target face feature vector includes: The processing unit determines the face region and the location information of key facial points in each frame of face image based on multiple frames of face images continuously acquired within a preset time window. The processing unit aligns the facial key point position information in each frame of facial image according to a preset standard coordinate template to obtain an aligned initial facial image. The processing unit determines the image sharpness of each initial face image based on the Laplacian operator response value of each initial face image, and determines the initial face image with an image sharpness greater than a preset image sharpness threshold as the target face image. The processing unit obtains multiple initial face feature vectors from all the target face images using a preset face feature extraction model, and performs a weighted average operation on the corresponding initial face feature vectors based on the image clarity of each frame of the target face image to generate the target face feature vector.
3. The method for facial recognition access to a locker according to claim 1, characterized in that, The processing unit constructs a target linear mapping function based on the device's unique key, and performs feature transformation processing on the target face feature vector using the target linear mapping function to generate target feature data, including: The processing unit inputs the device's unique key into a preset pseudo-random number generation algorithm to generate a set of real number sequences; The processing unit constructs a feature transformation matrix from the real number sequence based on the dimension of the target face feature vector; The processing unit constructs the target linear mapping function based on the feature transformation matrix, and transforms the target face feature vector through the target linear mapping function to generate target feature data.
4. The face verification access method for a locker according to claim 3, characterized in that, The transformation of the target face feature vector using the target linear mapping function includes: The processing unit performs matrix multiplication on the target face feature vector and the feature transformation matrix using the target linear mapping function, and normalizes the result of the matrix multiplication to generate the target feature data.
5. The face verification access method for a locker according to claim 3, characterized in that, The transformation of the target face feature vector using the target linear mapping function includes: The processing unit orthogonals the feature transformation matrix to generate a set of orthogonal basis vectors with the same dimension as the target face feature vector. The processing unit constructs a target linear mapping function based on the orthogonal basis vectors, and projects the target face feature vectors onto each orthogonal basis vector through the target linear mapping function to obtain multiple projection components. The processing unit compares each projection component with a preset binary reference value, generates a target binary sequence based on the comparison results, and determines the target binary sequence as target feature data.
6. The method for facial recognition access to a locker according to claim 1, characterized in that, The step of determining the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data in the storage unit, and controlling the opening of the cabinet corresponding to the cabinet identifier when the smallest vector distance is less than a preset distance threshold, includes: The processing unit retrieves a set of candidate historical feature data similar to the target feature data in the storage unit using a preset vector indexing algorithm based on the target feature data. The processing unit performs vector distance calculations between each historical feature data in the candidate historical feature data set and the target feature data, determines the historical feature data with the smallest vector distance, and obtains the cabinet identifier associated with the historical feature data. When the minimum vector distance is less than a preset distance threshold, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier.
7. The method for facial recognition access to a locker according to claim 1, characterized in that, The control to open the cabinet corresponding to the cabinet identifier includes: The processing unit determines the charging information of the corresponding cabinet based on the cabinet identifier, and controls the touch screen to display the payment QR code corresponding to the charging information; After receiving the payment success information, the processing unit controls the opening of the cabinet corresponding to the cabinet identifier, and establishes an association between the cabinet identifier, the target feature data, and the payment success information and stores them in the storage unit.
8. A facial recognition access device for a locker, characterized in that, The device is applied to a locker terminal, which is equipped with an image acquisition device, a storage unit, an input device, and a processing unit. The processing unit stores a unique device key. The device includes: The vector extraction module is used by the processing unit to control the image acquisition device to acquire the user's target face image when it receives a storage request or retrieval request initiated by the user, and to extract features from the target face image to generate a target face feature vector. The vector processing module is used by the processing unit to construct a target linear mapping function based on the device's unique key, and to perform feature transformation processing on the target face feature vector through the target linear mapping function to generate target feature data. The cabinet control module is used to control the opening of an empty cabinet and determine the cabinet identifier when the processing unit receives a storage request, establish an association between the cabinet identifier and the target feature data and store it in the storage unit; when the processing unit receives a retrieval request, it determines in the storage unit the historical feature data with the smallest vector distance to the target feature data and the cabinet identifier associated with the historical feature data, and when the smallest vector distance is less than a preset distance threshold, it controls the opening of the cabinet corresponding to the cabinet identifier.
9. A computer electronic device, characterized in that, The device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of a face verification access method for a locker as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when executed by a processor, the computer program implements the steps of a face verification access method for a locker as described in any one of claims 1 to 7.