Face recognition database image automatic updating method and system in security scene
Patent Information
- Application Number
- CN202610808980.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-05
- Publication Date
- 2026-08-28
AI Technical Summary
第一,初始底库构建依赖人工,成本高、效率低
(1)采用多源身份加权融合验证机制,在采集底库图像前对人员身份进行多维度交叉确认,有效防止了非授权人员或无权限人员的图像被错误加入底库,从根本上避免了因底库污染导致的安全漏洞,特别适用于高安全等级的安防场景。
Smart Images

Figure CN122654342A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology, and in particular to a method and system for automatically updating facial recognition database images in security scenarios. Background Technology
[0002] Facial recognition technology, as an important branch of biometric identification, has been widely applied and rapidly popularized in the security field due to its advantages such as non-contact, convenience, and high recognition rate. In typical security scenarios such as community security, park monitoring, and building access control, facial recognition systems usually require pre-registered facial images of individuals as a recognition database for subsequent identity authentication and personnel control. However, existing technologies for building and updating facial recognition databases have the following prominent problems: First, the initial database construction relies on manual labor, which is costly and inefficient. Traditional systems require dedicated personnel to collect resident photos and verify information before deployment, which is time-consuming and labor-intensive, and difficult to modify after personnel changes.
[0003] Second, the fixed image database cannot adapt to natural changes in people's appearance. As people age, their hairstyles change, they wear glasses, etc., and the difference between the initial database image and their current appearance increases, leading to a continuous decline in recognition accuracy and resulting in rejection and false recognition.
[0004] Third, existing dynamic update schemes have security risks and uncontrollable update quality issues. Existing technologies rely solely on the quality judgment of a single photo, lacking cross-verification of personnel identities, making it easy to mistakenly add images of unauthorized personnel to the database; the update strategy is simple (only replacing the "worst quality" image), failing to comprehensively consider the representativeness, timeliness, and actual matching performance of the image; and there is a lack of anomaly rollback mechanism, making it impossible to automatically recover after an erroneous update.
[0005] Fourth, the diversity and incremental information of the base image database are not fully utilized. Existing methods ignore the supplementary value of images of the same person from different angles and under different lighting conditions for recognition performance, resulting in insufficient robustness of the system in complex scenarios.
[0006] Therefore, how to achieve intelligent and high-quality updates to the facial recognition database while ensuring security is a pressing technical problem that needs to be solved. Summary of the Invention
[0007] The purpose of this invention is to provide a method and system for automatically updating the facial recognition database images in security scenarios, so as to solve the problems mentioned in the background art.
[0008] To achieve the above objectives, the present invention provides a method for automatically updating a facial recognition database image in a security scenario, comprising: S1. Multi-source identity fusion verification: Collect identity credential information of at least two different modalities of the person to be identified, perform weighted fusion of the verification results of each modality, and determine that the identity verification is successful when the fusion score exceeds the dynamic threshold. S2. Adaptive sequence acquisition: After successful verification, the acquisition window is triggered to continuously acquire multiple frames of face images at a variable frame rate. The variable frame rate is dynamically adjusted according to the speed of the person's movement. Step S3: Quality evaluation. Perform multi-dimensional quality assessment on each frame of the image to obtain a comprehensive quality evaluation value. S4. Construction of complementary candidate set: Select images whose comprehensive quality evaluation value exceeds the threshold and construct the optimal candidate set consisting of K frames. The pose difference between any two frames in the candidate set is greater than the preset threshold. S5. Incremental contribution evaluation: Extract the facial feature vectors of the candidate set and calculate their marginal incremental contribution relative to the existing feature vectors in the sub-base. If it is greater than the incremental acceptance threshold, it is determined that the update condition is met. S6. Hierarchical update execution: When the update conditions are met, if the sub-base library has not reached the capacity limit, it is directly added to the candidate set; if the limit has been reached, the multidimensional utility score of each existing image is calculated, the one with the lowest score is eliminated and replaced with the candidate set image. S7. Closed-loop rollback: After the update, the system enters a verification and observation period to monitor the recognition pass rate. If the number of consecutive failures exceeds the tolerance threshold, the system will roll back to restore the sub-database state before the update.
[0009] Preferably, the weighted fusion content in step S1 is as follows: Assign basic weights to the verification sub-model corresponding to each type of identity credential information. The basic weights are positively correlated with the anti-counterfeiting level of that type of identity credential information. Obtain the actual validation accuracy of each validation sub-model in the most recent statistical period, and calculate the dynamic adjustment factor based on the actual accuracy. The product of the base weights and the dynamic adjustment factor is used as the current effective weights of this validation sub-model; When the collection of identity credential information fails or the verification result is unreliable, the weight of that path is temporarily set to zero, and the overall credibility score is determined by the verification results of the remaining N-1 paths.
[0010] Preferably, the attitude angles in step S2 are characterized by a three-dimensional attitude angle vector (pitch angle, yaw angle, roll angle); The degree of occlusion is obtained by segmenting the face region into an unoccluded region and several types of occluded regions, calculating the area ratio of each type of occluded region, multiplying it by the corresponding penalty coefficient, and then summing the results. The comprehensive quality evaluation value is calculated by normalizing each dimension using a nonlinear weighted mapping function and then performing a weighted summation.
[0011] Preferably, in step S4, when the number of images in the high-quality image pool is insufficient to construct a K-frame candidate set that meets the pose difference threshold, the pose difference threshold is lowered and reselected until a candidate set that meets the requirements can be constructed; when the pose difference threshold is lowered to the lower limit but still cannot construct a K-frame candidate set, the maximum number of frames that can actually be obtained is taken as the optimal candidate set.
[0012] Preferably, the marginal incremental contribution in step S5 is calculated using the following formula: ; in, For the distance metric between feature vectors, cosine distance or Euclidean distance is used; marginal increment contribution. The physical meaning is: the maximum value of the minimum distance from each vector in the candidate feature vector set to the existing feature vector set, that is, the degree of similarity between the image in the candidate set that differs the most from the existing database and the database.
[0013] Preferably, the multidimensional utility score in step S6 is calculated using the following utility function: ; in, The multidimensional utility score represents the image, with a larger value indicating that the image should be retained more often; τ represents the normalized retention time of the image. The number of successful matches in the history of the image. This represents the maximum number of matches in the sub-database of the same person within the statistical period. This is the normalized quality assessment value for the image. This refers to the average quality evaluation value of the same sub-basin. , , For utility weighting coefficients, satisfying ; This is the coefficient for diminishing marginal utility of retention time.
[0014] Preferably, the sub-base database state rollback operation in step S7 specifically includes: Read the original image data that was replaced before the update from the backup storage area; The original image data is rewritten into the subbase, while the candidate images added during the update are removed. Broadcast a rollback command to all other security entrances within the coverage area of the same security system to keep the basement status of each entrance consistent. Write this rollback event to the system audit log, including the triggering reason, the time of occurrence, and the identification fields of the personnel involved; Set the automatic database update flag for this person to "frozen" and ignore all database update requests for this person during the cooldown period.
[0015] Preferably, the method also includes cross-node base database state consistency maintenance: Once any security entry point completes its database update operation, it encapsulates the changed data into an incremental update package and pushes it to the central management node via a reliable message transmission channel. The central management node writes the incremental update package into the global database change log in incrementing version number. Other security entry points pull the global database change log according to a preset synchronization cycle, determine the incremental update packages that need to be synchronized locally based on version number differences, and achieve eventual consistency. For update backlogs caused during network outages, breakpoint resume and idempotent application strategies are used to catch up and synchronize after network recovery.
[0016] An automatic image update system for a facial recognition database in a security scenario includes: The multi-source fusion verification engine is configured with multiple verification channel interfaces, each of which corresponds to a type of identity credential. The multi-source fusion verification engine includes a dynamic weight allocator and a weighted summation calculator to output a comprehensive credibility score. The adaptive image acquisition front end includes an image sensor, a motion detection sensor, and an ambient light sensor. The adaptive image acquisition front end dynamically adjusts the acquisition frame rate based on the speed signal output by the motion detection sensor and controls the supplementary light intensity based on the output of the ambient light sensor. The four-dimensional quality evaluator includes a sharpness evaluation unit, a brightness uniformity evaluation unit, a pose angle calculation unit, and an occlusion analysis unit. The output of each evaluation unit is output as a comprehensive quality evaluation value after nonlinear mapping. A complementary candidate set builder, comprising a quality threshold filter, a pose space distance calculator, and a combined optimization solver, is used to select the optimal candidate set from the original image sequence that meets the requirements for quality and pose diversity. The incremental contribution evaluator, which includes a feature extraction network, a feature vector distance calculation unit, and a marginal incremental contribution calculation unit, is used to determine whether the candidate set can bring new valuable information to the sub-base. The base inventory evolution controller, which includes a sub-base inventory capacity manager, a multidimensional utility score calculator, and a replacement executor, is used to perform hierarchical update operations based on the sub-base inventory capacity status and multidimensional utility scores; The closed-loop verification and rollback manager includes a verification observation period timer, a recognition success rate statistician, and a status rollback executor, which is used to automatically restore the sub-base database state when the update effect is not good.
[0017] Therefore, the present invention employs the above-mentioned method and system for automatically updating the facial recognition database image in a security scenario, which has the following beneficial effects: (1) A multi-source identity weighted fusion verification mechanism is adopted to cross-confirm the identity of personnel in multiple dimensions before collecting images from the base database. This effectively prevents images of unauthorized or unauthorized personnel from being mistakenly added to the base database, fundamentally avoiding security vulnerabilities caused by base database contamination. It is particularly suitable for high-security security scenarios.
[0018] (2) By combining adaptive variable frame rate continuous acquisition with four-dimensional quality field evaluation, the optimal and pose-complementary images are dynamically selected from the time series as candidates for the base library. Compared with the single-shot judgment or simple quality screening of the existing technology, it can obtain clearer, more uniformly illuminated and more natural facial images. At the same time, the pose complementarity ensures the coverage of faces at different angles of the base library, which significantly improves the recognition robustness in complex scenes.
[0019] (3) A marginal incremental contribution evaluation mechanism was introduced, and only images that are sufficiently different from the existing base database images will be included in the base database, thus avoiding the repeated storage of redundant images. At the same time, the multidimensional utility score comprehensively considers three dimensions: retention time, historical matching contribution, and quality residual, so that the images in the base database can dynamically adapt to the natural changes in people's appearance, while retaining the most representative images with the greatest recognition value.
[0020] (4) A closed-loop verification and adaptive rollback mechanism is set up so that when a series of recognition failures occur after the base database is updated, it can automatically recover to the stable state before the update, effectively preventing systemic recognition failures caused by a single erroneous update. The cross-node base database state consistency maintenance mechanism ensures the consistency of the multi-entry base database and avoids the problem of inconsistent recognition results from different entry points.
[0021] (5) It realizes the automated collection, evaluation, updating and synchronization of base images, greatly reducing the reliance on manual input and maintenance, and reducing the cost of system deployment and long-term operation and maintenance. It is particularly suitable for security scenarios with high personnel mobility, such as large-scale communities and parks.
[0022] The technical solution of the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description
[0023] Figure 1 This is a schematic diagram of the overall process of an embodiment of the method for automatically updating the facial recognition database image in a security scenario according to the present invention; Figure 2 This is a flowchart illustrating the multi-source identity fusion verification steps of an embodiment of the automatic update method for face recognition database images in a security scenario according to the present invention. Figure 3 This is a flowchart illustrating the four-dimensional quality assessment steps of an embodiment of a method and system for automatically updating a facial recognition database image in a security scenario according to the present invention. Figure 4 This is a flowchart illustrating the evolution of the update steps in an embodiment of the automatic update method for facial recognition database images in a security scenario according to the present invention. Figure 5 This is a schematic diagram of the module structure of an embodiment of a face recognition database image automatic update system in a security scenario according to the present invention. Detailed Implementation
[0024] The technical solution of the present invention will be further described below with reference to the accompanying drawings and embodiments.
[0025] Unless otherwise defined, the technical or scientific terms used in this invention shall have the ordinary meaning understood by one of ordinary skill in the art to which this invention pertains. The terms "first," "second," and similar terms used in this invention do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0026] Please see Figures 1-5 This invention provides a method for automatically updating a facial recognition database image in a security scenario, comprising: Multi-source identity fusion verification steps: Collect identity credential information of at least two different modalities of the person to be identified, weight and fuse the verification confidence of each credential information, and determine the identity pass when the fusion score exceeds the threshold.
[0027] At the security entrance, N different modalities of identity credentials for the person to be identified are collected in parallel, where N≥2. These N identity credentials are then input into their respective verification sub-models, resulting in N independent verification confidence scores. A dynamic weighting strategy is used to weight and sum these N confidence scores to obtain a comprehensive credibility score. When the comprehensive credibility score exceeds a preset dynamic access threshold, identity verification is deemed successful, and a unique identifier for the individual is output. The dynamic weighting strategy adjusts the weight coefficients in real time based on the current security level of the security scenario and the historical accuracy of each verification sub-model.
[0028] Adaptive sequence acquisition steps: After identity verification, multiple frames of facial images are continuously acquired at a variable frame rate, which is dynamically adjusted according to the speed of the person's movement.
[0029] Upon successful authentication, a capture window is triggered, and an image acquisition unit deployed at the security entrance continuously captures L frames of facial images at a variable frame rate, forming an original image sequence. The variable frame rate is dynamically adjusted based on the movement speed of the person to be identified; the faster the movement, the higher the frame rate. The duration of the capture window is adaptively correlated with the dwell time of the person to be identified.
[0030] Quality assessment steps: Perform a multi-dimensional quality assessment on each frame of the image, including sharpness, brightness, pose angle, and occlusion, and calculate the comprehensive quality evaluation value.
[0031] Each frame in the original image sequence is mapped to a four-dimensional quality space consisting of dimensions for sharpness, brightness uniformity, spatial pose, and local occlusion. The coordinate vector of each frame in this four-dimensional quality space is calculated. A nonlinear weighted mapping function is then used to project the coordinate vector onto a one-dimensional quality evaluation scale to obtain the comprehensive quality evaluation value for each frame.
[0032] The spatial attitude dimension is represented by three-dimensional attitude angle vectors (pitch, yaw, and roll). The local occlusion dimension is obtained by segmenting the face region into unoccluded regions and several types of occluded regions, calculating the area ratio of each type of occluded region, multiplying by the corresponding penalty coefficient, and then summing the results. The nonlinear weighted mapping function uses a sigmoid function to normalize each dimension before performing a weighted summation.
[0033] Complementary candidate set construction steps: Select images whose comprehensive quality evaluation value exceeds the threshold, and construct the optimal candidate set from them that meets the preset number of frames and whose poses are mutually differentiated.
[0034] A high-quality image pool is formed by selecting several frames from the original image sequence whose overall quality evaluation value exceeds a preset quality threshold. An optimal candidate set is then selected from the high-quality image pool. The optimal candidate set satisfies the following conditions: the number of image frames in the candidate set reaches a preset number K; the Euclidean distance between the spatial pose vectors of any two frames in the candidate set is greater than a preset pose difference threshold; and the sum of the overall quality evaluation values of all images in the candidate set is maximized.
[0035] When the number of images in the high-quality image pool is insufficient to construct a K-frame candidate set that meets the pose difference threshold, the pose difference threshold is lowered and reselected until a suitable candidate set can be constructed. If the pose difference threshold is lowered to the lower limit and still cannot construct a K-frame candidate set, the maximum number of frames actually available is used as the optimal candidate set.
[0036] Incremental contribution evaluation steps: Calculate the marginal incremental contribution of the candidate set relative to the existing images in the sub-base library, and determine that the update condition is met when the contribution exceeds the threshold.
[0037] Facial feature vectors are extracted from each frame of the optimal candidate set to form a candidate feature vector set. This candidate feature vector set is then compared to the existing feature vector set in the target person sub-database, and the marginal incremental contribution of the candidate feature vector set relative to the existing feature vector set is calculated. The formula for calculating the marginal incremental contribution is: ; in, For the distance metric between feature vectors, cosine distance or Euclidean distance is used. Marginal increment contribution. The physical meaning is: the maximum value of the minimum distance from each vector in the candidate feature vector set to the existing feature vector set, that is, the degree of similarity between the image in the candidate set that differs most from the existing database and the database. When the marginal incremental contribution is greater than the preset incremental acceptance threshold, the database update condition is determined to be met.
[0038] Hierarchical update execution steps: Based on the current capacity of the sub-base, perform direct addition or elimination replacement operations based on multi-dimensional utility scores.
[0039] When the conditions for updating the base database are met, obtain the current capacity status of the target personnel's sub-base database: If the number of images currently stored in the subbase is less than the preset capacity limit, then the images in the optimal candidate set will be directly added to the subbase. If the number of images currently stored in the subbase has reached its capacity limit, then calculate the multidimensional utility score for each existing image in the subbase, select the images with the lowest utility scores as elimination candidates, and replace them with images from the optimal candidate set.
[0040] The multidimensional utility score is calculated using the following utility function: ; in, The multidimensional utility score represents the image, with a larger value indicating that the image should be retained more often; τ represents the normalized retention time of the image. The number of successful matches in the history of the image. This represents the maximum number of matches in the sub-database of the same person within the statistical period. This is the normalized quality assessment value for the image. This refers to the average quality evaluation value of the same sub-basin. , , For utility weighting coefficients, satisfying ; This is the diminishing marginal utility coefficient for retention time. The historical matching contribution is calculated by accumulating the number of times the image was matched during the recognition process using a counter, and then assigning a decay weight based on the most recent matching time, with recent matches contributing more than older matches.
[0041] Closed-loop rollback steps: After the update, a verification and observation period is entered. When the number of recognition failures exceeds the tolerance threshold, the system will automatically roll back to the state before the update.
[0042] After each sub-database update operation is completed, a verification and observation period of T calendar days is automatically initiated. During the verification and observation period, the identity recognition pass rate based on the updated sub-database is continuously monitored. If the number of failures exceeds a preset failure tolerance threshold in W consecutive recognition attempts, a sub-database state rollback operation is automatically performed, restoring the sub-database to its pre-update state, and the individual's identifier is added to the update blacklist. During a preset cooling-off period, no automatic update operations can be performed on the database for that individual.
[0043] The sub-database status rollback operation specifically includes: reading the original image data that was replaced before the update from the backup storage area; rewriting the original image data into the sub-database while removing the candidate images added during the update; broadcasting the rollback instruction to all other security entrances within the coverage area of the same security system to keep the database status of each entrance consistent; writing this rollback event into the system audit log, including the triggering reason, occurrence time, and personnel identification fields; setting the automatic database update flag for that personnel to a "frozen" state, ignoring all database update requests for that personnel during the cooldown period.
[0044] Cross-node database state consistency maintenance steps: After any security entry point completes a database update operation, the changed data is encapsulated into an incremental update package and pushed to the central management node through a reliable message transmission channel. The central management node writes the incremental update package into the global database change log in incrementing version number. Other security entry points pull the global database change log according to a preset synchronization cycle, determine the incremental update package that needs to be synchronized locally based on the version number difference, and achieve eventual consistency. For update backlogs caused during network outages, breakpoint resumption and idempotent application strategies are used to catch up and synchronize after network recovery.
[0045] A system for automatically updating a facial recognition database image in a security scenario is also provided, used to perform the above method, including: Multi-source fusion verification engine: It is configured with multiple verification channel interfaces, each of which corresponds to a type of identity credential. The multi-source fusion verification engine includes a dynamic weight allocator and a weighted summation calculator to output a comprehensive credibility score.
[0046] Adaptive image acquisition front end: includes an image sensor, a motion detection sensor and an ambient light sensor. The adaptive image acquisition front end dynamically adjusts the acquisition frame rate according to the speed signal output by the motion detection sensor and controls the supplementary light intensity according to the output of the ambient light sensor.
[0047] The four-dimensional quality evaluator includes a sharpness evaluation unit, a brightness uniformity evaluation unit, a pose angle calculation unit, and an occlusion analysis unit. The output of each evaluation unit is nonlinearly mapped to output a comprehensive quality evaluation value. Specifically, the pose angle calculation unit uses a lightweight convolutional neural network to output pitch and yaw angles in real time on an edge computing device. The occlusion analysis unit uses facial landmark detection to locate the eye, nose, and mouth regions of the face, and detects occlusion caused by glasses, masks, and bangs, outputting the area percentage of each type of occlusion and the fused occlusion score.
[0048] Complementary candidate set builder: Includes a quality threshold filter, a pose space distance calculator, and a combined optimization solver, used to select the optimal candidate set from the original image sequence that meets the requirements for quality and pose diversity.
[0049] Incremental contribution evaluator: Includes a feature extraction network, a feature vector distance calculation unit, and a marginal incremental contribution calculation unit, used to determine whether the candidate set can bring new valuable information to the sub-base.
[0050] The base inventory evolution controller includes a sub-base inventory capacity manager, a multi-dimensional utility score calculator, and a replacement executor. It performs hierarchical update operations based on the sub-base inventory capacity status and multi-dimensional utility scores. The multi-dimensional utility score calculator uses the aforementioned utility function for calculation.
[0051] Closed-loop verification and rollback manager: Includes a verification observation period timer, a recognition success rate statistician, and a status rollback executor, used to automatically restore the sub-base database state when the update effect is not good.
[0052] Example 1 This embodiment provides a method for automatically updating a facial recognition database of images in a security scenario, applied to the access control and security system of a large smart community. The community has six pedestrian entrances / exits, each equipped with facial recognition access control devices. The system needs to provide facial recognition access services to over 3,000 households and approximately 8,000 residents within the community.
[0053] Scenario: Mr. Zhang, male, 35 years old. The initial database contained a photo of him taken two years ago when he checked in (no glasses, short hair). Recently, Mr. Zhang started wearing glasses and grew a beard, resulting in a significant difference between the original database image and his current appearance. As a result, the recognition success rate dropped from 97% to 62%.
[0054] The specific implementation process of this embodiment is as follows: I. Multi-source identity fusion verification steps Mr. Zhang walked to the south entrance of the residential complex and stopped in front of the access control equipment. The system simultaneously activated three authentication methods: access card sensing, mobile APP Bluetooth beacon verification, and facial liveness detection.
[0055] The access card reader reads the card number CARD_0521, and the confidence level of the verification sub-model output is 0.98. The user ID USER_0521 is obtained by parsing the Bluetooth beacon from the mobile APP, and the confidence level of the verification sub-model output is 0.95. The confidence level of the face liveness detection (including blink and head shaking judgment) output is 0.92.
[0056] The system's current security level is "High". The base weight for access card verification is 0.4, for APP verification it's 0.35, and for face liveness detection it's 0.25. Based on the actual accuracy rates of each sub-model over the past week (99.2%, 97.5%, and 96.8% respectively), dynamic adjustment factors were calculated, resulting in effective weights of 0.41, 0.34, and 0.25. The weighted fusion score is: .
[0057] The dynamic access threshold is 0.85. If 0.9548 > 0.85, the identity verification is deemed successful, and the personnel ID 10086 is output.
[0058] II. Adaptive Sequence Acquisition Steps After successful authentication, the system triggered the data acquisition window. The motion detection sensor detected Zhang's movement speed as 1.1 m / s (normal walking speed), and the system set the acquisition frame rate to 15 frames / second. The acquisition window duration was set to 1.5 seconds, acquiring a total of 22 frames of facial images to form the original image sequence. .
[0059] III. Quality Assessment Steps Perform a four-dimensional quality assessment on each frame of the sequence: Image variance was calculated using the Laplacian operator for sharpness assessment. The Laplacian variance of image I7 (frontal image of Zhang during a brief stop) was 192.3, and the normalized score was 0.94.
[0060] The brightness assessment calculates the mean of the image brightness histogram. The mean brightness of I7 is 126 (ideal exposure), with a score of 0.92.
[0061] Attitude angles were evaluated using a lightweight convolutional neural network to calculate pitch and yaw angles. The I7's pitch angle was 3° and yaw angle was 6°, both within the allowable range, resulting in a score of 1.0.
[0062] The occlusion assessment used facial landmark detection. I7 had no occlusion from glasses, masks, or hair, and scored 1.0.
[0063] After normalizing each dimension using a Sigmoid function, a weighted summation was performed (0.35 for sharpness, 0.25 for brightness, 0.25 for pose angle, and 0.15 for occlusion), resulting in an overall quality rating of 0.95 for I7.
[0064] Similarly, the overall quality score for other frames was calculated, with I12 (left face image with a yaw angle of -25°) scoring 0.88, I15 (right face image with a yaw angle of +22°) scoring 0.89, and I3 (motion-blurred image) scoring 0.52.
[0065] IV. Candidate Set Construction Steps A quality threshold of 0.75 was set, and nine images with a comprehensive quality evaluation value exceeding 0.75 were selected to form a high-quality image pool. The preset candidate set frame count K=3, and the attitude difference threshold was set to 25° (i.e., the yaw angle difference between any two images must be greater than 25°).
[0066] Select the optimal candidate set from the high-quality image pool: I7 (yaw angle 6°), I12 (yaw angle -25°), and I15 (yaw angle +22°). Verify the yaw angle difference between any two frames: , (Not satisfied). Adjusted selection schemes: I7 (yaw angle 6°), I12 (yaw angle -25°), I18 (yaw angle +28°), with differences of 31°, 22°, and 53° respectively, meeting the requirements. The sum of the comprehensive quality evaluation values of the three frames is... The maximum value among all combinations that satisfy the attitude difference condition is determined as the optimal candidate set.
[0067] V. Incremental Evaluation Steps The facial feature vectors of each frame in the optimal candidate set are extracted, and a 128-dimensional feature vector is extracted using a ResNet-50 network and the ArcFace loss function to form a candidate feature vector set. .
[0068] Obtain the existing feature vector set of 5 existing images in Zhang's database. .
[0069] Calculate the marginal incremental contribution: For v7, calculate its contribution to... The minimum distance between each vector is 0.28; for v12, the minimum distance is 0.31; and for v18, the minimum distance is 0.26. The minimum value of 0.26 is taken as the minimum distance. .
[0070] The incremental acceptance threshold is set to 0.20. If 0.26 > 0.20, the condition for updating the base database is met.
[0071] VI. Steps for Tiered Update The maximum capacity of Zhang's sub-base was preset to 8 frames. Currently, there are 5 frames, which is below the limit. Therefore, 3 frames from the optimal candidate set are directly added to the sub-base. After the update, the sub-base has a total of 8 frames, reaching the capacity limit.
[0072] VII. Closed-loop rollback steps The system initiated a 7-day verification and observation period for this update. During the observation period, the recognition success rate was continuously monitored: the success rate increased from 62% before the update to 91% on days 1-3, and remained at around 88% on days 4-6. There were no consecutive failures exceeding the tolerance threshold (5 consecutive recognition failures), so no rollback was performed, and the update was successful.
[0073] 8. Steps for Maintaining Cross-Node Base Database State Consistency After updating the database for Mr. Zhang, the south gate access control device encapsulates the changed data into an incremental update package (containing version number v3.2.1, personnel ID 10086, and three newly added image features and metadata), and pushes it to the central management node via a Kafka message channel. The central management node writes the incremental update package to the global database change log, incrementing the version number to v3.2.2. The other five entrances and exits pull the change logs every 30 seconds, determine the incremental update packages that need to be synchronized based on the version number differences, and complete the local database update. The west gate device failed to synchronize in time due to a momentary network interruption. When the network was restored after 30 seconds, a breakpoint resume strategy was used to complete the catch-up synchronization.
[0074] Through the above implementation process, this embodiment realizes the automated, secure, and high-quality updating of Zhang's facial recognition database image in a community security scenario, and the recognition success rate has rebounded from 62% to over 91%.
[0075] Example 2 This embodiment is basically the same as embodiment 1, except for the multi-source identity fusion verification method and the replacement operation when the sub-base reaches its capacity limit.
[0076] The multi-source identity fusion verification method differs: This embodiment is applied to a visitor registration scenario, employing a dual verification approach of "ID card sensing + fingerprint recognition." Visitors present their ID card and press their fingerprint at the gate. The system reads the ID card chip information via NFC, and the fingerprint sensor collects fingerprint features. The ID card verification confidence level is 0.96, the fingerprint verification confidence level is 0.94, and the weighted fusion score is 0.955, exceeding the threshold of 0.90, thus passing the verification.
[0077] Replacement operation: Assume Zhang's sub-base has reached its capacity limit of 8 frames, and existing images need to be replaced to add new candidate sets. Calculate the multidimensional utility score U for each existing image in the sub-base: Image A (Initial Photo): Retention Time Number of matches ,quality The quality residual is 0.03, and the calculated value is... ; Image E (photo of old glasses): , , The quality residual is 0.12, and the calculated value is... ; Image F (blurred photo): , , The quality residual is 0.32, and the calculated value is... .
[0078] The image F with the lowest effective score is selected as the elimination candidate and replaced with an image from the candidate set.
[0079] Example 3 This embodiment provides an automatic image update system for a facial recognition database in a security scenario, such as... Figure 5 As shown, it includes the following modules: Multi-source fusion verification engine: Configured with access card verification channels, APP verification channels, ID card verification channels, fingerprint verification channels, and voiceprint verification channels, each channel interface corresponding to a type of identity credential. The engine internally includes a dynamic weight allocator and a weighted summator calculator. The dynamic weight allocator calculates the effective weights in real time based on the historical accuracy of each verification sub-model, and the weighted summator calculator outputs a comprehensive credibility score.
[0080] Adaptive image acquisition front end: Includes an image sensor, a motion detection sensor, and an ambient light sensor. The image sensor uses a 2-megapixel high-definition network camera and supports infrared illumination. The motion detection sensor detects the speed of human movement and outputs a speed signal to dynamically adjust the acquisition frame rate. The ambient light sensor detects the ambient illuminance and controls the intensity of the illumination.
[0081] The four-dimensional quality evaluator includes a sharpness evaluation unit, a brightness uniformity evaluation unit, a pose angle calculation unit, and an occlusion analysis unit. The pose angle calculation unit uses a lightweight convolutional neural network, MobileNetV3, to output pitch and yaw angles in real time on an edge computing device. The occlusion analysis unit uses RetinaFace to detect facial landmarks, locating the eye, nose, and mouth regions, and detecting occlusion caused by glasses, masks, and bangs, respectively. The outputs of each evaluation unit are nonlinearly mapped and then input into a weighted fusion unit to output a comprehensive quality evaluation value.
[0082] Complementary Candidate Set Constructor: This includes a quality threshold filter, an attitude spatial distance calculator, and a combinatorial optimization solver. The quality threshold filter selects images whose overall quality evaluation value exceeds a threshold. The attitude spatial distance calculator calculates the Euclidean distance of the attitude angles between the images. The combinatorial optimization solver uses a greedy algorithm to find the optimal candidate set that satisfies the attitude difference threshold and maximizes the sum of quality values.
[0083] The incremental contribution evaluator comprises a feature extraction network, a feature vector distance calculation unit, and a marginal incremental contribution calculation unit. The feature extraction network uses ResNet-50+ArcFace and outputs a 128-dimensional feature vector. The distance calculation unit calculates the cosine distance between candidate features and existing features, and the marginal incremental contribution calculation unit outputs the evaluation result according to the ΔC formula.
[0084] Base Library Evolution Controller: Includes a sub-base library capacity manager, a multidimensional utility score calculator, and a replacement executor. The sub-base library capacity manager maintains the sub-base library capacity status for each person, the multidimensional utility score calculator calculates the multidimensional utility score for each image according to the U function, and the replacement executor performs direct addition or replacement operations.
[0085] Closed-loop verification and rollback manager: Includes a verification observation period timer, a recognition success rate statistician, and a status rollback executor. The verification observation period timer sets the observation period length (default 7 days), the recognition success rate statistician calculates the recognition pass rate in real time, and the status rollback executor performs a status recovery operation when rollback conditions are triggered.
[0086] Cross-node synchronization agent: Includes an incremental update package wrapper, a version number manager, and a breakpoint resume controller. The incremental update package wrapper encapsulates the base database change data into incremental update packages, the version number manager maintains a global version number sequence, and the breakpoint resume controller resumes the transmission of incomplete synchronization data after network interruption recovery.
[0087] The modules communicate loosely through RESTful APIs and message queues, and can be flexibly configured according to actual deployment needs.
[0088] Example 4 This embodiment focuses on illustrating the triggering and execution process of the rollback verification step.
[0089] After a certain update, the quality of newly acquired candidate images was poor due to extreme lighting conditions (severe backlighting), but the overall quality evaluation value still passed the threshold due to the limitations of weighted fusion. After the update, the system entered a 7-day verification and observation period.
[0090] During the observation period, the individual experienced consecutive recognition failures: 3 failures on day 1, 2 failures on day 2, and 4 failures on day 3. In 5 consecutive recognition attempts, the number of failures reached 4, exceeding the preset failure tolerance threshold (3 times).
[0091] The system automatically triggers a rollback operation: Read the original image data (2 frames in total) that was replaced before the update from the backup storage area; The original image data is rewritten into the subbase library, while the three candidate images added during the update are removed. Broadcast a rollback command to all five other security entrances within the coverage area of the same security system. Upon receiving the command, each entrance will synchronously roll back its local database. Write rollback events to the system audit log, recording the triggering reason ("continuous identification failures exceed the threshold"), the time of occurrence, and the identification of the personnel involved, etc. Set the automatic database update flag for this person to "frozen" and ignore all database update requests for this person during the 30-day cooldown period.
[0092] After the rollback is complete, the system returns to its stable state before the update, and the recognition success rate returns to normal levels. System administrators can trace the rollback event through audit logs for manual review and intervention.
[0093] Therefore, the above-mentioned method and system for automatically updating facial recognition database images in security scenarios can be widely applied to security scenarios requiring facial recognition authentication, such as community security, park monitoring, building access control, airport security checks, and train station entry. It is particularly suitable for scenarios with large numbers of people and high mobility, significantly reducing the labor costs of database maintenance, improving recognition accuracy and system robustness, and possessing high industrial practical value and broad market prospects.
[0094] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit them. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can still be made to the technical solutions of the present invention, and these modifications or equivalent substitutions cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for automatically updating a facial recognition database in a security scenario, characterized in that, include: S1. Multi-source identity fusion verification: Collect identity credential information of at least two different modalities of the person to be identified, perform weighted fusion of the verification results of each modality, and determine that the identity verification is successful when the fusion score exceeds the dynamic threshold. S2. Adaptive sequence acquisition: After successful verification, the acquisition window is triggered to continuously acquire multiple frames of face images at a variable frame rate. The variable frame rate is dynamically adjusted according to the speed of the person's movement. Step S3: Quality evaluation. Perform multi-dimensional quality assessment on each frame of the image to obtain a comprehensive quality evaluation value. S4. Construction of complementary candidate set: Select images whose comprehensive quality evaluation value exceeds the threshold and construct the optimal candidate set consisting of K frames. The pose difference between any two frames in the candidate set is greater than the preset threshold. S5. Incremental contribution evaluation: Extract the facial feature vectors of the candidate set and calculate their marginal incremental contribution relative to the existing feature vectors in the sub-base. If it is greater than the incremental acceptance threshold, it is determined that the update condition is met. S6. Hierarchical update execution: When the update conditions are met, if the sub-base library has not reached the capacity limit, it is directly added to the candidate set; if the limit has been reached, the multidimensional utility score of each existing image is calculated, the one with the lowest score is eliminated and replaced with the candidate set image. S7. Closed-loop rollback: After the update, the system enters a verification and observation period to monitor the recognition pass rate. If the number of consecutive failures exceeds the tolerance threshold, the system will roll back to restore the sub-database state before the update.
2. The method for automatically updating the face recognition database image in a security scenario according to claim 1, characterized in that, The weighted fusion in step S1 is as follows: Assign basic weights to the verification sub-model corresponding to each type of identity credential information. The basic weights are positively correlated with the anti-counterfeiting level of that type of identity credential information. Obtain the actual validation accuracy of each validation sub-model in the most recent statistical period, and calculate the dynamic adjustment factor based on the actual accuracy. The product of the base weights and the dynamic adjustment factor is used as the current effective weights of this validation sub-model; When the collection of identity credential information fails or the verification result is unreliable, the weight of that path is temporarily set to zero, and the overall credibility score is determined by the verification results of the remaining N-1 paths.
3. The method for automatically updating the face recognition database image in a security scenario according to claim 2, characterized in that: The attitude angles in step S2 are represented by a three-dimensional attitude angle vector; The degree of occlusion is obtained by segmenting the face region into an unoccluded region and several types of occluded regions, calculating the area ratio of each type of occluded region, multiplying it by the corresponding penalty coefficient, and then summing the results. The comprehensive quality evaluation value is calculated by normalizing each dimension using a nonlinear weighted mapping function and then performing a weighted summation.
4. The method for automatically updating the face recognition database image in a security scenario according to claim 3, characterized in that: In step S4, when the number of images in the high-quality image pool is insufficient to construct a K-frame candidate set that meets the pose difference threshold, the pose difference threshold is lowered and reselected until a candidate set that meets the requirements can be constructed; when the pose difference threshold is lowered to the lower limit but still cannot construct a K-frame candidate set, the maximum number of frames that can actually be obtained is taken as the optimal candidate set.
5. The method for automatically updating the face recognition database image in a security scenario according to claim 4, characterized in that, The marginal incremental contribution in step S5 is calculated using the following formula: ; in, For the distance metric between feature vectors, cosine distance or Euclidean distance is used; marginal increment contribution. The physical meaning is: the maximum value of the minimum distance from each vector in the candidate feature vector set to the existing feature vector set, that is, the degree of similarity between the image in the candidate set that differs the most from the existing database and the database.
6. The method for automatically updating the face recognition database image in a security scenario according to claim 5, characterized in that, The multidimensional utility score in step S6 is calculated using the following utility function: ; in, The multidimensional utility score represents the image, with a larger value indicating that the image should be retained more often; τ represents the normalized retention time of the image. The number of successful matches in the history of the image. This represents the maximum number of matches in the sub-database of the same person within the statistical period. This is the normalized quality assessment value for the image. This refers to the average quality evaluation value of the same sub-basin. , , For utility weighting coefficients, satisfying ; This is the coefficient for diminishing marginal utility of retention time.
7. The method for automatically updating the face recognition database image in a security scenario according to claim 6, characterized in that, The sub-base database state rollback operation in step S7 specifically includes: Read the original image data that was replaced before the update from the backup storage area; The original image data is rewritten into the subbase, while the candidate images added during the update are removed. Broadcast a rollback command to all other security entrances within the coverage area of the same security system to keep the basement status of each entrance consistent. Write this rollback event to the system audit log, including the triggering reason, the time of occurrence, and the identification fields of the personnel involved; Set the automatic database update flag for this person to "frozen" and ignore all database update requests for this person during the cooldown period.
8. The method and system for automatically updating a facial recognition database image in a security scenario according to claim 7, characterized in that, The method also includes maintaining cross-node base database state consistency: Once any security entry point completes its database update operation, it encapsulates the changed data into an incremental update package and pushes it to the central management node via a reliable message transmission channel. The central management node writes the incremental update package into the global database change log in incrementing version number. Other security entry points pull the global database change log according to a preset synchronization cycle, determine the incremental update packages that need to be synchronized locally based on version number differences, and achieve eventual consistency. For update backlogs caused during network outages, breakpoint resume and idempotent application strategies are used to catch up and synchronize after network recovery.
9. A system for automatically updating a facial recognition database image in a security scenario, comprising the method for automatically updating a facial recognition database image in a security scenario as described in any one of claims 1-8, characterized in that, include: The multi-source fusion verification engine is configured with multiple verification channel interfaces, each of which corresponds to a type of identity credential. The multi-source fusion verification engine includes a dynamic weight allocator and a weighted summation calculator to output a comprehensive credibility score. The adaptive image acquisition front end includes an image sensor, a motion detection sensor, and an ambient light sensor. The adaptive image acquisition front end dynamically adjusts the acquisition frame rate based on the speed signal output by the motion detection sensor and controls the supplementary light intensity based on the output of the ambient light sensor. The four-dimensional quality evaluator includes a sharpness evaluation unit, a brightness uniformity evaluation unit, a pose angle calculation unit, and an occlusion analysis unit. The output of each evaluation unit is output as a comprehensive quality evaluation value after nonlinear mapping. A complementary candidate set builder, comprising a quality threshold filter, a pose space distance calculator, and a combined optimization solver, is used to select the optimal candidate set from the original image sequence that meets the requirements for quality and pose diversity. The incremental contribution evaluator, which includes a feature extraction network, a feature vector distance calculation unit, and a marginal incremental contribution calculation unit, is used to determine whether the candidate set can bring new valuable information to the sub-base. The base inventory evolution controller, which includes a sub-base inventory capacity manager, a multidimensional utility score calculator, and a replacement executor, is used to perform hierarchical update operations based on the sub-base inventory capacity status and multidimensional utility scores; The closed-loop verification and rollback manager includes a verification observation period timer, a recognition success rate statistician, and a status rollback executor, which is used to automatically restore the sub-base database state when the update effect is not good.