Face recognition false brushing prevention feature optimization method and device, equipment and storage medium
By comparing initial and auxiliary feature values obtained in the face recognition system, abnormal fluctuation results are eliminated, and the threshold is dynamically adjusted when the number of recognitions reaches a preset number. This solves the problem of false recognition caused by environmental interference and fixed thresholds in the face recognition system, and improves the recognition accuracy and the ability to prevent false recognition.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- LICHU BUSINESS
- Filing Date
- 2025-12-08
- Publication Date
- 2026-04-17
AI Technical Summary
Existing facial recognition systems are prone to misidentification due to environmental interference during a single comparison, and fixed thresholds cannot adapt to individual user differences, resulting in a high false scan rate.
By acquiring the initial feature values entered by the user during the first entry and the auxiliary feature values of the most recent face recognition, comparisons are made in subsequent recognitions to eliminate abnormal fluctuations. When the number of recognitions reaches a preset number, the recognition threshold is dynamically adjusted. The interquartile range is used to determine the boundary of outliers, eliminate abnormal fluctuations, and dynamically adjust the threshold to adapt to the user's long-term stable mode.
It significantly improves recognition accuracy, effectively avoids recognition failures caused by fixed thresholds, improves the speed and efficiency of facial recognition anti-false scanning feature optimization, adapts to individual user differences, and reduces the false scanning rate.
Smart Images

Figure CN121259899B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of facial recognition processing technology, and in particular to a method, apparatus, device, and storage medium for optimizing facial recognition features to prevent accidental scanning. Background Technology
[0002] When using facial recognition for payment, even if the facial recognition algorithm itself has an accuracy rate of over 99.99%, there are still frequent reports of false scans when there are millions of facial recognition payment orders.
[0003] Currently, most facial recognition algorithms on the market use a base image or a feature value generated from an image. When a user makes a facial recognition payment, the image is directly compared with the currently saved base image or feature value. This single comparison has two drawbacks: firstly, there are cases where recognition is not possible or is misidentified; secondly, it is easy for the recognition to become unsatisfactory over time due to changes in the student's growth, development, hairstyle, glasses, etc.
[0004] Furthermore, the global system generally uses a fixed threshold to determine whether all user recognition is successful; if the recognition score exceeds the threshold, it is considered successful. However, each person's situation is different. If the threshold is set too low, it is easy for false scans to occur. If the threshold is set too high, it is easy for normal users to be unable to scan their faces and be blocked. Summary of the Invention
[0005] The main objective of this invention is to provide a method, apparatus, device, and storage medium for optimizing features to prevent false recognition in face recognition systems. This invention aims to solve the technical problems of high false recognition rates in existing face recognition systems, where false recognition is easily caused by environmental interference during a single comparison, and where fixed thresholds cannot adapt to individual user differences.
[0006] In a first aspect, the present invention provides a method for optimizing features to prevent accidental swiping in face recognition, the method comprising the following steps:
[0007] Obtain the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition;
[0008] In subsequent face recognition, the current face image is compared with both the initial feature value and the auxiliary feature value to exclude abnormal fluctuation results.
[0009] When the number of times a user performs face recognition exceeds a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations.
[0010] Optionally, obtaining the initial feature values of the user's first registered face and the auxiliary feature values of the user's most recent face recognition includes:
[0011] When a user first registers their face, an initial feature value is generated using a preset recognition threshold.
[0012] When the user performs subsequent face recognition, the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores is automatically recorded and saved as an auxiliary feature value.
[0013] Optionally, the step of automatically recording and saving the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as auxiliary feature values during subsequent face recognition by the user includes:
[0014] When the user enters subsequent face recognition, the system automatically monitors each successful recognition operation in real time and stores the current recognition frame and the corresponding current recognition score in the user's exclusive historical database.
[0015] When a new identification frame is detected with a score higher than the lowest score among the preset highest scores already saved in the historical database, the identification frame corresponding to the lowest score is automatically replaced.
[0016] Save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
[0017] Optionally, in subsequent face recognition, comparing the current face image simultaneously with the initial feature value and the auxiliary feature value to exclude abnormal fluctuations includes:
[0018] In subsequent face recognition, the currently captured face image is compared in parallel with the initial feature value and the auxiliary feature value to obtain recognition scores from multiple comparison results;
[0019] Abnormal fluctuations in each identification score are automatically excluded based on historical identification scores.
[0020] Optionally, the step of automatically excluding abnormal fluctuations in each identification score based on historical identification scores includes:
[0021] Obtain statistical distribution data of historical recognition scores;
[0022] The interquartile range is used to determine the outlier boundaries of the statistical distribution data.
[0023] Each identification score is compared with the outlier boundary, and the identification score that falls within the outlier boundary is taken as the result of the abnormal fluctuation.
[0024] Optionally, determining the outlier boundaries of the statistical distribution data using the interquartile range includes:
[0025] The interquartile range (IQR) is used to calculate the quartiles and IQR of the statistical distribution data. Based on the quartiles and IQR, the upper and lower bounds of outliers are determined using the following formula:
[0026]
[0027]
[0028]
[0029] in, Interquartile range, It is the third quartile. It is the first quartile. This is the upper bound for outliers. This is the lower bound for outliers;
[0030] The outlier boundary is determined based on the upper and lower bounds of the outlier.
[0031] Optionally, when the user's cumulative number of face recognition attempts exceeds a preset number, dynamically adjusting the preset recognition score threshold based on the target historical recognition score after excluding abnormal fluctuations includes:
[0032] When the user's cumulative number of face recognition attempts exceeds a preset number, the target historical recognition score is obtained after excluding the abnormal fluctuation results;
[0033] The preset identification score threshold is adjusted to a preset abnormal fluctuation lower limit value based on the target historical identification score.
[0034] Secondly, to achieve the above objectives, the present invention also proposes a facial recognition anti-mistake feature optimization device, the facial recognition anti-mistake feature optimization device comprising:
[0035] The feature value acquisition module is used to acquire the initial feature value of the user's first face registration and the auxiliary feature value of the user's most recent face recognition.
[0036] The anomaly exclusion module is used to compare the current face image with the initial feature value and the auxiliary feature value simultaneously in subsequent face recognition to exclude abnormal fluctuation results.
[0037] The dynamic adjustment module is used to dynamically adjust the preset recognition score threshold based on the target historical recognition score after excluding abnormal fluctuations when the user's cumulative number of face recognition attempts exceeds a preset number.
[0038] Thirdly, to achieve the above objectives, the present invention also proposes a face recognition anti-mistake feature optimization device, which includes: a memory, a processor, and a face recognition anti-mistake feature optimization program stored in the memory and executable on the processor. The face recognition anti-mistake feature optimization program is configured to implement the steps of the face recognition anti-mistake feature optimization method described above.
[0039] Fourthly, to achieve the above objectives, the present invention also proposes a storage medium storing a face recognition anti-mistake feature optimization program, wherein when the face recognition anti-mistake feature optimization program is executed by a processor, the face recognition anti-mistake feature optimization method described above is implemented.
[0040] The facial recognition anti-false-scanning feature optimization method proposed in this invention obtains the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition. In subsequent face recognition, the current face image is compared with both the initial feature values and the auxiliary feature values simultaneously to exclude abnormal fluctuation results. When the user's cumulative number of face recognition attempts exceeds a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding the abnormal fluctuation results. This significantly improves the recognition accuracy, effectively avoids recognition failures caused by fixed thresholds, and achieves adaptive optimization of the threshold to match the user's long-term stable recognition pattern, thereby improving the speed and efficiency of facial recognition anti-false-scanning feature optimization. Attached Figure Description
[0041] Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention;
[0042] Figure 2 This is a flowchart illustrating the first embodiment of the face recognition anti-mistake feature optimization method of the present invention;
[0043] Figure 3 This is a flowchart illustrating the second embodiment of the face recognition anti-mistake feature optimization method of the present invention;
[0044] Figure 4 This is a flowchart illustrating the third embodiment of the face recognition anti-mistake feature optimization method of the present invention;
[0045] Figure 5 This is a flowchart illustrating the fourth embodiment of the face recognition anti-mistake feature optimization method of the present invention;
[0046] Figure 6 This is a functional block diagram of the first embodiment of the face recognition anti-misreading feature optimization device of the present invention.
[0047] The realization of the objective, functional features and advantages of the present invention will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
[0049] The solution of this invention mainly involves: acquiring the initial feature value of the user's first face registration and the auxiliary feature value of the user's most recent face recognition; in subsequent face recognition, comparing the current face image with both the initial feature value and the auxiliary feature value simultaneously to exclude abnormal fluctuation results; when the user's cumulative face recognition count exceeds a preset number, dynamically adjusting the preset recognition score threshold based on the target historical recognition score after excluding the abnormal fluctuation results. This significantly improves recognition accuracy, effectively avoids recognition failure caused by fixed thresholds, and achieves adaptive optimization of the threshold to match the user's long-term stable recognition pattern. It improves the speed and efficiency of face recognition anti-false recognition feature optimization, and solves the technical problem in the prior art where face recognition systems are easily misidentified due to environmental interference in a single comparison, and fixed thresholds cannot adapt to individual user differences, resulting in a high false recognition rate.
[0050] Reference Figure 1 , Figure 1 This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present invention.
[0051] like Figure 1 As shown, the device may include: a processor 1001, such as a CPU; a communication bus 1002; a user interface 1003; a network interface 1004; and a memory 1005. The communication bus 1002 is used to enable communication between these components. The user interface 1003 may include a display screen or an input unit such as a keyboard; optionally, the user interface 1003 may also include a standard wired interface or a wireless interface. The network interface 1004 may optionally include a standard wired interface or a wireless interface (such as a Wi-Fi interface). The memory 1005 may be high-speed RAM or non-volatile memory, such as a disk drive. Optionally, the memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0052] Those skilled in the art will understand that Figure 1 The device structure shown does not constitute a limitation on the device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.
[0053] like Figure 1As shown, the memory 1005, which serves as a storage medium, may include an operating device, a network communication module, a user interface module, and a face recognition anti-misreading feature optimization program.
[0054] The device of this invention calls the face recognition anti-mistake feature optimization program stored in the memory 1005 through the processor 1001, and performs the following operations:
[0055] Obtain the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition;
[0056] In subsequent face recognition, the current face image is compared with both the initial feature value and the auxiliary feature value to exclude abnormal fluctuation results.
[0057] When the number of times a user performs face recognition exceeds a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations.
[0058] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0059] When a user first registers their face, an initial feature value is generated using a preset recognition threshold.
[0060] When the user performs subsequent face recognition, the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores is automatically recorded and saved as an auxiliary feature value.
[0061] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0062] When the user enters subsequent face recognition, the system automatically monitors each successful recognition operation in real time and stores the current recognition frame and the corresponding current recognition score in the user's exclusive historical database.
[0063] When a new identification frame is detected with a score higher than the lowest score among the preset highest scores already saved in the historical database, the identification frame corresponding to the lowest score is automatically replaced.
[0064] Save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
[0065] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0066] In subsequent face recognition, the currently captured face image is compared in parallel with the initial feature value and the auxiliary feature value to obtain recognition scores from multiple comparison results;
[0067] Abnormal fluctuations in each identification score are automatically excluded based on historical identification scores.
[0068] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0069] Obtain statistical distribution data of historical recognition scores;
[0070] The interquartile range is used to determine the outlier boundaries of the statistical distribution data.
[0071] Each identification score is compared with the outlier boundary, and the identification score that falls within the outlier boundary is taken as the result of the abnormal fluctuation.
[0072] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0073] The interquartile range (IQR) is used to calculate the quartiles and IQR of the statistical distribution data. Based on the quartiles and IQR, the upper and lower bounds of outliers are determined using the following formula:
[0074]
[0075]
[0076]
[0077] in, Interquartile range, It is the third quartile. It is the first quartile. This is the upper bound for outliers. This is the lower bound for outliers;
[0078] The outlier boundary is determined based on the upper and lower bounds of the outlier.
[0079] The device of the present invention, through processor 1001 calling the face recognition anti-mistake feature optimization program stored in memory 1005, also performs the following operations:
[0080] When the user's cumulative number of face recognition attempts exceeds a preset number, the target historical recognition score is obtained after excluding the abnormal fluctuation results;
[0081] The preset identification score threshold is adjusted to a preset abnormal fluctuation lower limit value based on the target historical identification score.
[0082] This embodiment, through the above-described scheme, obtains the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition. In subsequent face recognition, the current face image is compared with both the initial feature values and the auxiliary feature values simultaneously to exclude abnormal fluctuations. When the user's cumulative face recognition attempts exceed a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations. This significantly improves recognition accuracy, effectively avoids recognition failures caused by fixed thresholds, and achieves adaptive optimization of the threshold to match the user's long-term stable recognition pattern, thereby improving the speed and efficiency of face recognition anti-false scanning feature optimization.
[0083] Based on the above hardware structure, an embodiment of the face recognition anti-mistake feature optimization method of the present invention is proposed.
[0084] Reference Figure 2 , Figure 2 This is a flowchart illustrating the first embodiment of the face recognition anti-mistake feature optimization method of the present invention.
[0085] In the first embodiment, the face recognition anti-mistake feature optimization method includes the following steps:
[0086] Step S10: Obtain the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition.
[0087] It should be noted that the feature values of the background image generated when the user first enters their face are used as the initial feature values, and the feature values of the user's most recent preset number of recognitions are automatically recorded as auxiliary feature values.
[0088] Step S20: In subsequent face recognition, the current face image is compared with both the initial feature value and the auxiliary feature value to exclude abnormal fluctuation results.
[0089] It should be understood that in subsequent face recognition, the current face image can be compared with the initial feature value and the auxiliary feature value at the same time, and then statistical methods can be used to exclude results with obvious fluctuations in recognition score, thereby eliminating abnormal fluctuation results.
[0090] Step S30: When the number of times the user's face recognition is accumulated exceeds the preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding the abnormal fluctuation results.
[0091] It is understandable that when the number of times a user performs face recognition exceeds the preset number, the preset recognition score threshold can be dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations.
[0092] This embodiment, through the above-described scheme, obtains the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition. In subsequent face recognition, the current face image is compared with both the initial feature values and the auxiliary feature values simultaneously to exclude abnormal fluctuations. When the user's cumulative face recognition attempts exceed a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations. This significantly improves recognition accuracy, effectively avoids recognition failures caused by fixed thresholds, and achieves adaptive optimization of the threshold to match the user's long-term stable recognition pattern, thereby improving the speed and efficiency of face recognition anti-false scanning feature optimization.
[0093] Furthermore, Figure 3 This is a flowchart illustrating the second embodiment of the face recognition anti-mistake feature optimization method of the present invention, as shown below. Figure 3 As shown, based on the first embodiment, a second embodiment of the face recognition anti-mistake feature optimization method of the present invention is proposed. In this embodiment, step S10 specifically includes the following steps:
[0094] Step S11: When a user first registers their face, an initial feature value is generated using a preset recognition threshold.
[0095] It should be noted that when a user registers their face for the first time, a preset recognition threshold (i.e., the default value) can be used to generate initial feature values.
[0096] In the actual implementation, when a user first registers their face, the default recognition threshold is used. At this time, the registered face... Figure 1 High-definition cameras, such as those used in mobile phones, typically capture clear images, serving as the primary basis for identification. The identification score threshold refers to the score given by the algorithm after a user scans their face. Only when the score is greater than the identification score threshold can the user be considered successfully identified. Generally, the default identification score threshold is not set very high, for example, 80 points (out of 100).
[0097] Step S12: When the user performs subsequent face recognition, automatically record and save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
[0098] It should be understood that during the subsequent face recognition process, the system automatically records and saves the user's highest recent face recognition score of a preset number of times, such as 5 recognition frames, as an auxiliary feature value. Of course, it can also be the number of times corresponding to other values, such as 6, 7, 10, etc. This embodiment does not limit this.
[0099] Furthermore, step S12 specifically includes the following steps:
[0100] When the user enters subsequent face recognition, the system automatically monitors each successful recognition operation in real time and stores the current recognition frame and the corresponding current recognition score in the user's exclusive historical database.
[0101] When a new identification frame is detected with a score higher than the lowest score among the preset highest scores already saved in the historical database, the identification frame corresponding to the lowest score is automatically replaced.
[0102] Save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
[0103] Understandably, during subsequent face recognition by the user, the system can automatically monitor each successful recognition operation in real time and store the current recognition frame and its corresponding recognition score in the user's exclusive historical database. When the score of a new recognition frame is higher than the lowest score among the five highest scores currently saved (taking a preset number of five times as an example), the system automatically replaces the frame with the lowest score, ensuring that the auxiliary feature value list always dynamically maintains the recognition frames with the highest scores in the user's most recent five recognitions. These auxiliary feature values are converted into standardized feature vectors through feature extraction algorithms and participate in the multi-round comparison process of subsequent face recognition together with the initial feature values, effectively filtering out fluctuations in recognition scores caused by environmental interference or changes in individual status.
[0104] In the actual implementation, during the first face recognition comparison, the video stream of the current camera is compared with the background image. If the recognition is successful and there is only one comparison result, the current recognition frame and recognition score are recorded; if there are multiple comparison results, the user needs to verify again.
[0105] When a user performs a facial recognition scan, the captured frames from the video stream are compared with the background image library in three rounds. In each round, the recognition scores of all comparison results are sorted from highest to lowest, and the top 5 results are returned. That is, a facial recognition scan returns 15 results, which are then filtered according to a recognition score threshold. Results with scores higher than the threshold are retained, while those lower are excluded. Finally, all results are combined. If all results indicate the same person, the user is successfully identified. If all results indicate multiple users, the user needs to undergo secondary verification. Secondary verification involves the user manually entering their mobile phone number, the last four digits of their mobile phone number, or the last four digits of their ID card to assist in the identification. The user whose name matches the verification result is considered to have been successfully identified.
[0106] This step aims to reduce the chance of false identification in a single instance by increasing the number of identification rounds and results, and to identify the correct user through manual secondary verification by the user.
[0107] The current recognition frame and recognition score are uploaded to the server. Feature values are also extracted from the current recognition frame to assist in recognition. The server will dynamically save the 5 results with the highest recognition scores for the same user in the most recent period.
[0108] The reason for adding an auxiliary identification base image for the same user at this step is to make the user result set retrieved in each round of face scanning more accurate, as mentioned in the previous step. If a user only has one base image, then in each round of normal face scanning, there will generally only be one result exceeding the recognition score threshold in the result set, which still leaves a very small probability of false scans.
[0109] This embodiment, through the above-described scheme, generates initial feature values using a preset recognition score threshold when the user first registers their face; during subsequent face recognition by the user, it automatically records and saves the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as auxiliary feature values; this can significantly reduce the recognition failure rate caused by differences in appearance, while providing an accurate data foundation for subsequent multi-round comparisons and dynamic threshold optimization, thereby improving the stability and anti-false scanning capability of the face recognition system.
[0110] Furthermore, Figure 4 This is a flowchart illustrating the third embodiment of the face recognition anti-mistake feature optimization method of the present invention, as shown below. Figure 4 As shown, based on the first embodiment, a third embodiment of the face recognition anti-mistake feature optimization method of the present invention is proposed. In this embodiment, step S20 specifically includes the following steps:
[0111] Step S21: In subsequent face recognition, the currently captured face image is compared in parallel with the initial feature value and the auxiliary feature value to obtain recognition scores of multiple comparison results.
[0112] It should be noted that in the subsequent face recognition process, the currently captured face image can be compared in parallel with the initial feature value (the background image feature entered by the user for the first time) and the auxiliary feature value (the feature of the 5 most recent recognition frames with the highest recognition scores, taking a preset number of 5 times as an example) to obtain the recognition scores of multiple comparison results.
[0113] Step S22: Automatically exclude abnormal fluctuation results in each identification score based on historical identification scores.
[0114] Understandably, statistical distribution based on historical recognition scores can automatically exclude abnormal results with significant fluctuations in recognition scores, retaining only reliable comparison results that conform to the user's long-term stable recognition pattern, thereby effectively improving recognition accuracy and significantly reducing the risk of false recognition.
[0115] In the actual implementation, subsequent user identification will simultaneously compare the original background image and the auxiliary identification background image. Based on the identification score of each comparison, statistical methods will be used to eliminate results with obvious fluctuations, thereby improving the probability of correct identification results. This step is to prevent the user from being mistakenly identified as someone else.
[0116] When there are other auxiliary verification base maps or feature values for the same person in the base map library, the result set indicates that there will be more results for that user; if all the results in the result set point to the same user, it means that the user has been successfully identified; even if there are some results in the result set that point to other users, they can be directly filtered out or the user can be asked to perform secondary verification based on the proportion and score of such results.
[0117] By directly eliminating obviously erroneous or fluctuating results based on predefined logic, the need for secondary verification by users can be reduced, increasing the smoothness of the user experience. Even if secondary verification does occur, the system can reinforce the learning of the true characteristics of the user based on the results of that secondary verification. As the result set gradually increases, the user experience will become increasingly smoother.
[0118] Furthermore, step S22 specifically includes the following steps:
[0119] Obtain statistical distribution data of historical recognition scores;
[0120] The interquartile range is used to determine the outlier boundaries of the statistical distribution data.
[0121] Each identification score is compared with the outlier boundary, and the identification score that falls within the outlier boundary is taken as the result of the abnormal fluctuation.
[0122] It should be noted that, based on the statistical distribution of users' historical face recognition scores, the Interquartile Range (IQR) method is automatically used to determine outlier boundaries, thereby identifying abnormal fluctuations. This allows for the real-time removal of abnormal scores caused by environmental interference, temporary occlusion, or changes in individual status during the comparison process, ensuring that only reliable results that conform to the user's long-term stable recognition pattern are retained, effectively improving the accuracy of face recognition and the ability to prevent false scans.
[0123] Furthermore, the step of determining the outlier boundaries of the statistical distribution data using the interquartile range specifically includes the following steps:
[0124] The interquartile range (IQR) is used to calculate the quartiles and IQR of the statistical distribution data. Based on the quartiles and IQR, the upper and lower bounds of outliers are determined using the following formula:
[0125]
[0126]
[0127]
[0128] in, Interquartile range, It is the third quartile. It is the first quartile. This is the upper bound for outliers. This is the lower bound for outliers;
[0129] The outlier boundary is determined based on the upper and lower bounds of the outlier.
[0130] Understandably, in statistical analysis, the interquartile range (IQR) method is used to calculate the outlier boundaries of the data distribution: First, the user's historical recognition scores are sorted, and the first quartile (Q1, i.e., the 25th percentile, indicating that 25% of the data are less than or equal to this value) and the third quartile (Q3, i.e., the 75th percentile, indicating that 75% of the data are less than or equal to this value) are calculated. The interquartile range (IQR) is defined as IQR = Q3 - Q1, representing the middle 50% of the data distribution range. The outlier boundaries are determined by the formula: lower bound = Q1 - 2 × IQR, upper bound = Q3 + 2 × IQR. Among them, 2 × IQR is used as an expansion factor to strictly define the range of abnormal fluctuations—recognition scores below the lower bound or above the upper bound are considered outliers (such as abnormal fluctuations caused by environmental interference or temporary occlusion), and are thus automatically removed in the comparison to ensure that only reliable results that conform to the user's long-term stable recognition pattern are retained.
[0131] This embodiment, through the above-described scheme, compares the currently captured face image with the initial feature value and the auxiliary feature value in parallel during subsequent face recognition, obtaining recognition scores from multiple comparison results; based on historical recognition scores, it automatically excludes abnormal fluctuation results among each recognition score, ensuring that only reliable results that conform to the user's long-term stable recognition pattern are retained, effectively improving the accuracy and anti-false scanning capability of face recognition, and increasing the speed and efficiency of face recognition anti-false scanning feature optimization.
[0132] Furthermore, Figure 5 This is a flowchart illustrating the fourth embodiment of the face recognition anti-mistake feature optimization method of the present invention, as shown below. Figure 5 As shown, based on the first embodiment, a fourth embodiment of the face recognition anti-mistake feature optimization method of the present invention is proposed. In this embodiment, step S30 specifically includes the following steps:
[0133] Step S31: When the user's cumulative number of face recognition attempts exceeds a preset number, obtain the target historical recognition score after excluding the abnormal fluctuation results.
[0134] It should be noted that when the user's cumulative number of face recognition attempts exceeds a preset number, abnormal fluctuations in the historical recognition scores can be filtered out to obtain the target historical recognition score after filtering.
[0135] Step S32: Adjust the preset identification score threshold to the preset abnormal fluctuation lower limit value based on the target historical identification score.
[0136] It is understood that the preset identification score threshold can be adjusted to a preset abnormal fluctuation lower limit value based on the target historical identification score.
[0137] It should be understood that when a user's cumulative number of face recognition attempts exceeds a preset threshold (e.g., 5 times), the system calculates the first quartile (Q1) and the third quartile (Q3) based on historical recognition scores, determines the interquartile range (IQR = Q3 - Q1) and outlier boundaries (lower bound = Q1 - 2 × IQR, upper bound = Q3 + 2 × IQR), and eliminates abnormal fluctuations in recognition scores that are below the lower bound or above the upper bound. Subsequently, the preset recognition score threshold is dynamically adjusted to the lower bound value (i.e., Q1 - 2 × IQR), so that the threshold can adapt to the user's long-term stable recognition pattern, effectively preventing others from misidentifying with low scores, while avoiding the problem of not being able to scan due to a fixed threshold, significantly improving the robustness of the system.
[0138] In practice, after more than 5 recognitions, the recognition score threshold for an individual user will also start to change dynamically based on the previous facial recognition results, to prevent others from misidentifying the user with a low score.
[0139] This step primarily addresses the default threshold. It's possible that users A and B might have similar appearances; A might be identified as A' with a score of 94 during facial recognition, while B, due to a similar angle, might also be identified as A', but with a score of only 84. To address this, besides directly excluding significantly fluctuating low scores from the result set as mentioned earlier, we can also dynamically increase the user's recognition score threshold for interception.
[0140] Logically, the identification scores of nearly one month or nearly 50 records have been stored. These results are processed according to the IQR method. By calculating the quartiles (Q1, Q3) and interquartile range (IQR) of the data distribution, outlier boundaries are defined: points below Q1-2×IQR or above Q3+2×IQR are considered outliers.
[0141] For example, after sorting, the recognition scores are 89, 90, 92, 92, 93, 94, 94, 94, 95; Q1 (25th percentile) = 92, Q3 (75th percentile) = 94, IQR = Q3 - Q1 = 2; the lower bound is Q1 - 2 * IQR = 88, and scores below 88 are defined as outliers; the current recognition threshold for this user is set at 88 points. If someone is recognized as this user by facial recognition but only scores 87 points, the recognition is considered a failure.
[0142] Of course, three special measures were taken to prevent erroneous interception.
[0143] Firstly, this score is also bound to the feature values of the current base image and the auxiliary base image. If the user changes the base image, the recognition score will still be restored to the default recognition score threshold.
[0144] Secondly, the highest recognition score threshold is set at 90, meaning it cannot exceed 90 points.
[0145] Finally, this score will be downgraded based on the user's inactivity time until it returns to the default value; for example, if a student user is on summer vacation and their recognition score threshold is 90, but they haven't used the service for two consecutive months, their recognition score threshold will be lowered to 87. This is to prevent users from being affected by changes in their appearance when using facial recognition.
[0146] This embodiment increases the sample size by performing multiple comparisons with a single face scan, and uses statistical methods to eliminate the extremely low probability of false scans; it optimizes the background image and feature values dynamically to adapt to the growth and development of users, especially students, thereby improving face scanning efficiency; and it optimizes the threshold dynamically, using different thresholds for each person to avoid situations where some people with high recognition scores are unable to be scanned due to others with low recognition scores.
[0147] This embodiment, through the above-described scheme, obtains a target historical recognition score after excluding abnormal fluctuations when the user's cumulative number of face recognition attempts exceeds a preset number; and adjusts the preset recognition score threshold to a preset abnormal fluctuation lower bound based on the target historical recognition score. This significantly improves recognition accuracy, effectively avoids recognition failures caused by fixed thresholds, and achieves adaptive optimization of the threshold to match the user's long-term stable recognition pattern, thereby improving the speed and efficiency of face recognition anti-false scanning feature optimization.
[0148] Accordingly, the present invention further provides a facial recognition feature optimization device to prevent accidental swiping.
[0149] Reference Figure 6 , Figure 6 This is a functional block diagram of the first embodiment of the face recognition anti-misreading feature optimization device of the present invention.
[0150] In a first embodiment of the face recognition anti-mistake feature optimization device of the present invention, the face recognition anti-mistake feature optimization device includes:
[0151] The feature value acquisition module 10 is used to acquire the initial feature value of the user's first face registration and the auxiliary feature value of the user's most recent face recognition.
[0152] The anomaly exclusion module 20 is used to compare the current face image with the initial feature value and the auxiliary feature value simultaneously in subsequent face recognition to exclude abnormal fluctuation results.
[0153] The dynamic adjustment module 30 is used to dynamically adjust the preset recognition score threshold based on the target historical recognition score after excluding the abnormal fluctuation results when the user's cumulative number of face recognition attempts exceeds a preset number.
[0154] The feature value acquisition module 10 is also used to generate initial feature values using a preset recognition score threshold when the user first enters a face; and to automatically record and save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as auxiliary feature values when the user performs subsequent face recognition.
[0155] The feature value acquisition module 10 is also used to automatically monitor each successful recognition operation in real time when the user enters subsequent face recognition, and store the current recognition frame and the corresponding current recognition score in the user's exclusive historical database; when a new recognition frame is detected to have a score higher than the lowest score among the preset highest scores already saved in the historical database, the recognition frame corresponding to the lowest score is automatically replaced; and the recognition frame with the highest preset number of recognition scores among the user's most recent face recognition scores is saved as an auxiliary feature value.
[0156] The anomaly exclusion module 20 is also used to compare the currently captured face image with the initial feature value and the auxiliary feature value in parallel during subsequent face recognition, and obtain recognition scores of multiple comparison results; and automatically exclude abnormal fluctuation results with abnormal fluctuations in each recognition score based on historical recognition scores.
[0157] The anomaly exclusion module 20 is also used to acquire statistical distribution data of historical recognition scores; determine the corresponding outlier boundary of the statistical distribution data using interquartile range; compare each recognition score with the outlier boundary, and take the recognition score that is at the outlier boundary as the abnormal fluctuation result of the abnormal fluctuation.
[0158] The anomaly removal module 20 is further configured to calculate the quartiles and interquartile range of the statistical distribution data using the interquartile range, and determine the upper and lower bounds of outliers based on the quartiles and the interquartile range using the following formula:
[0159]
[0160]
[0161]
[0162] in, Interquartile range, It is the third quartile. It is the first quartile. This is the upper bound for outliers. This is the lower bound for outliers;
[0163] The outlier boundary is determined based on the upper and lower bounds of the outlier.
[0164] The dynamic adjustment module 30 is further configured to, when the user's cumulative number of face recognition attempts exceeds a preset number, obtain a target historical recognition score after excluding the abnormal fluctuation results; and adjust the preset recognition score threshold to a preset abnormal fluctuation lower bound value based on the target historical recognition score.
[0165] The steps for implementing each functional module of the face recognition anti-mistake feature optimization device can be referred to in the various embodiments of the face recognition anti-mistake feature optimization method of the present invention, and will not be repeated here.
[0166] Furthermore, this embodiment of the invention also proposes a storage medium storing a face recognition anti-mistake feature optimization program. When the face recognition anti-mistake feature optimization program is executed by a processor, it performs the following operations:
[0167] Obtain the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition;
[0168] In subsequent face recognition, the current face image is compared with both the initial feature value and the auxiliary feature value to exclude abnormal fluctuation results.
[0169] When the number of times a user performs face recognition exceeds a preset number, the preset recognition score threshold is dynamically adjusted based on the target historical recognition score after excluding abnormal fluctuations.
[0170] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0171] When a user first registers their face, an initial feature value is generated using a preset recognition threshold.
[0172] When the user performs subsequent face recognition, the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores is automatically recorded and saved as an auxiliary feature value.
[0173] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0174] When the user enters subsequent face recognition, the system automatically monitors each successful recognition operation in real time and stores the current recognition frame and the corresponding current recognition score in the user's exclusive historical database.
[0175] When a new identification frame is detected with a score higher than the lowest score among the preset highest scores already saved in the historical database, the identification frame corresponding to the lowest score is automatically replaced.
[0176] Save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
[0177] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0178] In subsequent face recognition, the currently captured face image is compared in parallel with the initial feature value and the auxiliary feature value to obtain recognition scores from multiple comparison results;
[0179] Abnormal fluctuations in each identification score are automatically excluded based on historical identification scores.
[0180] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0181] Obtain statistical distribution data of historical recognition scores;
[0182] The interquartile range is used to determine the outlier boundaries of the statistical distribution data.
[0183] Each identification score is compared with the outlier boundary, and the identification score that falls within the outlier boundary is taken as the result of the abnormal fluctuation.
[0184] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0185] The interquartile range (IQR) is used to calculate the quartiles and IQR of the statistical distribution data. Based on the quartiles and IQR, the upper and lower bounds of outliers are determined using the following formula:
[0186]
[0187]
[0188]
[0189] in, Interquartile range, It is the third quartile. It is the first quartile. This is the upper bound for outliers. This is the lower bound for outliers;
[0190] The outlier boundary is determined based on the upper and lower bounds of the outlier.
[0191] Furthermore, when the face recognition anti-mistake feature optimization program is executed by the processor, it also performs the following operations:
[0192] When the user's cumulative number of face recognition attempts exceeds a preset number, the target historical recognition score is obtained after excluding the abnormal fluctuation results;
[0193] The preset identification score threshold is adjusted to a preset abnormal fluctuation lower limit value based on the target historical identification score.
[0194] Those skilled in the art will understand that all or part of the steps in the methods described above can be implemented by a program instructing related hardware. The program is stored in a storage medium and includes several instructions to cause a device (which may be a microcontroller, chip, etc.) or processor to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium is a computer-readable storage medium, including: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, and other media that can store program code.
[0195] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0196] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0197] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.
Claims
1. A method for optimizing features to prevent accidental facial recognition scans, characterized in that, The face recognition anti-mistake feature optimization method includes: Obtain the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition; In subsequent face recognition, the currently captured face image is compared in parallel with the initial feature value and the auxiliary feature value to obtain recognition scores from multiple comparison results; Obtain statistical distribution data of historical recognition scores; The interquartile range is used to determine the outlier boundaries of the statistical distribution data. Each identification score is compared with the outlier boundary, and the identification score that is at the outlier boundary is taken as the outlier fluctuation result of the outlier fluctuation. The outlier boundary includes an upper outlier and a lower outlier. When the user's cumulative number of face recognition attempts exceeds a preset number, the target historical recognition score is obtained after excluding the abnormal fluctuation results; The preset identification score threshold is adjusted to the lower bound of the outlier based on the target historical identification score.
2. The face recognition anti-mistake feature optimization method as described in claim 1, characterized in that, The process of obtaining the initial feature values of the user's first face registration and the auxiliary feature values of the user's most recent face recognition includes: When a user first registers their face, an initial feature value is generated using a preset recognition threshold. When the user performs subsequent face recognition, the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores is automatically recorded and saved as an auxiliary feature value.
3. The face recognition anti-mistake feature optimization method as described in claim 2, characterized in that, The step of automatically recording and saving the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as auxiliary feature values during subsequent face recognition by the user includes: When the user enters subsequent face recognition, the system automatically monitors each successful recognition operation in real time and stores the current recognition frame and the corresponding current recognition score in the user's exclusive historical database. When a new identification frame is detected with a score higher than the lowest score among the preset highest scores already saved in the historical database, the identification frame corresponding to the lowest score is automatically replaced. Save the recognition frame with the highest preset number of recognitions in the user's most recent face recognition scores as an auxiliary feature value.
4. The face recognition anti-mistake feature optimization method as described in claim 1, characterized in that, The method of determining the outlier boundaries of the statistical distribution data using interquartile range includes: The interquartile range (IQR) is used to calculate the quartiles and IQR of the statistical distribution data. Based on the quartiles and IQR, the upper and lower bounds of outliers are determined using the following formula: in, Interquartile range, It is the third quartile. It is the first quartile. This is the lower bound for outliers. This is the upper bound for outliers; The outlier boundary is determined based on the upper and lower bounds of the outlier.
5. A facial recognition feature optimization device to prevent accidental swiping, characterized in that, The facial recognition anti-mistake feature optimization device includes: The feature value acquisition module is used to acquire the initial feature value of the user's first face registration and the auxiliary feature value of the user's most recent face recognition. The anomaly exclusion module is used to compare the current face image with the initial feature value and the auxiliary feature value simultaneously in subsequent face recognition to exclude abnormal fluctuation results. The dynamic adjustment module is used to dynamically adjust the preset recognition score threshold based on the target historical recognition score after excluding the abnormal fluctuation results when the user's cumulative number of face recognition attempts exceeds the preset number. The anomaly exclusion module is also used to compare the currently captured face image with the initial feature value and the auxiliary feature value in parallel during subsequent face recognition, and obtain recognition scores of multiple comparison results; and to automatically exclude abnormal fluctuation results with abnormal fluctuations in each recognition score based on historical recognition scores. The anomaly exclusion module is also used to obtain statistical distribution data of historical recognition scores; determine the corresponding outlier boundary of the statistical distribution data using interquartile range; compare each recognition score with the outlier boundary, and take the recognition score that is at the outlier boundary as the outlier fluctuation result of the abnormal fluctuation, wherein the outlier boundary includes an upper bound and a lower bound. The dynamic adjustment module is also used to obtain a target historical recognition score after excluding the abnormal fluctuation results when the user's cumulative number of face recognition attempts exceeds a preset number; and to adjust the preset recognition score threshold to the lower bound of the abnormal value based on the target historical recognition score.
6. A facial recognition feature optimization device to prevent accidental swiping, characterized in that, The face recognition anti-mistake feature optimization device includes: a memory, a processor, and a face recognition anti-mistake feature optimization program stored in the memory and executable on the processor. The face recognition anti-mistake feature optimization program is configured to implement the steps of the face recognition anti-mistake feature optimization method as described in any one of claims 1 to 4.
7. A storage medium, characterized in that, The storage medium stores a face recognition anti-mistake feature optimization program, which, when executed by the processor, implements the steps of the face recognition anti-mistake feature optimization method as described in any one of claims 1 to 4.
Citation Information
Patent Citations
Face recognition method and device, intelligent equipment and storage medium
CN116959047A
Facial recognition method, device, and storage medium
WO2023279783A1