Identity recognition method, device, equipment and medium based on federated liveness detection model

Through federated learning technology, the local live detection model is iteratively trained using the joint gradient of the coordination end, which solves the problem of low recognition accuracy caused by insufficient samples of the live detection model, and improves the recognition accuracy of the model while protecting data privacy. and generalization ability.

CN111428620BActive Publication Date: 2025-02-07WEBANK (CHINA)
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010202675.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-03-20
Publication Date
2025-02-07
Estimated Expiration
2040-03-20

AI Technical Summary

Technical Problem

The existing live detection models have low recognition accuracy due to insufficient samples during training, and there is a risk of private data leakage when training through shared data.

Method used

The identity recognition method based on the federal living organism detection model is adopted, and the local initial living organism detection model is iteratively trained through the joint gradient sent by the coordination end, and the model gradient processing and joint training of multi-party nodes are realized to ensure the protection of data privacy.

Benefits of technology

Without revealing data privacy, the identification accuracy and generalization ability of the live detection model are improved, and the problem of low recognition accuracy caused by insufficient samples is solved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111428620B_ABST
    Figure CN111428620B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of financial technology, and discloses an identity recognition method, device, equipment and medium based on a federated liveness detection model. The method includes: upon receiving a liveness detection request, obtaining image information collected by a preset collection device; preprocessing the image information to obtain a liveness feature image to be detected; calling a federated liveness detection model to identify the liveness feature image, and obtaining liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training a local initial liveness detection model based on a joint gradient sent by a coordination end, and the joint gradient is generated by the coordination end based on model gradient processing of multiple nodes. The present invention performs identity recognition through a federated liveness detection model, and improves the accuracy of liveness detection model detection while ensuring data security.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of financial technology (Fintech), and in particular to an identity recognition method, device, equipment and medium based on a federated liveness detection model. Background Art

[0002] In recent years, with the rapid development of Internet financial technology (Fintech), more and more technologies (big data, distributed, blockchain, artificial intelligence, etc.) are being applied in the financial field.

[0003] In order to ensure the security of financial business operations, the financial sector needs to perform liveness recognition, which is achieved through liveness detection equipment, including infrared sensors, scanners, etc. Such liveness detection methods require high equipment costs. Some institutions use liveness detection models to achieve liveness detection. Currently, liveness detection models mostly use local training samples for liveness detection model training, which requires a large number of training samples. However, in real scenarios, few companies have a large number of training samples that cover enough sample types. Due to the insufficient amount of training sample data, the trained liveness detection model has a low recognition accuracy. Summary of the invention

[0004] The main purpose of the present invention is to propose an identity recognition method, device, equipment and medium based on a federated liveness detection model, aiming to solve the problem of insufficient training samples of the current liveness detection model, resulting in insufficient learning of the liveness detection model and low recognition accuracy. If the model is trained through shared data, there is a risk of privacy data leakage.

[0005] To achieve the above object, the present invention provides an identity recognition method based on a federated liveness detection model, and the identity recognition method based on a federated liveness detection model comprises the following steps:

[0006] Upon receiving a liveness detection request, obtaining image information collected by a preset collection device;

[0007] Preprocessing the image information to obtain a living feature image to be detected;

[0008] Call the federated liveness detection model to identify the liveness feature image to obtain the liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training the local initial liveness detection model based on the joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on the model gradient processing of multiple nodes.

[0009] Optionally, before the step of calling the federated living body detection model to identify the living body feature image and obtaining the living body identity information corresponding to the living body feature image, the method includes:

[0010] Obtain an initial liveness detection model and mark the image information in local storage to form a training sample set;

[0011] Extracting a training sample group from the training sample set, training the initial liveness detection model by using the training sample group, and obtaining a trained liveness detection model and a liveness feature vector;

[0012] Processing the live feature vector by a preset loss function to obtain a loss value, and sending the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges;

[0013] When the model convergence prompt sent by the coordination end is received, the trained liveness detection model is used as the federated liveness detection model.

[0014] Optionally, the step of obtaining an initial liveness detection model and marking the image information in local storage to form a training sample set includes:

[0015] When receiving a liveness detection model training instruction, output a configuration page, wherein the configuration page is used to configure the model types of the liveness detection model, and the model types include an anti-copy detection model, an infrared detection model, a motion detection model, a flash liveness detection model, and a 3D liveness detection model;

[0016] If the initial liveness detection model corresponding to the model type does not exist in the local storage, sending a model acquisition instruction to the coordination end so that the coordination end feeds back the initial liveness detection model corresponding to the model type;

[0017] An initial liveness detection model generated by the coordination end is received, image information corresponding to the model type in the local storage is obtained, and the image information is marked to form a training sample set.

[0018] Optionally, the step of extracting a training sample group from the training sample set, training the initial liveness detection model by using the training sample group, and obtaining the trained liveness detection model and liveness feature vector comprises:

[0019] Randomly extract a training sample from the training sample set as an anchor sample, select a positive sample and a negative sample according to label information associated with the anchor sample, and use the anchor sample, the positive sample and the negative sample as a training sample group;

[0020] Training the initial liveness detection model through the training sample group to obtain a model gradient, and sending the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0021] The joint gradient sent by the coordination end is received, and the initial liveness detection model is updated according to the joint gradient to obtain a trained liveness detection model and a liveness feature vector.

[0022] Optionally, the step of processing the liveness feature vector by a preset loss function to obtain a loss value, and sending the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges includes:

[0023] Extracting an anchor feature vector corresponding to the anchor example, extracting a positive feature vector corresponding to the positive example, and extracting a negative feature vector corresponding to the negative example;

[0024] Calculating a first Euclidean distance between the anchor feature vector and the positive example feature vector, and a second Euclidean distance between the anchor feature vector and the negative example feature vector;

[0025] The first Euclidean distance and the second Euclidean distance are input into a preset loss function to obtain a loss value, and the loss value is sent to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges.

[0026] Optionally, the step of calling a federated living body detection model to identify the living body feature image and obtaining living body identity information corresponding to the living body feature image includes:

[0027] Calling a federated liveness detection model to identify the liveness feature image, obtaining a liveness feature vector, and comparing the liveness feature vector with a preset feature vector;

[0028] A target feature vector matching the live feature vector is obtained, live identity information associated with the target feature vector is obtained, and the live identity information is used as the live identity information corresponding to the live feature image.

[0029] Optionally, after the step of calling the federated living body detection model to identify the living body feature image and obtaining the living body identity information corresponding to the living body feature image, the method further includes:

[0030] When the living body identity information is recognized incorrectly, outputting a marking prompt to prompt the user to mark the image information;

[0031] The annotated image information is used as a training sample, the federated liveness detection model is trained according to the training sample to obtain a model gradient, and the model gradient is sent to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0032] Receive the joint gradient sent by the coordination end, and update the federated living body detection model according to the joint gradient.

[0033] In addition, to achieve the above-mentioned purpose, the present invention further provides an identity recognition device based on a federated liveness detection model, the identity recognition device based on a federated liveness detection model comprising:

[0034] An information acquisition module, used to acquire image information collected by a preset collection device when receiving a liveness detection request;

[0035] A processing and acquisition module, used for preprocessing the image information to obtain a living feature image to be detected;

[0036] A recognition module is called to call a federated liveness detection model to identify the liveness feature image and obtain liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training a local initial liveness detection model based on a joint gradient sent by a coordination end, and the joint gradient is generated by the coordination end based on model gradient processing of multiple nodes.

[0037] In addition, to achieve the above-mentioned purpose, the present invention also provides an identity recognition device based on a federated liveness detection model, and the identity recognition device based on a federated liveness detection model includes: a memory, a processor, and a computer program corresponding to the identity recognition based on the federated liveness detection model stored in the memory and run on the processor. When the computer program corresponding to the identity recognition based on the federated liveness detection model is executed by the processor, the steps of the identity recognition method based on the federated liveness detection model as described above are implemented.

[0038] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium, on which is stored a computer program corresponding to identity recognition based on a federated liveness detection model. When the computer program corresponding to identity recognition based on a federated liveness detection model is executed by a processor, the steps of the identity recognition method based on a federated liveness detection model as described above are implemented.

[0039] The present invention provides an identity recognition method, device, equipment and medium based on a federated liveness detection model. In an embodiment of the present invention, when a liveness detection request is received, image information collected by a preset collection device is obtained; the image information is preprocessed to obtain a liveness feature image to be detected; the federated liveness detection model is called to identify the liveness feature image to obtain liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training a local initial liveness detection model based on a joint gradient sent by a coordination end, and the joint gradient is generated by the coordination end based on model gradient processing of multiple nodes. In the identity recognition method based on a federated liveness detection model in an embodiment of the present invention, by means of joint training of each node in the alliance chain, multiple parties can fully learn the liveness detection model without disclosing their own data privacy, thereby improving the accuracy and generalization ability of liveness detection model recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention;

[0041] Figure 2 It is a schematic diagram of the process of constructing a federated liveness detection model in the first embodiment of the identity recognition method based on the federated liveness detection model of the present invention;

[0042] Figure 3 A schematic diagram of a specific scenario of the first embodiment of the identity recognition method based on the federated living body detection model of the present invention;

[0043] Figure 4 It is a flowchart of the first embodiment of the identity recognition method based on the federated living body detection model of the present invention;

[0044] Figure 5 This is a functional module diagram of an embodiment of an identity recognition device based on a federated living body detection model of the present invention.

[0045] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0046] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0047] like Figure 1 As shown, Figure 1 It is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present invention.

[0048] The identity recognition device based on the federated liveness detection model in the embodiment of the present invention may be a coordination end device, such as Figure 1As shown, the identity recognition device based on the federated liveness detection model may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0049] Those skilled in the art will understand that Figure 1 The device structure shown in the figure does not constitute a limitation of the device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0050] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating network communication module, a user interface module, and a computer program corresponding to identity recognition based on a federated living body detection model.

[0051] exist Figure 1 In the device shown, the network interface 1004 is mainly used to connect to the background coordination end and communicate data with the background coordination end; the user interface 1003 is mainly used to connect to the client (user end) and communicate data with the client; and the processor 1001 can be used to call the computer program corresponding to the identity recognition based on the federated liveness detection model stored in the memory 1005, and perform the operations in the following identity recognition method based on the federated liveness detection model.

[0052] Based on the above hardware structure, an embodiment of an identity recognition method based on a federated living body detection model of the present invention is proposed.

[0053] Upon receiving a liveness detection request, obtaining image information collected by a preset collection device;

[0054] Preprocessing the image information to obtain a living feature image to be detected;

[0055] Call the federated liveness detection model to identify the liveness feature image to obtain the liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training the local initial liveness detection model based on the joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on the model gradient processing of multiple nodes.

[0056] In this embodiment, the identity recognition method based on the federal liveness detection model is applied to the identity recognition device based on the federal liveness detection model in the financial institutions (banking institutions, insurance institutions, securities institutions, etc.) in the financial industry. The identity recognition device based on the federal liveness detection model is a node, terminal or client in the alliance chain.

[0057] Before the steps of this embodiment are executed, the terminal pre-builds a federated liveness detection model, referring to Figure 2 , a flowchart of constructing a federated liveness detection model in a first embodiment of an identity recognition method based on a federated liveness detection model; specifically, it includes:

[0058] Step S01, obtaining an initial liveness detection model, and marking the image information in local storage to form a training sample set;

[0059] The client obtains an initial liveness detection model (the initial liveness detection model refers to the model to be trained, and the type of the initial liveness detection model is not specifically limited. For example, the initial liveness detection model can be an anti-copying detection model, an infrared detection model, a motion detection model, a flash liveness detection model, and a 3D liveness detection model, etc.), and the client obtains the image information in the local storage according to the model type of the initial liveness detection model. The client outputs a marking prompt, and the user marks the image information. The client composes the user-marked image information into a training sample set for model training.

[0060] Step S02, extracting a training sample group from the training sample set, training the initial liveness detection model by using the training sample group, and obtaining a trained liveness detection model and liveness feature vector;

[0061] The client extracts a training sample group from the training sample set for model training, specifically including:

[0062] Randomly extract a training sample from the training sample set as an anchor sample, select a positive sample and a negative sample according to label information associated with the anchor sample, and use the anchor sample, the positive sample and the negative sample as a training sample group;

[0063] Training the initial liveness detection model through the training sample group to obtain a model gradient, and sending the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0064] The joint gradient sent by the coordination end is received, and the initial liveness detection model is updated according to the joint gradient to obtain a trained liveness detection model and a liveness feature vector.

[0065] That is, the client randomly selects a training sample from the training sample set as an anchor example, the client selects a positive example and a negative example according to the label information associated with the anchor example, and the client regards the anchor example, the positive example and the negative example as a training sample group. Specifically, the client regards the training samples with label information of living as one category, and the training samples with label information of non-living as another category. The client randomly selects a training sample as an anchor example, the client selects a training sample of the same category as the anchor example as the positive example, the client selects a training sample of a different category from the anchor example as the negative example, and the client regards the anchor example, the positive example and the negative example as a training sample group; for example, each training sample group contains three IDs: (anchor example (ANC_ID), positive example (POS_ID), negative example (NEG_ID)).

[0066] The client trains the initial liveness detection model through the training sample group to obtain the model gradient, and sends the model gradient to the coordination end so that the coordination end processes the model gradients of multiple nodes to obtain the joint gradient; the client receives the joint gradient sent by the coordination end, and updates the initial liveness detection model according to the joint gradient to obtain the trained liveness detection model and liveness feature vector.

[0067] Step S03, processing the living body feature vector by a preset loss function to obtain a loss value, and sending the loss value to the coordination end, so that the coordination end analyzes the loss value to determine whether the trained living body detection model converges;

[0068] The client processes the live feature vector through a preset loss function (the preset loss function refers to a function constructed according to the model to determine whether the model converges) to obtain a loss value, and the client sends the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges. Specifically, it includes:

[0069] Extracting an anchor feature vector corresponding to the anchor example, extracting a positive feature vector corresponding to the positive example, and extracting a negative feature vector corresponding to the negative example;

[0070] Calculating a first Euclidean distance between the anchor feature vector and the positive example feature vector, and a second Euclidean distance between the anchor feature vector and the negative example feature vector;

[0071] The first Euclidean distance and the second Euclidean distance are input into a preset loss function to obtain a loss value, and the loss value is sent to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges.

[0072] That is, the client extracts the anchor feature vector corresponding to the anchor example, extracts the positive feature vector corresponding to the positive example, and extracts the negative feature vector corresponding to the negative example; the client calculates the first Euclidean distance between the anchor feature vector and the positive feature vector, and the second Euclidean distance between the client anchor feature vector and the negative feature vector; the client inputs the first Euclidean distance and the second Euclidean distance into a preset loss function to obtain a loss value, and the client sends the loss value to the coordination end, so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges.

[0073] Step S04: upon receiving the model convergence prompt sent by the coordination end, using the trained liveness detection model as the federated liveness detection model.

[0074] When the client receives the model convergence prompt sent by the coordination end, the trained liveness detection model is used as the federated liveness detection model. In this embodiment, the liveness detection model is established by federation, so that the model is fully learned to improve the accuracy of liveness recognition while ensuring data security.

[0075] Specifically, refer to Figure 3 , Figure 3 This is a schematic diagram of a specific scenario of the first embodiment of the identity recognition method based on the federated living body detection model of the present invention.

[0076] Client A (also called participant A) and client B (also called participant B), each of which has some image information. Client A and client B mark the image information in local storage to form a training sample set, which contains living training samples and non-living training samples, respectively. and Without leaking user privacy, client A and client B combine their data to train a better model. Specifically:

[0077] Client A and client B extract training sample groups from the training sample set according to the initial liveness detection model. Each training sample group contains three training sample IDs: (a, p, n). Client A and client B train the initial liveness detection model through the training sample group to obtain the trained liveness detection model and liveness feature vector. Client A and client B process the training samples to extract the feature vector of the training samples (the feature vectors have the same dimension, which is usually 128, 256 or 512). For example, the feature vector returned by client A is recorded as The feature vector returned by client B is recorded as Represents homomorphic encryption. A and B perform homomorphic encryption on their respective feature vectors, denoted as and Client A and client B process the living feature vector by using a preset loss function to obtain a loss value. The loss function is calculated as follows:

[0078] Loss=max(d(a,p)-d(a,n)+margin,0)

[0079] The client performs gradient calculation based on the local initial liveness detection model and loss value, and updates the local liveness detection model based on the result of the gradient calculation. The client sends the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model has converged; upon receiving the model convergence prompt sent by the coordination end, the trained liveness detection model is used as the federated liveness detection model.

[0080] In the embodiment of the present invention, through the joint training of each node in the alliance chain, multiple parties can fully learn the liveness detection model without disclosing their own data privacy, thereby improving the accuracy of liveness detection model recognition. The above-mentioned identity recognition method based on the federated liveness detection model is adopted in financial institutions such as banks to train the liveness detection model, and liveness recognition is performed through the trained liveness detection model, thereby improving the accuracy of liveness recognition.

[0081] Reference Figure 4 , Figure 4 This is a flow chart of a first embodiment of an identity recognition method based on a federated liveness detection model of the present invention. In this embodiment, the identity recognition method based on a federated liveness detection model includes:

[0082] Step S10: upon receiving a liveness detection request, obtaining image information collected by a preset collection device.

[0083] The client receives a liveness detection request, and the triggering method of the liveness detection request is not specifically limited, that is, the liveness detection request can be actively triggered by the user, for example, the user clicks the "identity recognition" button on the client display page to actively trigger the liveness detection request; in addition, the liveness detection request can also be automatically triggered, for example, the identity recognition device is pre-set: when receiving image information, the liveness detection request is automatically triggered. The client receives the liveness detection request, and the client obtains the image information collected by the preset collection device.

[0084] Step S20, preprocessing the image information to obtain a living feature image to be detected.

[0085] The client preprocesses the image information. In this embodiment, the method of preprocessing the image information is not specifically limited. The client can determine the preprocessing steps according to the type, color, and size of the image information. For example, the client performs grayscale processing or binarization processing on the image, and the client obtains the living feature image to be detected after the image information is preprocessed.

[0086] Step S30, calling the federated liveness detection model to identify the liveness feature image, and obtaining the liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training the local initial liveness detection model based on the joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on the model gradient processing of multiple nodes.

[0087] Specifically, it includes:

[0088] Calling a federated liveness detection model to identify the liveness feature image, obtaining a liveness feature vector, and comparing the liveness feature vector with a preset feature vector;

[0089] A target feature vector matching the live feature vector is obtained, live identity information associated with the target feature vector is obtained, and the live identity information is used as the live identity information corresponding to the live feature image.

[0090] That is, the client calls the federated liveness detection model to identify the liveness feature image and obtains the liveness feature vector. The client compares the liveness feature vector with the preset feature vector (the preset feature vector refers to the feature vector that is pre-identified); obtains the target feature vector that matches the liveness feature vector, obtains the liveness identity information associated with the target feature vector, and uses the liveness identity information as the liveness identity information corresponding to the liveness feature image. In addition, if there is no target feature vector that matches the liveness feature vector, a prompt message is output.

[0091] The identity recognition method based on the federated liveness detection model in the embodiment of the present invention enables multiple parties to fully learn the liveness detection model without disclosing their own data privacy through joint training of each node in the alliance chain, thereby improving the accuracy and generalization ability of the liveness detection model recognition.

[0092] Furthermore, based on the first embodiment of the identity recognition method based on the federated liveness detection model of the present invention, a second embodiment of the identity recognition method based on the federated liveness detection model of the present invention is proposed.

[0093] This embodiment is a refinement of step S01 in the first embodiment. The difference between this embodiment and the above embodiment is that:

[0094] When receiving a liveness detection model training instruction, output a configuration page, wherein the configuration page is used to configure the model types of the liveness detection model, and the model types include an anti-copy detection model, an infrared detection model, a motion detection model, a flash liveness detection model, and a 3D liveness detection model;

[0095] If the initial liveness detection model corresponding to the model type does not exist in the local storage, sending a model acquisition instruction to the coordination end so that the coordination end feeds back the initial liveness detection model corresponding to the model type;

[0096] An initial liveness detection model generated by the coordination end is received, image information corresponding to the model type in the local storage is obtained, and the image information is marked to form a training sample set.

[0097] When the client receives the liveness detection model training instruction, the client outputs a configuration page, wherein the configuration page is used to configure the model type, and the model types include anti-copy detection model, infrared detection model, motion detection model, flash liveness detection model and 3D liveness detection model; the user enters the model type in the configuration page number, and the client determines that there is no initial liveness detection model corresponding to the model type in the local storage. If there is an initial liveness detection model corresponding to the model type in the local storage, the client obtains the image information corresponding to the model type in the local storage, and marks the image information to form a training sample set. If there is no initial liveness detection model corresponding to the model type in the local storage of the client, the client sends a model acquisition instruction to the coordination end, so that the coordination end feeds back the initial liveness detection model corresponding to the model type; the client receives the initial liveness detection model generated by the coordination end, obtains the image information corresponding to the model type in the local storage, and marks the image information to form a training sample set.

[0098] In this embodiment, there is no initial liveness detection model in the client. The coordination end sends the initial liveness detection model to the client so that each client can use local training samples to perform training, effectively preventing the leakage of user information and ensuring data security.

[0099] Furthermore, based on the above-mentioned embodiment of the identity recognition method based on the federated living body detection model of the present invention, a third embodiment of the identity recognition method based on the federated living body detection model of the present invention is proposed.

[0100] This embodiment is the step after step S30 in the first embodiment. The difference between this embodiment and the above embodiment is that:

[0101] When the living body identity information is recognized incorrectly, outputting a marking prompt to prompt the user to mark the image information;

[0102] The annotated image information is used as a training sample, the federated liveness detection model is trained according to the training sample to obtain a model gradient, and the model gradient is sent to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0103] Receive the joint gradient sent by the coordination end, and update the federated living body detection model according to the joint gradient.

[0104] In this embodiment, when the live identity information is recognized incorrectly, the client outputs a labeling prompt to prompt the user to label the image information (the user marks it as live data and non-live data); the client uses the labeled image information as a training sample, and the client trains the federated liveness detection model according to the training sample to obtain a model gradient, and the client sends the model gradient to the coordination end, so that the coordination end processes and generates a joint gradient based on the model gradients of multiple nodes; the client receives the joint gradient sent by the coordination end, and the client updates the federated liveness detection model according to the joint gradient.

[0105] In this embodiment, the client performs liveness recognition through a liveness detection model. When a recognition error occurs, the federated liveness detection model is trained again, thereby improving the training accuracy of the liveness detection model.

[0106] Reference Figure 5 The present invention also provides an identity recognition device based on a federated liveness detection model, the identity recognition device based on a federated liveness detection model comprising:

[0107] The information acquisition module 10 is used to acquire the image information collected by the preset collection device when receiving a liveness detection request;

[0108] The processing and acquisition module 20 is used to pre-process the image information to obtain a living feature image to be detected;

[0109] The identification module 30 is called to call the federated liveness detection model to identify the liveness feature image and obtain the liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training the local initial liveness detection model based on the joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on the model gradient processing of multiple nodes.

[0110] In one embodiment, the identity recognition device based on the federated living body detection model includes:

[0111] The labeling module is used to obtain the initial liveness detection model and label the image information in the local storage to form a training sample set;

[0112] A sample extraction module, used to extract a training sample group from the training sample set, train the initial liveness detection model through the training sample group, and obtain a trained liveness detection model and liveness feature vector;

[0113] A processing and sending module, used for processing the living body feature vector through a preset loss function to obtain a loss value, and sending the loss value to the coordination end, so that the coordination end analyzes the loss value to determine whether the trained living body detection model converges;

[0114] The training receiving module is used to use the liveness detection model obtained through training as the federated liveness detection model when receiving the model convergence prompt sent by the coordination end.

[0115] In one embodiment, the obtaining mark module includes:

[0116] A receiving output unit, configured to output a configuration page upon receiving a liveness detection model training instruction, wherein the configuration page is used to configure the model types of the liveness detection model, the model types including an anti-copy detection model, an infrared detection model, a motion detection model, a flash liveness detection model, and a 3D liveness detection model;

[0117] An instruction sending unit, configured to send a model acquisition instruction to the coordination end if the initial liveness detection model corresponding to the model type does not exist in the local storage, so that the coordination end feeds back the initial liveness detection model corresponding to the model type;

[0118] The receiving and marking unit is used to receive the initial liveness detection model generated by the coordination end, obtain the image information corresponding to the model type in the local storage, and mark the image information to form a training sample set.

[0119] In one embodiment, the sample extraction module includes:

[0120] A sample extraction unit, configured to randomly extract a training sample from the training sample set as an anchor sample, select a positive sample and a negative sample according to label information associated with the anchor sample, and use the anchor sample, the positive sample and the negative sample as a training sample group;

[0121] A model training unit, used for training the initial liveness detection model through the training sample group to obtain a model gradient, and sending the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0122] A receiving and updating unit is used to receive the joint gradient sent by the coordination end, update the initial liveness detection model according to the joint gradient, and obtain a trained liveness detection model and a liveness feature vector.

[0123] In one embodiment, the processing and sending module includes:

[0124] An extraction processing unit, configured to extract an anchor feature vector corresponding to the anchor example, extract a positive feature vector corresponding to the positive example, and extract a negative feature vector corresponding to the negative example;

[0125] A distance calculation unit, used to calculate a first Euclidean distance between the anchor feature vector and the positive example feature vector, and a second Euclidean distance between the anchor feature vector and the negative example feature vector;

[0126] An input acquisition unit is used to input the first Euclidean distance and the second Euclidean distance into a preset loss function to obtain a loss value, and send the loss value to the coordination end so as to analyze the loss value through the coordination end to determine whether the trained liveness detection model converges.

[0127] In one embodiment, the call identification module includes:

[0128] A model calling unit, used for calling a federated liveness detection model to identify the liveness feature image, obtain a liveness feature vector, and compare the liveness feature vector with a preset feature vector;

[0129] The matching and identifying unit is used to obtain a target feature vector that matches the live feature vector, obtain live identity information associated with the target feature vector, and use the live identity information as the live identity information corresponding to the live feature image.

[0130] In one embodiment, the identity recognition device based on the federated liveness detection model includes:

[0131] An output marking module, used for outputting a marking prompt when the live body identity information is recognized incorrectly, prompting the user to mark the image information;

[0132] A training sending module is used to use the annotated image information as a training sample, train the federated liveness detection model according to the training sample to obtain a model gradient, and send the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient;

[0133] A receiving and updating module is used to receive the joint gradient sent by the coordination end, and update the federated living body detection model according to the joint gradient.

[0134] Among them, the method implemented when the identity recognition device based on the federated liveness detection model is executed can refer to the various embodiments of the identity recognition method based on the federated liveness detection model of the present invention, and will not be repeated here.

[0135] In the embodiment of the present invention, the identity recognition device based on the federated liveness detection model shares feature vectors through each node in the alliance chain, and the joint training method enables multiple parties to fully learn the liveness detection model without revealing their own data privacy, thereby improving the accuracy of liveness detection model recognition. The above-mentioned identity recognition method based on the federated liveness detection model is adopted in financial institutions such as banks to train the liveness detection model, and liveness recognition is performed through the trained liveness detection model, thereby improving the accuracy of liveness recognition.

[0136] The present invention also provides a computer-readable storage medium.

[0137] The computer-readable storage medium of the present invention stores a computer program corresponding to identity recognition based on a federated liveness detection model. When the computer program corresponding to identity recognition based on a federated liveness detection model is executed by a processor, the steps of the identity recognition method based on a federated liveness detection model as described above are implemented.

[0138] Among them, the method implemented when the computer program corresponding to the identity recognition based on the federated liveness detection model running on the processor is executed can refer to the various embodiments of the identity recognition method based on the federated liveness detection model of the present invention, which will not be repeated here.

[0139] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0140] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0141] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for enabling a terminal device (which can be a mobile phone, a computer, a coordination terminal, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0142] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An identity recognition method based on a federated liveness detection model, characterized in that: The identity recognition method based on the federated liveness detection model comprises the following steps: Upon receiving a liveness detection request, obtaining image information collected by a preset collection device; Preprocessing the image information to obtain a living feature image to be detected; Calling a federated liveness detection model to identify the liveness feature image, and obtaining liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training a local initial liveness detection model based on a joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on model gradient processing of multiple nodes; Before the step of calling the federated living body detection model to identify the living body feature image and obtaining the living body identity information corresponding to the living body feature image, the method includes: Obtain an initial liveness detection model and mark the image information in local storage to form a training sample set; Randomly extract a training sample from the training sample set as an anchor sample, select a positive sample and a negative sample according to label information associated with the anchor sample, and use the anchor sample, the positive sample and the negative sample as a training sample group; Training the initial liveness detection model through the training sample group to obtain a model gradient, and sending the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient; Receiving the joint gradient sent by the coordination end, updating the initial liveness detection model according to the joint gradient, and obtaining a trained liveness detection model and a liveness feature vector; Processing the live feature vector by a preset loss function to obtain a loss value, and sending the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges; When receiving the model convergence prompt sent by the coordination end, using the trained liveness detection model as the federated liveness detection model; The step of processing the living body feature vector by a preset loss function to obtain a loss value, and sending the loss value to the coordination end so that the coordination end analyzes the loss value to determine whether the trained living body detection model converges includes: Extracting an anchor feature vector corresponding to the anchor example, extracting a positive feature vector corresponding to the positive example, and extracting a negative feature vector corresponding to the negative example; Calculating a first Euclidean distance between the anchor feature vector and the positive example feature vector, and a second Euclidean distance between the anchor feature vector and the negative example feature vector; The first Euclidean distance and the second Euclidean distance are input into a preset loss function to obtain a loss value, and the loss value is sent to the coordination end so that the coordination end analyzes the loss value to determine whether the trained liveness detection model converges.

2. The identity recognition method based on the federated living body detection model according to claim 1, characterized in that: The step of obtaining an initial liveness detection model and marking the image information in local storage to form a training sample set includes: When receiving a liveness detection model training instruction, output a configuration page, wherein the configuration page is used to configure the model types of the liveness detection model, and the model types include an anti-copy detection model, an infrared detection model, a motion detection model, a flash liveness detection model, and a 3D liveness detection model; If the initial liveness detection model corresponding to the model type does not exist in the local storage, sending a model acquisition instruction to the coordination end so that the coordination end feeds back the initial liveness detection model corresponding to the model type; An initial liveness detection model generated by the coordination end is received, image information corresponding to the model type in the local storage is obtained, and the image information is marked to form a training sample set.

3. The identity recognition method based on the federated liveness detection model according to claim 1, characterized in that: The step of calling the federated living body detection model to identify the living body feature image and obtaining the living body identity information corresponding to the living body feature image includes: Calling a federated liveness detection model to identify the liveness feature image, obtaining a liveness feature vector, and comparing the liveness feature vector with a preset feature vector; A target feature vector matching the live feature vector is obtained, live identity information associated with the target feature vector is obtained, and the live identity information is used as the live identity information corresponding to the live feature image.

4. The identity recognition method based on the federated liveness detection model according to any one of claims 1 to 3, characterized in that: After the step of calling the federated living body detection model to identify the living body feature image and obtaining the living body identity information corresponding to the living body feature image, the method further includes: When the living body identity information is recognized incorrectly, outputting a marking prompt to prompt the user to mark the image information; The annotated image information is used as a training sample, the federated liveness detection model is trained according to the training sample to obtain a model gradient, and the model gradient is sent to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient; Receive the joint gradient sent by the coordination end, and update the federated living body detection model according to the joint gradient.

5. An identity recognition device based on a federated liveness detection model, characterized in that: The identity recognition device based on the federated living body detection model includes: An information acquisition module, used to acquire image information collected by a preset collection device when receiving a liveness detection request; A processing and acquisition module, used for preprocessing the image information to obtain a living feature image to be detected; Calling an identification module, which is used to call a federated liveness detection model to identify the liveness feature image and obtain liveness identity information corresponding to the liveness feature image, wherein the federated liveness detection model is obtained by iteratively training a local initial liveness detection model based on a joint gradient sent by the coordination end, and the joint gradient is generated by the coordination end based on model gradient processing of multiple nodes; The labeling module is used to obtain the initial liveness detection model and label the image information in the local storage to form a training sample set; A sample extraction module, used to extract a training sample group from the training sample set, train the initial liveness detection model through the training sample group, and obtain a trained liveness detection model and liveness feature vector; A processing and sending module, used for processing the living body feature vector through a preset loss function to obtain a loss value, and sending the loss value to the coordination end, so that the coordination end analyzes the loss value to determine whether the trained living body detection model converges; A receiving training module, configured to use the liveness detection model obtained through training as a federated liveness detection model when receiving a model convergence prompt sent by the coordination end; The sample extraction module comprises: A sample extraction unit, configured to randomly extract a training sample from the training sample set as an anchor sample, select a positive sample and a negative sample according to label information associated with the anchor sample, and use the anchor sample, the positive sample and the negative sample as a training sample group; A model training unit, used for training the initial liveness detection model through the training sample group to obtain a model gradient, and sending the model gradient to the coordination end, so that the coordination end processes the model gradients of multiple nodes to obtain a joint gradient; A receiving and updating unit, configured to receive the joint gradient sent by the coordinating end, and update the initial liveness detection model according to the joint gradient to obtain a trained liveness detection model and a liveness feature vector; The processing and sending module comprises: An extraction processing unit, configured to extract an anchor feature vector corresponding to the anchor example, extract a positive feature vector corresponding to the positive example, and extract a negative feature vector corresponding to the negative example; A distance calculation unit, used to calculate a first Euclidean distance between the anchor feature vector and the positive example feature vector, and a second Euclidean distance between the anchor feature vector and the negative example feature vector; An input acquisition unit is used to input the first Euclidean distance and the second Euclidean distance into a preset loss function to obtain a loss value, and send the loss value to the coordination end so as to analyze the loss value through the coordination end to determine whether the trained liveness detection model converges.

6. An identity recognition device based on a federated liveness detection model, characterized in that: The identity recognition device based on the federated liveness detection model includes: a memory, a processor, and a computer program corresponding to the identity recognition based on the federated liveness detection model stored in the memory and executable on the processor. When the computer program corresponding to the identity recognition based on the federated liveness detection model is executed by the processor, the steps of the identity recognition method based on the federated liveness detection model as described in any one of claims 1 to 4 are implemented.

7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program corresponding to identity recognition based on a federated liveness detection model. When the computer program corresponding to identity recognition based on a federated liveness detection model is executed by a processor, the steps of the identity recognition method based on a federated liveness detection model as described in any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Human face living body detection method and apparatus and electronic device

    CN107358157A

  • Disease data processing method, device and equipment based on federal learning and medium

    CN110444263A