Liveness detection method and device, storage medium and equipment
By acquiring the target device risk level and risk characteristics of the certified device, a liveness detection result is generated, which solves the problem that existing liveness detection methods require additional hardware support and achieves high accuracy and high security liveness detection in low-cost scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2026-04-10
AI Technical Summary
Existing facial recognition systems struggle to effectively distinguish between live and non-live attacks. Furthermore, common liveness detection methods require additional hardware support and time costs, making them unsuitable for low-cost scenarios and failing to consider regional differences in liveness attacks.
By acquiring the target device's risk level and risk characteristics from the certified device, liveness detection results are generated based on the face image, the target device's risk level, and the target device's risk characteristics. The risk characteristics of the certified device are used as additional input for liveness detection, thereby improving detection accuracy and security.
Without increasing hardware and time costs, it improves the accuracy and security of liveness detection, is suitable for low-cost scenarios, and takes into account the regional differences in liveness attacks.
Smart Images

Figure CN116503960B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present specification relates to the technical field of computer technology, and particularly relates to a living body detection method and device, a storage medium and equipment. BACKGROUND
[0002] With the continuous development of face recognition systems in recent years, face recognition technology is becoming mature, and its commercial application is becoming more and more widespread, such as widely used in financial transactions, access control systems, mobile terminals and other fields. However, the face is easy to be copied by photos, videos, models or masks, and therefore the forgery of the face of a legal user is an important threat to the security of the face recognition and authentication system. In order to prevent malicious people from forging and stealing the biological characteristics of others for identity authentication, "liveness attack detection" has become an indispensable part of the face recognition system, which can effectively intercept non-living body type attack samples in the face recognition system. SUMMARY
[0003] The living body detection method, device, storage medium and equipment provided by the embodiments of the present specification improve the accuracy and security of living body detection by obtaining the risk features corresponding to the authentication device and using the risk features of the authentication device as additional input for living body detection of the face image. The technical solution is as follows:
[0004] In a first aspect, the embodiments of the present specification provide a living body detection method, which comprises:
[0005] obtaining a face image collected by a first authentication device when a user performs a face recognition transaction;
[0006] obtaining a target device risk level and a target device risk feature corresponding to the first authentication device, wherein the target device risk level and the target device risk feature are determined based on a target geographic area where the first authentication device is located;
[0007] generating a living body detection result corresponding to the face image based on the face image, the target device risk level and the target device risk feature.
[0008] In a second aspect, the embodiments of the present specification provide a risk perception model training method, which comprises:
[0009] constructing a first sample training data set, wherein the first sample training data comprises sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device;
[0010] inputting the sample risk data in the first sample training data into a risk perception model to obtain a predicted risk level corresponding to the sample authentication device;
[0011] The risk perception model is supervised trained and model parameters of the risk perception model are iteratively updated based on a risk perception loss function, the predicted risk level and the risk level label until the risk perception model converges, to obtain a trained risk perception model.
[0012] In a third aspect, the embodiments of the present specification provide a living body detection model training method, and the method comprises:
[0013] A second sample training data set is constructed, and the second sample training data comprises a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image;
[0014] The sample face image, the sample region risk level and the sample region risk feature are input into a living body detection model to obtain a sample living body detection result corresponding to the sample face image;
[0015] The living body detection model is supervised trained and model parameters of the living body detection model are iteratively updated based on a living body detection loss function, the sample living body detection result and the living body detection label until the living body detection model converges, to obtain a trained living body detection model.
[0016] In a fourth aspect, the embodiments of the present specification provide a living body detection device, comprising:
[0017] A face image acquisition module is configured to acquire a face image collected by a first authentication device when a user performs a face recognition transaction;
[0018] A device risk acquisition module is configured to acquire a target device risk level and a target device risk feature corresponding to the first authentication device, wherein the target device risk level and the target device risk feature are determined based on a target geographic region where the first authentication device is located;
[0019] A living body detection module is configured to generate a living body detection result corresponding to the face image based on the face image, the target device risk level and the target device risk feature.
[0020] In a fifth aspect, the embodiments of the present specification provide a risk perception model training device, comprising:
[0021] A first sample construction module is configured to construct a first sample training data set, and the first sample training data comprises sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device;
[0022] a risk level prediction module, configured to input sample risk data in the first sample training data into a risk perception model to obtain a predicted risk level corresponding to the sample authentication device;
[0023] a risk model training module, configured to supervise training of the risk perception model based on a risk perception loss function, the predicted risk level, and the risk level label, and iteratively update model parameters of the risk perception model until the risk perception model converges, to obtain a trained risk perception model.
[0024] In a sixth aspect, an embodiment of the present specification provides a living body detection model training apparatus, comprising:
[0025] a second sample construction module, configured to construct a second sample training data set, the second sample training data comprising a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and sample region risk features corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image;
[0026] a sample living body detection module, configured to input the sample face image, the sample region risk level, and the sample region risk features into a living body detection model to obtain a sample living body detection result corresponding to the sample face image;
[0027] a living body model training module, configured to supervise training of the living body detection model based on a living body detection loss function, the sample living body detection result, and the living body detection label, and iteratively update model parameters of the living body detection model until the living body detection model converges, to obtain a trained living body detection model.
[0028] In a seventh aspect, an embodiment of the present specification provides a computer program product, which stores at least one instruction adapted to be loaded by a processor and execute the method steps described above.
[0029] In an eighth aspect, an embodiment of the present specification provides a storage medium, which stores a computer program adapted to be loaded by a processor and execute the method steps described above.
[0030] In a ninth aspect, an embodiment of the present specification provides an electronic device, which can comprise a processor and a memory; wherein the memory stores a computer program adapted to be loaded by the processor and execute the method steps described above.
[0031] The technical solutions provided by some embodiments of the present specification have at least the following beneficial effects:
[0032] The method for living body detection provided in the embodiments of the present specification obtains a face image collected by the first authentication device when the user performs a face recognition transaction, obtains a target device risk level and a target device risk feature corresponding to the first authentication device, and determines the target device risk level and the target device risk feature based on a target geographic area where the first authentication device is located. Based on the face image, the target device risk level, and the target device risk feature, a living body detection result corresponding to the face image is generated. By obtaining the risk feature corresponding to the authentication device, the risk feature of the authentication device is used as an additional input for living body detection of the face image, thereby improving the accuracy and security of living body detection. BRIEF DESCRIPTION OF DRAWINGS
[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present specification or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present specification, and other drawings can be obtained by those skilled in the art without creative labor.
[0034] Figure 1 A flowchart of a living body detection method provided by the embodiments of the present specification;
[0035] Figure 2 A scene diagram of living body detection provided by the embodiments of the present specification;
[0036] Figure 3 A flowchart of a living body detection method provided by the embodiments of the present specification;
[0037] Figure 4 A flowchart of a living body detection method provided by the embodiments of the present specification;
[0038] Figure 5 A flowchart of a risk perception model training method provided by the embodiments of the present specification;
[0039] Figure 6 A flowchart of a risk perception model training method provided by the embodiments of the present specification;
[0040] Figure 7 A structure diagram of a risk perception model provided by the embodiments of the present specification;
[0041] Figure 8 A flowchart of a living body detection model training method provided by the embodiments of the present specification;
[0042] Figure 9 A flowchart of a living body detection model training method provided by the embodiments of the present specification;
[0043] Figure 10 A structure diagram of a living body detection model provided for an embodiment of the present specification is shown in FIG. 1.
[0044] Figure 11 A structure diagram of a living body detection device provided for an embodiment of the present specification is shown in FIG. 2.
[0045] Figure 12 A structure diagram of a living body detection device provided for an embodiment of the present specification is shown in FIG. 2.
[0046] Figure 13 A structure diagram of a risk perception model training device provided for an embodiment of the present specification is shown in FIG. 3.
[0047] Figure 14 A structure diagram of a living body detection model training device provided for an embodiment of the present specification is shown in FIG. 4.
[0048] Figure 15 A structure block diagram of an electronic device provided for an embodiment of the present specification is shown in FIG. 5. DETAILED DESCRIPTION
[0049] The technical solutions in the embodiments of the present specification will be described clearly and completely below with reference to the drawings in the embodiments of the present specification. Obviously, the described embodiments are only part of the embodiments of the present specification, rather than all the embodiments. Based on the embodiments in the present specification, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present specification.
[0050] In the description of the present specification, it should be understood that the terms "first", "second" and the like are only used for the purpose of description and should not be understood as indicating or implying relative importance. In the description of the present specification, it should be noted that, unless otherwise explicitly specified and limited, "comprising" and "having" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units not listed or optionally includes other steps or units inherent to the process, method, product or device. The specific meaning of the above terms in the present specification can be understood by the person skilled in the art. In addition, in the description of the present specification, "multiple" means two or more, unless otherwise specified. "And / or", which describes the relationship between the associated objects, means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. The character " / " generally represents a "or" relationship between the associated objects before and after it.
[0051] In the related art, with the continuous development of face recognition systems, "liveness attack detection" has become an indispensable part of face recognition systems, which can effectively intercept non-liveness type attack samples. Common liveness detection methods can be divided into two types: one is a multi-modal device-based liveness detection method, which upgrades the collected single-modal image to a multi-modal image, and improves the liveness detection performance by introducing more modal information; the other is a motion interaction-based liveness detection method, which requires the user to complete a specific action, and then collects the user's action process image for liveness detection, and improves the liveness detection performance by introducing user motion information. The above methods all need additional hardware support and time cost, which is not suitable for low-cost scenarios, and do not consider the regional difference of the existence of liveness attack risk.
[0052] Based on this, the embodiment of the present specification proposes a liveness detection method, which first acquires a face image collected by a first authentication device when a user performs a face recognition transaction, acquires a target device risk level and a target device risk feature corresponding to the first authentication device, and determines the target device risk level and the target device risk feature based on a target geographic area where the first authentication device is located. Based on the face image, the target device risk level and the target device risk feature, a liveness detection result corresponding to the face image is generated. By acquiring the risk feature corresponding to the authentication device, the risk feature of the authentication device is used as an additional input for liveness detection of the face image, which improves the accuracy and security of liveness detection, and does not need to increase the hardware cost and time cost.
[0053] The following detailed description is made in conjunction with the embodiments in the embodiments of the present specification. The implementation described in the following exemplary embodiments does not represent all implementations consistent with the present specification. On the contrary, they are only examples of devices and methods consistent with some aspects of the present specification as detailed in the appended claims. The flowchart shown in the accompanying drawings is only an exemplary illustration, and it is not necessary to perform the steps as shown. For example, some steps are parallel and there is no strict logical sequence, so the actual execution order is variable.
[0054] Please refer to Figure 1 A flowchart of a liveness detection method provided by the embodiment of the present specification is shown. In the embodiments of the present specification, the liveness detection method is applied to a liveness detection model training device or an electronic device configured with a liveness detection model training device. The following will be described in detail with respect to the flowchart shown in Figure 1 The liveness detection method can specifically include the following steps:
[0055] S102, acquiring a face image collected by a first authentication device when a user performs a face recognition transaction;
[0056] In the embodiments of the present application, when the user performs face recognition authentication, the first authentication device collects the face image of the user during identity authentication. The face recognition transaction can be face recognition payment, face recognition access control, face recognition attendance, etc.
[0057] It should be noted that the first authentication device can be a mobile phone, a computer, a tablet computer, a smart wearable device, a vehicle-mounted device, or an IOT machine, etc. When the user performs a face recognition transaction on the first authentication device, the first authentication device collects the face image of the user based on the image collection device arranged on the first authentication device, and performs authentication of the face recognition transaction based on the face image of the user.
[0058] Please refer to Figure 2 , a scene diagram of living body detection is provided in the embodiments of the present application. As shown in Figure 2 , the electronic device shown is a device for performing identity authentication, and an image collection device is arranged thereon. When the user approaches the device and is within the image collection range of the image collection device, the image collection device will collect the face image of the approaching person, and perform living body detection on the collected face image.
[0059] In step S104, the target device risk level and the target device risk feature corresponding to the first authentication device are obtained, and the target device risk level and the target device risk feature are determined based on the target geographic area where the first authentication device is located.
[0060] In the embodiments of the present application, the target geographic area where the first authentication device is located is determined, and the target device risk level and the target device risk feature corresponding to the first authentication device are determined according to the target geographic area where the first authentication device is located.
[0061] In the embodiments of the present application, before step S102 is performed, a plurality of geographic areas are divided, and the geographic area risk level and the geographic area risk feature corresponding to each geographic area are calculated according to the risk data of all authentication devices in each geographic area. Then, the target geographic area corresponding to the first authentication device is determined, and the target area risk level and the target area risk feature corresponding to the target geographic area are determined. The target area risk level and the target area risk feature corresponding to the target geographic area are used as the target device risk level and the target device risk feature corresponding to the first authentication device.
[0062] It should be noted that in the embodiments of the present application, the division of the geographic area and the calculation of the geographic area risk level and the geographic area risk feature all belong to prior features for living body detection. The division of the geographic area, the calculation of the geographic area risk level and the geographic area risk feature can be completed by the first authentication device, or can be completed by other electronic devices other than the first authentication device. For this purpose, the embodiments of the present application are not limited.
[0063] In an embodiment, if the division of the geographical area and the calculation of the geographical area risk level and the geographical area risk feature are performed by an electronic device other than the first authentication device, after obtaining the area risk level and the area risk feature corresponding to each geographical area respectively, the electronic device sends the area risk level and the area risk feature corresponding to each geographical area respectively to the first authentication device, so that the first authentication device determines the target device risk level and the target device risk feature corresponding to the first authentication device based on the area risk level and the area risk feature of the target geographical area where the first authentication device is located when performing identity authentication and liveness detection.
[0064] In an embodiment of the present specification, before obtaining the face image collected by the first authentication device when the user performs the face recognition transaction, the method further comprises: obtaining risk data corresponding to each authentication device in the divided geographical area, determining a device risk level corresponding to each authentication device based on the risk data, and determining an area risk level and an area risk feature corresponding to a geographical area in a geographical area set based on the device risk level corresponding to each authentication device and the risk data corresponding to each authentication device. The geographical area set is a set of all divided geographical areas.
[0065] In an embodiment of the present specification, the risk level of the risk data corresponding to the authentication device can be predicted based on a multi-expert model group. Specifically, the risk data corresponding to the authentication device is input into the multi-expert model group to obtain risk level estimation results output by each expert model in the multi-expert model group, and finally the device risk level corresponding to the authentication device is determined according to the risk level estimation results output by each expert model.
[0066] It can be understood that the risk data corresponding to the authentication device can include multiple different components, such as the number of attacks encountered by the device in the recent period, the CPU occupancy rate, the consumption amount of the device in the recent period, the number of accounts logged into the device in the recent period, etc. Due to the large category difference between different components of the risk data, in order to ensure the risk level prediction result, the multiple expert models in the multi-expert model group are used to predict different risk data components respectively, and finally the device risk level of the authentication device is determined according to multiple risk level estimation results. The multi-expert model group includes multiple pre-trained neural networks, and each neural network processes different components of the risk data.
[0067] Optionally, after obtaining multiple risk level estimation results output by the multi-expert model group, the multiple risk level estimation results are weighted and summed according to a preset weight, and the final weighted and summed result is taken as the device risk level corresponding to the authentication device.
[0068] In an embodiment of the present disclosure, after determining the device risk levels respectively corresponding to the authentication devices in the determined geographical region, the region risk level and the region risk feature corresponding to the geographical region are determined according to the device risk levels respectively corresponding to the authentication devices in the geographical region and the risk data.
[0069] Optionally, the region risk level can be the accumulation of the device risk levels respectively corresponding to the authentication devices in the geographical region, and the region risk feature can be the concatenation of the risk data respectively corresponding to the authentication devices in the geographical region.
[0070] In an embodiment of the present disclosure, after determining the region risk level and the region risk feature respectively corresponding to each geographical region in the geographical region set, the region risk level and the region risk feature respectively corresponding to each geographical region are updated by risk transmission optimization according to the adjacent relationship between the geographical regions.
[0071] It can be understood that, after determining the region risk level and the region risk feature corresponding to the geographical region based on the device risk levels respectively corresponding to the authentication devices in the geographical region and the risk data, it is considered that the risk will be transmitted between different regions, and the transmission process will be limited by the distance and will be weakened with the increase of the distance. For example, there is a B region between A region and C region, when A region and C region are high-risk level regions, B region as the adjacent region of the two regions should not be a low-risk region. Therefore, the region risk level and the region risk feature respectively corresponding to each geographical region are updated by risk transmission optimization according to the adjacent relationship between the geographical regions, so as to improve the calculation effect of the region risk level and the region risk feature.
[0072] Optionally, updating the region risk level and the region risk feature respectively corresponding to each geographical region by risk transmission optimization according to the adjacent relationship between the geographical regions can specifically be: determining at least one reference geographical region adjacent to the geographical region in the geographical region set, obtaining the reference region risk level and the reference region risk feature respectively corresponding to the at least one reference geographical region, and updating the region risk level and the region risk feature corresponding to the geographical region by transmission optimization based on the reference region risk level and the reference region risk feature.
[0073] S106, generating the live body detection result corresponding to the face image based on the face image, the target device risk level and the target device risk feature.
[0074] In an embodiment of the present specification, after determining the target device risk level corresponding to the first authentication device and the target device risk feature, a face image collected by the first authentication device is taken as input, the target device risk level corresponding to the first authentication device and the target device risk feature are taken as additional input, and a live detection result corresponding to the face image is generated according to the face image, the target device risk level, and the target device risk feature.
[0075] In an embodiment of the present specification, the face image is subjected to feature encoding processing to obtain an image feature corresponding to the face image, the target device risk level and the target device risk feature are subjected to feature encoding processing to obtain a fusion risk feature corresponding to the first authentication device, and a live prediction is performed based on the image feature and the fusion risk feature to obtain a live detection result corresponding to the face image.
[0076] In an embodiment of the present specification, a live detection can be performed on the face image, the target device risk level, and the target device risk feature based on a pre-trained live detection model. The face image, the target device risk level, and the target device risk feature are input into the live detection model, and the live detection model outputs a live detection result corresponding to the face image.
[0077] It should be noted that face spoofing and fake face are major threats faced by a face recognition system. Face spoofing refers to the behavior of fraudsters attacking the face recognition system by means of making face models, face masks, photos, videos, and the like. The live detection model is a model for performing live detection on a face image collected by the first authentication device, and distinguishing whether the currently collected face image is of a live type or an attack type. In the application process of the face recognition system, a face image is mainly collected by means of on-site shooting, and then the live detection model detects whether the collected face image is live. If the face image is collected from a face of a live person by the face recognition system, it is determined that the face image is of a live type. If the face image is collected from a fake face that is not live and is made by fraudsters, it is determined that the face image is of an attack type.
[0078] In an embodiment of the present specification, the live detection result can be an attack probability value of the face image. After obtaining the live detection result corresponding to the face image, it is judged whether the attack probability value is greater than a preset threshold. If the attack probability value is greater than the preset threshold, it is determined that the face image is of an attack type. If the attack probability value is less than or equal to the preset threshold, it is determined that the face image is of a live type.
[0079] In the embodiment of the present specification, first, a face image collected by the first authentication device when the user performs a face recognition transaction is obtained, a target device risk level and a target device risk feature corresponding to the first authentication device are obtained, the target device risk level and the target device risk feature are determined based on a target geographic area where the first authentication device is located, and based on the face image, the target device risk level and the target device risk feature, a liveness detection result corresponding to the face image is generated. By obtaining the risk feature corresponding to the authentication device, the risk feature of the authentication device is used as an additional input for liveness detection of the face image, which improves the accuracy and security of liveness detection.
[0080] Please refer to Figure 3 A flowchart of a liveness detection method provided by the embodiment of the present specification is shown in FIG. 1. The liveness detection method can specifically include the following steps:
[0081] S202, obtaining risk data corresponding to each authentication device in a geographic area, respectively;
[0082] It should be noted that the geographic area is a region divided according to a certain size, that is, a region with a larger area is divided into a plurality of geographic areas with the same area size to obtain a set of divided geographic areas.
[0083] The authentication device is an electronic device used for face recognition authentication, including but not limited to a mobile phone, a computer, a tablet computer, a smart wearable device, a vehicle-mounted device, or an IOT machine, etc. electronic devices with image acquisition function.
[0084] After the region is divided to obtain the set of geographic areas, for each geographic area in the set of geographic areas, risk data corresponding to each authentication device in the geographic area is obtained. The risk data can be the number of attacks encountered by the device in the near future, the CPU occupancy rate, the consumption amount of the device in the near future, the number of accounts logged into the device in the near future, etc.
[0085] S204, determining a device risk level corresponding to each authentication device based on the risk data;
[0086] In the embodiment of the present specification, after obtaining the risk data corresponding to the authentication device, the device risk level corresponding to the authentication device can be determined based on the risk data corresponding to the authentication device.
[0087] Please refer to Figure 4 A flowchart of a liveness detection method provided by the embodiment of the present specification is shown in FIG. 1. As shown in Figure 4 S204 includes the following steps:
[0088] S2042, input the risk data corresponding to the second authentication device into the multiple expert model group, obtain risk level estimation results respectively output by each expert model in the multiple expert model group, and the second authentication device is any authentication device in the authentication devices;
[0089] It can be understood that the risk data corresponding to the authentication device can include multiple different components, for example, it can include: the number of attacks encountered by the device in the recent period, CPU occupancy, consumption amount of the device in the recent period, number of accounts logged into the device in the recent period, etc. Due to the large category difference between different components of the risk data, in order to ensure the risk level prediction result, multiple expert models in the multiple expert model group are used to predict different risk data components respectively, and finally the device risk level of the authentication device is determined according to multiple risk level estimation results. The multiple expert model group includes multiple pre-trained neural networks, and each neural network processes different components of the risk data.
[0090] Using the multiple expert model group to estimate the risk level of the risk data can improve the prediction accuracy of the risk level of the authentication device.
[0091] S2044, determining the device risk level corresponding to the second authentication device according to the risk level estimation result.
[0092] In the embodiments of the present specification, after obtaining multiple risk level estimation results output by the multiple expert model group, the multiple risk level estimation results are weighted and summed according to a preset weight, and the final weighted and summed result is taken as the device risk level corresponding to the authentication device.
[0093] Optionally, the risk level estimation result with the highest risk level in the multiple risk level estimation results is taken as the device risk level corresponding to the second authentication device.
[0094] In one embodiment, the device risk level of the authentication device can be predicted based on the pre-trained risk perception model according to the risk data corresponding to the authentication device. The risk perception model includes a multiple expert model group and a risk level prediction network. After inputting the risk data corresponding to the second authentication device into the risk perception model, the multiple expert model group in the risk perception model performs risk assessment on the risk data, obtains risk level estimation results respectively output by each expert model in the multiple expert model group for the risk data, and then inputs the multiple risk level estimation results into the risk level prediction network to obtain the device risk level corresponding to the second authentication device.
[0095] S206, determining the region risk level and the region risk feature corresponding to the geographic region in the geographic region set based on the device risk level respectively corresponding to each authentication device and the risk data respectively corresponding to each authentication device;
[0096] In an embodiment of the present disclosure, after determining the device risk levels respectively corresponding to the authentication devices in the determined geographical region, the region risk level and the region risk feature corresponding to the geographical region are determined according to the device risk levels respectively corresponding to the authentication devices in the geographical region and the risk data.
[0097] In an embodiment of the present disclosure, the region risk level can be the accumulation of the device risk levels respectively corresponding to the authentication devices in the geographical region, and the region risk feature can be the concatenation of the risk data respectively corresponding to the authentication devices in the geographical region.
[0098] S208, at least one reference geographical region adjacent to the geographical region is determined in the geographical region set, and reference region risk levels and reference region risk features respectively corresponding to the at least one reference geographical region are obtained;
[0099] It can be understood that, after determining the region risk level and the region risk feature corresponding to the geographical region based on the device risk levels respectively corresponding to the authentication devices in the geographical region and the risk data, it is considered that the risk will be transmitted between different regions, and the transmission process will be limited by the distance and will be weakened with the increase of the distance. For example, there is a B region between A region and C region, when A region and C region are high-risk level regions, B region as the adjacent region of the two regions should not be a low-risk region. Therefore, the region risk level and the region risk feature respectively corresponding to each geographical region are updated by risk transmission optimization according to the adjacent relationship between the geographical regions, so as to improve the calculation effect of the region risk level and the region risk feature.
[0100] In an embodiment of the present disclosure, after determining the region risk level and the region risk feature respectively corresponding to each geographical region in the geographical region set, first, at least one reference geographical region adjacent to the to-be-optimized geographical region is determined in the geographical region set according to the adjacent relationship between the geographical regions, and reference region risk levels and reference region risk features respectively corresponding to the at least one reference geographical region are obtained. The reference geographical region is a geographical region in the geographical region set, and the reference geographical region is a geographical region adjacent to the to-be-optimized geographical region.
[0101] S210, the region risk level and the region risk feature corresponding to the geographical region are updated by transmission optimization based on the reference region risk level and the reference region risk feature;
[0102] In an embodiment of the present disclosure, the region risk level and the region risk feature corresponding to the geographical region are updated by transmission optimization according to the reference region risk level and the reference region risk feature respectively corresponding to the at least one reference geographical region adjacent to the geographical region.
[0103] Optionally, a graph model is constructed with each geographical area in the set of geographical areas as a node and the adjacency relationship between geographical areas as an edge, and risk propagation optimization is performed on the graph model based on a preset propagation function, wherein the input of the propagation function is the regional risk feature and the regional risk level of the adjacent nodes, and the output is the new regional risk level and the regional risk feature of the node.
[0104] It can be understood that, according to the characteristic that the risk propagation decreases with distance, the regional risk feature and the regional risk level between adjacent nodes should be as consistent as possible.
[0105] S212, acquiring a face image of the user collected by the first authentication device when the user performs the face recognition transaction;
[0106] In the embodiments of the present specification, step S212 can refer to the detailed description of step S102 in another embodiment of the present application, which will not be repeated here.
[0107] S214, determining a target geographical area where the first authentication device is located;
[0108] In the embodiments of the present specification, when the user performs identity authentication based on the first authentication device, the target geographical area where the first authentication device is located is determined. The target geographical area is one of the set of pre-divided geographical areas.
[0109] S216, determining a target regional risk level and a target regional risk feature corresponding to the target geographical area based on the regional risk level and the regional risk feature corresponding to each geographical area in the set of geographical areas respectively;
[0110] S218, taking the target regional risk level as the target device risk level and taking the target regional risk feature as the target device risk feature;
[0111] S220, performing feature encoding processing on the face image to obtain an image feature corresponding to the face image;
[0112] In the embodiments of the present specification, after the face image corresponding to the face recognition transaction performed by the user is collected and the target device risk level and the target device risk feature corresponding to the first authentication device are determined, the collected face image is processed by feature encoding to obtain an image feature corresponding to the face image.
[0113] The image feature can include texture features, color features, shape features, and spatial relationship features of the face image.
[0114] In an embodiment, the face image can be subjected to liveness detection based on a pre-trained liveness detection model, the liveness detection model comprising an image feature encoding network, after the face image is input into the liveness detection model, the face image is subjected to feature encoding processing by the image feature encoding network to obtain image features corresponding to the face image.
[0115] S222, the target device risk level and the target device risk feature are subjected to feature encoding processing to obtain the fusion risk feature corresponding to the first authentication device;
[0116] In the embodiments of the present specification, after the face image corresponding to the user performing the face recognition transaction is collected, and the target device risk level and the target device risk feature corresponding to the first authentication device are determined, the target device risk level and the target device risk feature are subjected to feature encoding processing to obtain the fusion risk feature corresponding to the first authentication device.
[0117] The target device risk level is the risk level corresponding to the current authentication device, and the target device risk feature is the risk feature corresponding to the current authentication device.
[0118] In an embodiment, the face image can be subjected to liveness detection based on a pre-trained liveness detection model, the liveness detection model comprising an image feature encoding network, after the face image is input into the liveness detection model, the face image is subjected to feature encoding processing by the image feature encoding network to obtain image features corresponding to the face image.
[0119] S224, the liveness is predicted based on the image feature and the fusion risk feature to obtain a liveness detection result corresponding to the face image.
[0120] In the embodiments of the present specification, after the image feature corresponding to the face image and the fusion risk feature corresponding to the first authentication device are obtained, the liveness is predicted based on the image feature and the fusion risk feature to obtain a liveness detection result corresponding to the face image, the risk feature of the authentication device is used as an additional input to perform liveness detection on the face image, and the accuracy and security of liveness detection are improved.
[0121] In an embodiment, the live body detection model comprises a fusion feature prediction network. After inputting the face image, the target device risk level and the target device risk feature into the live body detection model, the face image is subjected to feature coding processing by the image feature coding network to obtain the image feature corresponding to the face image, the target device risk level and the target device risk feature are subjected to feature coding processing by the risk feature coding network to obtain the fusion risk feature corresponding to the target device risk level and the target device risk feature, and then the image feature and the fusion risk feature are subjected to feature fusion and prediction based on the fusion feature prediction network to obtain the live body detection result corresponding to the face image.
[0122] In the embodiments of the present specification, firstly, risk data corresponding to each authentication device in a geographical area is acquired, a device risk level corresponding to each authentication device is determined based on the risk data, a region risk level and a region risk feature corresponding to a geographical region in a geographical region set are determined based on the device risk level corresponding to each authentication device and the risk data corresponding to each authentication device, at least one reference geographical region adjacent to the geographical region in the geographical region set is determined, a reference region risk level and a reference region risk feature corresponding to the at least one reference geographical region are acquired, the region risk level and the region risk feature corresponding to the geographical region are updated by transfer optimization based on the reference region risk level and the reference region risk feature, after determining the region risk level and the region risk feature corresponding to the geographical region in the geographical region set, the calculation accuracy of the region risk level and the region risk feature of the geographical region is effectively improved by updating the region risk level and the region risk feature corresponding to the geographical region by transfer optimization, thereby improving the detection effect of live body detection. Then, a face image collected by the first authentication device when the user performs a face recognition transaction is acquired, a target device risk level and a target device risk feature corresponding to the first authentication device are acquired, the target device risk level and the target device risk feature are determined based on a target geographical region where the first authentication device is located, and finally, a live body detection result corresponding to the face image is generated based on the face image, the target device risk level and the target device risk feature. By acquiring the risk feature corresponding to the authentication device and using the risk feature of the authentication device as an additional input for live body detection of the face image, the accuracy and security of live body detection are improved.
[0123] See Figure 5 , a flowchart of a risk perception model training method provided by the embodiments of the present specification. In the embodiments of the present specification, the risk perception model training method is applied to a risk perception model training device or an electronic device configured with a risk perception model training device. The risk perception model training method will be described in detail below with reference to the flowchart shown in Figure 5 . The risk perception model training method can specifically include the following steps:
[0124] S302, a first sample training data set is constructed, the first sample training data including sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device;
[0125] It should be noted that the risk perception model is a deep learning model for predicting a device risk level of an authentication device according to risk data corresponding to the authentication device.
[0126] In the embodiments of the present specification, the first sample training data set contains a plurality of first sample training data for learning and training the risk perception model, and the first sample training data includes sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device.
[0127] Optionally, the risk level label is a risk level manually labeled for the sample authentication device based on experience.
[0128] S304, inputting the sample risk data in the first sample training data into the risk perception model to obtain a predicted risk level corresponding to the sample authentication device;
[0129] In the embodiments of the present specification, the risk perception model is a deep learning model for predicting a device risk level of an authentication device according to risk data corresponding to the authentication device. The sample risk data corresponding to a certain sample authentication device is input into the risk perception model, and the risk perception model predicts a predicted risk level corresponding to the sample authentication device according to the sample risk data.
[0130] In one embodiment, the risk perception model includes a multi-expert model group and a risk level prediction network. The sample risk data corresponding to the sample authentication device is input into the risk perception model, the sample risk data is evaluated by the multi-expert model group in the risk perception model, a sample risk level estimation result output by each expert model in the multi-expert model group for the sample risk data is obtained, and then the plurality of sample risk level estimation results are input into the risk level prediction network to obtain the predicted risk level corresponding to the sample authentication device.
[0131] S306, supervising and training the risk perception model based on a risk perception loss function, a predicted risk level and a risk level label, and iteratively updating model parameters of the risk perception model until the risk perception model converges, to obtain a trained risk perception model.
[0132] In the embodiment of the present specification, the risk perception loss value corresponding to the predicted risk level and the risk level label is calculated based on the risk perception loss function, the model parameters of the risk perception model are updated based on the risk perception loss value, it is judged whether the parameter updated risk perception model meets the preset convergence condition, if yes, the training is stopped, and the trained risk perception model is obtained, and if not, step S304 is executed.
[0133] In the embodiment of the present specification, by constructing a first sample training data set, the first sample training data includes sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device, the sample risk data in the first sample training data is input into the risk perception model, the predicted risk level corresponding to the sample authentication device is obtained, the risk perception model is supervised trained based on the risk perception loss function, the predicted risk level and the risk level label, and the model parameters of the risk perception model are iteratively updated until the risk perception model converges, and the trained risk perception model is obtained. According to the authentication device risk data, the risk perception model for accurately predicting the risk level of the authentication device can be obtained by using the embodiment.
[0134] Please refer to Figure 6 The flowchart of a risk perception model training method provided by the embodiment of the present specification. The risk perception model training method can specifically include the following steps:
[0135] S402, constructing a first sample training data set, the first sample training data includes sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device;
[0136] In the embodiment of the present specification, step S402 please refer to the detailed description of step S302 in another embodiment of the present specification, which will not be repeated here.
[0137] It should be noted that in the embodiment of the present specification, the risk perception model includes a multi-expert model group and a risk level prediction network. Please refer to Figure 7 The structural diagram of a risk perception model provided by the embodiment of the present specification.
[0138] S404, using the multi-expert model group to perform risk assessment on the sample risk data in the first sample training data, and obtaining sample risk level estimation results respectively output by each expert model in the multi-expert model group for the sample risk data;
[0139] S406, performing fusion prediction processing on each sample risk level estimation result based on the risk level prediction network, and obtaining a predicted risk level corresponding to the sample authentication device;
[0140] Steps S404-S406 are specifically as follows:Figure 7 As shown, after the sample risk data in the first sample training data is input into the risk perception model, the sample risk data is input into the multi-expert model group, the sample risk data is evaluated by the multi-expert model group, the sample risk level estimation results respectively output by each expert model for the sample risk data are obtained, and then each sample risk level estimation result is input into the risk level prediction network, the risk level estimation results are fused and predicted by the risk level prediction network, and the predicted risk level corresponding to the sample authentication device is obtained.
[0141] S408, a risk perception loss value corresponding to the predicted risk level and the risk level label is calculated based on a risk perception loss function;
[0142] The predicted risk level is a risk level predicted by the risk perception model for the sample risk data, the risk level label is a risk level corresponding to the sample authentication device set by experience and manually, and the risk level label can be used as a true value. The risk perception loss value corresponding to the predicted risk level and the risk level label is calculated by the risk perception loss function, so as to guide the learning direction of the model according to the risk perception loss value.
[0143] S410, the model parameters of the risk perception model are updated based on the risk perception loss value;
[0144] S412, it is judged whether the risk perception model after the parameter update meets a preset convergence condition, if yes, the training is stopped, and the trained risk perception model is obtained, and if not, step S404 is executed.
[0145] Optionally, the preset convergence condition can be that the risk perception loss value is less than a preset loss threshold. If the risk perception loss value is less than the preset loss threshold, it is determined that the model converges, if the risk perception loss value is greater than or equal to the preset loss threshold, it is determined that the model does not converge, and then step S404 is executed for iterative training.
[0146] In the embodiment of the present specification, by constructing a first sample training data set, the first sample training data includes sample risk data corresponding to the sample authentication device and a risk level label corresponding to the sample authentication device, training a risk perception model based on the first sample training data set, the risk perception model includes a multi-expert model group and a risk level prediction network, the multi-expert model group is used to evaluate the risk of the sample risk data in the first sample training data, and the sample risk level estimation result output by each expert model in the multi-expert model group for the sample risk data is obtained. The risk level prediction network is used to fuse and predict each sample risk level estimation result to obtain the predicted risk level corresponding to the sample authentication device. Using a multi-expert model group to estimate the risk level of risk data can improve the prediction accuracy of the risk level of the sample authentication device. The risk perception loss value corresponding to the predicted risk level and the risk level label is calculated based on the risk perception loss function, and the model parameters of the risk perception model are updated based on the risk perception loss value. Finally, when the parameter updated risk perception model meets the preset convergence condition, the training is stopped, and the trained risk perception model is obtained. Using the present embodiment, a risk perception model for accurately predicting the risk level of an authentication device based on the risk data of the authentication device can be obtained.
[0147] Please refer to Figure 8 , a flowchart of a living body detection model training method provided in the embodiment of the present specification. In the embodiment of the present specification, the living body detection model training method is applied to a living body detection model training device or an electronic device configured with a living body detection model training device. In the following, the flowchart shown in Figure 8 will be described in detail. The living body detection model training method can specifically include the following steps:
[0148] S502, constructing a second sample training data set, the second sample training data including a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image;
[0149] In the embodiment of the present specification, the second sample training data set contains a plurality of second sample training data for learning and training the living body detection model, and the second sample training data includes a sample face image collected by a user when performing a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image.
[0150] It can be understood that the sample face image is the face image of the user collected by the sample authentication device when the user performs the face recognition transaction.
[0151] The living body detection label can be an attack type or a living body type. When the living body detection label is the attack type, it indicates that the sample face image is authentication information of the attack type, and at this time, the authentication is dangerous. When the living body detection label is the living body type, it indicates that the sample face image is authentication information of the living body type, and at this time, the authentication is safe.
[0152] S504, inputting the sample face image, the sample region risk level and the sample region risk feature into the living body detection model to obtain a sample living body detection result corresponding to the sample face image;
[0153] In the embodiments of the present specification, the living body detection model is a deep learning model for predicting a living body detection result corresponding to a sample face image. The sample face image, the sample region risk level and the sample region risk feature are input into the living body detection model, and the living body detection model predicts a sample living body detection result for the sample face image according to the sample face image, the sample region risk level and the sample region risk feature.
[0154] In one embodiment, the living body detection model includes an image feature encoding network, a risk feature encoding network and a fusion feature prediction network. The sample face image, the sample region risk level and the sample region risk feature are input into the living body detection model, the sample face image is processed by the image feature encoding network for feature encoding to obtain a sample image feature corresponding to the sample face image, the sample region risk level and the sample region risk feature are processed by the risk feature encoding network for feature encoding to obtain a sample fusion risk feature corresponding to the sample authentication device, and finally, the sample image feature and the sample fusion risk feature are predicted for living body by the fusion feature prediction network to obtain a sample living body detection result corresponding to the sample face image.
[0155] S506, supervising and training the living body detection model based on the living body detection loss function, the sample living body detection result and the living body detection label, and iteratively updating the model parameters of the living body detection model until the living body detection model converges, to obtain a trained living body detection model.
[0156] In the embodiments of the present specification, the living body detection loss value corresponding to the sample living body detection result and the living body detection label is calculated based on the living body detection loss function, the model parameters of the living body detection model are updated based on the living body detection loss value, it is judged whether the living body detection model after the parameter update meets a preset convergence condition, if yes, the training is stopped, and a trained living body detection model is obtained, and if not, step S504 is executed.
[0157] In the embodiment of the present specification, by constructing a second sample training data set, the second sample training data includes a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample regional risk level and a sample regional risk feature corresponding to a sample geographic area where the sample authentication device is located, and a living body detection label corresponding to the face image, the sample face image, the sample regional risk level and the sample regional risk feature are input into the living body detection model to obtain a sample living body detection result corresponding to the sample face image, the living body detection model is supervised and trained based on a living body detection loss function, the sample living body detection result and the living body detection label, and the model parameters of the living body detection model are iteratively updated until the living body detection model converges, and a trained living body detection model is obtained. By using the embodiment, the living body detection model can be trained based on the constructed second sample training data, and the living body detection model capable of detecting the living body of the user can be obtained, and the risk level and the risk feature corresponding to the sample authentication device are added in the training process, thereby further improving the model effect of the living body detection model.
[0158] Please refer to Figure 9 A flowchart of a living body detection model training method provided by an embodiment of the present specification is shown. The living body detection model training method can specifically include the following steps:
[0159] S602, a second sample training data set is constructed, and the second sample training data includes a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample regional risk level and a sample regional risk feature corresponding to a sample geographic area where the sample authentication device is located, and a living body detection label corresponding to the face image;
[0160] In the embodiment of the present specification, step S602 is described in detail in another embodiment of the present specification for step S502, which will not be repeated here.
[0161] It should be noted that in the embodiment of the present specification, the living body detection model includes an image feature encoding network, a risk feature encoding network, and a fusion feature prediction network. Please refer to Figure 10 A structure diagram of a living body detection model provided by an embodiment of the present specification is shown.
[0162] S604, the image feature encoding network is used for feature encoding processing of the sample face image to obtain a sample image feature corresponding to the sample face image;
[0163] S606, the risk feature encoding network is used for feature encoding processing of the sample regional risk level and the sample regional risk feature to obtain a sample fusion risk feature corresponding to the sample authentication device;
[0164] S608, performing living body prediction on the sample image feature and the sample fusion risk feature based on the fusion feature prediction network to obtain a sample living body detection result corresponding to the sample face image;
[0165] Specifically, as shown in FIG. 6, after inputting the sample face image, the sample region risk level and the sample region risk feature into the living body detection model, the sample face image is subjected to feature coding processing by the image feature coding network to obtain a sample image feature corresponding to the sample face image, the sample region risk level and the sample region risk feature are subjected to feature coding processing by the risk feature coding network to obtain a sample fusion risk feature corresponding to the sample region risk level and the sample region risk feature, and finally the sample image feature and the sample fusion risk feature are subjected to feature fusion and prediction based on the fusion feature prediction network to obtain a sample living body detection result corresponding to the sample face image. Figure 10
[0166] S610, calculating a living body detection loss value corresponding to the sample living body detection result and a living body detection label based on a living body detection loss function;
[0167] S612, updating model parameters of the living body detection model based on the living body detection loss value;
[0168] The sample living body detection result is a detection result obtained by the living body detection model performing living body detection on the sample face image, and the living body detection label is a true value label corresponding to the sample face image. The living body detection loss value corresponding to the sample living body detection result and the living body detection label is calculated by the living body detection loss function, so as to guide the learning direction of the living body detection model according to the living body detection loss value.
[0169] S614, judging whether the living body detection model after parameter updating meets a preset convergence condition, if yes, stopping training to obtain a trained living body detection model, and if not, performing step S604.
[0170] In the embodiment of the present application, by constructing a second sample training data set, the second sample training data includes a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a live detection label corresponding to the face image, the sample face image, the sample region risk level and the sample region risk feature are input into the live detection model to obtain a sample live detection result corresponding to the sample face image, the live detection model is supervised and trained based on a live detection loss function, the sample live detection result and the live detection label, and the model parameters of the live detection model are iteratively updated until the live detection model converges, and a trained live detection model is obtained. By using the embodiment, the live detection model can be trained based on the constructed second sample training data, and the live detection model that can detect the user's live can be obtained, and the sample region risk level and the sample region risk feature corresponding to the sample authentication device are added in the training process, which further improves the model effect of the live detection model.
[0171] Please refer to Figure 11 , a structure diagram of a live detection device provided by an embodiment of the present application. As shown in Figure 11 , the live detection device 1 can be realized by software, hardware or a combination of both to become all or part of an electronic device. According to some embodiments, the live detection device 1 includes a face image acquisition module 11, a device risk acquisition module 12, and a live detection module 13, and specifically includes:
[0172] The face image acquisition module 11 is configured to acquire a face image collected by a first authentication device when a user performs a face recognition transaction.
[0173] The device risk acquisition module 12 is configured to acquire a target device risk level and a target device risk feature corresponding to the first authentication device, wherein the target device risk level and the target device risk feature are determined based on a target geographic region where the first authentication device is located.
[0174] The live detection module 13 is configured to generate a live detection result corresponding to the face image based on the face image, the target device risk level and the target device risk feature.
[0175] Optionally, please refer to Figure 12 , a structure diagram of a live detection device provided by an embodiment of the present application. As shown in Figure 12 , the live detection device further includes a region risk determination module 14, configured to:
[0176] Acquire risk data respectively corresponding to each authentication device in a geographic region;
[0177] determine a device risk level corresponding to each authentication device based on the risk data;
[0178] determine a region risk level and a region risk feature corresponding to the geographic region in the set of geographic regions based on the device risk level corresponding to each authentication device and the risk data corresponding to each authentication device.
[0179] Optionally, in the determination of the device risk level corresponding to each authentication device based on the risk data, the region risk determination module 14 is specifically configured to:
[0180] input the risk data corresponding to the second authentication device into a plurality of expert model groups to obtain risk level estimation results output by each expert model in the plurality of expert model groups, the second authentication device being any authentication device in the authentication devices;
[0181] determine the device risk level corresponding to the second authentication device according to the risk level estimation results.
[0182] Optionally, after the determination of the region risk level and the region risk feature corresponding to the geographic region in the set of geographic regions, the region risk determination module 14 is further configured to:
[0183] determine at least one reference geographic region adjacent to the geographic region in the set of geographic regions, and obtain a reference region risk level and a reference region risk feature corresponding to each reference geographic region;
[0184] perform transfer optimization update on the region risk level and the region risk feature corresponding to the geographic region based on the reference region risk level and the reference region risk feature.
[0185] Optionally, the device risk acquisition module 12 is specifically configured to:
[0186] determine a target geographic region in which the first authentication device is located;
[0187] determine a target region risk level and a target region risk feature corresponding to the target geographic region based on the region risk level and the region risk feature corresponding to each geographic region in the set of geographic regions;
[0188] use the target region risk level as the target device risk level and use the target region risk feature as the target device risk feature.
[0189] Optionally, the living body detection module 13 is specifically configured to:
[0190] perform feature encoding processing on the face image to obtain an image feature corresponding to the face image.
[0191] perform feature coding processing on the target device risk level and the target device risk feature to obtain a fusion risk feature corresponding to the first authentication device;
[0192] perform liveness prediction based on the image feature and the fusion risk feature to obtain a liveness detection result corresponding to the face image.
[0193] Optionally, the liveness detection result is an attack probability value of the face image being an attack. As shown in Figure 15 The liveness detection apparatus further includes a liveness type judgment module 15, which is specifically configured to:
[0194] determine whether the attack probability value is greater than a preset threshold value;
[0195] If the attack probability value is greater than the preset threshold value, it is determined that the face image is of an attack type.
[0196] If the attack probability value is less than or equal to the preset threshold value, it is determined that the face image is of a liveness type.
[0197] In the embodiments of the present disclosure, first, a face image collected by a first authentication device when a user performs a face recognition transaction is obtained, a target device risk level and a target device risk feature corresponding to the first authentication device are obtained, the target device risk level and the target device risk feature are determined based on a target geographic area where the first authentication device is located, and a liveness detection result corresponding to the face image is generated based on the face image, the target device risk level and the target device risk feature. By obtaining the risk feature corresponding to the authentication device and using the risk feature of the authentication device as an additional input to perform liveness detection on the face image, the accuracy and security of liveness detection are improved.
[0198] It should be noted that the liveness detection apparatus provided in the above embodiments is only used as an example to illustrate the division of the above functional modules in the execution of the liveness detection method. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the liveness detection apparatus and the liveness detection method provided in the above embodiments belong to the same concept, and the implementation process is detailed in the method embodiments. Therefore, it will not be described here.
[0199] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0200] Please refer to Figure 13 for a structural schematic diagram of a risk perception model training apparatus provided in the embodiments of the present disclosure. As shown in Figure 13As shown, the risk perception model training apparatus 2 can be implemented as all or part of an electronic device by software, hardware, or a combination of both. According to some embodiments, the risk perception model training apparatus 2 includes a first sample construction module 21, a risk level prediction module 22, and a risk model training module 23, and specifically includes:
[0201] The first sample construction module 21 is configured to construct a first sample training data set, wherein the first sample training data includes sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device.
[0202] The risk level prediction module 22 is configured to input the sample risk data in the first sample training data into a risk perception model to obtain a predicted risk level corresponding to the sample authentication device.
[0203] The risk model training module 23 is configured to supervise training of the risk perception model based on a risk perception loss function, the predicted risk level, and the risk level label, and iteratively update model parameters of the risk perception model until the risk perception model converges, thereby obtaining a trained risk perception model.
[0204] Optionally, the risk perception model includes a multi-expert model group and a risk level prediction network, and the risk level prediction module 22 is specifically configured to:
[0205] use the multi-expert model group to perform risk assessment on the sample risk data in the first sample training data to obtain sample risk level estimation results respectively output by each expert model in the multi-expert model group for the sample risk data;
[0206] perform fusion prediction processing on each of the sample risk level estimation results based on the risk level prediction network to obtain the predicted risk level corresponding to the sample authentication device.
[0207] Optionally, the risk model training module 23 is specifically configured to:
[0208] calculate a risk perception loss value corresponding to the predicted risk level and the risk level label based on the risk perception loss function;
[0209] update the model parameters of the risk perception model based on the risk perception loss value;
[0210] determine whether the risk perception model after parameter update meets a preset convergence condition, if yes, stop training to obtain the trained risk perception model, and if not, perform the step of inputting the sample risk data in the first sample training data into the risk perception model to obtain the predicted risk level corresponding to the sample authentication device.
[0211] In the embodiment of the present specification, by constructing a first sample training data set, the first sample training data includes sample risk data corresponding to the sample authentication device and a risk level label corresponding to the sample authentication device, inputting the sample risk data in the first sample training data into the risk perception model, obtaining the predicted risk level corresponding to the sample authentication device, and based on the risk perception loss function, the predicted risk level and the risk level label, the risk perception model is supervised and trained and the model parameters of the risk perception model are iteratively updated until the risk perception model converges, and the trained risk perception model is obtained. By using the embodiment, the risk perception model for accurately predicting the risk level of the authentication device according to the risk data of the authentication device can be obtained.
[0212] It should be noted that the risk perception model training device provided in the above embodiment is only exemplified by the division of the above functional modules when performing the risk perception model training method. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the risk perception model training device and the risk perception model training method embodiment provided in the above embodiment belong to the same concept, and the implementation process is detailed in the method embodiment, which will not be described here.
[0213] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0214] Please refer to Figure 14 , a structure diagram of a living body detection model training device provided in the embodiment of the present specification. As Figure 14 indicated, the living body detection model training device 3 can be realized by software, hardware or a combination of the two to become all or part of an electronic device. According to some embodiments, the living body detection model training device 3 includes a second sample construction module 31, a sample living body detection module 32, and a living body model training module 33, specifically including:
[0215] The second sample construction module 31 is configured to construct a second sample training data set, wherein the second sample training data includes a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image.
[0216] The sample living body detection module 32 is configured to input the sample face image, the sample region risk level and the sample region risk feature into a living body detection model to obtain a sample living body detection result corresponding to the sample face image.
[0217] The living body model training module 33 is configured to supervise training of the living body detection model based on the living body detection loss function, the sample living body detection result and the living body detection label, and iteratively update model parameters of the living body detection model until the living body detection model converges, so as to obtain the trained living body detection model.
[0218] Optionally, the living body detection model comprises an image feature encoding network, a risk feature encoding network and a fusion feature prediction network.
[0219] The image feature encoding network is configured to perform feature encoding processing on the sample face image, so as to obtain a sample image feature corresponding to the sample face image.
[0220] The risk feature encoding network is configured to perform feature encoding processing on the sample region risk level and the sample region risk feature, so as to obtain a sample fusion risk feature corresponding to the sample authentication device.
[0221] The fusion feature prediction network is configured to perform living body prediction on the sample image feature and the sample fusion risk feature, so as to obtain a sample living body detection result corresponding to the sample face image.
[0222] Optionally, the living body model training module 33 is configured to:
[0223] The living body detection loss function is configured to calculate a living body detection loss value corresponding to the sample living body detection result and the living body detection label.
[0224] The living body detection loss value is configured to update the model parameters of the living body detection model.
[0225] The living body detection model after the parameter update is determined whether to satisfy a preset convergence condition, if yes, the training is stopped, and the trained living body detection model is obtained, if not, the step of inputting the sample face image, the sample region risk level and the sample region risk feature into the living body detection model to obtain the sample living body detection result corresponding to the sample face image is executed.
[0226] In the embodiment of the present application, by constructing a second sample training data set, the second sample training data includes a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample regional risk level and a sample regional risk feature corresponding to a sample geographic area where the sample authentication device is located, a live detection label corresponding to the face image, the sample face image, the sample regional risk level and the sample regional risk feature are input into the live detection model to obtain a sample live detection result corresponding to the sample face image, the live detection model is supervised and trained based on a live detection loss function, the sample live detection result and the live detection label, and the model parameters of the live detection model are iteratively updated until the live detection model converges, and a trained live detection model is obtained. By using the embodiment, the live detection model can be trained based on the constructed second sample training data, and the live detection model can be used to detect the user, and the risk level and risk feature corresponding to the sample authentication device are added in the training process, which further improves the model effect of the live detection model.
[0227] It should be noted that the live detection model training device provided in the above embodiment is used to execute the live detection model training method, and only the division of the above functional modules is used as an example for illustration. In actual application, the above functions can be distributed to different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the live detection model training device and the live detection model training method provided in the above embodiment belong to the same concept, and the implementation process is described in detail in the method embodiment, which will not be repeated here.
[0228] The serial numbers of the above embodiments of the present application are only for description, and do not represent the advantages or disadvantages of the embodiments.
[0229] The embodiment of the present application also provides a computer storage medium, which can store a plurality of instructions, the instructions are suitable for being loaded and executed by a processor to execute the live detection method of the above Figures 1-10 The specific execution process can refer to the specific description of the embodiment of the above Figures 1-10 The specific execution process can refer to the specific description of the embodiment of the above
[0230] The present application also provides a computer program product, which stores at least one instruction, the at least one instruction is loaded and executed by the processor to execute the live detection method of the above Figures 1-10 The specific execution process can refer to the specific description of the embodiment of the above Figures 1-10 The specific execution process can refer to the specific description of the embodiment of the above
[0231] Please refer to Figure 15A structural block diagram of an electronic device is provided for an embodiment of the present specification. The electronic device in the present specification can include one or more of the following components: a processor 110, a memory 120, an input device 130, an output device 140, and a bus 150. The processor 110, the memory 120, the input device 130, and the output device 140 can be connected through the bus 150.
[0232] The processor 110 can include one or more processing cores. The processor 110 connects various parts within the terminal through various interfaces and lines, performs various functions of the terminal 100 and processes data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 120, and calling data stored in the memory 120. Alternatively, the processor 110 can be implemented in at least one of a hardware form of a digital signal processing (DSP), a field-programmable gate array (FPGA), and a programmable logic array (PLA). The processor 110 can integrate one or a combination of a central processing unit (CPU), a graphics processing unit (GPU), and a modem. Among them, the CPU mainly processes an operating system, a user interface, and an application program; the GPU is responsible for rendering and drawing display content; and the modem is used for processing wireless communication. It can be understood that the above-mentioned modem can also not be integrated into the processor 110, but can be implemented by a separate communication chip.
[0233] The memory 120 can include a random access memory (RAM) and can also include a read-only memory (ROM). Alternatively, the memory 120 includes a non-transitory computer-readable storage medium. The memory 120 can be used to store instructions, programs, codes, code sets, or instruction sets.
[0234] Among them, the input device 130 is used to receive input instructions or data, and the input device 130 includes but is not limited to a keyboard, a mouse, a camera, a microphone, or a touch device. The output device 140 is used to output instructions or data, and the output device 140 includes but is not limited to a display device and a speaker. In an embodiment of the present specification, the input device 130 can be a temperature sensor for obtaining the operating temperature of the terminal. The output device 140 can be a speaker for outputting an audio signal.
[0235] In addition, those skilled in the art will understand that the structure of the terminal shown in the above figures does not constitute a limitation on the terminal. The terminal may include more or fewer components than shown, or combine certain components, or have different component arrangements. For example, the terminal may also include radio frequency circuits, input units, sensors, audio circuits, wireless fidelity (WIFI) modules, power supplies, Bluetooth modules, etc., which will not be described in detail here.
[0236] In the embodiments of this specification, the executing entity for each step can be the terminal described above. Optionally, the executing entity for each step is the terminal's operating system. The operating system can be Android, iOS, or other operating systems; this specification does not limit this.
[0237] exist Figure 15 In the electronic device, the processor 110 can be used to call the liveness detection program stored in the memory 120 and execute it to implement the liveness detection method as described in the various method embodiments of this specification.
[0238] In the embodiments of this specification, firstly, the face image captured by the first authentication device when the user performs a face-scanning transaction is obtained. Then, the target device risk level and target device risk characteristics corresponding to the first authentication device are obtained. The target device risk level and target device risk characteristics are determined based on the target geographical area where the first authentication device is located. Based on the face image, the target device risk level, and the target device risk characteristics, a liveness detection result corresponding to the face image is generated. By obtaining the risk characteristics corresponding to the authentication device, the risk characteristics of the authentication device are used as additional input to perform liveness detection on the face image, thereby improving the accuracy and security of liveness detection.
[0239] Those skilled in the art will clearly understand that the technical solutions in this specification can be implemented using software and / or hardware. In this specification, "unit" and "module" refer to software and / or hardware capable of independently performing or cooperating with other components to perform a specific function. Hardware may include, for example, a Field-Programmable Gate Array (FPGA), an Integrated Circuit (IC), etc.
[0240] It should be noted that, for the foregoing method embodiments, the sequences of the described actions are not necessarily required to achieve the objects of the present application, and certain steps can be performed in other sequences or even concurrently. Additionally, the described embodiments are merely provided as examples, and not all of the actions described are necessarily required to achieve the objects of the present application.
[0241] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0242] In several embodiments provided in the present specification, it should be understood that the disclosed apparatus can be implemented in other manners. For example, the described apparatus embodiments are merely schematic. Taking the division of the units as an example, the division can be changed in actual implementation, for example, a plurality of units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed coupling or direct coupling or communication connection between the units can be indirect coupling or communication connection through some interfaces, devices or units, and can be electrical or other forms.
[0243] The units described as separate components can or can not be physically separate, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purposes of the embodiments.
[0244] In addition, each functional unit in each embodiment of the present specification can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be implemented in the form of hardware, or in the form of a software functional unit.
[0245] Those skilled in the art can understand that all or part of the steps in the above-described embodiments of various methods can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable memory, which can include a flash disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0246] The above-described embodiments are merely illustrative for the present specification and cannot limit the scope of the present specification. That is, any equivalent changes and modifications made in accordance with the teachings of the present specification are still within the scope of the present specification. Other embodiments of the present specification will be easily suggested to those skilled in the art upon consideration of the present specification and practice of the disclosure herein. The present specification is intended to encompass any variations, uses, or adaptive changes of the present specification following the general principles of the present specification and including common knowledge or conventional technical means not described in the present specification. The present specification and embodiments are merely considered as exemplary, and the scope and spirit of the present specification are defined by the claims.
Claims
1. A live detection method, comprising: obtaining a face image collected by a first authentication device when a user performs a face recognition transaction; obtaining a target device risk level corresponding to the first authentication device and a target device risk feature, the target device risk level being determined based on a target area risk level of a target geographic area where the first authentication device is located, and the target device risk feature being determined based on a target area risk feature of the target geographic area, the target area risk level and the target area risk feature being determined by device risk levels corresponding to authentication devices in the target geographic area, and each device risk level corresponding to an authentication device being determined by a risk perception model based on risk data corresponding to the authentication device, the risk perception model including a multi-expert model group and a risk level prediction network, each expert model in the multi-expert model group being configured to output a risk level estimation result for the risk data, and the risk level prediction network being configured to perform weighted summation on each risk level estimation result according to a preset weight to obtain a device risk level corresponding to the authentication device; generating a live detection result corresponding to the face image based on the face image, the target device risk level, and the target device risk feature; the generating of the live detection result corresponding to the face image based on the face image, the target device risk level, and the target device risk feature comprises: performing feature encoding processing on the face image to obtain an image feature corresponding to the face image; performing feature encoding processing on the target device risk level and the target device risk feature to obtain a fusion risk feature corresponding to the first authentication device; performing live prediction based on the image feature and the fusion risk feature to obtain the live detection result corresponding to the face image.
2. The method of claim 1, before the obtaining of the face image collected by the first authentication device when the user performs the face recognition transaction, further comprising: obtaining risk data respectively corresponding to authentication devices in a geographic area; determining device risk levels respectively corresponding to the authentication devices based on the risk data; determining an area risk level and an area risk feature corresponding to the geographic area in a geographic area set based on the device risk levels respectively corresponding to the authentication devices and the risk data respectively corresponding to the authentication devices.
3. The method of claim 2, the determining of the device risk levels respectively corresponding to the authentication devices based on the risk data comprises: inputting risk data corresponding to a second authentication device into a multi-expert model group to obtain risk level estimation results respectively output by each expert model in the multi-expert model group, the second authentication device being any authentication device in the authentication devices; determining a device risk level corresponding to the second authentication device according to the risk level estimation results.
4. The method of claim 2, after the determining of the area risk level and the area risk feature corresponding to the geographic area in the geographic area set, further comprising: determining at least one reference geographical area adjacent to the geographical area in the geographical area set, obtaining a reference area risk level and a reference area risk feature corresponding to the at least one reference geographical area respectively; performing transfer optimization update on the area risk level and the area risk feature corresponding to the geographical area based on the reference area risk level and the reference area risk feature.
5. The method of claim 2, wherein the obtaining the target device risk level and the target device risk feature corresponding to the first authentication device comprises: determining a target geographical area in which the first authentication device is located; determining a target area risk level and a target area risk feature corresponding to the target geographical area based on the area risk level and the area risk feature corresponding to each geographical area in the geographical area set; taking the target area risk level as the target device risk level and taking the target area risk feature as the target device risk feature.
6. The method of claim 1, wherein the liveness detection result is an attack probability value of the face image being an attack, and after the generating the liveness detection result corresponding to the face image based on the face image, the target device risk level, and the target device risk feature, the method further comprises: determining whether the attack probability value is greater than a preset threshold value; if the attack probability value is greater than the preset threshold value, determining that the face image is of an attack type; if the attack probability value is less than or equal to the preset threshold value, determining that the face image is of a liveness type.
7. A risk perception model training method, comprising: constructing a first sample training data set, wherein the first sample training data set comprises sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device, and the sample risk data at least comprises a number of times of attacks suffered by the sample authentication device, a processor occupancy rate of the sample authentication device, a consumption amount of the sample authentication device, and a number of accounts logged into the sample authentication device; inputting the sample risk data in the first sample training data set into a risk perception model to obtain a predicted risk level corresponding to the sample authentication device; performing supervised training on the risk perception model based on a risk perception loss function, the predicted risk level, and the risk level label, and iteratively updating model parameters of the risk perception model until the risk perception model converges, to obtain a trained risk perception model, wherein the trained risk perception model is used to determine a device risk level corresponding to each authentication device based on risk data corresponding to each authentication device in a target geographical area, so that a liveness detection model determines a target area risk level and a target area risk feature of the target geographical area based on the device risk level corresponding to each authentication device, the target area risk level is used to make the liveness detection model determine a target device risk level of a first authentication device, and the target area risk feature is used to make the liveness detection model determine a target device risk feature of the first authentication device, the first authentication device being located in the target geographical area. The risk perception model comprises a multi-expert model group and a risk level prediction network, the sample risk data in the first sample training data is input into the risk perception model, and a predicted risk level corresponding to the sample authentication device is obtained. The sample risk data in the first sample training data is evaluated by using the multi-expert model group, and sample risk level estimation results respectively output by each expert model in the multi-expert model group for the sample risk data are obtained. The risk level estimation results are weighted and summed based on the risk level prediction network according to a preset weight, and the predicted risk level corresponding to the sample authentication device is obtained.
8. The method of claim 7, wherein the risk perception model is supervised trained and the model parameters of the risk perception model are iteratively updated based on the risk perception loss function, the predicted risk level and the risk level label until the risk perception model converges, and a trained risk perception model is obtained, comprising: calculating a risk perception loss value corresponding to the predicted risk level and the risk level label based on the risk perception loss function; updating the model parameters of the risk perception model based on the risk perception loss value; determining whether the parameter updated risk perception model meets a preset convergence condition, if yes, stopping training to obtain the trained risk perception model, and if not, performing the step of inputting the sample risk data in the first sample training data into the risk perception model to obtain the predicted risk level corresponding to the sample authentication device.
9. A living body detection model training method, comprising: constructing a second sample training data set, the second sample training data comprising a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample region risk level and a sample region risk feature corresponding to a sample geographic region where the sample authentication device is located, and a living body detection label corresponding to the face image, the sample region risk level and the sample region risk feature being determined by device risk levels corresponding to authentication devices in the sample geographic region, the device risk levels corresponding to each of the authentication devices being determined by a risk perception model based on risk data corresponding to each of the authentication devices, the risk perception model comprising a multi-expert model group and a risk level prediction network, each expert model in the multi-expert model group being configured to output a risk level estimation result for the risk data, and the risk level prediction network being configured to weighted sum each risk level estimation result according to a preset weight to obtain a device risk level corresponding to each authentication device; inputting the sample face image, the sample region risk level and the sample region risk feature into a living body detection model to obtain a sample living body detection result corresponding to the sample face image; supervised training the living body detection model based on a living body detection loss function, the sample living body detection result and the living body detection label, and iteratively updating model parameters of the living body detection model until the living body detection model converges, and obtaining a trained living body detection model. The live body detection model comprises an image feature encoding network, a risk feature encoding network, and a fusion feature prediction network. The image feature encoding network is used for performing feature encoding processing on the sample face image to obtain sample image features corresponding to the sample face image. The risk feature encoding network is used for performing feature encoding processing on the sample regional risk level and the sample regional risk feature to obtain sample fusion risk features corresponding to the sample authentication device. The fusion feature prediction network is used for performing live body prediction on the sample image features and the sample fusion risk features to obtain a sample live body detection result corresponding to the sample face image.
10. The method of claim 9, wherein the live body detection model is supervised trained and the model parameters of the live body detection model are iteratively updated based on the live body detection loss function, the sample live body detection result, and the live body detection label until the live body detection model converges, so as to obtain a trained live body detection model, comprising: calculating a live body detection loss value corresponding to the sample live body detection result and the live body detection label based on the live body detection loss function; updating the model parameters of the live body detection model based on the live body detection loss value; determining whether the live body detection model after parameter updating meets a preset convergence condition, if yes, stopping the training to obtain the trained live body detection model, and if not, performing the step of inputting the sample face image, the sample regional risk level, and the sample regional risk feature into the live body detection model to obtain the sample live body detection result corresponding to the sample face image.
11. A live body detection device, comprising: a face image acquisition module configured to acquire a face image collected by a first authentication device when a user performs a face recognition transaction; a device risk acquisition module configured to acquire a target device risk level corresponding to the first authentication device and a target device risk feature, the target device risk level being determined based on a target regional risk level of a target geographic region where the first authentication device is located, and the target device risk feature being determined based on a target regional risk feature of the target geographic region, the target regional risk level and the target regional risk feature being determined by device risk levels corresponding to authentication devices in the target geographic region, and each device risk level corresponding to each authentication device being determined by a risk perception model based on risk data corresponding to each authentication device, the risk perception model comprising a multi-expert model group and a risk level prediction network, each expert model in the multi-expert model group being configured to output a risk level estimation result for the risk data, and the risk level prediction network being configured to perform weighted summation on each risk level estimation result according to a preset weight to obtain a device risk level corresponding to each authentication device. The living body detection module is configured to perform feature coding processing on the face image to obtain an image feature corresponding to the face image. The living body detection module is configured to perform feature coding processing on the face image to obtain an image feature corresponding to the face image. The living body detection module is configured to perform feature coding processing on the face image to obtain an image feature corresponding to the face image. The living body detection module is configured to perform feature coding processing on the face image to obtain an image feature corresponding to the face image.
12. A risk perception model training apparatus, comprising: A first sample construction module configured to construct a first sample training data set, wherein the first sample training data comprises sample risk data corresponding to a sample authentication device and a risk level label corresponding to the sample authentication device, and the sample risk data at least comprises a number of times of attacks suffered by the sample authentication device, a processor occupancy rate of the sample authentication device, a consumption amount of the sample authentication device, and a number of accounts logged into the sample authentication device. A risk level prediction module configured to input the sample risk data in the first sample training data into a risk perception model to obtain a predicted risk level corresponding to the sample authentication device. A risk model training module configured to perform supervised training on the risk perception model based on a risk perception loss function, the predicted risk level, and the risk level label, and iteratively update model parameters of the risk perception model until the risk perception model converges, to obtain a trained risk perception model, wherein the trained risk perception model is configured to determine a device risk level corresponding to each authentication device based on risk data corresponding to the authentication device in a target geographic region, so that a living body detection model determines a target region risk level and a target region risk feature of the target geographic region based on the device risk level corresponding to each authentication device, the target region risk level is used to make the living body detection model determine a target device risk level of a first authentication device, and the target region risk feature is used to make the living body detection model determine a target device risk feature of the first authentication device, and the first authentication device is in the target geographic region. The risk perception model comprises a plurality of expert model groups and a risk level prediction network, and the risk level prediction module is specifically configured to perform risk assessment on the sample risk data in the first sample training data by using the plurality of expert model groups to obtain sample risk level estimation results respectively output by each expert model in the plurality of expert model groups for the sample risk data. The risk level prediction network is configured to perform weighted summation on each of the sample risk level estimation results according to a preset weight to obtain the predicted risk level corresponding to the sample authentication device.
13. A living body detection model training apparatus, comprising: The second sample construction module is configured to construct a second sample training data set, wherein the second sample training data comprises a sample face image collected by a sample authentication device when a user performs a face recognition transaction, a sample regional risk level and a sample regional risk feature corresponding to a sample geographic region where the sample authentication device is located, and a live body detection label corresponding to the face image, the sample regional risk level and the sample regional risk feature are determined according to device risk levels corresponding to authentication devices in the sample geographic region, the device risk levels corresponding to the authentication devices are determined based on risk data corresponding to the authentication devices by a risk perception model, the risk perception model comprises a multi-expert model group and a risk level prediction network, each expert model in the multi-expert model group is configured to output a risk level estimation result according to the risk data, and the risk level prediction network is configured to perform weighted summation on the risk level estimation results according to preset weights to obtain the device risk levels corresponding to the authentication devices. The sample live body detection module is configured to input the sample face image, the sample regional risk level and the sample regional risk feature into a live body detection model to obtain a sample live body detection result corresponding to the sample face image. The live body model training module is configured to supervise training of the live body detection model based on a live body detection loss function, the sample live body detection result and the live body detection label, and iteratively update model parameters of the live body detection model until the live body detection model converges, so as to obtain a trained live body detection model. The live body detection model comprises an image feature encoding network, a risk feature encoding network and a fusion feature prediction network, and the sample live body detection module is specifically configured to perform feature encoding processing on the sample face image by using the image feature encoding network to obtain a sample image feature corresponding to the sample face image, perform feature encoding processing on the sample regional risk level and the sample regional risk feature by using the risk feature encoding network to obtain a sample fusion risk feature corresponding to the sample authentication device, and perform live body prediction on the sample image feature and the sample fusion risk feature by using the fusion feature prediction network to obtain the sample live body detection result corresponding to the sample face image. The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10. The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10.
14. A storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10.
15. An electronic device, comprising: The computer program is executed by the processor to implement the steps of the method in any one of claims 1-10. 16. A computer program product having stored thereon at least one instruction, the computer program product comprising:
Citation Information
Patent Citations
Risk prediction model training method and device
CN112330035A
Anti-fraud transaction verification method and device for hearing-impaired people
CN115438326A
Identity authentication method and device, electronic equipment, system and storage medium
CN115567283A