Face recognition monitoring security method and device and storage medium

By performing facial recognition preprocessing and similarity calculation on local devices, combined with the computing resources of cloud servers, the problem of insufficient computing resources of local devices is solved, the accuracy and speed of facial recognition is improved, and efficient and safe Monitor security requirements.

CN119479028APending Publication Date: 2025-02-18SHENZHEN JIANIAN SHENGSHI IND CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411417165.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-11
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

The existing facial recognition technology performs calculations on local devices, resulting in insufficient computing resources, resulting in low recognition accuracy and slow speed, making it difficult to meet efficient and secure monitoring and security needs.

Method used

By obtaining the video data stream collected by the monitoring device, facial recognition preprocessing is performed, and inputting it into the preconfigured face recognition model to calculate the face similarity. When the similarity is higher than the threshold, it is found in the local database and is lower than When thresholding is used, the target cloud server is obtained from the cloud server cluster for identification.

Benefits of technology

It improves the accuracy and speed of facial recognition, meets the needs of efficient and secure monitoring and security, and improves the real-time and accuracy of recognition through powerful computing resources of cloud servers.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479028A_ABST
    Figure CN119479028A_ABST
Patent Text Reader

Abstract

The invention discloses a face recognition monitoring security method and device and a storage medium. The method comprises the following steps: acquiring a first video data stream collected by monitoring equipment; preprocessing the first video data stream to obtain a second video data stream; inputting the second video data stream into a face recognition model to obtain a first face feature vector; obtaining a second face feature vector from a face database, and carrying out similarity calculation on the second face feature vector and the first face feature vector to obtain a similarity; when the similarity is greater than a preset threshold value, searching and obtaining user identity information in a database; when the similarity is smaller than a threshold value, selecting a target cloud server based on an adaptive scheduling algorithm; and sending the second video data stream to a target cloud server for recognition to obtain a third face feature vector and user identity information, and sending the third face feature vector and the user identity information to the controller for storage. According to the invention, the local face recognition task is assigned to the cloud server for calculation by using the adaptive scheduling algorithm, so that the accuracy and speed of face recognition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of face recognition technology, and in particular to a face recognition monitoring security method, device and storage medium. Background Art

[0002] Face recognition technology is a technology that uses computer vision and machine learning algorithms to automatically identify and verify personal identities. It captures facial images through a camera, then extracts key features such as the position and shape of the eyes, nose and mouth, and compares these features with the stored facial features in the database. Face recognition technology is increasingly used in the field of surveillance and security. It can quickly identify and verify personal identities by capturing and analyzing facial images in real time through cameras, thereby improving the intelligence and response speed of security systems. Face recognition systems can quickly identify the identities of people entering and leaving to prevent unauthorized access. At the same time, by real-time monitoring and analysis of video data, face recognition technology can also help to promptly detect and respond to security threats such as illegal intrusions or suspicious behavior. In addition, this technology can also be used in intelligent building management systems to achieve automatic access control and visitor management, thereby improving the security and convenience of the entire system.

[0003] Existing face recognition technologies usually perform calculations on local devices, identifying and verifying identities by processing video streams or images locally. This means that all processing work, including face detection, feature extraction, feature comparison, etc., is done on the user's device instead of being sent to a remote server for processing. In order to adapt to the computing power of the terminal device, the face recognition model may need to be compressed and simplified to reduce the model size and computing requirements. These limitations are particularly evident when processing complex tasks or high-resolution images, making it difficult to meet the requirements of real-time and efficiency.

[0004] To sum up, due to insufficient computing resources and computing power of local devices, face recognition has low accuracy and slow speed, making it difficult to meet the needs of efficient and safe monitoring and security. Summary of the invention

[0005] The present invention provides a face recognition monitoring and security method to meet the needs of efficient and safe monitoring and security and improve the accuracy and speed of face recognition.

[0006] In the first aspect, in order to solve the above technical problems, the present invention provides a face recognition monitoring security method, comprising: Acquire a first video data stream collected by a monitoring device; Performing a face recognition preprocessing operation on the first video data stream to obtain a second video data stream; Inputting the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; Acquire a second facial feature vector from a pre-configured facial database, and perform facial similarity calculation on the first facial feature vector and the second facial feature vector to obtain facial similarity; When the face similarity is greater than a preset face similarity threshold, searching in the pre-configured face database according to the second face feature vector to obtain user identity information; When the face similarity is less than a preset face similarity threshold, a target cloud server is obtained from the cloud server cluster based on an adaptive scheduling algorithm; Sending the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; The received third facial feature vector and the user identity information are input into the facial database for storage.

[0007] Preferably, performing a face recognition preprocessing operation according to the first video data stream to obtain a second video data stream is specifically: Performing a face detection operation according to the first video data stream to obtain a face detection video data stream; A face alignment operation is performed according to the face detection video data stream to obtain a second video data stream.

[0008] Preferably, the configuration process of the preconfigured face recognition model includes: Get the first face dataset; Performing a model training preprocessing operation on the first face data set to obtain a second face data set; The second face data set is input into the face recognition model for training, and the training is judged to be completed when the loss function of the face recognition model meets the convergence condition, thereby obtaining a trained face recognition model.

[0009] Preferably, performing a model training preprocessing operation according to the first face data set to obtain the second face data set is specifically: Performing a facial image cropping operation according to the first facial data set to obtain a facial image cropped data set; Performing a face image alignment operation according to the face image cropping data set to obtain a face image alignment data set; Performing a face image size normalization operation according to the face image alignment data set to obtain a face image size normalized data set; A data enhancement operation is performed on the face image size normalized data set to obtain a second face data set.

[0010] Preferably, the configuration process of the pre-configured face database includes: Obtain user identity information; According to the face recognition model, a face recognition operation is performed on the user to obtain a face feature vector; The user identity information and the facial feature vector are input into the facial database for storage.

[0011] Preferably, the acquiring of the second face feature vector from a pre-configured face database, and the calculation of face similarity between the first face feature vector and the second face feature vector to obtain face similarity are specifically: Calculating the cosine value of the angle between the first facial feature vector and the second facial feature vector to measure the facial similarity between the first facial feature vector and the second facial feature vector,

[0012] in, is the face similarity, is the first facial feature vector, is the second face feature vector.

[0013] Preferably, the step of obtaining a target cloud server from a cloud server cluster based on an adaptive scheduling algorithm includes: Obtaining cloud server cluster indicators and network indicators; wherein the cloud server cluster indicators include server performance, server load, server response time and number of server connections, and the network indicators include network bandwidth; Standardizing the indicators of the cloud server cluster and the network indicators to obtain standardized indicators; According to the standardized indicators, the comprehensive scores of the servers are calculated and sorted, and the server with the highest comprehensive score is selected as the target cloud server; The comprehensive score calculation formula is as follows:

[0014] in, is the comprehensive score of the i-th server in the cloud server cluster, is the server performance weight, is the server load, is the server response time, is the number of server connections, is the network bandwidth, is the normalized server performance, is the normalized server load, is the normalized server response time, is the normalized number of server connections, is the normalized network bandwidth.

[0015] Preferably, the method further comprises: The server performance weight is adjusted according to the feedback to obtain an updated server performance weight, wherein the weight adjustment formula is specifically:

[0016] in, is the weight of the kth indicator, To adjust the step size, is the feedback function; The feedback function is specifically:

[0017] in, is the task completion time of the i-th server in the cloud server cluster, is the resource utilization of the i-th server in the cloud server cluster, is the resource utilization of the jth server in the cloud server cluster, and is the weight of the feedback function.

[0018] In a second aspect, the present invention provides a face recognition monitoring and security device, comprising: An acquisition module, used to acquire a first video data stream collected by a monitoring device; A preprocessing module, used for performing a face recognition preprocessing operation according to the first video data stream to obtain a second video data stream; A face recognition module, used for inputting the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; A face similarity calculation module, used to obtain a second face feature vector from a pre-configured face database, and perform face similarity calculation on the first face feature vector and the second face feature vector to obtain face similarity; A search module, configured to search the pre-configured face database according to the second face feature vector to obtain user identity information when the face similarity is greater than a preset face similarity threshold; An adaptive scheduling module, configured to obtain a target cloud server from a cloud server cluster based on an adaptive scheduling algorithm when the face similarity is less than a preset face similarity threshold; a data exchange module, configured to send the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; The saving module inputs the received third facial feature vector and the user identity information into the facial database for saving.

[0019] The configuration process of the pre-configured face recognition model includes: Get the first face dataset; Performing a model training preprocessing operation on the first face data set to obtain a second face data set; The second face data set is input into the face recognition model for training, and the training is judged to be completed when the loss function of the face recognition model meets the convergence condition, thereby obtaining a trained face recognition model.

[0020] The configuration process of the pre-configured face database includes: Obtain user identity information; According to the face recognition model, a face recognition operation is performed on the user to obtain a face feature vector; The user identity information and the facial feature vector are input into the facial database for storage.

[0021] In a third aspect, the present invention further provides a computer-readable storage medium, which includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute any one of the above-mentioned facial recognition monitoring and security methods.

[0022] Compared with the prior art, the present invention has the following beneficial effects. The embodiments of the present invention provide a face recognition monitoring security method, device and storage medium, including obtaining a first video data stream collected by a monitoring device; performing a face recognition preprocessing operation according to the first video data stream to obtain a second video data stream; inputting the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; obtaining a second face feature vector from a pre-configured face database, performing face similarity calculation on the first face feature vector and the second face feature vector to obtain face similarity; when the face similarity is greater than a preset face similarity threshold, Then, according to the second facial feature vector, a search is performed in the pre-configured facial database to obtain user identity information; when the facial similarity is less than the preset facial similarity threshold, a target cloud server is obtained from the cloud server cluster based on an adaptive scheduling algorithm; the second video data stream is sent to the target cloud server, so that the target cloud server performs facial recognition according to the second video data stream, obtains a third facial feature vector and user identity information, and sends the third facial feature vector and the user identity information to the controller; the received third facial feature vector and the user identity information are input into the facial database for storage. The method uses an adaptive scheduling algorithm to assign local facial recognition tasks to cloud servers for calculation, thereby meeting the needs of efficient and safe monitoring and security, and improving the accuracy and speed of facial recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 It is a flow chart of a face recognition monitoring and security method provided by an embodiment of the present invention; Figure 2 It is a flowchart of another face recognition monitoring and security method provided by an embodiment of the present invention; Figure 3 It is a flowchart of a configuration process of a face recognition model provided by an embodiment of the present invention; Figure 4 It is a flowchart of a configuration process of a face database provided by an embodiment of the present invention; Figure 5 It is a structural schematic diagram of a face recognition monitoring security device provided by an embodiment of the present invention; Figure 6 It is a structural schematic diagram of another face recognition monitoring security device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Reference Figure 1 and Figure 2 The embodiment of the present invention provides a face recognition monitoring and security method, which is executed by a controller and includes the following steps: S01, obtaining a first video data stream collected by a monitoring device.

[0026] S02: Perform a face recognition preprocessing operation according to the first video data stream to obtain a second video data stream.

[0027] S03: Input the second video data stream into a pre-configured face recognition model to obtain a first face feature vector.

[0028] S04, obtaining a second face feature vector from a pre-configured face database, and performing face similarity calculation on the first face feature vector and the second face feature vector to obtain a face similarity. S05, when the face similarity is greater than a preset face similarity threshold, searching in the pre-configured face database according to the second face feature vector to obtain user identity information; S06, when the face similarity is less than a preset face similarity threshold, obtaining a target cloud server from the cloud server cluster based on an adaptive scheduling algorithm; S07, sending the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; S08, inputting the received third facial feature vector and the user identity information into the face database for storage.

[0029] In step S01, it should be noted that the first video data stream collected by the monitoring device is obtained. Specifically, after the initial configuration, the monitoring device begins to capture the scenes within its field of view in real time according to the set parameters including resolution, frame rate, compression format, network connection mode, viewing angle and focal length, and converts these scenes into continuous image frames. Each image frame represents a static image at a point in time, and the time interval between these frames is controlled according to the set frame rate, thereby forming a smooth video stream. This video data stream is called the first video data stream, which contains all dynamic activity information in the monitoring area, including changes in personnel, vehicles and environment.

[0030] In an optional implementation, the first video data stream is transmitted via a wired transmission method, including Ethernet or optical fiber, etc. In another implementation, the first video data stream is transmitted via a network, and the network transmission method includes Wi-Fi, 4G / 5G mobile network or other wireless communication means.

[0031] In order to ensure the real-time and integrity of video data during transmission, real-time transport protocols (such as RTSP and RTP) are usually used for data transmission, combined with error checking mechanisms and retransmission strategies to prevent data loss or damage. Once the first video data stream reaches the terminal device, the terminal device will receive and decode the data, and the decoded image frames will serve as the basic data for subsequent face recognition operations. During the decoding process, the terminal device will verify the data to ensure the integrity and quality of the video data.

[0032] In step S02, it should be noted that the face recognition preprocessing operation is performed on the first video data stream to obtain the second video data stream. Specifically, the face detection operation is performed on the first video data stream to obtain the face detection video data stream; and the face alignment operation is performed on the face detection video data stream to obtain the second video data stream.

[0033] In an optional implementation, a Haar feature classifier is applied to detect whether an image frame contains a face and identify the area where the face is located. In this process, each frame of the video data stream is processed one by one, and the detected face area is marked and cropped to form a sub-image containing the face image area, and these sub-images constitute the face detection video data stream. During the detection process, if a face is not detected in some frames, the frame data will be marked as "invalid" and ignored in subsequent processing steps to improve the efficiency and accuracy of system processing.

[0034] The Haar feature classifier is an image processing technology based on machine learning and is widely used in computer vision tasks such as face detection. The working principle of the Haar feature classifier is based on the characteristics of brightness changes in the image, and recognizes the characteristics of the face through simple rectangular area comparison. For example, in the face area, the eyes are usually darker than the adjacent cheek parts, and this contrast is a type of Haar feature. The Haar feature classifier determines whether there is a specific object (such as a face) in the image by comparing these brightness differences.

[0035] After completing the above-mentioned face detection operation, a face alignment operation is performed according to the face detection video data stream. The purpose of this operation is to ensure that the faces detected in different frames have a uniform posture and direction, thereby improving the accuracy of subsequent face recognition. The face alignment operation usually adopts key point detection technology, by locating the key parts of the face (such as eyes, nose, corners of the mouth, etc.), and using geometric transformation to rotate, scale or translate the face to a standardized posture. This process may involve the precise positioning and adjustment of multiple facial key points to ensure that faces in different frames are compared and identified in the same reference frame. Key point detection algorithms are usually based on deep learning models, such as models based on ResNet or other deep network structures, to obtain high-precision key point positioning results.

[0036] During the face alignment process, further image enhancement processing may be performed, such as histogram equalization, color correction, and illumination normalization, to reduce the impact of illumination, contrast, and color changes on face recognition. These processing steps help obtain more consistent image data under different environmental conditions, thereby improving the performance and robustness of subsequent face recognition models. After the alignment process is completed, the obtained image data constitutes the second video data stream, which contains a standardized sequence of face images.

[0037] In step S03, it should be noted that the second video data stream is input into a pre-configured face recognition model to obtain a first face feature vector.

[0038] Among them, refer to Figure 3 , the configuration process of the pre-configured face recognition model includes: S11, obtaining a first face data set; S12, performing a model training preprocessing operation on the first face data set to obtain a second face data set; S13, inputting the second face data set into the face recognition model for training, and determining that the training is completed when the loss function of the face recognition model meets the convergence condition, thereby obtaining a trained face recognition model.

[0039] Specifically, the second video data stream is input into a pre-configured face recognition model to obtain a first face feature vector. The second video data stream is composed of a plurality of pre-processed face image frames, which have been standardized and suitable for input into the face recognition model for further processing after steps such as face detection and face alignment. The face recognition model is a deep neural network specifically used to extract face features from images. By inputting standardized face image frames, the model can generate a set of high-dimensional vectors representing face features. These vectors are the first face feature vectors, which are used for subsequent identity recognition and comparison.

[0040] The configuration process of the pre-configured face recognition model includes the following steps: first, obtain a first face data set, which usually contains a large number of labeled face images for training the face recognition model. The source of the data set can be a public database or a large number of face images collected by monitoring equipment. These images usually cover a variety of different shooting conditions, lighting changes, expressions and postures, ensuring that the model has robustness and generalization capabilities in different actual scenarios.

[0041] After obtaining the first face data set, it should be noted that the model training preprocessing operation is performed according to the first face data set to obtain the second face data set, specifically: a face image cropping operation is performed according to the first face data set to obtain a face image cropping data set; a face image alignment operation is performed according to the face image cropping data set to obtain a face image alignment data set; According to the face image alignment data set, a face image size normalization operation is performed to obtain a face image size normalized data set; according to the face image size normalized data set, a data enhancement operation is performed to obtain a second face data set.

[0042] Specifically, first, the first face dataset is subjected to a face image cropping operation. The purpose of the cropping operation is to remove the background and redundant information in the face image and retain only the main area of ​​the face. Cropping is usually performed based on the face bounding box calibrated by the face detection algorithm. By strictly limiting the cropping range of the image, it is ensured that the high-quality face area is reflected in the image dataset input during training. After the cropping is completed, the resulting face image cropped dataset contains more concentrated face information, laying the foundation for accurate learning of the model.

[0043] According to the face image cropping dataset, a face image alignment operation is performed. The face image alignment operation refers to geometrically transforming the cropped image so that the main features of the face (such as eyes, nose, mouth, etc.) are in the same position in the image. This operation can be achieved by locating the key points of the face and using affine transformation or other geometric transformation techniques. The purpose of the alignment operation is to eliminate deviations caused by shooting angles, posture changes, etc., so that all face images are presented in the same reference frame, which facilitates the subsequent model to learn consistent features. The aligned face images will form a standardized face image alignment dataset.

[0044] Then, according to the face image alignment dataset, a face image size normalization operation is performed. The purpose of the normalization operation is to uniformly adjust all face images to the same size (such as 112x112 or 224x224 pixels) to ensure that the image size input to the model during the training process is consistent, thereby avoiding training bias caused by image size differences. The normalization process may also include standardization of brightness and contrast, so that the image data can maintain consistent image characteristics under different lighting conditions. After normalization, all images form a face image size normalization dataset with uniform specifications.

[0045] Finally, the dataset is normalized according to the size of the face image and data augmentation is performed. Data augmentation refers to generating more diverse training samples through various image transformation techniques (such as rotation, scaling, flipping, color transformation, etc.) to improve the generalization ability of the model. The purpose of this operation is to simulate the diversity in actual scenes so that the model can be exposed to various possible situations during the training process, so that it can perform more stably and accurately in testing or actual applications. After the data augmentation is completed, the second face dataset is finally generated. This dataset has higher diversity and robustness and is the final dataset used for model training.

[0046] After completing the data preprocessing, the second face data set is input into the face recognition model for training. During the training process, the model learns the feature information in the image through repeated iterations and gradually adjusts its internal parameters to optimize the feature extraction capability. The loss function used in the training process is usually an indicator used to measure the difference between the model output and the target, such as cross entropy loss or triple loss. As the training proceeds, the value of the loss function will gradually decrease. When the loss function meets the preset convergence condition, the training process is completed, the parameters of the model are no longer updated, and finally the trained face recognition model is obtained.

[0047] The trained model can effectively extract features from the input face image and generate a high-dimensional first face feature vector. These feature vectors can represent the unique attributes of the face and can be used for further identification or comparison operations.

[0048] In step S04, it should be noted that the second face feature vector is obtained from a pre-configured face database, and face similarity is calculated between the first face feature vector and the second face feature vector to obtain face similarity.

[0049] Among them, refer to Figure 4 The configuration process of the pre-configured face database includes: S21, obtaining user identity information; S22, performing a face recognition operation on the user according to the face recognition model to obtain a face feature vector; S23, inputting the user identity information and the facial feature vector into the face database for storage.

[0050] Specifically, a second face feature vector is obtained from a pre-configured face database, and the first face feature vector and the second face feature vector are subjected to face similarity calculation to obtain face similarity. First, the first face feature vector extracted by the face recognition model is a high-dimensional vector that represents the unique features of the target face extracted from the current video stream. In the next step, this feature vector needs to be compared with multiple feature vectors stored in the pre-configured face database to determine its similarity with known faces in the database, and finally determine the identity of the target face.

[0051] The pre-configured face database contains multiple face feature vectors, each feature vector corresponds to a specific user identity information. The database has been configured with a large amount of user data before actual deployment. Specifically, the configuration process of the database includes the following key steps. First, obtain user identity information, which includes but is not limited to the user's name, ID number, contact information, etc. The specific information depends on the application scenario and security requirements of the system. This identity information will be bound to the facial feature vectors extracted subsequently, so that the corresponding user identity can be quickly retrieved through the feature vector in actual applications.

[0052] Next, according to the configured user information, the face recognition model is used to perform face recognition operations on the user to obtain the user's face feature vector. In this process, each user needs to provide multiple face photos covering different expressions, angles and lighting conditions. The face recognition model processes these photos and extracts unique and distinctive feature vectors, which represent the characteristic information of the user's face. After the feature vector extraction is completed, the user identity information and the corresponding face feature vector are input into the face database for storage. In this way, the system can establish a mapping relationship from user identity to face feature vector to provide support for subsequent face recognition operations.

[0053] In the actual face recognition process, after the terminal device obtains the first face feature vector, it needs to be compared with the feature vector stored in the database to calculate its similarity. Specifically, the system will first extract all stored second face feature vectors from the pre-configured face database. Each second face feature vector is a high-dimensional vector, which is compared with the first face feature vector in the same feature space. In order to quantify the similarity between two feature vectors, the system uses the cosine value of the angle as the metric for similarity calculation. The cosine value of the angle, that is, cosine similarity, is a commonly used measurement method to evaluate the similarity between two vectors in the feature space. Cosine similarity is calculated using the following formula,

[0054] in, is the face similarity, is the first facial feature vector, is the second face feature vector.

[0055] The cosine value ranges from [-1, 1]. When the two vectors are exactly the same, the cosine similarity is 1, indicating that the two are highly similar; when the two vectors are completely unrelated, the cosine similarity is 0; and when the two vectors are in completely opposite directions, the cosine similarity is -1. Therefore, by calculating the cosine similarity, the system can determine the similarity between the first facial feature vector and the second facial feature vector in the database.

[0056] In one embodiment, reference Figure 1 When the face similarity is greater than the preset face similarity threshold, step S05 is executed. When the face similarity is greater than the preset face similarity threshold, the user identity information is obtained by searching in the pre-configured face database according to the second face feature vector.

[0057] Specifically, when the similarity calculation is completed, the system will judge the recognition result according to the preset similarity threshold. If the similarity between a second facial feature vector and a first facial feature vector exceeds the threshold, the user identity information corresponding to the second facial feature vector will be extracted and identified as the currently recognized face. Among them, the face similarity threshold is a critical value set by the system during the configuration process, usually obtained through experimental data to ensure the accuracy of recognition. When the similarity value is greater than or equal to this threshold, the system determines that the currently recognized face is similar enough to a known face in the database, that is, it may be the same person. At this point, the system will further operate and perform a precise search operation in the face database.

[0058] The search operation is based on the second facial feature vector. Specifically, each record in the database contains not only the user's identity information, but also the facial feature vector corresponding to the user. After the similarity calculation is completed, the system uses the second facial feature vector that has been identified to have a high similarity with the first facial feature vector as a keyword to start a comparison search in the database. Databases usually use efficient data structures, such as hash tables or tree structures, to facilitate fast retrieval.

[0059] During the search process, the system will locate the database entry that fully matches the second facial feature vector. These entries are usually stored in the index part of the database and contain various types of user identity information, such as name, ID number, contact information, and other possible personal information. After completing the match, the system extracts the corresponding user identity information from the matching database record.

[0060] In one embodiment, reference Figure 2 , when the face similarity is less than the preset face similarity threshold, execute step S06, step S07 and step S08. When the face similarity is less than the preset face similarity threshold, based on the adaptive scheduling algorithm, obtain the target cloud server from the cloud server cluster; send the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains the third face feature vector and user identity information and sends the third face feature vector and the user identity information to the controller; inputs the received third face feature vector and the user identity information into the face database for storage.

[0061] Specifically, when the face similarity is less than the preset face similarity threshold, the system will obtain the target cloud server from the cloud server cluster based on the adaptive scheduling algorithm, and send the second video data stream to the target cloud server for further high-precision face recognition. First, when the similarity between the first face feature vector and the feature vector in the pre-configured face database is lower than the set threshold, the system determines that the current device cannot accurately recognize the face, which may be due to the computing power of the terminal device or the limitations of the database, so it is necessary to use the powerful computing resources of the cloud server for more complex and sophisticated processing.

[0062] At this time, an adaptive scheduling algorithm is used to obtain the target cloud server from the cloud server cluster. The algorithm evaluates multiple parameters such as the server performance, server load, server response time, number of server connections, and network bandwidth of the cloud server, and selects the optimal target cloud server from the cloud server cluster. Specifically, the cloud server cluster indicators and network indicators are obtained; wherein the cloud server cluster indicators include server performance, server load, server response time, number of server connections, and the network indicators include network bandwidth; Next, the cloud server cluster index and the network index are standardized to obtain standardized indexes; wherein the standardized formula is specifically:

[0063] in, is the server performance of the i-th server in the cloud server cluster, is the server performance, is the normalized server performance of the i-th server in the cloud server cluster;

[0064] in, is the server load of the ith server in the cloud server cluster, is the server load, is the normalized server load of the ith server in the cloud server cluster;

[0065] in, is the server response time of the ith server in the cloud server cluster, is the server response time, is the normalized server response time of the i-th server in the cloud server cluster;

[0066] in, is the number of server connections of the ith server in the cloud server cluster, is the number of connections to the server, is the normalized number of server connections of the ith server in the cloud server cluster;

[0067] in, is the network bandwidth, is the network bandwidth, is the normalized network bandwidth; According to the standardized indicators, the comprehensive scores of the servers are calculated and sorted, and the server with the highest comprehensive score is selected as the target cloud server; The comprehensive score calculation formula is as follows:

[0068] in, is the comprehensive score of the i-th server in the cloud server cluster, is the server performance weight, is the server load, is the server response time, is the number of server connections, is the network bandwidth, is the normalized server performance, is the normalized server load, is the normalized server response time, is the normalized number of server connections, is the normalized network bandwidth.

[0069] The server performance weight is adjusted according to the feedback to obtain an updated server performance weight, wherein the weight adjustment formula is specifically:

[0070] in, is the weight of the kth indicator, To adjust the step size, is the feedback function; The feedback function is specifically:

[0071] in, is the task completion time of the i-th server in the cloud server cluster, is the resource utilization of the i-th server in the cloud server cluster, is the resource utilization of the jth server in the cloud server cluster, and is the weight of the feedback function.

[0072] Once the target cloud server is determined, the system will immediately send the second video data stream to the server. This data stream is the face detection video stream that has been initially processed by the local device and contains the face information to be recognized. In the process of sending data to the target cloud server, the system may use an optimized transmission protocol to ensure the security and integrity of the data during network transmission and avoid recognition errors caused by data loss or tampering.

[0073] After the target cloud server receives the second video data stream, it will use its high-performance face recognition model to identify the face in the data stream. Since cloud servers have stronger computing power and storage resources, the face recognition models used are usually more complex and accurate than those of local devices. The server will analyze the video stream frame by frame, extract the third face feature vector of the face in each frame, and compare and identify based on these feature vectors. The cloud server compares it with its huge internal face database and finally obtains the recognition result, that is, the user's identity information.

[0074] After the recognition is completed, the cloud server returns the third face feature vector and the recognized user identity information to the controller of the local terminal device. This process may involve data encryption and the selection of transmission protocols to ensure the security and integrity of the data. After the controller receives the data returned from the cloud server, it will parse and process the data to determine the credibility of the recognition result. If the recognition result is as expected, the controller will perform subsequent operations, such as using the user identity information for access control, record keeping, or further security verification.

[0075] Finally, the system inputs the received third facial feature vector and user identity information into the local device's facial database for storage. This operation enables the local database to be updated and expanded in real time. As more recognition results are accumulated, the facial feature vectors and user identity information in the database will become richer and more complete, improving the accuracy and efficiency of subsequent recognition. The data storage in this process must ensure data persistence and security, which is usually achieved through encrypted storage, backup, and redundant design.

[0076] The configuration process of the pre-configured face database is usually completed in the initial stage of system deployment. First, the user's basic identity information, such as name, ID number, contact information, etc., is obtained through manual or automated means. This information constitutes the basic entries in the database. After obtaining the user's identity information, the system uses the face recognition model in the local or cloud server to perform face recognition operations on the user and extract the face feature vector representing the user's unique biometric features.

[0077] The facial feature vector extraction process usually requires users to provide multiple facial images with different angles, expressions and lighting conditions to ensure that the extracted feature vector has wide adaptability and robustness. On this basis, the system binds the extracted facial feature vector with the corresponding user identity information and enters it into the face database for storage. The database storage mechanism usually includes encrypted storage, distributed backup and data redundancy to ensure rapid recovery and data integrity in the event of system failure or data corruption.

[0078] In summary, the first embodiment of the present invention provides a security system based on face recognition, which realizes efficient and accurate face recognition through step-by-step implementation. First, the monitoring device collects the video data stream and performs preprocessing, including face detection and alignment, to generate a secondary video data stream that can be identified. Then, the system inputs the data stream into a pre-configured face recognition model, extracts the first face feature vector and performs a similarity calculation. If the similarity is higher than the preset threshold, the system searches and returns the user identity information in the local database; if it is lower than the threshold, the target cloud server is selected for further identification through an adaptive scheduling algorithm, and the identification results are returned to the local and saved in the database, so as to realize the dynamic improvement of the recognition capability and data update. Through the combination of terminal devices and cloud servers, the system ensures real-time and security while improving the recognition speed and accuracy.

[0079] Reference Figure 5 and Figure 6 , an embodiment of the present invention provides a face recognition monitoring security device, comprising: An acquisition module 101 is used to acquire a first video data stream collected by a monitoring device; A preprocessing module 102, configured to perform a face recognition preprocessing operation on the first video data stream to obtain a second video data stream; A face recognition module 103, configured to input the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; A face similarity calculation module 104 is used to obtain a second face feature vector from a pre-configured face database, and perform face similarity calculation on the first face feature vector and the second face feature vector to obtain face similarity; A search module 105, configured to search the pre-configured face database according to the second face feature vector to obtain user identity information when the face similarity is greater than a preset face similarity threshold; The adaptive scheduling module 106 is used to obtain a target cloud server from the cloud server cluster based on an adaptive scheduling algorithm when the face similarity is less than a preset face similarity threshold; A data exchange module 107, configured to send the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; The saving module 108 inputs the received third facial feature vector and the user identity information into the facial database for saving.

[0080] The configuration process of the pre-configured face recognition model includes: Get the first face dataset; Performing a model training preprocessing operation on the first face data set to obtain a second face data set; The second face data set is input into the face recognition model for training, and the training is judged to be completed when the loss function of the face recognition model meets the convergence condition, thereby obtaining a trained face recognition model.

[0081] The configuration process of the pre-configured face database includes: Obtain user identity information; According to the face recognition model, a face recognition operation is performed on the user to obtain a face feature vector; The user identity information and the facial feature vector are input into the facial database for storage.

[0082] It should be noted that the face recognition monitoring and security device provided in an embodiment of the present invention is used to execute all the process steps of a face recognition monitoring and security method in the above embodiment. The working principles and beneficial effects of the two correspond one to one, and thus will not be elaborated on.

[0083] The embodiment of the present invention further provides a terminal device. The terminal device includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps in the above-mentioned face recognition monitoring and security method embodiments are implemented, for example: Figure 1Alternatively, the processor implements the functions of each module / unit in the above-mentioned device embodiments when executing the computer program.

[0084] Exemplarily, the computer program may be divided into one or more modules / units, which are stored in the memory and executed by the processor to implement the present invention. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, which are used to describe the execution process of the computer program in the terminal device.

[0085] The terminal device may be a computing device such as a desktop computer, a notebook, a PDA, and a smart tablet. The terminal device may include, but is not limited to, a processor and a memory. Those skilled in the art may understand that the above components are merely examples of terminal devices and do not constitute a limitation on the terminal device. The terminal device may include more or less components than the above components, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.

[0086] The processor may be a central processing unit (CPU), other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc. The processor is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device.

[0087] The memory can be used to store the computer program and / or module, and the processor realizes various functions of the terminal device by running or executing the computer program and / or module stored in the memory, and calling the data stored in the memory. The memory can mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area can store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory can include a high-speed random access memory, and can also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices.

[0088] Wherein, if the module / unit integrated in the terminal device is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on such an understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Wherein, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0089] It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present invention, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0090] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A face recognition monitoring and security method, characterized in that: Executed by a controller, the method includes: Acquire a first video data stream collected by a monitoring device; Performing a face recognition preprocessing operation on the first video data stream to obtain a second video data stream; Inputting the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; Acquire a second facial feature vector from a pre-configured facial database, and perform facial similarity calculation on the first facial feature vector and the second facial feature vector to obtain facial similarity; When the face similarity is greater than a preset face similarity threshold, searching in the pre-configured face database according to the second face feature vector to obtain user identity information; When the face similarity is less than a preset face similarity threshold, a target cloud server is obtained from the cloud server cluster based on an adaptive scheduling algorithm; Sending the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; The received third facial feature vector and the user identity information are input into the facial database for storage.

2. The face recognition monitoring and security method according to claim 1, characterized in that: The face recognition preprocessing operation is performed according to the first video data stream to obtain the second video data stream, specifically: Performing a face detection operation according to the first video data stream to obtain a face detection video data stream; A face alignment operation is performed according to the face detection video data stream to obtain a second video data stream.

3. The face recognition monitoring and security method according to claim 1, characterized in that: The configuration process of the pre-configured face recognition model includes: Get the first face dataset; Performing a model training preprocessing operation on the first face data set to obtain a second face data set; The second face data set is input into the face recognition model for training, and the training is judged to be completed when the loss function of the face recognition model meets the convergence condition, thereby obtaining a trained face recognition model.

4. The face recognition monitoring and security method according to claim 3, characterized in that: The performing of a model training preprocessing operation according to the first face data set to obtain a second face data set is specifically: Performing a facial image cropping operation according to the first facial data set to obtain a facial image cropped data set; Performing a face image alignment operation according to the face image cropping data set to obtain a face image alignment data set; Performing a face image size normalization operation according to the face image alignment data set to obtain a face image size normalized data set; A data enhancement operation is performed on the face image size normalized data set to obtain a second face data set.

5. The face recognition monitoring and security method according to claim 1, characterized in that: The configuration process of the pre-configured face database includes: Obtain user identity information; According to the face recognition model, a face recognition operation is performed on the user to obtain a face feature vector; The user identity information and the facial feature vector are input into the facial database for storage.

6. The face recognition monitoring and security method according to claim 1, characterized in that: The step of obtaining a second face feature vector from a pre-configured face database and calculating face similarity between the first face feature vector and the second face feature vector to obtain face similarity is specifically as follows: Calculating the cosine value of the angle between the first facial feature vector and the second facial feature vector to measure the facial similarity between the first facial feature vector and the second facial feature vector, in, is the face similarity, is the first facial feature vector, is the second face feature vector.

7. The face recognition monitoring and security method according to claim 1, characterized in that: The method of obtaining a target cloud server from a cloud server cluster based on an adaptive scheduling algorithm includes: Obtaining cloud server cluster indicators and network indicators; wherein the cloud server cluster indicators include server performance, server load, server response time and number of server connections, and the network indicators include network bandwidth; Standardizing the indicators of the cloud server cluster and the network indicators to obtain standardized indicators; According to the standardized indicators, the comprehensive scores of the servers are calculated and sorted, and the server with the highest comprehensive score is selected as the target cloud server; The comprehensive score calculation formula is as follows: in, is the comprehensive score of the i-th server in the cloud server cluster, is the server performance weight, is the server load, is the server response time, is the number of server connections, is the network bandwidth, is the normalized server performance, is the normalized server load, is the normalized server response time, is the normalized number of server connections, is the normalized network bandwidth.

8. The face recognition monitoring and security method according to claim 7, characterized in that: The method further comprises: The server performance weight is adjusted according to the feedback to obtain an updated server performance weight, wherein the weight adjustment formula is specifically: in, is the weight of the kth indicator, To adjust the step size, is the feedback function; The feedback function is specifically: in, is the task completion time of the i-th server in the cloud server cluster, is the resource utilization of the i-th server in the cloud server cluster, is the resource utilization of the jth server in the cloud server cluster, and is the weight of the feedback function.

9. A face recognition monitoring security device, characterized in that: Executed by the controller, including: An acquisition module, used to acquire a first video data stream collected by a monitoring device; A preprocessing module, used for performing a face recognition preprocessing operation according to the first video data stream to obtain a second video data stream; A face recognition module, used for inputting the second video data stream into a pre-configured face recognition model to obtain a first face feature vector; A face similarity calculation module, used to obtain a second face feature vector from a pre-configured face database, and perform face similarity calculation on the first face feature vector and the second face feature vector to obtain face similarity; A search module, configured to search the pre-configured face database according to the second face feature vector to obtain user identity information when the face similarity is greater than a preset face similarity threshold; An adaptive scheduling module, configured to obtain a target cloud server from a cloud server cluster based on an adaptive scheduling algorithm when the face similarity is less than a preset face similarity threshold; a data exchange module, configured to send the second video data stream to the target cloud server, so that the target cloud server performs face recognition according to the second video data stream, obtains a third face feature vector and user identity information, and sends the third face feature vector and the user identity information to the controller; The saving module inputs the received third facial feature vector and the user identity information into the facial database for saving.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the face recognition monitoring and security method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Weighted least-connection scheduling algorithm oriented to SWIM (System Wide Information Management) system improvement

    CN107547650A

  • Personnel identification method and device and storage medium

    CN111368622A

  • Self-adaptive face recognition method and system based on edge cloud collaboration

    CN115690889A

  • Face recognition method and device based on deep and shallow model combination, equipment and medium

    CN117037238A