Face recognition method and device, electronic equipment and computer readable storage medium

CN114996682BActive Publication Date: 2026-09-04INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202210847394.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-19
Publication Date
2026-09-04
Estimated Expiration
2042-07-19

AI Technical Summary

Technical Problem

[0004]本申请实施例提供了一种人脸识别方法、装置、电子设备及计算机可读存储介质,以至少解决现有技术中人脸识别安全性差的技术问题

Benefits of technology

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described face recognition method at runtime.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114996682B_ABST
    Figure CN114996682B_ABST
Patent Text Reader

Abstract

The application discloses a face recognition method and device, electronic equipment and a computer readable storage medium, and relates to the technical field of information security. The method comprises the following steps: obtaining a face recognition request sent by a target device, wherein the face recognition request at least comprises a device identifier of the target device; determining a face recognition log of the target device according to the device identifier, wherein the face recognition log at least comprises a device parameter of the target device and a historical face recognition record of the target device; determining whether the target device is an abnormal device according to the device parameter and the historical face recognition record, wherein the abnormal device is a device with a face recognition risk; and in the case that the target device is the abnormal device, the face recognition request is rejected. The application solves the technical problem of poor face recognition security in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of information security technology, and more specifically, to a face recognition method, device, electronic device, and computer-readable storage medium. Background Technology

[0002] In recent years, with the widespread adoption of facial recognition applications, the security of the facial recognition process has become increasingly important to users. Currently, facial recognition attacks are often carried out using specific terminal devices, resulting in poor security and compromising the protection of users' financial and information security.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a face recognition method, apparatus, electronic device, and computer-readable storage medium to at least solve the technical problem of poor security in face recognition in the prior art.

[0005] According to one aspect of the embodiments of this application, a face recognition method is provided, comprising: acquiring a face recognition request sent by a target device, wherein the face recognition request includes at least a device identifier of the target device; determining a face recognition log of the target device based on the device identifier, wherein the face recognition log includes at least device parameters of the target device and historical face recognition records of the target device; determining whether the target device is an abnormal device based on the device parameters and historical face recognition records, wherein an abnormal device is a device with a face recognition risk; and rejecting the face recognition request if the target device is an abnormal device.

[0006] Furthermore, the face recognition method also includes: determining whether the target device has abnormal device features based on device parameters, wherein the abnormal device features indicate that there are abnormal parameters in the device parameters of the target device; and determining the target device as an abnormal device if the target device has abnormal device features.

[0007] Furthermore, the face recognition method also includes: detecting whether the device parameters are the same as the target device parameters, wherein the target device parameters are the device parameters of a normal device; when the device parameters are different from the target device parameters, determining that there are abnormal parameters in the device parameters and determining that the target device has abnormal device features; when the device parameters are the same as the target device parameters, determining that the target device does not have abnormal device features.

[0008] Furthermore, the face recognition method also includes: determining whether the target device has historical data anomaly features based on historical face recognition records, wherein the historical data anomaly features indicate that the number of target users corresponding to the historical face recognition records is greater than the preset number of users, the target users are users who perform face recognition through the target device, and different target users correspond to different identity information; if the target device has historical data anomaly features, the target device is determined to be an abnormal device.

[0009] Furthermore, the face recognition method also includes: acquiring face image information from historical face recognition records; determining the number of target users corresponding to the historical face recognition records based on the face image information, wherein different target users correspond to different face image information; determining that the target device has abnormal historical data features when the number of target users is greater than the preset number of users; and determining that the target device does not have abnormal historical data features when the number of target users is less than or equal to the preset number of users.

[0010] Furthermore, the face recognition method also includes: determining whether the target device has abnormal attack behavior characteristics based on historical face recognition records, wherein the abnormal attack behavior characteristics indicate that the target device has face recognition attack behavior in historical face recognition records; and determining the target device as an abnormal device if the target device has abnormal attack behavior characteristics.

[0011] Furthermore, the face recognition method also includes: determining multiple first face recognition records from historical face recognition records, wherein the first face recognition record is a record generated by the target device each time face recognition fails; parsing the first face recognition record to obtain the error code corresponding to the first face recognition record, wherein the error code is used to characterize the type of reason for the face recognition failure of the target device; determining the target face recognition record from the multiple first face recognition records based on the error code, wherein the error code of the target face recognition record is the target error code, wherein the target error code is the error code generated by the abnormal device when face recognition fails; determining the number of target face recognition records, and when the number of target face recognition records is greater than a preset number, determining that the target device has abnormal characteristics of attack behavior; when the number of target face recognition records is less than or equal to the preset number, determining that the target device does not have abnormal characteristics of attack behavior.

[0012] According to another aspect of the embodiments of this application, a face recognition device is also provided, comprising: an acquisition module, configured to acquire a face recognition request sent by a target device, wherein the face recognition request includes at least a device identifier of the target device; a first determination module, configured to determine the face recognition log of the target device based on the device identifier, wherein the face recognition log includes at least device parameters of the target device and historical face recognition records of the target device; a second determination module, configured to determine whether the target device is an abnormal device based on the device parameters and historical face recognition records, wherein an abnormal device is a device with a face recognition risk; and a face recognition request processing module, configured to reject the face recognition request if the target device is an abnormal device.

[0013] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, wherein a computer program is stored in the computer program, and the computer program is configured to execute the above-described face recognition method at runtime.

[0014] According to another aspect of the embodiments of this application, an electronic device is also provided, the electronic device including one or more processors; a memory for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors are configured to run the programs, wherein the programs are configured to execute the above-described face recognition method at runtime.

[0015] In the technical solution of this application, a method is adopted to determine whether the target device is an abnormal device based on device parameters and historical face recognition records. First, the face recognition request sent by the target device is obtained. The face recognition request includes at least the device identifier of the target device. Then, the face recognition log of the target device is determined based on the device identifier. The face recognition log includes at least the device parameters and historical face recognition records of the target device. Finally, the target device is determined to be an abnormal device based on the device parameters and historical face recognition records. If the target device is an abnormal device, the face recognition request is rejected. An abnormal device is a device that poses a face recognition risk.

[0016] As described above, this application determines whether a target device is abnormal by detecting its device parameters and historical facial recognition records. This allows for the timely detection of abnormal devices and the rejection of facial recognition requests sent by abnormal devices, thereby preventing unauthorized access to facial recognition verification and improving the security of facial recognition. Furthermore, by detecting the target device and determining whether to accept the facial recognition request based on the detection results, this application can determine the processing result of the facial recognition request without performing any detection on the request itself. In other words, this application does not require running numerous facial recognition algorithms to parse and analyze the request; it can determine whether to reject the request based on the target device's detection results. Therefore, the technical solution of this application can also improve the processing efficiency of facial recognition requests.

[0017] Therefore, the technical solution of this application achieves the purpose of detecting whether the target device is an abnormal device, thereby improving the security of face recognition and solving the technical problem of poor face recognition security in the prior art. Attached Figure Description

[0018] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0019] Figure 1 A flowchart of an optional face recognition method according to an embodiment of this application;

[0020] Figure 2 A flowchart of another optional face recognition method according to an embodiment of this application;

[0021] Figure 3 This is a schematic diagram of an optional face recognition device according to an embodiment of this application;

[0022] Figure 4 This is a schematic diagram of an optional electronic device according to an embodiment of this application. Detailed Implementation

[0023] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0024] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0025] Furthermore, it should be noted that all information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for display, data used for analysis, etc.) disclosed herein are information and data authorized by the user or fully authorized by all parties. For example, this system has interfaces with relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain the relevant information only after receiving consent from the aforementioned user or organization.

[0026] Example 1

[0027] According to an embodiment of this application, an embodiment of a face recognition method is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0028] Alternatively, a face recognition request processing system can serve as the execution entity for the face recognition method in this application embodiment. This face recognition request processing system can run on a server.

[0029] Figure 1 A flowchart of an optional face recognition method according to an embodiment of this application is shown below. Figure 1 As shown, the method includes the following steps:

[0030] Step S101: Obtain the face recognition request sent by the target device.

[0031] In step S101, the face recognition request includes at least the device identifier of the target device.

[0032] Specifically, the target devices mentioned above include, but are not limited to, terminal devices that provide facial recognition functionality, such as smartphones, smart tablets, laptops, and smart wearable devices. Users can perform facial recognition through the target device, which will then generate a facial recognition request and send it to the facial recognition request processing system.

[0033] Optionally, the face recognition request may include at least the device identifier of the target device. The device identifier may be the target device's network address, MAC address, or other identifier used to distinguish different target devices.

[0034] It should be noted that if there is no unique identifier in the face recognition request of the target device that can be used to distinguish different target devices, the face recognition request processing system can generate a unique device identifier for the target device by using an encoding algorithm based on multiple parameter information in the face recognition request after receiving the face recognition request.

[0035] Step S102: Determine the face recognition log of the target device based on the device identifier.

[0036] In step S102, the face recognition log includes at least the device parameters of the target device and the historical face recognition records of the target device.

[0037] Specifically, the face recognition request system acquires the target device's device parameters each time it receives a face recognition request. This acquisition can be done in at least two ways: active and passive. Active acquisition involves the target device sending a device parameter acquisition command after receiving the request, and then returning the corresponding device parameters to the face recognition request processing system based on this command. Passive acquisition involves the target device sending its device parameters along with the face recognition request to the system, allowing the system to acquire these parameters without sending any commands to the target device.

[0038] Optionally, the above device parameters include, but are not limited to, device model, UA (user agent) parameters, brand parameters, etc.

[0039] In addition, after processing each face recognition request, the face recognition request processing system generates a corresponding historical face recognition record. This record includes at least the facial image information from the request, the processing result, and the error code displayed when the request was rejected. Based on the target device's identifier, device parameters, and historical face recognition records, the system generates a face recognition log and stores it on the server.

[0040] It should be noted that since the server stores the face recognition logs corresponding to each target device, and the face recognition logs contain the device identifier of the target device, the face recognition request processing system can determine the face recognition log of the target device from the server based on the device identifier each time it receives a new face recognition request.

[0041] Step S103: Determine whether the target device is an abnormal device based on the device parameters and historical face recognition records.

[0042] In step S103, the abnormal device is a device that poses a risk of facial recognition failure.

[0043] Specifically, the face recognition request processing system can determine whether the target device exhibits any abnormal characteristics based on its device parameters. These abnormal characteristics indicate the presence of anomalous parameters within the target device's specifications. If the target device exhibits abnormal characteristics, the face recognition request processing system classifies it as an abnormal device.

[0044] The aforementioned abnormal parameters may be specific device models, or UA parameters, Brand parameters, etc., that differ from those of normal devices.

[0045] The facial recognition request processing system can also determine whether the target device has historical data anomalies based on historical facial recognition records. These anomalies indicate that the number of target users in the historical facial recognition records exceeds a preset number. Target users are those who performed facial recognition through the target device, and different target users have different identity information. If the target device exhibits historical data anomalies, the facial recognition request processing system determines the target device as an abnormal device.

[0046] In addition, the facial recognition request processing system can also determine whether the target device exhibits abnormal attack behavior characteristics based on historical facial recognition records. These abnormal attack behavior characteristics indicate that the target device has engaged in facial recognition attack behavior in historical records. If the target device exhibits abnormal attack behavior characteristics, the facial recognition request processing system determines the target device as an abnormal device.

[0047] It's important to note that current technologies primarily employ two methods to strengthen the security of facial recognition authentication. The first method involves adjusting various parameters of the facial recognition algorithm to analyze facial recognition requests initiated by abnormal devices, ultimately determining whether to approve the request based on the analysis results. The second method involves detecting the hardware operating environment of abnormal devices and then deciding whether to approve the request based on the detection results. However, the first method requires continuous adjustments to the facial recognition algorithm, increasing the workload and development costs for developers. Furthermore, users need to make corresponding adjustments to the modified algorithm, thus degrading the user experience. The second method, when detecting the hardware operating environment, is hampered by user permissions and legal restrictions, making it difficult to collect the necessary information, leading to incomplete detection and ultimately compromising the security of facial recognition.

[0048] In this application, the face recognition request processing system only needs to obtain the target device's device parameters and historical face recognition records to determine whether the target device is abnormal. Therefore, the technical solution of this application does not involve adjustments to the face recognition algorithm, thereby reducing the workload of developers and improving the user experience. Furthermore, the device parameters and historical face recognition records have low permission requirements for the target device's hardware operating environment and do not involve the user's personal privacy information. Therefore, this application can comprehensively detect the target device, thereby improving the security of face recognition.

[0049] Step S104: If the target device is an abnormal device, the face recognition request is rejected.

[0050] In step S104, since the abnormal device is a device with a risk of face recognition, the face recognition request processing system will reject the face recognition request sent by the target device when the target device is an abnormal device, thereby protecting the user's information security and financial security.

[0051] In addition, if the target device is a normal device, the face recognition request processing system will process the face recognition request sent by the target device.

[0052] As can be seen from steps S101 to S104 above, the technical solution of this application uses a method to determine whether the target device is an abnormal device based on device parameters and historical face recognition records. First, the face recognition request sent by the target device is obtained, wherein the face recognition request includes at least the device identifier of the target device. Then, the face recognition log of the target device is determined based on the device identifier, wherein the face recognition log includes at least the device parameters of the target device and the historical face recognition records of the target device. Finally, the target device is determined to be an abnormal device based on the device parameters and historical face recognition records, and if the target device is an abnormal device, the face recognition request is rejected. An abnormal device is a device that poses a face recognition risk.

[0053] As described above, this application determines whether a target device is abnormal by detecting its device parameters and historical facial recognition records. This allows for the timely detection of abnormal devices and the rejection of facial recognition requests sent by abnormal devices, thereby preventing unauthorized use of abnormal devices to pass facial recognition verification and improving the security of facial recognition. Furthermore, by detecting the target device and determining whether to accept the facial recognition request based on the detection results, this application can determine the processing result of the facial recognition request without performing any detection on the request itself. In other words, this application does not require running numerous facial recognition algorithms to parse and analyze the request; it can determine whether to reject the request based on the target device's detection results. Therefore, the technical solution of this application can also improve the processing efficiency of facial recognition requests.

[0054] Therefore, the technical solution of this application achieves the purpose of detecting whether the target device is an abnormal device, thereby improving the security of face recognition and solving the technical problem of poor face recognition security in the prior art.

[0055] In one optional embodiment, the face recognition request processing system determines whether the target device exhibits any abnormal device characteristics based on device parameters, wherein the abnormal device characteristics indicate the presence of abnormal parameters in the target device's device parameters. If the target device exhibits abnormal device characteristics, the face recognition request processing system determines the target device to be an abnormal device.

[0056] Optionally, the face recognition request processing system checks whether the device parameters are the same as the target device parameters, where the target device parameters are those of a normal device. If the device parameters are different from the target device parameters, the face recognition request processing system determines that there are abnormal parameters in the device parameters and that the target device has abnormal characteristics; if the device parameters are the same as the target device parameters, the face recognition request processing system determines that the target device does not have abnormal characteristics.

[0057] Specifically, through analysis and testing of common abnormal devices, technicians discovered significant anomalies between the device parameters of abnormal devices and those of normal devices. For example, abnormal devices might exhibit specific device models or User Agent (UA) parameters. Based on this, the face recognition request processing system pre-stores the device parameters of normal devices. These normal devices can be of various types, and the number and parameters of normal devices can be continuously updated.

[0058] After obtaining the device parameters of the target device, the face recognition request processing system can compare the device parameters of the target device with the device parameters of normal devices that are stored in advance. If the device parameters of the target device do not belong to the device parameters of normal devices, it is determined that the target device has abnormal characteristics, that is, the target device is an abnormal device.

[0059] It should be noted that due to the extremely high difficulty in modifying abnormal devices, most abnormal devices are specific models of terminal devices, which typically exhibit abnormal characteristics. Based on this, the face recognition request system in this application can effectively identify abnormal devices according to these abnormal characteristics.

[0060] In one optional embodiment, the face recognition request processing system determines whether the target device has historical data anomaly characteristics based on historical face recognition records. These anomaly characteristics indicate that the number of target users corresponding to historical face recognition records exceeds a preset number of users. Target users are those who perform face recognition through the target device, and different target users have different identity information. If the target device exhibits historical data anomaly characteristics, the face recognition request processing system determines the target device as an abnormal device.

[0061] Optionally, the face recognition request processing system acquires facial image information from historical face recognition records and determines the number of target users corresponding to those records based on this information. Different target users correspond to different facial image information. When the number of target users exceeds a preset number, the face recognition request processing system determines that the target device exhibits historical data anomalies; when the number of target users is less than or equal to the preset number, the system determines that the target device does not exhibit historical data anomalies.

[0062] Specifically, by acquiring facial image information from historical facial recognition records, the facial recognition request processing system can detect whether there are a large number of facial image information of different users in the historical facial recognition records of the target device. In other words, by acquiring facial image information from historical facial recognition records, the facial recognition request processing system can detect whether a large number of users with different identities have performed facial recognition through the target device.

[0063] It should be noted that, generally speaking, when someone wants to carry out a facial recognition attack using an abnormal device, they will use the same abnormal device for the attack for cost reasons. Therefore, this application can effectively identify abnormal devices by using abnormal features of historical data.

[0064] In addition, the aforementioned preset number of users can be customized by technical personnel.

[0065] In one optional embodiment, the face recognition request processing system determines whether the target device exhibits abnormal attack behavior characteristics based on historical face recognition records. These abnormal attack behavior characteristics indicate that the target device has engaged in face recognition attack behavior according to historical records. If the target device exhibits abnormal attack behavior characteristics, the face recognition request processing system determines the target device as an abnormal device.

[0066] Optionally, the face recognition request processing system determines multiple first face recognition records from historical face recognition records. These first face recognition records are generated by the target device each time face recognition fails. Then, the system parses these first face recognition records to obtain their corresponding error codes, which characterize the reason for the target device's face recognition failure. Based on this, the system determines the target face recognition record from these first face recognition records according to the error codes. The error code of this target face recognition record is the target error code, generated by the abnormal device when face recognition fails. Finally, the system determines the number of target face recognition records. If the number exceeds a preset number, the system determines that the target device exhibits abnormal attack behavior characteristics; if the number is less than or equal to the preset number, the system determines that the target device does not exhibit abnormal attack behavior characteristics.

[0067] Specifically, technicians will use existing faulty devices to conduct attack and defense tests. They will send face recognition test requests to the face recognition request processing system using these devices. If the system rejects the request, it will generate a target error code, such as code 001. During the attack and defense test, the face recognition request processing system will store the target error code on its server.

[0068] Furthermore, assume that target device A has N historical face recognition records, of which M records are generated when face recognition fails, i.e., the first face recognition records. The face recognition request processing system can obtain the error code corresponding to each of the M first face recognition records by parsing them. For example, the M error codes corresponding to the M face recognition records can be divided into three categories: code 001, code 002, and code 003. Among them, only code 001 is the target error code; codes 002 and 003 are not target error codes.

[0069] Based on this, the face recognition request processing system will identify the first face recognition record with error code 001 as the target face recognition record and calculate the number of target face recognition records. If the number of target face recognition records is greater than a preset number, it is determined that the target device has abnormal characteristics of attack behavior. The preset number can be customized by technicians.

[0070] It is important to note that, typically, before launching a facial recognition attack using an abnormal device, facial recognition tests are frequently conducted using the abnormal device. As a result, a large number of target facial recognition records will exist in the target device's historical facial recognition records. Therefore, by obtaining the number of target facial recognition records, it is possible to effectively identify whether the target device has abnormal characteristics of attack behavior, and thus determine whether the target device is an abnormal device.

[0071] In one alternative embodiment, Figure 2 A flowchart of another face recognition method according to an embodiment of this application is shown. Figure 2 As shown, after receiving a face recognition request from a target device, the face recognition request processing system extracts the target device's device identifier and then determines whether the device identifier is in a blacklist. The device identifiers in the blacklist are those of abnormal devices. If the target device's device identifier is in the blacklist, the face recognition request processing system will directly reject the target device's face recognition request. If the target device's device identifier is not in the blacklist, the face recognition request processing system will detect whether the target device exhibits abnormal device characteristics, abnormal historical data characteristics, or abnormal attack behavior characteristics. If the target device exhibits any of these abnormal characteristics, the face recognition request processing system determines the target device as an abnormal device, rejects the target device's face recognition request, and adds the target device's device identifier to the blacklist.

[0072] Therefore, since abnormal devices are usually modified devices, their device parameters will exhibit certain abnormal characteristics compared to normal devices. Furthermore, the historical facial recognition records of abnormal devices will also show certain abnormal characteristics compared to normal devices. Based on this, this application can promptly determine whether a target device is abnormal by detecting whether it exhibits abnormal device characteristics, abnormal historical data characteristics, or abnormal attack behavior characteristics. When a target device is identified as abnormal, its facial recognition requests will be rejected, thus improving the security of facial recognition.

[0073] Example 2

[0074] According to an embodiment of this application, a face recognition device is also provided, wherein... Figure 3 This is a schematic diagram of an optional face recognition device according to an embodiment of this application, such as... Figure 3 As shown, the device includes: an acquisition module 301, used to acquire a face recognition request sent by a target device, wherein the face recognition request includes at least a device identifier of the target device; a first determination module 302, used to determine the face recognition log of the target device based on the device identifier, wherein the face recognition log includes at least device parameters of the target device and historical face recognition records of the target device; a second determination module 303, used to determine whether the target device is an abnormal device based on the device parameters and historical face recognition records, wherein an abnormal device is a device with a face recognition risk; and a face recognition request processing module 304, used to reject the face recognition request if the target device is an abnormal device.

[0075] It should be noted that the above-mentioned acquisition module 301, first determination module 302, second determination module 303 and face recognition request processing module 304 correspond to steps S101 to S104 in the above embodiments. The four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in the above embodiment 1.

[0076] Optionally, the second determining module described above further includes a first determining unit and a second determining unit. The first determining unit is used to determine whether the target device exhibits any abnormal device characteristics based on device parameters, wherein the abnormal device characteristics indicate the presence of abnormal parameters in the target device's device parameters; the second determining unit is used to determine that the target device is an abnormal device if the target device exhibits abnormal device characteristics.

[0077] Optionally, the first determining unit further includes: a first detection subunit, a first determining subunit, and a second determining subunit. The first detection subunit is used to detect whether the device parameters are the same as the target device parameters, wherein the target device parameters are those of a normal device. The first determining subunit is used to determine that there are abnormal parameters in the device parameters and that the target device exhibits abnormal characteristics when the device parameters are different from the target device parameters. The second determining subunit is used to determine that the target device does not exhibit abnormal characteristics when the device parameters are the same as the target device parameters.

[0078] Optionally, the second determining module described above further includes a third determining unit and a fourth determining unit. The third determining unit is used to determine whether the target device has historical data anomaly features based on historical face recognition records. The historical data anomaly features indicate that the number of target users corresponding to the historical face recognition records is greater than a preset number of users. Target users are users who perform face recognition through the target device, and different target users have different identity information. The fourth determining unit is used to determine that the target device is an abnormal device if the target device has historical data anomaly features.

[0079] Optionally, the aforementioned third determining unit further includes: a first acquiring subunit, a third determining subunit, a fourth determining subunit, and a fifth determining subunit. The first acquiring subunit is used to acquire facial image information from historical facial recognition records; the third determining subunit is used to determine the number of target users corresponding to the historical facial recognition records based on the facial image information, wherein different target users correspond to different facial image information; the fourth determining subunit is used to determine that the target device has historical data abnormalities when the number of target users is greater than a preset number of users; and the fifth determining subunit is used to determine that the target device does not have historical data abnormalities when the number of target users is less than or equal to the preset number of users.

[0080] Optionally, the second determining module described above further includes a fifth determining unit and a sixth determining unit. The fifth determining unit is used to determine whether the target device exhibits abnormal attack behavior characteristics based on historical face recognition records, wherein the abnormal attack behavior characteristics indicate that the target device exhibits face recognition attack behavior in the historical face recognition records. The sixth determining unit is used to determine that the target device is an abnormal device if the target device exhibits abnormal attack behavior characteristics.

[0081] Optionally, the fifth determining unit mentioned above may further include: a sixth determining subunit, a parsing subunit, a seventh determining subunit, an eighth determining subunit, and a ninth determining subunit. The system comprises the following sub-units: a sixth determining sub-unit, used to determine multiple first face recognition records from historical face recognition records, wherein each first face recognition record is generated by the target device each time face recognition fails; a parsing sub-unit, used to parse the first face recognition records to obtain the error codes corresponding to the first face recognition records, wherein the error codes characterize the type of reason for the face recognition failure of the target device; a seventh determining sub-unit, used to determine the target face recognition record from multiple first face recognition records based on the error codes, wherein the error code of the target face recognition record is the target error code, wherein the target error code is the error code generated by the abnormal device when face recognition fails; an eighth determining sub-unit, used to determine the number of target face recognition records, and if the number of target face recognition records is greater than a preset number, to determine that the target device has abnormal attack behavior characteristics; and a ninth determining sub-unit, used to determine that the target device does not have abnormal attack behavior characteristics if the number of target face recognition records is less than or equal to a preset number.

[0082] Example 3

[0083] According to an embodiment of this application, a computer-readable storage medium is also provided, in which a computer program is stored, wherein the computer program is configured to execute the face recognition method in Embodiment 1 above when it is run.

[0084] Example 4

[0085] According to an embodiment of this application, an embodiment of an electronic device is also provided, wherein, Figure 4 This is a schematic diagram of an optional electronic device according to an embodiment of this application, such as... Figure 4 As shown, the electronic device includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps:

[0086] Obtain the face recognition request sent by the target device, wherein the face recognition request includes at least the device identifier of the target device; determine the face recognition log of the target device based on the device identifier, wherein the face recognition log includes at least the device parameters of the target device and the historical face recognition records of the target device; determine whether the target device is an abnormal device based on the device parameters and the historical face recognition records, wherein an abnormal device is a device with face recognition risk; if the target device is an abnormal device, reject the face recognition request.

[0087] Optionally, the processor may also perform the following steps when executing the program: determine whether the target device has any abnormal device characteristics based on the device parameters, wherein the abnormal device characteristics indicate that there are abnormal parameters in the device parameters of the target device; if the target device has abnormal device characteristics, determine that the target device is an abnormal device.

[0088] Optionally, the processor may also perform the following steps when executing the program: detect whether the device parameters are the same as the target device parameters, wherein the target device parameters are the device parameters of a normal device; when the device parameters are different from the target device parameters, determine that there are abnormal parameters in the device parameters and determine that the target device has abnormal device characteristics; when the device parameters are the same as the target device parameters, determine that the target device does not have abnormal device characteristics.

[0089] Optionally, the processor may also perform the following steps when executing the program: determine whether the target device has historical data anomaly features based on historical face recognition records, wherein the historical data anomaly features indicate that the number of target users corresponding to the historical face recognition records is greater than the preset number of users, the target users are users who perform face recognition through the target device, and different target users have different identity information; if the target device has historical data anomaly features, determine that the target device is an abnormal device.

[0090] Optionally, the processor may also perform the following steps when executing the program: acquiring facial image information from historical facial recognition records; determining the number of target users corresponding to the historical facial recognition records based on the facial image information, wherein different target users correspond to different facial image information; determining that the target device has historical data abnormal features when the number of target users is greater than the preset number of users; and determining that the target device does not have historical data abnormal features when the number of target users is less than or equal to the preset number of users.

[0091] Optionally, the processor may also perform the following steps when executing the program: determine whether the target device has abnormal attack behavior characteristics based on historical face recognition records, wherein the abnormal attack behavior characteristics indicate that the target device has face recognition attack behavior in the historical face recognition records; if the target device has abnormal attack behavior characteristics, determine that the target device is an abnormal device.

[0092] Optionally, the processor, when executing the program, further implements the following steps: determining multiple first face recognition records from historical face recognition records, wherein the first face recognition record is a record generated by the target device each time face recognition fails; parsing the first face recognition record to obtain the error code corresponding to the first face recognition record, wherein the error code is used to characterize the type of reason for the face recognition failure of the target device; determining the target face recognition record from the multiple first face recognition records based on the error code, wherein the error code of the target face recognition record is the target error code, wherein the target error code is the error code generated by the abnormal device when face recognition fails; determining the number of target face recognition records, and if the number of target face recognition records is greater than a preset number, determining that the target device has abnormal attack behavior characteristics; if the number of target face recognition records is less than or equal to the preset number, determining that the target device does not have abnormal attack behavior characteristics.

[0093] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0094] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0095] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual couplings, direct couplings, or communication connections may be through some interfaces; indirect couplings or communication connections between units or modules may be electrical or other forms.

[0096] The units described as separate components may or may not be physically separate. Similarly, the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment, depending on actual needs.

[0097] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0098] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0099] The above are merely preferred embodiments of this application. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A face recognition method, characterized in that, include: Obtain a face recognition request sent by the target device, wherein the face recognition request includes at least the device identifier of the target device; The face recognition log of the target device is determined based on the device identifier. The face recognition log includes at least the device parameters of the target device and the historical face recognition records of the target device. The device parameters are obtained by actively or passively acquiring each time a face recognition request is received from the target device. The device parameters and historical facial recognition records are used to determine whether the target device is an abnormal device, wherein the abnormal device is a device that poses a risk to facial recognition. If the target device is the abnormal device, the face recognition request will be rejected. Determining whether the target device is an abnormal device based on the device parameters and the historical face recognition records includes: determining whether the target device has abnormal attack behavior characteristics based on the historical face recognition records, wherein the abnormal attack behavior characteristics indicate that the target device has face recognition attack behavior in the historical face recognition records; and determining the target device as the abnormal device if the target device has the abnormal attack behavior characteristics. The method of determining whether the target device exhibits abnormal attack behavior characteristics based on the historical face recognition records includes: identifying multiple first face recognition records from the historical face recognition records, wherein the first face recognition records are records generated by the target device each time face recognition fails; parsing the first face recognition records to obtain error codes corresponding to the first face recognition records, wherein the error codes are used to characterize the type of reason for the face recognition failure of the target device; identifying a target face recognition record from the multiple first face recognition records based on the error codes, wherein the error code of the target face recognition record is a target error code, wherein the target error code is an error code generated by the abnormal device when face recognition fails; determining the number of target face recognition records, and determining that the target device exhibits the abnormal attack behavior characteristics when the number of target face recognition records is greater than a preset number; and determining that the target device does not exhibit the abnormal attack behavior characteristics when the number of target face recognition records is less than or equal to the preset number. Determining whether the target device is an abnormal device based on the device parameters and the historical facial recognition records includes: Based on the historical facial recognition records, it is determined whether the target device has historical data anomaly features. The historical data anomaly features indicate that the number of target users corresponding to the historical facial recognition records is greater than a preset number of users. The target users are users who perform facial recognition through the target device, and different target users have different identity information. If the target device exhibits the aforementioned historical data anomaly characteristics, the target device is determined to be the abnormal device. Determining whether the target device has historical data anomalies based on the historical facial recognition records includes: Obtain facial image information from the historical facial recognition records; The number of target users corresponding to the historical face recognition records is determined based on the face image information, wherein different target users correspond to different face image information; When the number of target users is greater than the preset number of users, it is determined that the target device has the abnormal characteristics of the historical data; When the number of target users is less than or equal to the preset number of users, it is determined that the target device does not have the abnormal characteristics of the historical data.

2. The method according to claim 1, characterized in that, Determining whether the target device is an abnormal device based on the device parameters and the historical facial recognition records includes: Based on the equipment parameters, it is determined whether the target equipment has any abnormal characteristics, wherein the abnormal characteristics indicate that there are abnormal parameters in the equipment parameters of the target equipment; If the target device exhibits the abnormal characteristics described above, the target device is determined to be the abnormal device.

3. The method according to claim 2, characterized in that, Determining whether the target device exhibits any abnormal characteristics based on the device parameters includes: The device parameters are checked to see if they are the same as those of the target device, wherein the target device parameters are those of a normal device. When the device parameters differ from the target device parameters, it is determined that the abnormal parameters exist in the device parameters, and the target device exhibits the abnormal device characteristics. When the device parameters are the same as the target device parameters, it is determined that the target device does not have the abnormal device characteristics.

4. A face recognition device for implementing the face recognition method according to any one of claims 1 to 3, characterized in that, include: The acquisition module is used to acquire a face recognition request sent by the target device, wherein the face recognition request includes at least the device identifier of the target device; The first determining module is used to determine the face recognition log of the target device based on the device identifier, wherein the face recognition log includes at least the device parameters of the target device and the historical face recognition records of the target device, and the device parameters are obtained by actively or passively acquiring each time a face recognition request is received from the target device; The second determining module is used to determine whether the target device is an abnormal device based on the device parameters and the historical face recognition records, wherein the abnormal device is a device with a face recognition risk. A face recognition request processing module is used to refuse the face recognition request if the target device is the abnormal device. The second determining module further includes: a fifth determining unit, used to determine whether the target device has abnormal attack behavior characteristics based on the historical face recognition records, wherein the abnormal attack behavior characteristics indicate that the target device has face recognition attack behavior in the historical face recognition records; and a sixth determining unit, used to determine that the target device is the abnormal device when the target device has the abnormal attack behavior characteristics. The fifth determining unit includes: a sixth determining subunit, used to determine multiple first face recognition records from the historical face recognition records, wherein the first face recognition records are records generated by the target device each time face recognition fails; a parsing subunit, used to parse the first face recognition records to obtain the error code corresponding to the first face recognition records, wherein the error code is used to characterize the reason type of the face recognition failure of the target device; a seventh determining subunit, used to determine a target face recognition record from the multiple first face recognition records according to the error code, wherein the error code of the target face recognition record is a target error code, wherein the target error code is an error code generated by the abnormal device when face recognition fails; an eighth determining subunit, used to determine the number of target face recognition records, and when the number of target face recognition records is greater than a preset number, determine that the target device has the abnormal characteristics of the attack behavior; a ninth determining subunit, used to determine that the target device does not have the abnormal characteristics of the attack behavior when the number of target face recognition records is less than or equal to the preset number. The second determining module further includes: a third determining unit, used to determine whether the target device has historical data abnormal features based on historical face recognition records, wherein the historical data abnormal features indicate that the number of target users corresponding to the historical face recognition records is greater than the preset number of users, the target users are users who perform face recognition through the target device, and different target users correspond to different identity information; a fourth determining unit, used to determine that the target device is an abnormal device when the target device has historical data abnormal features. The third determining unit further includes: a first acquiring subunit, used to acquire facial image information from historical facial recognition records; a third determining subunit, used to determine the number of target users corresponding to the historical facial recognition records based on the facial image information, wherein different target users correspond to different facial image information; a fourth determining subunit, used to determine that the target device has historical data abnormal characteristics when the number of target users is greater than a preset number of users; and a fifth determining subunit, used to determine that the target device does not have historical data abnormal characteristics when the number of target users is less than or equal to the preset number of users.

5. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the face recognition method according to any one of claims 1 to 3 when it is run.

6. An electronic device, characterized in that, The electronic device includes one or more processors; A memory for storing one or more programs, which, when executed by one or more processors, cause the one or more processors to be configured to run the programs, wherein the programs are configured to execute the face recognition method according to any one of claims 1 to 3 at runtime.

Citation Information

Patent Citations

  • Method and device for detecting abnormal registration of terminal

    CN107800678A

  • Face attack event detection method and device, equipment and storage medium

    CN113033404A

  • Abnormal data identification method and device, equipment and storage medium

    CN114154166A

  • Black product equipment positioning method and device, storage medium and electronic equipment

    CN115423483A