A computer management recognition method and system based on face recognition
By dynamically adjusting the attention weight and illumination coupling coefficient of facial feature regions, the problem of inaccurate feature extraction in high-risk operation scenarios of facial recognition systems is solved, achieving high-precision identity verification and security control.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUANGDONG INNOVATIVE TECH COLLEGE
- Filing Date
- 2026-03-02
- Publication Date
- 2026-06-05
AI Technical Summary
In high-risk operation scenarios, existing facial recognition systems cannot adaptively focus on feature regions that are disturbed but still have identification value, resulting in inaccurate extraction of core features, which in turn leads to matching failures or misjudgments, weakening the proactive defense capabilities of computer systems.
By acquiring operational behavior data to determine the risk level, dynamically adjusting the attention weight of facial feature regions, quantifying the confidence of head deflection using the midline of the eyes and the distribution of feature points, and calculating the deflection illumination coupling coefficient by combining the differences in illumination distribution, the feature attention weight is dynamically adjusted by the gain, guiding the recognition model to invest more computational attention in high-interference areas.
Under high-risk operations, it improved the accuracy of identity verification capabilities, reduced the false alarm rate of security risks, and ensured the compliant and secure operation of computer systems.
Smart Images

Figure CN122153864A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition technology, and more specifically to a computer management and recognition method and system based on facial recognition. Background Technology
[0002] In the field of computer security management, facial recognition has become a key technology for identity authentication and risk behavior prevention, and is widely used in high-level access control and continuous identity verification scenarios. However, facial recognition systems typically have a fixed pre-set facial feature attention strategy, meaning that the recognition weight of core areas such as the eyes and nose remains consistent regardless of changes in the operating environment.
[0003] In real-world high-risk operational scenarios, operators often need to frequently glance at the screen, consult documents, or perform multitasking, inevitably causing head posture shifts. Simultaneously, complex ambient lighting, such as sidelight and backlighting, combined with head shifts, easily creates shadows or high-contrast highlights on the face, leading to inaccurate extraction of key feature texture details. If a fixed attention weight is still used, the recognition model struggles to adaptively focus on those feature regions that, while disturbed, still possess discernible value, resulting in inaccurate core feature extraction. This, in turn, leads to biometric matching failures or misjudgments, weakening the computer system's proactive defense capabilities and precise control level under high-risk conditions. Summary of the Invention
[0004] To address the technical problem in existing technologies where fixed attention weights prevent recognition models from adaptively focusing on feature regions that, despite interference, still possess discernible value, leading to inaccurate core feature extraction and consequently biometric matching failures or misjudgments, this invention aims to provide a computer-managed recognition method and system based on face recognition. The specific technical solution adopted is as follows: This invention provides a computer-based management identification method based on facial recognition, the method comprising: Acquire the operational behavior data of the target object, and determine the current risk level based on the operational behavior data; according to the risk level, determine the basic attention weight of the facial feature region to which each key feature point in the real-time facial image of the target object belongs; the key feature points include at least: eye feature points and nasal root feature points; The eye midline of the face is determined by the location and distribution of key feature points; the differences in texture distribution and geometric position of symmetrical feature regions on both sides of the eye midline are analyzed to determine the head deflection confidence; the head deflection confidence is used to correct the illumination distribution on both sides of the eye midline, and the difference in grayscale distribution on both sides is analyzed to obtain the deflection illumination coupling coefficient. The dynamic attention weight is obtained by dynamically adjusting the gain of the basic attention weight based on the deflection illumination coupling coefficient; the dynamic attention weight is then used to guide the recognition model to extract and match features from real-time face images.
[0005] Furthermore, determining the current risk level based on operational behavior data includes: For real-time monitoring of the operational behavior data of the target object, when abnormal operational behavior is detected, the risk value of the corresponding abnormal operational behavior is accumulated to obtain the current cumulative risk score; different risk levels are preset with corresponding score threshold ranges, and the risk level corresponding to the current cumulative risk score being within the score threshold range is taken as the current risk level.
[0006] Furthermore, determining the midline of the eyes on the face through the positional distribution of key feature points includes: Perform skin color detection and connected component analysis on real-time face images to determine the face region and generate the bounding rectangle of the face region; obtain the connection between the feature points of the eyes in the real-time face image, and take the perpendicular direction of the connection as the symmetry direction; Starting from the nasal root feature point, extend in both directions along the symmetrical direction to the upper and lower boundaries of the circumscribed rectangle until it stops at the boundary of the circumscribed rectangle of the face area. The line segment formed after the extension is used as the midline of the eyes.
[0007] Furthermore, the method for obtaining the head deflection confidence includes: On both sides of the central axis of the eyes, local texture regions of a preset size are extracted, centered on each key feature point of the eyes. The local texture feature vector in each local texture region is obtained based on the LBP operator; the difference in local texture feature vectors between the local texture regions on both sides of the midline of the eyes is used as the texture distribution difference feature. The distance deviations of key feature points on both sides of the midline of the eyes from the midline are analyzed; the confidence level of head deflection is obtained by combining the distance deviation with the difference in texture distribution.
[0008] Furthermore, the method for obtaining the deflection illumination coupling coefficient includes: The backlight side and the light-receiving side are determined based on the grayscale distribution on both sides of the midline of the eyes; An illumination compensation factor was constructed using the head deflection confidence level, and the illumination compensation factor was positively correlated with the head deflection confidence level. The compensation gray value of the backlight side was obtained by combining the illumination compensation factor and the gray value mean of the backlight side. The deflection light coupling coefficient is obtained based on the deviation between the gray-scale mean on the light-receiving side and the compensated gray-scale mean on the backlight side.
[0009] Furthermore, determining the backlight side and the light-receiving side based on the grayscale distribution on both sides of the central axis of the eyes includes: The gray values of pixels in all facial feature regions on both sides of the midline of the eyes are counted separately. The overall gray value of each side is calculated, and the side with the larger gray value is taken as the illuminated side, and the side with the smaller gray value is taken as the backlit side.
[0010] Furthermore, the step of dynamically adjusting the gain of the basic attention weight based on the deflection illumination coupling coefficient to obtain the dynamic attention weight includes: The product of the deflection illumination coupling coefficient and the basic attention weight is used as the weight gain; the sum of the weight gain and the basic attention weight is used as the dynamic attention weight.
[0011] Furthermore, the step of using the dynamic attention weight to guide the recognition model to extract and match features from real-time face images includes: The real-time face image is divided into a sequence of image blocks according to a preset size, and each image block is converted into a first token sequence; the dynamic attention weights of each facial feature region are vectorized to form a second token sequence; the second token sequence is concatenated with the first token sequence and then input into the visual Transformer model; The visual Transformer model uses a self-attention mechanism to allocate higher computational attention to image block features corresponding to high-weight facial feature regions in the first token sequence based on the weight information carried by the second token sequence, thereby completing feature extraction and identity matching.
[0012] Furthermore, the determination of the basic attention weights for each key feature point in the real-time facial image of the target object based on the risk level includes: A five-point feature detection algorithm is used to extract key feature points in real-time face images. The key feature points include eye feature points, nose root feature points, and left and right corners of mouth feature points. Based on historical data, a mapping table is pre-generated to correspond risk levels and attention weights for facial feature regions. According to the current risk level of the target object, the attention weights of the corresponding facial feature regions are retrieved from the mapping table as the basic attention weights of the facial feature regions to which each key feature point belongs.
[0013] The present invention also provides a computer management and identification system based on face recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the computer management and identification method based on face recognition described above.
[0014] The present invention has the following beneficial effects: This invention first assesses the risk level based on operational behavior, ensuring that the basic focus on core facial features is automatically increased during high-risk operations, thus achieving tiered control. Second, it quantifies the confidence level of head deflection using the midline of the eyes and the distribution of feature points, and calculates the deflection-illumination coupling coefficient based on differences in illumination distribution. This coefficient characterizes the degree of facial feature blurring caused by the superposition of posture and illumination, making the quantitative analysis of scene interference factors more realistic. Finally, based on this coupling coefficient, the feature attention weight is dynamically adjusted, forcing the recognition model to invest more computational attention in high-interference areas, effectively compensating for the loss of feature details. This invention constructs a dynamic mapping mechanism between risk level and facial feature attention weight, improving the accuracy of identity recognition capabilities and reducing the false positive rate of security risks under non-ideal operator cooperation, ensuring the compliant and secure operation of the computer system. Attached Figure Description
[0015] To more clearly illustrate the technical solutions and advantages in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0016] Figure 1 This is a flowchart of a computer management identification method based on face recognition, provided as an embodiment of the present invention. Detailed Implementation
[0017] To further illustrate the technical means and effects adopted by the present invention to achieve its intended purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation, structure, features, and effects of a computer management identification method and system based on face recognition proposed according to the present invention. In the following description, different "one embodiment" or "another embodiment" do not necessarily refer to the same embodiment. Furthermore, specific features, structures, or characteristics in one or more embodiments can be combined in any suitable form.
[0018] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0019] The following description, in conjunction with the accompanying drawings, details a specific solution for a computer management and identification method and system based on face recognition provided by this invention.
[0020] Please see Figure 1 The diagram illustrates a flowchart of a computer management identification method based on face recognition according to an embodiment of the present invention. The method includes the following steps: S1: Obtain the operational behavior data of the target object, and determine the current risk level based on the operational behavior data; according to the risk level, determine the basic attention weight of the facial feature region to which each key feature point in the real-time face image of the target object belongs; the key feature points include at least: eye feature points and nasal root feature points.
[0021] In high-risk computer operation scenarios, operators often need to frequently check the screen, look at data from the side, or perform multitasking, inevitably causing head posture to shift. Furthermore, the face is easily affected by complex lighting conditions such as side lighting and shadows, leading to blurred or lost textures in key facial features, such as the eyes and the root of the nose, significantly increasing the difficulty of recognition. Therefore, if a fixed weighting for full-face feature extraction is still used during facial recognition authentication, incomplete extraction of key features can easily lead to false recognition or rejection, severely impacting the system's proactive defense capabilities in high-risk situations. To address this, this invention introduces a risk level assessment mechanism that adaptively adjusts the basic attention weight of facial features based on the risk level of the operation, ensuring that the attention to core facial features is automatically increased during high-risk operations, achieving tiered control.
[0022] In this embodiment of the invention, the target is authorized operators of the computer system. During their computer operations, operation behavior data is acquired in real time. The monitoring mainly focuses on core operation behaviors related to computer security management, including accessing, modifying, and copying high-secret files, logging into the system outside of working hours, and browsing public data beyond the permitted time limit. Among these, copying and modifying high-secret files and logging into the system with administrator privileges outside of authorized hours involve higher risk levels, while the other operations have relatively lower risk levels. By quantifying and scoring the risks of various operation behaviors, and combining them with preset threshold ranges, the current risk level is determined.
[0023] In a specific embodiment of the present invention, for real-time monitoring of the target object's operation behavior data, the computer operation behavior log of the target object is continuously collected, the abnormal operation behavior types and frequencies in the log are extracted, and corresponding risk values are preset for each type of abnormal operation behavior. The risk values are positively correlated with the degree of security risk of the operation behavior.
[0024] Furthermore, when abnormal operation behavior is detected, the risk value of the corresponding abnormal operation behavior is accumulated to obtain the current cumulative risk score. Specifically, the risk value is accumulated one by one according to the number of times the abnormal operation behavior occurs. If the same type of abnormal operation behavior occurs multiple times, its risk value is accumulated repeatedly. For example, the preset risk value for copying high-security files is 10 points / time, the preset risk value for administrator login outside working hours is 8 points / time, and the preset risk value for browsing public data beyond the time limit is 3 points / hour. If the target object has one copy of high-security files and one login outside working hours, the cumulative risk score is 18 points.
[0025] Furthermore, different risk levels are preset with corresponding score threshold ranges. These ranges are defined in conjunction with computer business security classifications and industry security standards. In this embodiment, the score threshold ranges for low, medium, and high risk levels are set without overlap, with scores increasing sequentially. For example, low risk is 0-10 points, medium risk is 11-20 points, and high risk is 21 points and above. The risk level corresponding to the current accumulated risk score falling within the score threshold range is taken as the current risk level. A one-to-one mapping is established between score ranges and risk levels; that is, if the accumulated score falls into a corresponding range, it directly matches the risk level of that range. For example, if the accumulated score is 18 points and falls into the medium risk range, the current operation is determined to be of medium risk.
[0026] For authorized personnel, after assessing the risk level of their actions, a computer camera is triggered to capture real-time facial images of the target object. The captured images undergo basic preprocessing to ensure the recognizability of facial features. In this embodiment, a five-point feature detection algorithm is used to extract key feature points from the real-time facial image. These key feature points include eye feature points, nasal root feature points, and left and right corners of the mouth feature points. These feature points have high recognizability and are relatively stable, effectively representing facial geometry. Through rapid feature point localization and extraction, blurry or invalid interference frames are removed from the image, retaining only facial images with clear and accurately located feature points, providing a reliable image foundation for subsequent weighted matching of facial feature regions.
[0027] In one specific embodiment of the present invention, a mapping table of risk levels and attention weights for facial feature regions is pre-generated based on historical data. The mapping table includes normalized attention weights for facial feature regions such as the corners of the eyes, the root of the nose, and the corners of the mouth corresponding to low, medium, and high risk levels, with higher risk levels corresponding to greater attention weights for core feature regions. For example, at high risk levels, to ensure absolute accuracy in identity recognition, the system significantly increases the weights of the eyes and the root of the nose, making them dominant in feature extraction, while at low risk levels, the weight distribution is relatively balanced. It should be noted that the weight configuration in the mapping table can be adjusted by the implementer according to specific implementation conditions, and is not limited here.
[0028] Based on the current risk level of the target object, the attention weights of corresponding facial feature regions are retrieved from the mapping table as the basic attention weights of the facial feature regions to which each key feature point belongs. For ease of subsequent calculation, all basic attention weights are normalized values, meaning the sum of the basic attention weights for each region is 1, ensuring the stability of the model input. In this embodiment of the invention, the normalization method can be Softmax normalization, a technique well-known to those skilled in the art, and will not be elaborated upon here.
[0029] S2: Determine the midline of the eyes on the face by analyzing the location and distribution of key feature points; analyze the differences in texture distribution and geometric position of symmetrical feature regions on both sides of the midline of the eyes to determine the confidence level of head deflection; use the confidence level of head deflection to correct the illumination distribution on both sides of the midline of the eyes, and analyze the difference in gray distribution on both sides to obtain the deflection illumination coupling coefficient.
[0030] To accurately assess the reliability of facial feature recognition in high-risk operational scenarios, considering the coupled influence of head deflection and illumination conditions, the symmetry analysis of the central axis of both eyes and the feature regions on both sides is used to quantitatively estimate the probability and degree of head deflection, and further evaluate its impact on illumination distribution.
[0031] First, the midline of the eyes on the face is determined by the location and distribution of key feature points, providing a unified geometric benchmark for subsequent symmetrical region analysis. In this embodiment of the invention, skin color detection and connected component analysis are first performed on the real-time face image to determine the face region and generate the bounding rectangle of the face region. Background pixel interference is eliminated by skin color feature filtering to ensure the accuracy of face region localization. Specifically, the real-time face image is converted from the RGB color space to the YCbCr color space, and a binary mask image is generated based on preset skin color Cb and Cr component thresholds. Then, the connected component with the largest area is selected through connected component analysis to determine the face region, and the coordinates and size parameters of the bounding rectangle of the face region are calculated accordingly. It should be noted that spatial transformation and the acquisition of the bounding rectangle are techniques well known to those skilled in the art and are not limited herein.
[0032] Then, the line connecting the feature points of the eyes in the real-time face image is obtained, and the direction of the perpendicular line of the line is taken as the symmetry direction. Since the line connecting the eyes should be horizontal when the face is facing forward, but will rotate when the head is tilted, its perpendicular direction can adaptively reflect the current vertical symmetry axis of the face.
[0033] Since the nasal root feature point is the natural center of symmetry of the face, its position is highly stable and it is located on the perpendicular bisector of the line connecting the eyes. Starting from the nasal root feature point, the line extends bidirectionally along the symmetrical direction to the upper and lower boundaries of the circumscribed rectangle. During the extension process, the effective line segment points are marked pixel by pixel to ensure that the line segments are always within the facial area, until the extension stops at the boundary of the circumscribed rectangle of the facial area. The line segment formed after the extension is used as the central axis of the eyes. This central axis becomes the core geometric basis for dividing the left and right symmetrical feature areas of the face, and it adaptively adjusts with the head posture to ensure the accuracy of the division of the two sides.
[0034] Considering the high symmetry of the feature regions on both sides of the midline of the eyes, significant differences in texture details and geometric positions will occur if head rotation occurs. Joint analysis of texture distribution differences and geometric position differences can more robustly quantify the degree of head rotation. In this embodiment, local texture regions of a preset size are extracted on both sides of the midline of the eyes, centered on each key feature point of the eyes. The preset size can be optimized according to the resolution of the face image, balancing texture detail preservation and computational efficiency. Specifically, a 32×32 pixel square region is selected as the local texture region, ensuring that the region completely contains the core texture information surrounding the feature points of both eyes.
[0035] Local texture feature vectors are obtained from each local texture region using the LBP operator. The grayscale texture variation patterns within the region are extracted using the LBP operator, generating rotationally invariant quantized texture features that effectively extract microscopic texture structures. The difference in local texture feature vectors between the local texture regions on both sides of the midline of the eyes is used as a texture distribution difference feature. Specifically, Euclidean distance can be used to calculate the similarity of the feature vectors on both sides; a larger distance indicates a greater difference between the two vectors, representing a higher degree of texture asymmetry on both sides, suggesting head deflection or occlusion.
[0036] The method further analyzes the distance deviations of key feature points on both sides of the midline of the eyes from the midline. In a frontal view, the distances from both eyes to the midline should be equal. If the head is turned, the distance on one side shortens due to perspective projection, while the distance on the other side lengthens. Therefore, the difference in pixel distances from the same source key feature points on both sides to the midline of the eyes is calculated to characterize the degree of geometric positional asymmetry caused by head rotation. Finally, combining the distance deviation and texture distribution difference features, a head rotation confidence score is obtained. In this embodiment, the distance deviation and texture distribution difference features are weighted and summed to obtain the head rotation confidence score. The higher the head rotation confidence score, the greater the degree of head deviation from the facing direction. It should be noted that the weights can be adjusted according to the actual scene. The weight of geometric position features can be higher because it is less affected by lighting; for example, the weight of distance deviation is 0.6, and the weight of texture distribution difference features is 0.4.
[0037] When the head is turned, facial structures such as the bridge of the nose and cheekbones can block light, resulting in shadows on the shaded side and overexposure on the illuminated side. Therefore, the coupled lighting situation needs to be specifically corrected based on the confidence level of head rotation to eliminate the interference of inherent shadows and quantify the actual impact of uneven lighting. In this embodiment of the invention, the shaded side and the illuminated side are determined based on the grayscale distribution on both sides of the central axis of the eyes. Since grayscale values and brightness are positively correlated in digital grayscale images, a higher grayscale mean indicates more sufficient lighting on that side, and a lower grayscale mean indicates less lighting. Specifically, the grayscale values of pixels in all facial feature regions on both sides of the central axis of the eyes are statistically analyzed, and the overall grayscale mean of each side is calculated. Since the illuminated side is usually brighter, the side with a larger grayscale mean is designated as the illuminated side, and the side with a smaller grayscale mean is designated as the shaded side.
[0038] A lighting compensation factor is constructed using head deflection confidence. This factor is positively correlated with head deflection confidence; a higher confidence indicates a more significant influence of inherent shadows, requiring a higher degree of lighting compensation. Specifically, the sum of the numerical value of 1 and the normalized head deflection confidence is used as the lighting compensation factor. Normalization can be achieved using a hyperbolic tangent function to compensate for the backlit side. As an example, the expression for the lighting compensation factor is: In the formula, This is represented as the illumination compensation factor. This is represented as the head deflection confidence level. It is represented as the hyperbolic tangent function.
[0039] Furthermore, by combining the illumination compensation factor and the average grayscale value of the backlit side, the compensated average grayscale value of the backlit side is obtained. In this embodiment of the invention, the product of the illumination compensation factor and the average grayscale value of the backlit side is used as the compensated average grayscale value. Simultaneously, in this embodiment of the invention, the compensated average grayscale value is limited to not exceeding the average grayscale value of the illuminated side. That is, when the compensated average grayscale value is greater than the average grayscale value of the illuminated side, the difference between the average grayscale value of the illuminated side and a preset adjustment coefficient is used as the compensated average grayscale value. The preset adjustment coefficient can be set to 1, which can be adjusted by the implementer to prevent image grayscale distortion due to over-compensation and ensure that the compensated data conforms to the actual lighting scene.
[0040] Finally, based on the deviation between the average grayscale value on the illuminated side and the average compensated grayscale value on the backlit side, the deflection illumination coupling coefficient is obtained to quantify the degree of coupling between head deflection and illumination unevenness. In this embodiment of the invention, the difference between the average grayscale value on the illuminated side and the average compensated grayscale value on the backlit side is normalized to obtain the deflection illumination coupling coefficient. The larger the value, the higher the degree of coupling between head deflection and illumination unevenness. In this embodiment of the invention, the normalization method can preferably be mean normalization to ensure a uniform range of values for the coupling coefficient, facilitating subsequent calculation and fusion with the basic attention weights.
[0041] Thus, by constructing the midline of the eyes on the face, the confidence of head deflection was quantitatively calculated and the deflection illumination coupling coefficient was further analyzed, providing a basis for the dynamic gain adjustment of the subsequent basic attention weight.
[0042] S3: Adjust the dynamic gain of the basic attention weights according to the deflection illumination coupling coefficient to obtain dynamic attention weights; use the dynamic attention weights to guide the recognition model to perform feature extraction and matching on real-time face images.
[0043] Based on the deflection illumination coupling coefficient, the pre-configured basic attention weights for facial features are dynamically adjusted. When the coupling coefficient is large, it indicates that the facial features become blurred due to head deflection and shadow occlusion. In this case, it is necessary to increase the recognition weight for these blurred areas, forcing the model to invest more computational resources in high-risk areas to uncover potential detailed features.
[0044] In this embodiment of the invention, the product of the deflection illumination coupling coefficient and the basic attention weight is used as the weight gain, quantifying the additional attention weight required due to head deflection and illumination coupling. A larger coupling coefficient results in a higher gain, corresponding to a higher recognition attention allocation for the corresponding feature region. The sum of the weight gain and the basic attention weight is used as the dynamic attention weight. Simultaneously, the dynamic attention weights for all facial feature regions are normalized, such as using Softmax normalization, to ensure the total weight sum is 1, preventing weight imbalance from affecting the calculation logic of the recognition model.
[0045] Leveraging the self-attention mechanism of the visual Transformer model, dynamic attention weights are integrated into the feature extraction process to achieve precise focusing on high-weight feature regions. In a specific embodiment of this invention, the real-time face image is divided into a sequence of image blocks according to a preset size, and each image block is converted into a first token sequence. A linear mapping is used to convert the pixel information of each image block into a fixed-dimensional token vector, ensuring that the input data conforms to the model's processing format requirements. The preset size is set according to the face image resolution and the model input dimension; for example, the image is divided into 16×16 pixel image blocks, balancing feature detail preservation with model computational efficiency.
[0046] The dynamic attention weights of each facial feature region are then vectorized to form a second token sequence. This second token sequence has the same dimensionality as the first token sequence, and each weight vector corresponds to the attention priority of an image patch, with higher weight feature regions corresponding to higher token vector values. The second token sequence is concatenated with the first token sequence and then input into the visual Transformer model. The concatenated sequence contains both pixel feature information of the facial image and contextualized weight guidance information, allowing the model to specifically enhance the extraction of core feature regions. It should be noted that the concatenation operation is completed in the model's embedding layer, ensuring that the weight information and image feature information enter the self-attention calculation stage simultaneously, without disrupting the model's original calculation process.
[0047] The visual Transformer model uses a self-attention mechanism to allocate higher computational attention to image patch features corresponding to high-weight facial feature regions in the first token sequence based on the weight information carried by the second token sequence. It prioritizes the calculation of self-attention scores for high-weight image patches, thereby improving the extraction accuracy of features in that region. In other words, when calculating the attention matrix, the model will amplify the attention coefficients related to high-risk feature regions according to the instructions of the weight tokens, suppress background noise, and enhance the response of key features.
[0048] In this embodiment of the invention, the weighted and fused feature vector output by the model is compared with a preset facial feature database to calculate the cosine similarity, thus completing feature extraction and identity matching. When the similarity exceeds a preset similarity threshold, identity verification is deemed successful; otherwise, an alarm or further verification process is triggered. In this embodiment, the preset similarity threshold can be set to 0.6, which can be adjusted by the implementer.
[0049] Through this dynamic weight guidance mechanism, a high-precision identity locking capability is maintained under non-cooperative posture and complex lighting conditions, reducing the false judgment rate of security risks and realizing intelligent and refined management and control of the computer system.
[0050] In summary, this invention first assesses the risk level based on operational behavior, ensuring that the basic focus on core facial features is automatically increased during high-risk operations, thus achieving tiered control. Secondly, it quantifies the confidence level of head deflection using the midline of the eyes and the distribution of feature points, and calculates the deflection-illumination coupling coefficient based on differences in illumination distribution. This characterizes the degree of facial feature blurring caused by the superposition of posture and illumination, making the quantitative analysis of scene interference factors more realistic. Finally, based on this coupling coefficient, the feature attention weight is dynamically adjusted, forcing the recognition model to invest more computational attention in high-interference areas, effectively compensating for the loss of feature details. This invention constructs a dynamic mapping mechanism between risk level and facial feature attention weight, improving the accuracy of identity recognition capabilities and reducing the false positive rate of security risks under non-ideal operator cooperation, ensuring the compliant and secure operation of the computer system.
[0051] The present invention also provides a computer management and identification system based on face recognition, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps of the computer management and identification method based on face recognition described above.
[0052] It should be noted that the order of the above embodiments of the present invention is merely for descriptive purposes and does not represent the superiority or inferiority of the embodiments. The processes depicted in the accompanying drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0053] The various embodiments in this specification are described in a progressive manner. The same or similar parts between the various embodiments can be referred to each other. Each embodiment focuses on describing the differences from other embodiments.
Claims
1. A computer management identification method based on facial recognition, characterized in that, The method includes: Acquire the operational behavior data of the target object, and determine the current risk level based on the operational behavior data; according to the risk level, determine the basic attention weight of the facial feature region to which each key feature point in the real-time facial image of the target object belongs; the key feature points include at least: eye feature points and nasal root feature points; The eye midline of the face is determined by the location and distribution of key feature points; the differences in texture distribution and geometric position of symmetrical feature regions on both sides of the eye midline are analyzed to determine the head deflection confidence; the head deflection confidence is used to correct the illumination distribution on both sides of the eye midline, and the difference in grayscale distribution on both sides is analyzed to obtain the deflection illumination coupling coefficient. The dynamic attention weight is obtained by dynamically adjusting the gain of the basic attention weight based on the deflection illumination coupling coefficient; the dynamic attention weight is then used to guide the recognition model to extract and match features from real-time face images.
2. The computer management identification method based on face recognition according to claim 1, characterized in that, The determination of the current risk level based on operational behavior data includes: For real-time monitoring of the operational behavior data of the target object, when abnormal operational behavior is detected, the risk value of the corresponding abnormal operational behavior is accumulated to obtain the current cumulative risk score; different risk levels are preset with corresponding score threshold ranges, and the risk level corresponding to the current cumulative risk score being within the score threshold range is taken as the current risk level.
3. The computer management identification method based on face recognition according to claim 1, characterized in that, The method of determining the midline of the eyes on the face by analyzing the location and distribution of key feature points includes: Perform skin color detection and connected component analysis on real-time face images to determine the face region and generate the bounding rectangle of the face region; obtain the connection between the feature points of the eyes in the real-time face image, and take the perpendicular direction of the connection as the symmetry direction; Starting from the nasal root feature point, extend in both directions along the symmetrical direction to the upper and lower boundaries of the circumscribed rectangle until it stops at the boundary of the circumscribed rectangle of the face area. The line segment formed after the extension is used as the midline of the eyes.
4. The computer management identification method based on face recognition according to claim 1, characterized in that, The method for obtaining the head deflection confidence includes: On both sides of the central axis of the eyes, local texture regions of a preset size are extracted, centered on each key feature point of the eyes. The local texture feature vector in each local texture region is obtained based on the LBP operator; the difference in local texture feature vectors between the local texture regions on both sides of the midline of the eyes is used as the texture distribution difference feature. The distance deviations of key feature points on both sides of the midline of the eyes from the midline are analyzed; the confidence level of head deflection is obtained by combining the distance deviation with the difference in texture distribution.
5. The computer management identification method based on face recognition according to claim 1, characterized in that, The method for obtaining the deflection illumination coupling coefficient includes: The backlight side and the light-receiving side are determined based on the grayscale distribution on both sides of the midline of the eyes; An illumination compensation factor was constructed using the head deflection confidence level, and the illumination compensation factor was positively correlated with the head deflection confidence level. The compensation gray value of the backlight side was obtained by combining the illumination compensation factor and the gray value mean of the backlight side. The deflection light coupling coefficient is obtained based on the deviation between the gray-scale mean on the light-receiving side and the compensated gray-scale mean on the backlight side.
6. The computer management identification method based on face recognition according to claim 5, characterized in that, The determination of the backlight side and the light-receiving side based on the grayscale distribution on both sides of the central axis of the eyes includes: The gray values of pixels in all facial feature regions on both sides of the midline of the eyes are counted separately. The overall gray value of each side is calculated, and the side with the larger gray value is taken as the illuminated side, and the side with the smaller gray value is taken as the backlit side.
7. The computer management identification method based on face recognition according to claim 1, characterized in that, The process of dynamically adjusting the gain of the basic attention weight based on the deflection illumination coupling coefficient to obtain the dynamic attention weight includes: The product of the deflection illumination coupling coefficient and the basic attention weight is used as the weight gain; the sum of the weight gain and the basic attention weight is used as the dynamic attention weight.
8. The computer management identification method based on face recognition according to claim 1, characterized in that, The step of using the dynamic attention weight-guided recognition model to extract and match features from real-time face images includes: The real-time face image is divided into a sequence of image blocks according to a preset size, and each image block is converted into a first token sequence; the dynamic attention weights of each facial feature region are vectorized to form a second token sequence; the second token sequence is concatenated with the first token sequence and then input into the visual Transformer model; The visual Transformer model uses a self-attention mechanism to allocate higher computational attention to image block features corresponding to high-weight facial feature regions in the first token sequence based on the weight information carried by the second token sequence, thereby completing feature extraction and identity matching.
9. The computer management identification method based on face recognition according to claim 1, characterized in that, The determination of the basic attention weights for each key feature point in the real-time facial image of the target object based on the risk level includes: A five-point feature detection algorithm is used to extract key feature points in real-time face images. The key feature points include eye feature points, nose root feature points, and left and right corners of mouth feature points. Based on historical data, a mapping table is pre-generated to correspond risk levels and attention weights for facial feature regions. According to the current risk level of the target object, the attention weights of the corresponding facial feature regions are retrieved from the mapping table as the basic attention weights of the facial feature regions to which each key feature point belongs.
10. A computer management and identification system based on face recognition, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the computer management and identification method based on face recognition as described in any one of claims 1 to 9.