Data mining and processing method, device, electronic device and storage medium
By screening images that match the target image features to form incremental training samples, the problem of the inability to update the liveness detection model in a timely manner is solved, and efficient new attack data mining and model optimization are achieved.
Patent Information
- Application Number
- CN202210518034.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-05-12
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2042-05-12
AI Technical Summary
In existing technologies, it is difficult to identify new network attacks in a timely and effective manner, resulting in the inability to update liveness detection models in a timely manner, low manual labeling efficiency, and low data utilization.
By obtaining a small number of images with target label information and screening images that match their features, an incremental training sample image set is formed, which is used to iteratively optimize the historical liveness detection model and automatically mine new attack data.
It achieves efficient mining of new attack data, improves data utilization, ensures timely iterative optimization of liveness detection models, and effectively combats new attacks.
Smart Images

Figure CN117011627B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer processing technology, and in particular to a data mining and processing method, device, electronic device and storage medium. Background Art
[0002] With the advancement of computer technology, more and more application scenarios require the detection of liveness features to verify authenticity, such as liveness detection on faces to prevent cyberattacks. However, the ever-increasing methods of cyberattacks make it difficult to timely and effectively identify new attack data. Related technologies require business parties to provide feedback on new online black market breaches, so that similar data can be collected by simulating these new attack methods. Alternatively, labelers are assigned daily to randomly select a batch of data from the massive amount of online data for manual labeling. The former requires feedback from business parties before similar data can be collected, resulting in a lengthy process and no guarantee that the collected data will accurately reflect the new attack. The latter, through random sampling, is unlikely to capture new attacks, resulting in low online data utilization and inefficiency. Summary of the Invention
[0003] In view of the above-mentioned technical problems, the present application proposes a data mining and processing method, device, electronic device and storage medium.
[0004] According to one aspect of the present application, a data mining method is provided, comprising:
[0005] Acquire a first image set and a plurality of first target images having target label information; the target label information indicates that the first target image is an image of a target live attack method; the first image in the first image set and the first target image both include a target object; and the number of the plurality of first target images is less than or equal to a first preset number;
[0006] screening a plurality of second target images from the first image set that match the first image features of each of the plurality of first target images;
[0007] Based on the multiple first target images and the multiple second target images, an incremental training sample image set is obtained, and the incremental training sample image set is used to iteratively optimize a historical liveness detection model. The historical liveness detection model is trained based on the historical training sample image set, and the historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the target liveness attack method.
[0008] According to another aspect of the present application, a data processing method is provided, comprising:
[0009] In response to a liveness verification request, obtaining a target image to be verified and a reference image annotated with target label information;
[0010] Inputting the target image and the reference image into a target living body feature extraction model to perform living body feature extraction processing to obtain target features of the target image and reference features of the reference image;
[0011] If the similarity between the target feature and the reference feature satisfies a similarity condition, the liveness verification request is determined to be a request for a target liveness attack method, and the target image is annotated with the target label information; the target liveness attack method is a liveness attack method represented by the target label information; wherein the target liveness feature extraction model is obtained based on the following training method.
[0012] According to another aspect of the present application, a data mining device is provided, comprising:
[0013] an acquisition module, configured to acquire a first image set and a plurality of first target images having target label information, wherein the target label information indicates that the first target image is an image of a target live attack method, the first image in the first image set and the first target image both include a target object, and the number of the plurality of first target images is less than a first preset number;
[0014] a screening module, configured to screen, from the first image set, a plurality of second target images that match the first image features of the respective first target images;
[0015] A training data mining module updates a historical training sample image set based on the multiple first target images and the multiple second target images to obtain a target training sample image set for iteratively optimizing a historical liveness detection model; wherein the historical liveness detection model is trained based on the historical training sample image set, and the historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the target liveness attack method.
[0016] According to another aspect of the present application, there is provided a data processing device, comprising:
[0017] A response module, configured to respond to a liveness verification request and obtain a target image to be verified and a reference image annotated with target label information;
[0018] a target feature and reference feature acquisition module, configured to input the target image and the reference image into a target living feature extraction model, perform living feature extraction processing, and obtain target features of the target image and reference features of the reference image;
[0019] An attack interception module is configured to determine, if the similarity between the target feature and the reference feature satisfies a similarity condition, that the liveness verification request is a request for a target liveness attack method, and to annotate the target image with the target label information; the target liveness attack method is a liveness attack method represented by the target label information; wherein the target liveness feature extraction model is obtained based on the method of any one of claims 6 to 8.
[0020] According to another aspect of the present application, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to execute the above method.
[0021] According to another aspect of the present application, a non-volatile computer-readable storage medium is provided, on which computer program instructions are stored, wherein the computer program instructions implement the above method when executed by a processor.
[0022] A small number of first target images with target label information are used to screen multiple second target images that match the first image features of each of the multiple first target images from the first image set, and based on the multiple first target images and the multiple second target images, an incremental training sample image set is obtained, so that training data under the target live attack mode can be automatically mined, which is more efficient in mining new attack data and has high data utilization rate; based on this, timely iterative optimization of the liveness detection model can be guaranteed, so that the iteratively optimized target liveness detection model can be put online to effectively counter new attacks corresponding to the target label information.
[0023] Other features and aspects of the present application will become apparent from the following detailed description of exemplary embodiments with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0024] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate exemplary embodiments, features, and aspects of the application and, together with the description, serve to explain the principles of the application.
[0025] Figure 1 A schematic diagram of an application system provided according to an embodiment of the present application is shown.
[0026] Figure 2 A flow chart of a data mining method provided according to an embodiment of the present application is shown.
[0027] Figure 3 A schematic diagram of data mining provided according to an embodiment of the present application is shown.
[0028] Figure 4A flow chart of a method for screening a plurality of second target images that match respective first image features of a plurality of first target images from a first image set according to an embodiment of the present application is shown.
[0029] Figure 5 A flow chart of a training data mining method for a target business model provided according to an embodiment of the present application is shown.
[0030] Figure 6 A schematic diagram of training data mining of a target business model provided according to an embodiment of the present application is shown.
[0031] Figure 7 A flow chart of a training method for a target living body feature extraction model provided according to an embodiment of the present application is shown.
[0032] Figure 8 A schematic diagram of a training architecture for a target living feature extraction model provided according to an embodiment of the present application is shown.
[0033] Figure 9 A flow chart of a data processing method provided according to an embodiment of the present application is shown.
[0034] Figure 10 A schematic diagram of data processing provided according to an embodiment of the present application is shown.
[0035] Figure 11 A block diagram of a data mining device provided according to an embodiment of the present application is shown.
[0036] Figure 12 A block diagram of an electronic device for data mining provided according to an embodiment of the present application is shown. DETAILED DESCRIPTION
[0037] Various exemplary embodiments, features, and aspects of the present application will be described in detail below with reference to the accompanying drawings. The same reference numerals in the accompanying drawings represent elements with the same or similar functions. Although various aspects of the embodiments are shown in the accompanying drawings, the drawings are not necessarily drawn to scale unless otherwise indicated.
[0038] The word “exemplary” is used exclusively herein to mean “serving as an example, example, or illustration.” Any embodiment described herein as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0039] In addition, numerous specific details are provided in the detailed description below to better illustrate the present application. Those skilled in the art will appreciate that the present application can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art are not described in detail in order to highlight the main purpose of the present application.
[0040] See also Figure 1 , Figure 1 A schematic diagram of an application system provided according to an embodiment of the present application is shown. The application system can be used in the data mining method of the present application. Figure 1 As shown, the application system may at least include a server 01 and a terminal 02.
[0041] In an embodiment of the present application, the server 01 can be used for data mining and data processing. The server 01 may include an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It may also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN (Content Delivery Network), and big data and artificial intelligence platforms.
[0042] In an embodiment of the present application, the terminal 02 can be used to send a liveness verification request, such as images of store signs continuously captured in an area. The terminal 02 may include a physical device such as a smartphone, desktop computer, tablet computer, laptop computer, smart speaker, digital assistant, augmented reality (AR) / virtual reality (VR) device, smart wearable device, or vehicle-mounted terminal. The physical device may also include software running on the physical device, such as an application. The operating system running on the terminal 02 in the embodiment of the present application may include, but is not limited to, Android, iOS, Linux, Windows, etc.
[0043] In the embodiments of this specification, the terminal 02 and the server 01 may be connected directly or indirectly via wired or wireless communication, which is not limited in this application.
[0044] In a specific embodiment, when server 02 is a distributed system, the distributed system can be a blockchain system. When a distributed system is a blockchain system, it can be formed by multiple nodes (any form of computing device connected to the network, such as a server or user terminal), forming a peer-to-peer (P2P) network between the nodes. The P2P protocol is an application layer protocol running on the Transmission Control Protocol (TCP). In a distributed system, any machine such as a server or terminal can join and become a node. The node includes a hardware layer, an intermediate layer, an operating system layer, and an application layer. Specifically, the functions of each node in the blockchain system may include:
[0045] 1) Routing: A basic function of a node, used to support communication between nodes.
[0046] In addition to the routing function, nodes can also have the following functions:
[0047] 2) Applications, deployed in the blockchain, implement specific services based on actual business needs, record data related to the implementation of functions to form record data, carry digital signatures in the record data to indicate the source of the task data, and send the record data to other nodes in the blockchain system for other nodes to add the record data to a temporary block when they successfully verify the source and integrity of the record data.
[0048] It should be noted that in the specific implementation of this application, data related to user information (including but not limited to user device information, user personal information, etc.) is involved. When the following embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0049] Before introducing the method embodiments provided in the present application, a brief introduction is first given to the application scenarios, relevant terms or nouns that may be involved in the method embodiments of the present application to facilitate understanding by technical personnel in the field of the present application.
[0050] Self-supervised learning refers to a machine learning algorithm that designs some auxiliary tasks (pretext tasks) to generate pseudo labels without manual labeling, thereby realizing model training.
[0051] Contrastive learning: refers to a type of self-supervised learning algorithm that generates similar samples and combines them with corresponding loss functions to make the distance between similar samples in the feature space learned by the model smaller than that between dissimilar samples.
[0052] Novel attack: refers to a targeted attack designed to target generalized vulnerabilities in online liveness detection models in order to break through liveness detection security verification.
[0053] Face authentication: This consists of two parts: face liveness detection and face recognition. Face recognition verifies the identity of the user, while face liveness detection distinguishes the real user from a fake screen shot, paper mask, or other attackers.
[0054] Figure 2 FIG. 1 is a flow chart of a data mining method according to an embodiment of the present application. Figure 2As shown, the method may include:
[0055] S201: Acquire a first image set and a plurality of first target images having target label information.
[0056] The target label information may indicate that the first target image is an image of a target liveness attack method, i.e., multiple types of label information may correspond to multiple types of liveness attack methods, wherein the target label information may correspond to a target liveness attack method; or, in other words, one type of label information may indicate a corresponding liveness attack method. The images in the first image set and the first target image may both include target objects. The target object may include a human face, a human body, etc. In the case of a human face, the image in this application may refer to a human face image.
[0057] In embodiments of this specification, to promptly discover new attack data, online data can be periodically mined to obtain new attack data, and subsequent data can be liveness verification performed based on the mined new attack data. The online data here can refer to images from historical liveness detections, i.e., images included in historical liveness verification requests. Taking facial liveness detection as an example, the data can refer to images containing faces. Based on this, images from historical liveness detections can be periodically acquired as a first image set. These images from historical liveness detections can then be randomly sampled and manually annotated to obtain a small number of first target images for a targeted liveness attack scenario. Optionally, new attack images fed back by the business side can be used as multiple first target images, and these multiple first target images can be annotated with target label information. The number of these multiple first target images can be less than or equal to a first preset number to ensure rapid acquisition of multiple first target images from the online data, serving as a small number of seed images for the targeted liveness attack scenario, i.e., new attack seeds. The periodicity can be pre-set, such as the iterative training cycle of the liveness detection model, such as 24 hours, but this disclosure is not limited thereto.
[0058] It should be noted that the target live attack method may be a new live attack method, that is, it is not included in the known live attack methods (historical live attack methods) and is a live attack method newly discovered in the network.
[0059] Optionally, based on the need to mine new attack data, considering that facial images with historical liveness detection results of non-live faces can be identified by historical liveness attack methods, and new attack methods are generally continuously upgraded, it is possible to select facial images corresponding to live faces in the most recent period and in the massive amount of face liveness detection data to ensure the effective mining of new attack data. Based on this, facial images carried by massive historical liveness verification requests within a preset period can be obtained as the object of data mining: the first image set. As an example, images determined to be liveness attacks can be annotated with label information, which can be referred to as historical label information to distinguish it from target label information. That is, the label information before obtaining multiple first target images can be regarded as historical label information. The historical label information represents historical liveness attack methods, and the historical liveness attack methods do not include target liveness attack methods (new liveness attack methods).
[0060] In one possible implementation, the multiple first target images can be obtained by the following steps: obtaining a second image set, wherein the second images in the second image set do not have label information (i.e., historical label information), the number of second images in the second image set being less than or equal to a second preset number, and the second preset number being greater than the first preset number. The second images in the second image set can be input into a target service model to perform live attack mode prediction to obtain predicted label information for each second image; and second images whose predicted label information is the target label information can be selected from the second image set as the multiple first target images. The second images can include target objects, such as human faces.
[0061] Alternatively, considering that images with label information are generally images of known liveness attack methods or normal images with liveness characteristics, while images without label information are generally images from a recent period or images of unknown liveness attack methods, a second set of images without label information, i.e., unlabeled data, can be selected from the first image set. For example, the first image set can be divided into multiple image subsets, with at least one of these subsets serving as the second image set. Screening for new attack data within this unlabeled data not only narrows the screening scope and improves efficiency, but also enhances screening accuracy. Based on this, the second image in the second image set can be input into the target service model to perform liveness attack method prediction, obtaining predicted label information for each second image. The predicted label information can represent multiple liveness attack methods. Multiple first target images corresponding to the target liveness attack method can thus be statistically obtained. The target liveness attack method can be one of multiple liveness attack methods. For example, the multiple liveness attack methods may include attacks 1 through 8, with attack 8 being a new attack method and attacks 1 through 7 being historical attack methods. Therefore, attack 8 can be identified as the target liveness attack method.
[0062] The target service model can be a pre-trained neural network model, such as a convolutional neural network. The specific training process can be found in the following content. The target service model can be used to predict the live attack mode, which can be regarded as an active mining of the second image set without label information in the first image set, such as Figure 3 This can also be seen as a preliminary screening of online data, obtaining a small number of new attack seeds: multiple first target images.
[0063] As an alternative, Figure 3 As shown, a manual annotation step can be added to the active mining to improve the accuracy of the active mining. For example, the second image in the second image set can be input into the target business model to predict the live attack mode and obtain the image to be annotated (data to be annotated) under the target live attack mode; further, the image to be annotated can be verified by manual annotation, so that multiple first target images can be screened and the target label information can be annotated for the first target image, that is, Figure 3 The multiple first target images may be all or part of the images to be annotated.
[0064] S203 : Filtering, from the first image set, a plurality of second target images that match the respective first image features of the plurality of first target images.
[0065] In the embodiments of this specification, Figure 3 As shown, a small amount of new attack seeds can be used to automatically screen similar attack data from massive online data, that is, to perform feature retrieval. This not only takes advantage of the characteristic of repeated attacks after the black market breaks through the vulnerability, but also can make full use of online data. Based on this, multiple second target images that match the first image features of multiple first target images can be screened from the first image set. For example, feature extraction processing can be performed on each image in the first image set and the multiple first target images to obtain the second image features of each image in the first image set and the first image features of the multiple first target images. Thereby, the feature distance between each second image feature and each first image feature can be determined, and the images corresponding to the second image features whose feature distance is less than the preset distance threshold are used as multiple second target images. The multiple second target images are part of the images in the first image set. The present disclosure does not limit the specific method of the above-mentioned feature extraction.
[0066] S205 : Obtain an incremental training sample image set based on the multiple first target images and the multiple second target images.
[0067] Among them, the incremental training sample image set is used to iteratively optimize the historical liveness detection model, which is trained based on the historical training sample image set. The historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the above-mentioned target liveness attack methods.
[0068] In the embodiments of this specification, multiple first target images and multiple second target images can be labeled, for example, with target label information. Thus, the multiple first target images and multiple second target images carrying target label information can be used as an incremental training sample image set. Furthermore, the incremental training sample image set can be added to the historical training sample image set to obtain a target training sample image set for iteratively optimizing the historical liveness detection model.
[0069] Alternatively, as Figure 3 As shown in , in order to ensure the accuracy of multiple second target images, the initial similar images obtained by feature retrieval can be manually annotated for further manual verification. Thus, the verified initial similar images can be used as multiple second target images, that is, Figure 3 The target label information can be annotated for the plurality of second target images, so that the plurality of first target images and the plurality of second target images carrying the target label information can be used as an incremental training sample image set.
[0070] A small number of first target images with target label information are used to screen multiple second target images that match the first image features of each of the multiple first target images from the first image set, and based on the multiple first target images and the multiple second target images, an incremental training sample image set is obtained, so that training data under the target live attack mode can be automatically mined, which is more efficient in mining new attack data and has high data utilization rate; based on this, timely iterative optimization of the liveness detection model can be guaranteed, so that the iteratively optimized target liveness detection model can be put online to effectively counter new attacks corresponding to the target label information.
[0071] Figure 4 A flowchart of a method for screening a plurality of second target images that match the first image features of the plurality of first target images from a first image set according to an embodiment of the present application is shown. In one possible implementation, Figure 4 As shown, step S203 may include:
[0072] S401: Input a plurality of first target images and a first image in a first image set into a target living body feature extraction model, perform living body feature extraction processing, and obtain a first image feature of each first target image and a second image feature of each first image.
[0073] In the embodiments of this specification, the target living feature extraction model can be a pre-trained neural network model, such as a convolutional neural network model. For specific training, please refer to the corresponding content below and will not be repeated here.
[0074] In actual applications, multiple first target images and the first image in the first image set can be input into the target living feature extraction model to perform living feature extraction processing to obtain the first image features of each first target image and the second image features of each first image. The first image features and the second image features can be 2048-dimensional feature vectors, which is not limited in this application.
[0075] S403 : Perform similarity matching processing on the first image feature and the second image feature to obtain a target image feature that matches the first image feature, where the target image feature is at least one of the plurality of second image features.
[0076] In a possible implementation, a feature distance between the first image feature and the second image feature may be calculated, so that the second image feature corresponding to a feature distance smaller than a feature distance threshold may be used as a target image feature that matches the first image feature.
[0077] In another possible implementation, the first image feature and the second image feature can be clustered to obtain a target feature cluster where the first image feature is located; thereby, the second image feature in the target feature cluster can be used as the target image feature. Specifically, based on a preset clustering method, the first image feature and the second image feature can be clustered to obtain multiple feature clusters; thereby, multiple feature clusters can be detected to obtain a target feature cluster where the first image feature is located, that is, a feature cluster including any first image feature, as a target feature cluster. Thus, the second image feature in the target feature cluster can be used as the target image feature. Among them, the preset clustering method may include a clustering method based on the DBSCAN algorithm, a clustering method based on the k-means clustering algorithm, etc., which is not limited in this application. By clustering image features, the target image features that match the first image feature can be quickly screened out, which is suitable for mining massive data and effectively improves data mining efficiency.
[0078] S405: Use the first image corresponding to the target image feature as multiple second target images.
[0079] like Figure 3 As shown, multiple second target images can be considered similar attack data. By using image feature matching, we can quickly match multiple second target images from massive data using a small amount of seed data under the target live attack mode, that is, multiple first target images, which improves data utilization and data mining efficiency.
[0080] Figure 5 A flow chart of a training data mining method for a target business model according to an embodiment of the present application is shown. In a possible implementation, Figure 5 As shown, this may include:
[0081] S501 , obtaining a first sample image set without historical label information; a first sample image in the first sample image set includes a target object.
[0082] In practical applications, images containing the target object but without historical label information can be obtained from historical liveness verification records to form the first sample image set, i.e. Figure 8 Unlabeled data shown.
[0083] S503: Input the first sample image set into the target living body feature extraction model, perform living body feature extraction processing, and obtain sample image features; please refer to the corresponding content above and will not be repeated here.
[0084] S505, clustering the first sample image in the first sample image set based on the sample image features to obtain multiple clusters to be processed; the clustering process can be performed based on a preset clustering method. For details, please refer to the corresponding content of the clustering process above, which will not be repeated here.
[0085] S507, performing recall processing on the out-of-cluster sample images based on the multiple clusters to be processed to obtain multiple target processing clusters; the out-of-cluster sample images are the first sample images in the first sample image set excluding the multiple clusters to be processed;
[0086] S509, selecting a target processing cluster that meets a preset condition from the multiple target processing clusters, wherein the target processing cluster satisfies the preset condition, where the predicted labels of the images in the cluster obtained by the target processing cluster based on the preset business model do not meet the clustering condition, i.e., the prediction results are significantly different;
[0087] S511: Use the first sample image in the target processing cluster that meets the preset conditions as a training sample image set for training a preset business model.
[0088] In the embodiments of this specification, Figure 6 As shown, the above-mentioned target living body feature extraction model can perform self-supervised model feature extraction. The training process of the target living body feature extraction model is introduced below and will not be repeated here.
[0089] Taking DBSCAN clustering as an example, DBSCAN clustering can perform DBSCAN clustering on the obtained features to gather clusters with the same semantic features from massive unlabeled data. That is, based on the sample image features, the first sample image in the first sample image set is clustered to obtain multiple clusters to be processed.
[0090] Furthermore, retrieval can be performed based on the cluster features of the cluster to be processed, i.e., recall processing. Due to the limitations of the DBSCAN algorithm, some sample images in the first sample image set may be mistakenly judged as out-of-cluster data (which can be represented by outliers) during the clustering process. Cluster-based feature retrieval can be performed on multiple clusters to be processed clustered by DBSCAN. For example, the multiple clusters to be processed can be used as seed libraries one by one, and then sample images with similar features can be retrieved from the original data set (the first sample image set). In other words, valid data can be recalled from the outliers to obtain sample images with similar features to each cluster. In this way, sample images with similar features in each cluster are added to the corresponding cluster to be processed, forming multiple target processing clusters.
[0091] After obtaining multiple target processing clusters, a target processing cluster that meets preset conditions can be screened out from the multiple target processing clusters. As an example, the clusters that meet the preset conditions may include a high entropy cluster, a low pass rate cluster, and a sample image in the target processing cluster that meets the OOD (Out-of-Distribution Detection) feature space.
[0092] High entropy cluster TopK: Consider the target processing clusters obtained by clustering the sample image features obtained based on the self-supervised target live feature extraction model. The sample images in the same target processing cluster should have similar liveness detection semantic features. Based on this, the prediction results of the preset business model on the sample images in the same target processing cluster should be consistent. If the prediction results of the preset business model in some target processing clusters are quite different, then this type of data belongs to the data required for iterative optimization of the preset business model. Based on this, multiple target processing clusters can be traversed, and for any target processing cluster traversed, any sample image in it can be classified and predicted using the preset business model. Then, the classification prediction results (i.e., the probability of being judged as an attack) can be histogram-statisticed based on the histogram function, and the entropy of the histogram can be calculated by the following formula (1):
[0093]
[0094] Where i is the i-th prediction confidence category in the horizontal axis of the histogram; hist(i) is the probability distribution of the i-th prediction confidence category in the histogram; N is the number of prediction confidence categories in the histogram. The prediction confidence category can refer to any type of classification prediction result corresponding to each first sample image in any target processing cluster. For a clearer explanation, assume that any target cluster is represented by C1, i is the i-th classification prediction result in the classification prediction result corresponding to C1, that is, C1 corresponds to the i-th prediction confidence category in the histogram; N is the number of prediction confidence categories in the histogram; hist(i) is the probability distribution of the i-th prediction confidence category in the histogram. For example, C1 can include 10 first sample images, and the corresponding classification prediction results are: 0.1, 0.3, 0.2, 0.2, 0.5, 0.6, 0.7, 0.6, 0.6, 0.8. It can be statistically determined that there are 7 classification prediction results corresponding to C1: 0.1, 0.2, 0.3, 0.5, 0.6, 0.7, and 0.8, that is, the number of prediction confidence categories is 7, and N = 7 can be determined. Furthermore, the probability distribution corresponding to each prediction confidence category can be statistically determined. Taking 0.6 as an example, 3 of the 10 classification prediction results corresponding to the 10 first sample images are 0.6, and the probability distribution corresponding to 0.6 can be obtained as 3 / 10. Based on the same method, the probability distribution corresponding to each of the 7 prediction confidence categories (0.1, 0.2, 0.3, 0.5, 0.6, 0.7, and 0.8) can be determined as: 1 / 10, 2 / 10, 1 / 10, 1 / 10, 3 / 10, 1 / 10, and 1 / 10. The horizontal axis of the histogram is the prediction confidence category, and the vertical axis is the probability distribution. Therefore, the entropy of each target processing cluster can be obtained based on the histogram of each target processing cluster and the above formula (1). And the K with the largest entropy (TopK) can be selected as part of the mined data, that is, the target processing cluster that meets the preset conditions.
[0095] Low pass rate cluster TopK: Since the higher the probability of a target processing cluster being predicted as an attack by the preset business model (the lower the pass rate), the greater the possibility that the target processing cluster is attack data. Based on this, multiple target processing clusters can be traversed. For any target processing cluster traversed, each sample image in it is classified and predicted using the preset business model. Then, the pass rate of each cluster can be calculated using the following formula (2):
[0096]
[0097] Among them, ||Cluster|| is the number of sample images in the target processing cluster; N attack is the number of sample images predicted as attacks in the target processing cluster. Thus, the K images with the lowest pass rate (TopK) can be selected as part of the mined data, that is, the target processing cluster that meets the preset conditions.
[0098] OOD detection: Based on OOD, the training data of the preset business model can be modeled into a feature space distribution to determine whether the sample images in multiple target processing clusters belong to the feature space. If so, they can be determined as target processing clusters that meet the preset conditions.
[0099] Furthermore, data annotation can be performed on sample images in the target processing cluster that meet preset conditions. After manual annotation and confirmation, they can be labeled with target label information. Sample images in the target processing cluster that carry target label information and meet preset conditions can then be used as a training sample image set for training a preset business model. Optionally, the training sample image set for training the preset business model can be submitted as training data for iterative training of the preset business model. It should be noted that the preset business model can refer to the current business model.
[0100] Figure 7 A flow chart of a training method for a target living feature extraction model according to an embodiment of the present application is shown. In one possible implementation, Figure 7 As shown, this may include:
[0101] S701, obtaining a second sample image set with historical label information, wherein the second sample image in the second sample image set includes a target object; the historical label information indicates that the second sample image is an image of a historical live attack method; that is, the second sample image set can be Figure 8 Known attack data shown.
[0102] S703 : Divide the second sample image set into a plurality of sample image clusters according to the historical label information; the sample image clusters have initial cluster labels, and the initial cluster labels correspond to the historical label information.
[0103] In an embodiment of the present specification, a second sample image set can be obtained from historical attack data accumulated by the business. The second sample image set can be divided into multiple sample image clusters based on the live attack method represented by the historical label information. Here, the second sample image can be divided into multiple attack templates based on scene, background, lighting, clothing, etc., and the multiple attack templates correspond to multiple historical attack methods. After dividing the multiple sample image clusters, initial cluster labels can be annotated for the sample image clusters. For example, if there are seven attack templates, the initial cluster labels can be represented as attack 1 to attack 7.
[0104] S705 , performing amplification and random sampling processing on the images in each sample image cluster to obtain a plurality of second sample image pairs;
[0105] S707 , performing an amplification process on the first sample image to obtain a plurality of first sample image pairs.
[0106] In the embodiment of this specification, a contrastive learning framework is selected to train the preset live feature extraction model. A key technology of contrastive learning is to construct similar sample pairs, that is, a pair of similar but not completely identical samples. Therefore, similar pair construction is required, that is, sample image pairs are constructed. Based on this, the first sample image can be amplified, and the expanded first sample image can be subjected to similar sample pair construction. For example, the first sample image and a sample image after the first sample image is expanded are taken as a first sample image pair to obtain multiple first sample image pairs. The amplification here may include image size change, cropping, color conversion, and noise addition, etc., which are not limited in this application. Furthermore, considering that the first sample image and the second sample image are for liveness detection training, in order to avoid the structural information of the target object, such as the face, causing the model to focus on learning the identity features of the face, random sampling can be performed within the same sample image cluster. For example, two second sample images can be randomly sampled from the same sample image cluster, and data expansion can be performed to obtain a second sample image pair.
[0107] S709: Input the plurality of first sample image pairs and the plurality of second sample image pairs into a preset living feature extraction model, such as Figure 8 The CNN feature extractor shown performs live feature extraction processing to obtain a first sample feature of each first sample image and a second sample feature of each second sample image;
[0108] S711, performing contrast loss processing on the first sample feature and the second sample feature based on the first sample image pair and the second sample image pair to obtain contrast loss information;
[0109] S713: Train a preset living feature extraction model according to the contrast loss information to obtain a target living feature extraction model.
[0110] In actual use, contrast loss information can be calculated based on a contrast learning framework using a preset contrast loss function. For example, contrast loss information can be determined based on feature difference information between each first sample image pair and the second sample image pair. The contrast learning framework can be a SimSiam contrast learning framework, in which only similar sample pairs need to be provided. This application does not limit the preset contrast loss function. The preset live feature extraction model can be Reset50, whose output feature is 2048-dimensional, which is also not limited in this application.
[0111] Optionally, training can be performed in stages. In the initial stage, for example, when the number of training iterations reaches a preset number, the features extracted by the preset living feature extraction model are not very stable. Therefore, the above method can be selected for training, that is, the training data is multiple first sample image pairs and multiple second sample image pairs.
[0112] In the stable stage, for example, when the number of training iterations reaches a preset number, the extracted features can be clustered, that is, feature space clustering, to obtain new clusters (target image clusters), so that sample images can be amplified and randomly sampled based on the new clusters to obtain training data. The preset number of times can be 10, which is not limited in this application. Specifically, based on the first sample features and the second sample features corresponding to the preset number of times, a plurality of first sample image pairs and a plurality of second sample image pairs can be clustered to obtain a plurality of target image clusters and target cluster labels for each target image cluster, and the plurality of target cluster labels include initial cluster labels and target label information. For example, if the initial cluster labels are attack 1 to attack 7, a new target label information of attack 8 can now be obtained.
[0113] Taking into account the clustering of similar data, we choose to add ArcFace (Additive Angular MarginLoss) loss, so that we can determine the clustering loss information based on the target cluster label and the initial cluster label to perform statistics on the similarity between the sample images in the cluster and obtain the clustering loss information. Therefore, we can train the preset live feature extraction model based on the contrast loss information and the clustering loss information to obtain the target live feature extraction model. For example, we can update the preset live feature extraction model based on the contrast loss information and the clustering loss information to obtain the initial live feature extraction model; Figure 8 As shown in , the target cluster labels obtained after clustering can include 0, 1, and 2, which can correspond to the initial label information, target label information, and unclustered label information respectively. In the next round of iteration, the sample images corresponding to the unclustered label information can no longer be used. Based on this, the image clusters corresponding to the initial label information and target label information can be used as the target image cluster. Figure 8 As shown, the training data can be determined based on the target image clusters obtained by clustering. For example, the images in each target image cluster can be amplified and randomly sampled to obtain multiple third sample image pairs, and the multiple third sample image pairs are used as the input of the initial live feature extraction model. The above steps are repeated until the preset iteration conditions are met, that is, the training of the stable stage is repeated, and the input of the next round of initial live feature extraction model is determined based on the clusters obtained in each round of clustering until the preset iteration conditions are met, thereby obtaining the target live feature extraction model. The preset iteration condition may refer to the loss information being less than the loss threshold. The clustering process may be DBSCAN clustering, which is not limited in this application.
[0114] Figure 9 FIG. 1 shows a flow chart of a data processing method provided according to an embodiment of the present application. Figure 9 Shown, including:
[0115] S901, in response to a liveness verification request, obtaining a target image to be verified and a reference image annotated with target label information;
[0116] S903: Input the target image and the reference image into a target living feature extraction model to perform living feature extraction processing to obtain target features of the target image and reference features of the reference image; wherein the target living feature extraction model is obtained based on the above-mentioned training method;
[0117] S905: If the similarity between the target feature and the reference feature meets the similarity condition, determine that the liveness verification request is a request for a target liveness attack method, and annotate the target image with target label information; the target liveness attack method is the liveness attack method represented by the target label information.
[0118] like Figure 10 As shown, the new attack data can be used to intercept the liveness verification request in real time. Based on this, when the liveness verification request is received, the target image to be verified and the reference image with the target label information are obtained in response to the liveness verification request; wherein the target image can refer to Figure 10 In the online real-time data, the reference image can refer to Figure 10 The target image and reference image are input into the target liveness feature extraction model for liveness feature extraction processing, i.e., feature retrieval, to obtain the target features of the target image and the reference features of the reference image. The target features can then be retrieved based on the reference features to determine whether they are similar. If the similarity between the target features and the reference features meets the similarity condition, the liveness verification request is determined to be a request using the target liveness attack method and is intercepted. The target image can also be annotated with target label information, indicating that the target image is similar attack data. By performing real-time interception of a small amount of new attack data, the timeliness of interception of liveness verification requests from new attacks can be improved.
[0119] Figure 11 FIG. 1 is a block diagram of a data mining device according to an embodiment of the present application. Figure 11 As shown, the device may include:
[0120] An acquisition module 1101 is configured to acquire a first image set and a plurality of first target images having target label information, wherein the target label information indicates that the first target image is an image of a target live attack method, the first image in the first image set and the first target image both include a target object, and the number of the plurality of first target images is less than a first preset number;
[0121] A screening module 1103 is configured to screen, from the first image set, a plurality of second target images that match the respective first image features of the plurality of first target images;
[0122] The training data mining module 1105 updates the historical training sample image set based on multiple first target images and multiple second target images to obtain a target training sample image set for iteratively optimizing the historical liveness detection model; wherein the historical liveness detection model is obtained by training based on the historical training sample image set, and the historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the target liveness attack method.
[0123] In a possible implementation, the acquisition module 1101 may include:
[0124] a second image set acquiring unit, configured to acquire a second image set, wherein the second images in the second image set do not have label information, the number of the second images in the second image set is less than or equal to a second preset number, and the second images include the target object;
[0125] A prediction unit, configured to input the second image into a target service model, perform live attack mode prediction, and obtain predicted label information of each second image;
[0126] The screening unit is configured to screen out second images whose predicted label information is target label information from the second image set as the plurality of first target images.
[0127] In a possible implementation, the screening module 1103 may include:
[0128] a living body feature extraction unit, configured to input the plurality of first target images and the first image in the first image set into a target living body feature extraction model, perform living body feature extraction processing, and obtain a first image feature of each first target image and a second image feature of each first image;
[0129] a similarity matching unit, configured to perform similarity matching processing on the first image feature and the second image feature to obtain a target image feature that matches the first image feature, where the target image feature is at least one of the plurality of second image features;
[0130] The second target image living unit is used to use the first image corresponding to the target image feature as multiple second target images.
[0131] In a possible implementation, the similarity matching unit may include:
[0132] A first clustering unit is used to perform clustering processing on the first image feature and the second image feature to obtain a target feature cluster where the first image feature is located;
[0133] The target image feature determining unit is configured to use the second image feature in the target feature cluster as the target image feature.
[0134] In a possible implementation, the above device may further include
[0135] A first sample image set acquisition module is configured to acquire a first sample image set without historical label information; the first sample image in the first sample image set includes a target object; the historical label information indicates that the first sample image is an image of a historical live attack method;
[0136] A first feature extraction module is used to input the first sample image set into the target living feature extraction model, perform living feature extraction processing, and obtain sample image features;
[0137] A clustering module, configured to perform clustering processing on the first sample image in the first sample image set based on sample image features to obtain a plurality of clusters to be processed;
[0138] A recall module is used to perform recall processing on out-of-cluster sample images based on the multiple clusters to be processed to obtain multiple target processing clusters; the out-of-cluster sample images are the first sample images in the first sample image set excluding the multiple clusters to be processed;
[0139] A target processing cluster acquisition module is used to screen out a target processing cluster that meets a preset condition from multiple target processing clusters, where the target processing cluster that meets the preset condition indicates that the predicted labels of each image in the cluster obtained by the target processing cluster based on the preset business model do not meet the clustering condition;
[0140] The training sample acquisition module is used to use the first sample image in the target processing cluster that meets the preset conditions as a training sample image set for training the preset business model.
[0141] In a possible implementation, the device may further include:
[0142] A second sample image set acquisition module is configured to acquire a second sample image set having historical label information; the second sample images in the second sample image set include a target object; and the historical label information indicates that the second sample images are images of a historical live attack method;
[0143] a sample image division module, configured to divide the second sample image set into a plurality of sample image clusters according to the historical label information; the sample image clusters have initial cluster labels corresponding to the historical label information;
[0144] an amplification and random sampling module, configured to perform amplification and random sampling processing on the images in each sample image cluster to obtain a plurality of second sample image pairs;
[0145] an amplification module, configured to amplify the first sample image to obtain a plurality of first sample image pairs;
[0146] a second feature extraction module, configured to input the plurality of first sample image pairs and the plurality of second sample image pairs into a preset live feature extraction model, perform live feature extraction processing, and obtain a first sample feature of each first sample image and a second sample feature of each second sample image;
[0147] a contrast loss determination module, configured to perform contrast loss processing on the first sample feature and the second sample feature based on the first sample image pair and the second sample image pair to obtain contrast loss information;
[0148] The training module is used to train a preset live feature extraction model based on contrast loss information to obtain a target live feature extraction model.
[0149] In a possible implementation, the training module may include:
[0150] a second clustering unit, configured to, when the number of training iterations reaches a preset number, perform clustering processing on the plurality of first sample image pairs and the plurality of second sample image pairs based on the first sample features and the second sample features corresponding to the preset number of training iterations, to obtain a plurality of target image clusters and a target cluster label for each target image cluster, wherein the plurality of target cluster labels include initial cluster labels and target label information;
[0151] A clustering loss determination unit, configured to determine clustering loss information based on target cluster labels and initial cluster labels;
[0152] The training unit is used to train a preset live feature extraction model based on the contrast loss information and the clustering loss information to obtain a target live feature extraction model.
[0153] In a possible implementation, the training unit may include:
[0154] An updating subunit, configured to update a preset live feature extraction model according to contrast loss information and clustering loss information to obtain an initial live feature extraction model;
[0155] a sample pair construction unit, configured to amplify and randomly sample images in each target image cluster to obtain a plurality of third sample image pairs;
[0156] The training subunit is used to use the plurality of third sample image pairs as inputs of the initial living feature extraction model, repeat the above steps until a preset iteration condition is met, and obtain a target living feature extraction model.
[0157] In a possible implementation, a data processing device is further provided, including:
[0158] A response module, configured to respond to a liveness verification request and obtain a target image to be verified and a reference image annotated with target label information;
[0159] The target feature and reference feature acquisition module is used to input the target image and the reference image into the target living feature extraction model, perform living feature extraction processing, and obtain the target feature of the target image and the reference feature of the reference image;
[0160] An attack interception module is used to determine that the liveness verification request is a request for a target liveness attack method if the similarity between the target feature and the reference feature meets the similarity condition, and to mark the target image with target label information; the target liveness attack method is a liveness attack method characterized by the target label information; wherein the target liveness feature extraction model is obtained based on any one of the methods of claims 6-8.
[0161] Regarding the apparatus in the above embodiment, the specific manner in which each module and unit performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0162] In another aspect, the present application provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the data recommendation methods provided in the various optional implementations described above.
[0163] Figure 12 A block diagram of an electronic device for data mining according to an embodiment of the present application is shown. The electronic device may be a server, and its internal structure diagram may be as shown in FIG. Figure 12 As shown. The electronic device includes a processor, a memory, and a network interface connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the electronic device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a data mining method is implemented.
[0164] Those skilled in the art will understand that Figure 12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the electronic device to which the solution of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0165] In an exemplary embodiment, an electronic device is also provided, including: a processor; and a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the data mining method in the embodiment of the present application.
[0166] In an exemplary embodiment, a storage medium is further provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the data mining method in the embodiment of the present application.
[0167] In an exemplary embodiment, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the data mining method in the embodiment of the present application.
[0168] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, which can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0169] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0170] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A data mining method, characterized in that: The method comprises: Acquire a first image set and a plurality of first target images having target label information; the target label information indicates that the first target image is an image of a target live attack method; the first image in the first image set and the first target image both include a target object; and the number of the plurality of first target images is less than or equal to a first preset number; screening a plurality of second target images from the first image set that match the first image features of each of the plurality of first target images; Based on the multiple first target images and the multiple second target images, an incremental training sample image set is obtained, and the incremental training sample image set is used to iteratively optimize a historical liveness detection model. The historical liveness detection model is trained based on the historical training sample image set, and the historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the target liveness attack method.
2. The method according to claim 1, characterized in that The acquiring of a plurality of first target images comprises: Acquire a second image set, where second images in the second image set do not have label information, the number of second images in the second image set is less than or equal to a second preset number, and the second images include the target object; Inputting the second image into the target service model to perform live attack mode prediction to obtain predicted label information for each second image; Second images whose predicted label information is the target label information are selected from the second image set as the multiple first target images.
3. The method according to claim 1 or 2, characterized in that The step of screening a plurality of second target images that match the first image features of the plurality of first target images from the first image set includes: Inputting the plurality of first target images and the first image in the first image set into a target living body feature extraction model to perform living body feature extraction processing to obtain a first image feature of each first target image and a second image feature of each first image; performing similarity matching processing on the first image feature and the second image feature to obtain a target image feature that matches the first image feature, where the target image feature is at least one of the plurality of second image features; The first image corresponding to the target image feature is used as the multiple second target images.
4. The method according to claim 3, characterized in that The performing similarity matching processing on the first image feature and the second image feature to obtain a target image feature that matches the first image feature includes: performing clustering processing on the first image feature and the second image feature to obtain a target feature cluster where the first image feature is located; The second image feature in the target feature cluster is used as the target image feature.
5. The method according to claim 3, characterized in that The method further includes Acquire a first sample image set without historical label information; a first sample image in the first sample image set includes the target object; the historical label information indicates that the first sample image is an image of a historical live attack method; Inputting the first sample image set into the target living body feature extraction model to perform living body feature extraction processing to obtain sample image features; performing clustering processing on the first sample images in the first sample image set based on the sample image features to obtain a plurality of clusters to be processed; Performing recall processing on sample images outside the cluster based on the multiple clusters to be processed to obtain multiple target processing clusters; The out-of-cluster sample image is the first sample image in the first sample image set except the multiple clusters to be processed; Filtering a target processing cluster that meets a preset condition from the multiple target processing clusters, wherein the satisfying the preset condition indicates that the predicted labels of each image in the cluster obtained by the target processing cluster based on a preset business model do not meet a clustering condition; The first sample image in the target processing cluster that meets the preset conditions is used as a training sample image set for training a preset business model.
6. The method according to claim 5, characterized in that The target living feature extraction model is trained by the following steps: Acquire a second sample image set having the historical tag information; a second sample image in the second sample image set includes the target object; the historical tag information indicates that the second sample image is an image of a historical live attack method; According to the historical label information, the second sample image set is divided into a plurality of sample image clusters; the sample image clusters have initial cluster labels, and the initial cluster labels correspond to the historical label information; Performing amplification and random sampling processing on the images in each sample image cluster to obtain a plurality of second sample image pairs; performing an amplification process on the first sample image to obtain a plurality of first sample image pairs; Inputting the plurality of first sample image pairs and the plurality of second sample image pairs into a preset living feature extraction model to perform living feature extraction processing to obtain a first sample feature of each first sample image and a second sample feature of each second sample image; Based on the first sample image pair and the second sample image pair, performing contrast loss processing on the first sample feature and the second sample feature to obtain contrast loss information; The preset living body feature extraction model is trained according to the contrast loss information to obtain the target living body feature extraction model.
7. The method according to claim 6, characterized in that The step of training the preset living body feature extraction model according to the contrast loss information to obtain the target living body feature extraction model includes: When the number of training iterations reaches a preset number, clustering the plurality of first sample image pairs and the plurality of second sample image pairs based on the first sample features and the second sample features corresponding to the preset number of training iterations to obtain a plurality of target image clusters and a target cluster label for each target image cluster, the plurality of target cluster labels including the initial cluster label and the target label information; Determining clustering loss information based on the target cluster label and the initial cluster label; The preset living body feature extraction model is trained according to the contrast loss information and the clustering loss information to obtain the target living body feature extraction model.
8. The method according to claim 7, characterized in that The step of training the preset living feature extraction model according to the contrast loss information and the cluster loss information to obtain the target living feature extraction model includes: updating the preset living feature extraction model according to the contrast loss information and the clustering loss information to obtain an initial living feature extraction model; Performing amplification and random sampling processing on the images in each target image cluster to obtain a plurality of third sample image pairs; The plurality of third sample image pairs are used as inputs of the initial living body feature extraction model, and the above steps are repeated until a preset iteration condition is satisfied, thereby obtaining the target living body feature extraction model.
9. A data processing method, characterized in that: The method comprises: In response to a liveness verification request, obtaining a target image to be verified and a reference image annotated with target label information; Inputting the target image and the reference image into a target living body feature extraction model to perform living body feature extraction processing to obtain target features of the target image and reference features of the reference image; If the similarity between the target feature and the reference feature satisfies a similarity condition, determining that the liveness verification request is a request for a target liveness attack method, and marking the target image with the target label information; the target liveness attack method is the liveness attack method represented by the target label information; Wherein, the target living feature extraction model is obtained based on any one of the methods of claims 6-8.
10. A data mining device, characterized in that: include: An acquisition module, configured to acquire a first image set and a plurality of first target images having target label information; The target label information indicates that the first target image is an image of a target living body attack method, the first image in the first image set and the first target image both include a target object, and the number of the plurality of first target images is less than a first preset number; a screening module, configured to screen, from the first image set, a plurality of second target images that match the first image features of the respective plurality of first target images; A training data mining module updates a historical training sample image set based on the multiple first target images and the multiple second target images to obtain a target training sample image set for iteratively optimizing a historical liveness detection model; wherein the historical liveness detection model is trained based on the historical training sample image set, and the historical liveness attack methods represented by the historical label information of the historical training sample images in the historical training sample image set do not include the target liveness attack method.
11. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the executable instructions to implement the method according to any one of claims 1 to 9.
12. A non-volatile computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the computer program instructions are executed by a processor, the method according to any one of claims 1 to 9 is implemented.
Citation Information
Patent Citations
Living body detection method and device
CN110633647A
Training sample generation method and device, electronic equipment and storage medium
CN112733946A