An identity authentication method, device and equipment
Patent Information
- Application Number
- CN202410776134.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-14
- Publication Date
- 2026-08-18
- Estimated Expiration
- 2044-06-14
AI Technical Summary
目前,不法分子开始利用图像处理技术去生成各种逼真程度较高的证件模板,通过对证件模板与不同的可变证件信息进行结合、拼接,就可以快速生成大量的伪造证件图像,并在业务办理过程中去使用伪造证件图像进行身份认证,影响业务的正常运行
[0025]By masking the variable information areas in a first document image of a preset type required for user authentication, it becomes possible to extract first image feature data from a second document image of the target user with the variable information areas masked. Subsequently, by comparing the consistency between the first image feature data and the forged document image feature data in a preset type of forged document image with the variable information areas masked, it is possible to accurately identify whether the target user is using a forged document image for identity fraud, thus helping to ensure the security of identity authentication.
Smart Images

Figure CN118736396B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of identity verification technology, and in particular to an identity authentication method, apparatus and equipment. Background Technology
[0002] With the continuous development of artificial intelligence technology, image processing technology has become one of its important application areas. People can not only effectively edit and create images using the editing and drawing tools in image processing software, but also utilize generative artificial intelligence models to learn information from text or image samples, thereby conveniently generating high-quality and realistic images. Currently, criminals are beginning to use image processing technology to generate various highly realistic document templates. By combining and splicing these templates with different variable document information, they can quickly generate a large number of counterfeit document images and use them for identity verification during business transactions, disrupting the normal operation of the business.
[0003] Therefore, accurately identifying cases where users use forged document images to commit identity fraud during the identity authentication process, in order to ensure the security of identity authentication, has become an urgent technical problem to be solved. Summary of the Invention
[0004] The embodiments of this specification provide an identity authentication method, apparatus, and device that can accurately identify situations where users use forged document images to commit identity fraud during the identity authentication process, thereby ensuring the security of identity authentication.
[0005] To solve the above-mentioned technical problems, the embodiments in this specification are implemented as follows:
[0006] This specification provides an authentication method, including:
[0007] Obtain the first image of a preset type of identification document required for identity verification of the target user;
[0008] The variable information area in the first document image is masked to obtain the second document image;
[0009] Image feature extraction processing is performed on the second document image to obtain first image feature data;
[0010] Based on the first comparison result between the first image feature data and the forged document image feature data, the identity authentication result of the target user is generated; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0011] An identity authentication device provided in the embodiments of this specification includes:
[0012] The acquisition module is used to acquire images of the first type of document required for identity authentication of the target user.
[0013] The first masking processing module is used to mask the variable information area in the first document image to obtain the second document image;
[0014] The first feature extraction module is used to perform image feature extraction processing on the second document image to obtain first image feature data;
[0015] The authentication result generation module is used to generate the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0016] An identity authentication device provided in the embodiments of this specification includes:
[0017] At least one processor; and,
[0018] A memory communicatively connected to the at least one processor; wherein,
[0019] The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to:
[0020] Obtain the first image of a preset type of identification document required for identity verification of the target user;
[0021] The variable information area in the first document image is masked to obtain the second document image;
[0022] Image feature extraction processing is performed on the second document image to obtain first image feature data;
[0023] Based on the first comparison result between the first image feature data and the forged document image feature data, the identity authentication result of the target user is generated; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0024] At least one embodiment provided in this specification can achieve the following beneficial effects:
[0025] By masking the variable information areas in a first document image of a preset type required for user authentication, it becomes possible to extract first image feature data from a second document image of the target user with the variable information areas masked. Subsequently, by comparing the consistency between the first image feature data and the forged document image feature data in a preset type of forged document image with the variable information areas masked, it is possible to accurately identify whether the target user is using a forged document image for identity fraud, thus helping to ensure the security of identity authentication. Attached Figure Description
[0026] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0027] Figure 1 This is a schematic diagram illustrating an application scenario of an identity authentication method provided in the embodiments of this specification;
[0028] Figure 2 A flowchart illustrating an identity authentication method provided in an embodiment of this specification;
[0029] Figure 3 A schematic diagram illustrating the generation principle of a second document image provided in the embodiments of this specification;
[0030] Figure 4 The embodiments provided in this specification correspond to Figure 2 A swimlane flowchart illustrating the identity authentication method in the system;
[0031] Figure 5 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of an identity authentication device;
[0032] Figure 6 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of an identity authentication device. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of one or more embodiments of this specification clearer, the technical solutions of one or more embodiments of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the protection scope of one or more embodiments of this specification.
[0034] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0035] In existing technologies, criminals are beginning to use image processing techniques to generate highly realistic document templates. By combining and splicing these templates with various variable document information, they can quickly generate a large number of counterfeit document images and use them for identity verification during business transactions. Because these counterfeit documents are highly realistic, accurately identifying users using counterfeit document images for identity fraud during the authentication process poses a challenge.
[0036] To address the shortcomings of existing technologies, this solution provides the following embodiments:
[0037] Figure 1 This is a schematic diagram illustrating an application scenario of an identity authentication method provided in the embodiments of this specification.
[0038] like Figure 1 As shown, when the identity authentication device 101 performs identity authentication on the target user, it can mask the variable information area in the first document image of the target user's preset type to obtain the second document image; and perform image feature extraction processing on the second document image to obtain the first image feature data.
[0039] Since criminals often use a limited number of document templates that do not contain variable document information when generating counterfeit document images, if a pre-defined type of counterfeit document image is identified during business operations, the area containing variable information in the counterfeit document image can be masked, and image feature extraction processing can be performed to obtain the counterfeit document image feature data.
[0040] Based on this, the first image feature data of the target user can be compared with the feature data of the forged document image. If there is forged document image feature data that is consistent with the first image feature data of the target user, it means that the first document image used by the target user for identity authentication is a forged document image. That is, the target user is at risk of using a forged document image for identity fraud, which can prevent the target user's identity authentication from passing, thus helping to ensure the security of identity authentication.
[0041] Next, an identity authentication method provided in the embodiments of the specification will be described in detail with reference to the accompanying drawings:
[0042] Figure 2 This is a flowchart illustrating an authentication method provided in an embodiment of this specification. From a programming perspective, the entity executing this process can be a device used for authentication, or an application program installed on the device used for authentication. Figure 2 As shown, the process may include the following steps:
[0043] Step 202: Obtain the first document image of the preset type required for identity authentication of the target user.
[0044] In the embodiments described in this specification, during business operations, it may be necessary to verify user identification documents of a preset type to generate user identity authentication results. Therefore, it is necessary to obtain the first identification document image of the target user of the preset type. In practical applications, the preset type of identification document required in the identity authentication process can be set according to actual needs. For example, it may include: identification documents issued by official institutions reflecting individual identity, work permits, membership cards, bank cards, etc., without specific limitations.
[0045] In practical applications, due to differences in image acquisition angles, the acquired user ID images often suffer from certain distortions. Therefore, shape correction and alignment processing can be performed on the first ID image of the target user in advance to ensure the accuracy of the generated identity authentication results.
[0046] Step 204: Mask the area containing variable information in the first document image to obtain the second document image.
[0047] In the embodiments of this specification, the same type of identification documents from different users typically contain some variable information to distinguish the owner of the document. In addition, the same type of identification documents from different users also typically contain some immutable information, such as background images or information type identifiers. Since criminals usually use a limited number of document templates to create counterfeit document images, and document templates typically do not contain the variable information of the document, when identifying counterfeit document images based on the feature data of the document template portion, it is necessary to mask the areas containing variable information in the target user's first document image to obtain a second document image containing only the immutable information of the document.
[0048] Step 206: Perform image feature extraction processing on the second document image to obtain the first image feature data.
[0049] In the embodiments of this specification, image feature extraction is a key step in image processing, which aims to examine each pixel in an image to determine whether it represents a specific feature, such as color, texture, shape, edge, corner, etc. It is invariant to changes in the scale, rotation and brightness of the image and is widely used in computer vision tasks such as image matching, object recognition, and image classification.
[0050] Since it is necessary to compare whether the second document image is consistent with the forged document template in order to identify whether the target user is using the forged document image for identity fraud, it is necessary to extract the image feature data of the second document image to obtain the first image feature data in order to facilitate the consistency comparison operation.
[0051] Step 208: Generate the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0052] In the embodiments of this specification, during business operation, when it is identified that criminals are using a preset type of counterfeit document image, the variable information area in the counterfeit document image can be blocked (equivalent to obtaining a counterfeit document template), and image feature extraction processing can be performed to obtain counterfeit document image feature data.
[0053] Since the forged document image and the first document image obtained in step 202 belong to the same type of document, the variable information areas of both are also consistent. This makes the first document image (i.e., the second document image) with its variable information areas masked comparable to the forged document image with its variable information areas masked. Based on this, a consistency comparison can be performed between the first image feature data in the second document image and the forged document image feature data in the forged document image with its variable information areas masked. If the generated first comparison result indicates that the consistency between the first image feature data and the forged document image feature data is greater than or equal to a threshold, then a result indicating that the target user has failed authentication can be generated. If the first comparison result indicates that the consistency between the first image feature data and the forged document image feature data is less than a threshold, then a result indicating that the target user has passed authentication can be generated. Alternatively, other identity verification methods can be used to continue authenticating the target user to ensure the accuracy of the authentication result; no specific limitations are imposed on this.
[0054] Figure 2 The method described above masks the variable information region in a first document image of a preset type required for identity authentication by the target user. This allows for the extraction of first image feature data from a second document image of the target user, even after the variable information region has been masked. Subsequently, by comparing the consistency between the first image feature data and the forged document image feature data in a preset type of forged document image with the variable information region masked, it is possible to accurately identify whether the target user is using a forged document image for identity fraud, thus helping to ensure the security of identity authentication.
[0055] based on Figure 2 In addition to the method described in the embodiments of this specification, some specific implementation schemes of the method are also provided, which will be described below.
[0056] To facilitate understanding, the implementation method of the area containing variable information in the identification document is given here.
[0057] Specifically, before step 204: masking the area containing variable information in the first document image to obtain the second document image, it may further include:
[0058] Using an optical character recognition algorithm, the region containing the characters in the first document image is determined, thereby obtaining the region containing the variable information in the first document image; and / or,
[0059] Using a face recognition algorithm, the region where the face image is located in the first document image is determined, thereby obtaining the region where the variable information in the first document image is located.
[0060] In the embodiments of this specification, Optical Character Recognition (OCR) can refer to the process of using electronic devices (such as scanners or digital cameras) to determine the texture and shape in an image by detecting dark and light patterns, and then translating the texture and shape into computer text using character recognition methods.
[0061] Since identification documents typically contain character information used to identify the purpose of the document and the identity information of the document owner, and the character information in the documents of different users usually differs, the area containing the characters in the first document image identified by the optical character recognition algorithm can be used as the area containing variable information.
[0062] In practical applications, identification documents may contain fixed character information, such as document name and user information category identifiers (e.g., name, document validity period). Therefore, to increase the area of the document image that can be compared for consistency and improve the accuracy of the comparison results, after identifying the character area in the first document image, it can be determined whether any character area contains a preset fixed character. If so, the area containing the preset fixed character is prohibited from being identified as a variable information area; otherwise, the character area can be identified as a variable information area. Based on this, the variable information area identified will generally not contain preset fixed characters such as document name and user information category identifiers (e.g., name, document validity period).
[0063] Face recognition refers to the technology of identifying the position and size of a face in an image based on its color features, texture features, and geometric features between facial landmarks. Since some identification documents often contain user facial images, and these images are typically different for different users, the area containing the facial image determined by the face recognition algorithm can be used as the area containing variable information in the first identification document image.
[0064] In practical applications, facial images carried on identification documents typically have a preset format. For example, the image is horizontally centered within a rectangular frame, the head occupies approximately two-thirds of the photo's length, and the hairline is a preset distance from the top edge of the photo. Therefore, facial images on identification documents usually contain not only the face but also a significant amount of background. However, existing facial recognition algorithms often only accurately identify the rectangular facial region bounded by the hairline, chin, and ears, failing to accurately identify the background regions within the facial image. This affects the accuracy of identifying the variable information regions from the initial identification document image.
[0065] Based on this, the regions where the face images are located (including the face region and the face background region) in the preset types of document image samples can be labeled, so as to train the face recognition model using the labeled document image samples, thereby enabling the trained face recognition model to recognize the regions where the complete face images are located in the preset types of documents, so as to use the trained face recognition model to determine the regions where the face images are located in the first document image. This will not be elaborated further.
[0066] To facilitate understanding, the implementation method for masking the variable information area in the first document image is given here.
[0067] Specifically, step 204: Masking the area containing variable information in the first document image to obtain the second document image may include:
[0068] The second document image is obtained by setting the pixel values of each pixel within the region containing the variable information in the first document image to preset values; or,
[0069] Based on the location information of the variable information region in the first document image, a layer mask is generated to occlude the variable information region in the first document image. The pixel values of the target region in the layer mask used to occlude the variable information region in the first document image are preset values, and the transparency of the target region is less than a first threshold. Other regions of the layer mask are transparent regions.
[0070] The first document image is overlaid with the layer mask to obtain the second document image.
[0071] In the embodiments of this specification, "masking the variable information area in the first document image" aims to eliminate the influence of variable information in different users' documents on the subsequently extracted first image feature data. In other words, the technical effect to be achieved by "masking the variable information area in the first document image" is to make the feature data extracted from the variable information area in different users' documents consistent.
[0072] Based on this, after identifying the region containing variable information in the first document image, the pixel values of each pixel within that region can be directly set to preset values to serve as the second document image. Furthermore, the forged document image feature data used in step 208 should also be the feature data extracted after changing the region containing variable information in the forged document image to the preset values, thus ensuring the comparability of the subsequently extracted first image feature data with the forged document image feature data. In practical applications, the preset values can be numerical values representing any color, data representing grayscale, or multiple numerical values representing various colors; no specific limitations are imposed.
[0073] In the embodiments described in this specification, a layer mask can be viewed as a piece of glass covering a layer; it can be transparent, semi-transparent, or completely opaque. Using layer masks can protect specific parts of an image from editing operations and can also hide or show designated portions of an image, thereby enabling localized modifications and special effects. This makes them widely applicable in scenarios involving the creation of complex image effects and compositions.
[0074] Therefore, when it is necessary to mask the variable information area in the first ID image, a layer mask can be created. By setting the pixel values of the target area in the layer mask that corresponds to the variable information area to a preset value, and ensuring that the transparency of this target area is less than a first threshold, while making the other areas of the layer mask transparent, the variable information area in the first ID image can be masked without affecting the feature information carried by other areas. By overlaying the first ID image and the layer mask, a second ID image with the variable information area masked can be obtained.
[0075] In practical applications, the higher the transparency of the layer mask, the more feature information of the underlying layer is often revealed, resulting in a poorer occlusion effect. Therefore, to ensure effective occlusion and masking of the variable information area in the first document image, a relatively small first threshold value is usually preferred to ensure that the target area has low transparency or is completely opaque. Apart from the target area, other areas in the layer mask can be either completely transparent or semi-transparent with relatively high transparency; no specific limitation is made.
[0076] For ease of understanding, Figure 3 This is a schematic diagram illustrating the generation principle of a second document image provided in an embodiment of this specification. Figure 3As shown, a layer mask 302 can be created for the first document image 301. The target area in the layer mask 302 that corresponds to the variable information area in the first document image 301 can be set to black with an opacity of 0 (i.e., completely opaque), while other areas in the layer mask 302 can be transparent. By overlaying the first document image 301 and the layer mask 302, a second document image 303 with the variable information area masked can be obtained; this will not be elaborated further.
[0077] In this embodiment of the specification, step 206: performing image feature extraction processing on the second document image to obtain first image feature data, specifically may include:
[0078] The second document image is input into a self-supervised learning-based visual representation model, and the image feature vector output by a preset network layer in the visual representation model is extracted to obtain the first image feature data; or,
[0079] The second document image is input into the image classification model, and the image feature vector output by the specified network layer in the image classification model is extracted to obtain the first image feature data.
[0080] In the embodiments described in this specification, the core idea of self-supervised learning can be to create virtual supervision signals from the input data and then use these virtual labels to train the model. During training, the model optimizes based on the virtual labels to learn useful features and patterns in the data. These virtual labels can be automatically generated from the original data, such as removing a portion of content from an image and having the model predict the missing content, or masking parts of words in text and having the model fill in the missing words. Because self-supervised learning does not require manually labeled data but automatically generates labels from the input data itself to guide the model's learning process, it is convenient and fast, and therefore has been widely used in computer vision tasks such as image restoration, image completion, and image generation.
[0081] In simple terms, representing visual information can be about transforming image information into feature vectors or vector sequences required for deep learning input. In the era of deep learning, Convolutional Neural Networks (CNNs), with their characteristics such as local region connectivity, weight sharing, and shift invariance, naturally conform to the inductive assumptions of image information modeling, and are therefore widely used to build visual representation models.
[0082] Therefore, when it is necessary to extract the first image feature data carried by the second document image, the second document image can be input into a self-supervised learning-based visual representation model built using convolutional network layers. By extracting the image feature vector output by a preset network layer in the visual representation model, the first image feature data can be obtained. The preset network layer can typically be a fully connected layer close to the model's output layer, but other network layers are also acceptable; no specific limitation is made.
[0083] In the embodiments of this specification, image classification is an important task in the field of computer vision. Its goal is to classify input images into different categories. The basic principle of image classification is to obtain a classification model that has learned the features and knowledge of each category through supervised training. The trained classification model is then used to extract features from the image to be classified, and these features are compared with the classification features and knowledge learned by the model in the early stages to determine the category to which the image belongs. Image classification plays a crucial role in many applications, such as face recognition, object recognition, and autonomous driving.
[0084] Based on this, when it is necessary to extract the first image feature data carried by the second document image, document image samples of the preset categories can be obtained in advance and classified with labels. The image classification model can then be trained using these labeled document image samples. In practical applications, to improve the performance of the image classification model, image samples from multiple categories are often needed for model training. Therefore, other categories of document image samples can also be used to train the image classification model. Subsequently, the second document image can be input into the image classification model, and the image feature vector output by a specified network layer in the model can be extracted as the first image feature data. The specified network layer can typically be a fully connected layer close to the model's output layer, but other network layers are also acceptable; no specific limitation is made.
[0085] To facilitate understanding, the implementation method of training a visual representation model and an image classification model based on self-supervised learning is given here.
[0086] Specifically, Figure 2 The methods may also include:
[0087] The image sample of the preset type of document, with the variable information area masked, is input into the initial visual representation model to obtain the reconstructed image output by the initial visual representation model.
[0088] The initial visual representation model is optimized by minimizing the difference between the reconstructed image and the document image sample containing the unmasked variable information, thus obtaining the visual representation model. Alternatively,
[0089] The image sample of the preset type of document, with the variable information area masked, is input into the initial image classification model to obtain the predicted classification result output by the initial image classification model.
[0090] The initial image classification model is optimized by minimizing the difference between the predicted classification result and the preset classification label of the document image sample, thus obtaining the image classification model.
[0091] In the embodiments of this specification, training data can be generated by randomly removing a portion of an image, and the original data is used as training labels to pre-train the visual representation model based on self-supervised learning. This application happens to have a requirement to mask the variable information regions in document images. Based on this, document image samples of a preset type with the variable information regions masked can be used as model input data, and document image samples with the variable information regions not masked (i.e., complete document images) can be used as label data to train the visual representation model based on self-supervised learning. Further details are omitted here.
[0092] In practical applications, the visual representation model may include, but is not limited to, any one of the following: mask autoencoder, large image generation model, and multimodal large model.
[0093] Masked autoencoders (MAEs) are a simple autoencoding method that can reconstruct the complete signal given a partial observation. A MAE typically contains an encoder and a decoder. The encoder maps the observed signal to a latent representation, while the decoder reconstructs the complete signal from the latent representation. It is known that the network layer in the encoder of a masked autoencoder that is closer to the decoder can extract image feature data with better performance. Therefore, a specific network layer in the encoder of a masked autoencoder that is closer to the decoder can be used as the preset network layer required for extracting the first image feature data.
[0094] Large-scale image generation models refer to models capable of generating images (also known as base models). Because large-scale models often belong to machine learning models with a large number of parameters and complex structures, they have good image feature extraction capabilities. Based on this, large-scale image generation models can be used to extract primary image feature data.
[0095] Multimodal large models are a type of large model, but they can often receive or output multiple modalities of data, including visual, audio, video, text, or 3D point cloud modalities. Based on this, multimodal large models can also be used to extract first image feature data. In practical applications, there are various types of multimodal large models. For example, the BeiT-3 multimodal large model can be pre-trained on both unimodal and multimodal data using masked data modeling, and can be transferred to various downstream tasks in vision and vision-language processing. Its widespread application due to its ease of use is well-documented and will not be elaborated upon further.
[0096] In this embodiment of the specification, step 208: generating the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data, may specifically include:
[0097] Calculate the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set.
[0098] Determine whether there exists a target similarity value greater than or equal to the second threshold to obtain a first determination result.
[0099] If the first judgment result indicates that there is a target similarity value greater than or equal to the second threshold, then result information indicating that the target user has not passed identity authentication is generated.
[0100] If the first judgment result indicates that there is no target similarity value greater than or equal to the second threshold, then result information indicating that the target user has passed identity authentication can be generated, or other identity verification methods can be used to authenticate the target user to ensure the security and effectiveness of the identity authentication scheme.
[0101] In the embodiments of this specification, the target feature data set may include image feature data of various counterfeit documents obtained historically. Since the target feature data set may contain a large number of counterfeit document image feature data, to balance authentication efficiency and accuracy, a one-to-one comparison can be made between the first image feature data and each counterfeit document image feature data in the target feature data set, or a consistency comparison can be made only between the first image feature data and a portion of the counterfeit document image feature data in the target feature data set. No specific limitation is made in this regard.
[0102] In practical applications, a second threshold can be set to measure whether the first image feature data and the forged document image feature data are consistent, based on actual needs. When the target similarity between the first image feature data and the forged document image feature data is greater than or equal to the second threshold, they can be considered to be consistent. In this case, the target user is more likely to use the forged document image for identity authentication, so it is necessary to prevent the target user from passing the identity authentication. If the target similarity between the first image feature data and the forged document image feature data is less than the second threshold, they can be considered to be inconsistent. This will not be elaborated further.
[0103] In the embodiments of this specification, calculating the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set may specifically include:
[0104] Calculate the target similarity between the first image feature data and each of the forged document image feature data contained in the target feature data set; or,
[0105] The forged document image feature data contained in the target feature data set is subjected to clustering processing a preset number of times to obtain multiple target clusters.
[0106] Calculate the target similarity between the first image feature data and the target forged document image feature data in the target cluster; wherein, the target forged document image feature data includes the forged document image feature data at at least one of the cluster center point and edge point of the target cluster.
[0107] In the embodiments of this specification, in order to ensure the efficiency of identity authentication, a portion of representative counterfeit document image feature data can be selected from the target feature data set and compared with the first image feature data for consistency, instead of comparing all counterfeit document image feature data with the first image feature data one by one.
[0108] Cluster analysis, based on similarity, divides multiple objects into groups, resulting in higher similarity among objects within the same cluster and lower similarity among objects in different clusters. Based on this, we can perform clustering on the forged document image feature data contained in the target feature dataset, and then select a portion of the forged document image feature data from each category for consistency comparison with the first image feature data.
[0109] Specifically, since the cluster centroid of each cluster is a special object in the cluster analysis, representing a certain type of object, other objects are identified by their distance from the cluster centroid to determine whether they belong to that cluster. Clearly, representative forged document image feature data at the cluster centroid can be considered representative target forged document image feature data. Furthermore, edge points in each cluster are objects that are far from the cluster centroid, and their similarity to the cluster centroid is relatively low. Therefore, forged document image feature data at the edge points of the cluster can also be considered representative target forged document image feature data.
[0110] Since the number of clusters obtained from a single clustering process is limited, it may be impossible to extract a sufficient number of representative feature data of the target counterfeit document image. Therefore, this paper presents an implementation method to obtain a sufficient number of target clusters and feature data of the target counterfeit document image.
[0111] Specifically, the step of performing clustering processing on the forged document image feature data contained in the target feature data set a preset number of times to obtain multiple target clusters may include:
[0112] Clustering is performed on the forged document image feature data contained in the target feature data set to obtain multiple first clusters.
[0113] Determine whether the cumulative number of clustering operations performed has reached the preset number, and obtain a second determination result.
[0114] If the second determination result indicates that the cumulative number of clustering processes performed has reached the preset number, then the first cluster is determined as the target cluster.
[0115] If the second determination result indicates that the cumulative number of clustering processes performed has not reached the preset number, then the forged document image feature data contained in a single first cluster will be clustered again until the cumulative number of clustering processes performed reaches the preset number.
[0116] The cluster generated by the last clustering process is determined as the target cluster.
[0117] In the embodiments of this specification, the preset number of clustering processes to be performed can be set according to actual needs, and the preset number of processes can be a positive integer greater than or equal to 1. Since each clustering process, except for the first clustering process, requires clustering of the forged document image feature data in the clusters obtained from the previous clustering process, the number of clusters obtained in each clustering process can be increased exponentially, so as to quickly and efficiently obtain representative target clusters.
[0118] Correspondingly, before calculating the target similarity between the first image feature data and the target forged document image feature data in the target cluster, the process may further include:
[0119] For any of the target clusters, determine the forged document image feature data at the cluster center point of the target cluster to obtain the target forged document image feature data; or,
[0120] For any of the target clusters, a preset number of target forged document image feature data are sequentially determined based on the distance information between each of the forged document image feature data in the target cluster; wherein, the first target forged document image feature data is the forged document image feature data at the cluster center point of the target cluster, and the Nth target forged document image feature data is the forged document image feature data farthest from the previous N-1 target forged document image feature data, where N is a positive integer greater than or equal to 2.
[0121] In the embodiments of this specification, after the clustering process is completed, each target cluster and the cluster center point of the target cluster can be obtained. Therefore, the target forged document image feature data at the cluster center point can be extracted very easily, which will not be elaborated further.
[0122] When filtering feature data of counterfeit document images at edge points, we can first find the point in the target cluster that is farthest from the cluster center, and use it as the first edge point. Then, we find the point with the greatest combined distance from the cluster center and the first edge point, and use it as the first edge point. Based on the same principle, we can use the point with the greatest combined distance from the cluster center and all the identified edge points as the next edge point. This method is accurate, efficient, and convenient, and will not be elaborated further.
[0123] In practical applications, the images of pre-defined types of identification documents obtained by identity authentication devices often include not only the area where the document is located but also a portion of the background area to reflect the surrounding environment. Criminals, when forging document images, may also embed the forged document image into a fake background template to enhance the realism of the forged document image.
[0124] Based on this, step 202: Obtain a first document image of a preset type required for identity authentication of the target user, which may specifically include:
[0125] Obtain an initial image of the target user's identification document; wherein the initial image of the identification document includes an identification document area and a background area. The background area is used to reflect the surrounding environment information of the identification document.
[0126] Extract the image within the document area from the initial document image to obtain the first document image.
[0127] besides, Figure 2 The methods mentioned may also include:
[0128] The document area in the initial document image is masked to obtain the document background image.
[0129] Image feature extraction processing is performed on the background image of the document to obtain second image feature data.
[0130] Determine a second comparison result between the second image feature data and the forged document background image feature data; wherein the forged document background image feature data is image feature data extracted from the preset type of forged initial document image with the document area masked.
[0131] Correspondingly, step 208: generating the identity authentication result of the target user, which may specifically include:
[0132] Based on the first comparison result and the second comparison result, the identity authentication result of the target user is generated.
[0133] In the embodiments of this specification, after identifying a forged initial document image used by criminals during business operations, in addition to extracting the feature data of the forged document image, feature data of the forged document background image can also be extracted. Therefore, when verifying the authenticity of a target user's initial document image, feature data of the document background image can be extracted. If forged document background image feature data with a similarity greater than a threshold exists, it can be considered that the target user is using a forged document for identity authentication, and the target user's identity authentication can be failed.
[0134] In practical applications, the authentication result for the target user can be generated by combining the first comparison result between the target user's ID image and the forged ID image, and the second comparison result between the target user's ID background image and the forged ID background image, thereby improving the security and effectiveness of the authentication result. For example, the target user can be allowed to pass authentication only when the similarity of the feature data between the target user's ID image and the forged ID image is below a threshold, and the similarity of the feature data between the target user's ID background image and the forged ID background image is also below a threshold. Alternatively, appropriate weights can be assigned to the above two similarities, and the target user can be prohibited from passing authentication when the weighted sum or average of the calculated similarities is greater than a threshold. No specific limitations are imposed on this.
[0135] Figure 4 The embodiments provided in this specification correspond toFigure 2 The swimlane flowchart illustrates the identity authentication method in [the context of the game / system]. For example... Figure 4 As shown, the identity authentication process may involve execution entities such as identity authentication devices and databases. The database stores image feature data of forged documents and background image feature data of forged documents.
[0136] In the document image processing stage, the identity authentication device can extract the image within the document area from the initial document image of the target user's preset type to obtain the first document image; perform masking processing on the variable information area in the first document image to obtain the second document image; input the second document image into a visual representation model or image classification model based on self-supervised learning, extract the image feature vector output by a certain network layer in the model, and obtain the first image feature data.
[0137] Additionally, the document region in the initial document image of the target user's preset type is masked to obtain the document background image; the document background image is input into a visual representation model or image classification model based on self-supervised learning, and the image feature vector output by a certain network layer in the model is extracted to obtain the second image feature data.
[0138] In the feature comparison stage, the identity authentication device can perform clustering processing on the forged document image feature data obtained from the database a preset number of times to obtain multiple target clusters; calculate the target similarity between the first image feature data and the target forged document image feature data in the target clusters; the target forged document image feature data may include: forged document image feature data at least one of the cluster center point and edge point of the target cluster.
[0139] Furthermore, clustering is performed a preset number of times on the forged document background image feature data obtained from the database to obtain multiple specified clusters; a specified similarity is calculated between the second image feature data and the target forged document background image feature data in the specified clusters; the target forged document background image feature data may include: forged document background image feature data at least one of the cluster center point and edge point of the specified cluster.
[0140] Subsequently, the identity authentication device can determine whether there is a target similarity value greater than or equal to the second threshold or a specified similarity value greater than or equal to the third threshold. If so, it can generate authentication result information indicating that the target user's identity authentication has failed.
[0141] Based on the same idea, embodiments of this specification also provide apparatus corresponding to the above methods. Figure 5 The embodiments provided in this specification correspond to Figure 2 A schematic diagram of the structure of an identity authentication device. (See diagram below.) Figure 5As shown, the device may include:
[0142] The acquisition module 502 is used to acquire a first document image of a preset type required for identity authentication of the target user.
[0143] The first masking processing module 504 is used to mask the area containing variable information in the first document image to obtain the second document image.
[0144] The first feature extraction module 506 is used to perform image feature extraction processing on the second document image to obtain first image feature data.
[0145] The authentication result generation module 508 is used to generate the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0146] based on Figure 5 The embodiments of this specification also provide some specific implementations of the device, which will be described below.
[0147] Optional, Figure 5 The apparatus described herein may further include:
[0148] The first variable information recognition module is used to determine the region where the characters are located in the first document image using an optical character recognition algorithm, thereby obtaining the region where the variable information is located in the first document image; and / or,
[0149] The second variable information recognition module is used to determine the area where the face image is located in the first document image by using a face recognition algorithm, and to obtain the area where the variable information is located in the first document image.
[0150] Optionally, the first shielding processing module may include:
[0151] A pixel value setting unit is used to set the pixel values of each pixel in the area containing variable information in the first document image to preset values to obtain the second document image; or,
[0152] A layer mask generation unit is used to generate a layer mask for occluding the variable information in the first document image based on the location information of the variable information in the first document image. The pixel values in the target area of the layer mask used to occlude the variable information in the first document image are preset values, and the transparency of the target area is less than a first threshold. Other areas of the layer mask are transparent areas.
[0153] The overlay processing unit is used to overlay the first document image with the layer mask to obtain the second document image.
[0154] Optionally, the first feature extraction module may specifically include:
[0155] The first feature extraction unit is used to input the second document image into a self-supervised learning-based visual representation model, extract the image feature vector output by a preset network layer in the visual representation model, and obtain the first image feature data; or,
[0156] The second feature extraction unit is used to input the second document image into the image classification model, extract the image feature vector output by a specified network layer in the image classification model, and obtain the first image feature data.
[0157] Optional, Figure 5 The apparatus described herein may further include:
[0158] The first training module is used to input the preset type of document image samples with the variable information in the masked area into the initial visual representation model to obtain the reconstructed image output by the initial visual representation model.
[0159] The first parameter optimization module is used to optimize the parameters of the initial visual representation model with the objective of minimizing the difference between the reconstructed image and the document image sample in the region where the variable information is not masked, thereby obtaining the visual representation model; or...
[0160] The second training module is used to input the preset type of document image samples with the variable information in the masked area into the initial image classification model to obtain the predicted classification result output by the initial image classification model.
[0161] The second parameter optimization module is used to optimize the parameters of the initial image classification model with the goal of minimizing the difference between the predicted classification result and the preset classification label of the document image sample, so as to obtain the image classification model.
[0162] Optionally, the visual representation model may include any one of the following: a mask autoencoder, a large image generation model, and a multimodal large model.
[0163] Optionally, the authentication result generation module may include:
[0164] A calculation unit is configured to calculate the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set.
[0165] The judgment unit is used to determine whether there is a target similarity value greater than or equal to the second threshold, and obtain a first judgment result.
[0166] The authentication result generation unit is used to generate result information indicating that the target user has not passed the identity authentication if the first judgment result indicates that there is a target similarity with a value greater than or equal to the second threshold.
[0167] Optionally, the computing unit may include:
[0168] The first calculation subunit is used to calculate the target similarity between the first image feature data and each of the forged document image feature data contained in the target feature data set; or,
[0169] The clustering subunit is used to perform a preset number of clustering processes on the forged document image feature data contained in the target feature data set to obtain multiple target clusters.
[0170] The second calculation subunit is used to calculate the target similarity between the first image feature data and the target forged document image feature data in the target cluster; wherein, the target forged document image feature data includes the forged document image feature data at at least one of the cluster center point and edge point of the target cluster.
[0171] Optionally, the clustering subunit can be specifically used for:
[0172] Clustering is performed on the forged document image feature data contained in the target feature data set to obtain multiple first clusters.
[0173] Determine whether the cumulative number of clustering operations performed has reached the preset number, and obtain a second determination result.
[0174] If the second determination result indicates that the cumulative number of clustering processes performed has reached the preset number, then the first cluster is determined as the target cluster.
[0175] If the second determination result indicates that the cumulative number of clustering processes performed has not reached the preset number, then the forged document image feature data contained in a single first cluster will be clustered again until the cumulative number of clustering processes performed reaches the preset number.
[0176] The cluster generated by the last clustering process is determined as the target cluster.
[0177] Optionally, the computing unit may further include:
[0178] The first determining subunit is configured to, for any one of the target clusters, determine the forged document image feature data at the cluster center point of the target cluster, thereby obtaining the target forged document image feature data; or...
[0179] The second determining subunit is used to determine a preset number of target forged document image feature data sequentially for any target cluster based on the distance information between each forged document image feature data in the target cluster; wherein, the first target forged document image feature data is the forged document image feature data at the cluster center point of the target cluster, and the Nth target forged document image feature data is the forged document image feature data farthest from the previous N-1 target forged document image feature data.
[0180] Optionally, the acquisition module can be specifically used for:
[0181] Obtain the initial ID image of the target user; wherein the initial ID image includes an ID area and a background area.
[0182] Extract the image within the document area from the initial document image to obtain the first document image.
[0183] Optional, Figure 5 The apparatus described herein may further include:
[0184] The second masking module is used to mask the document area in the initial document image to obtain a document background image.
[0185] The second feature extraction module is used to perform image feature extraction processing on the background image of the document to obtain second image feature data.
[0186] The comparison module is used to determine a second comparison result between the second image feature data and the forged document background image feature data; wherein the forged document background image feature data is image feature data extracted from the preset type of forged initial document image with the document area shielded.
[0187] The authentication result generation module can be specifically used for:
[0188] Based on the first comparison result and the second comparison result, the identity authentication result of the target user is generated.
[0189] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.
[0190] Figure 6 The embodiments provided in this specification correspond to Figure 2A schematic diagram of the structure of an identity authentication device. (See diagram below.) Figure 6 As shown, device 600 may include:
[0191] At least one processor 610; and,
[0192] Memory 630 communicatively connected to the at least one processor; wherein,
[0193] The memory 630 stores instructions 620 that can be executed by the at least one processor 610, the instructions being executed by the at least one processor 610 to enable the at least one processor 610 to:
[0194] Obtain the first image of the preset type of identification document required for identity verification of the target user.
[0195] The variable information area in the first document image is masked to obtain the second document image.
[0196] Image feature extraction processing is performed on the second document image to obtain the first image feature data.
[0197] Based on the first comparison result between the first image feature data and the forged document image feature data, the identity authentication result of the target user is generated; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
[0198] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 6 As the device shown is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0199] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0200] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0201] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0202] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.
[0203] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0204] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0205] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0206] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0207] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0208] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0209] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0210] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0211] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0212] This application can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This application can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0213] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. An identity authentication method, comprising: Obtain the first image of a preset type of identification document required for identity verification of the target user; The variable information area in the first document image is masked to obtain the second document image; Image feature extraction processing is performed on the second document image to obtain first image feature data; wherein, the image feature extraction processing specifically includes inputting the second document image into a visual representation model based on self-supervised learning, and extracting the image feature vector output by a preset network layer in the visual representation model; the visual representation model is trained by using document image samples of the preset type with the variable information area masked as model input data, and document image samples with the variable information area not masked as label data; Based on the first comparison result between the first image feature data and the forged document image feature data, the identity authentication result of the target user is generated; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
2. The method as described in claim 1, further comprising, before performing masking processing on the variable information area in the first document image to obtain the second document image: By using an optical character recognition algorithm, the region where the characters are located in the first document image is determined, and the region where the variable information is located in the first document image is obtained; And / or, Using a face recognition algorithm, the region where the face image is located in the first document image is determined, thereby obtaining the region where the variable information in the first document image is located.
3. The method as described in claim 1 or 2, wherein the step of masking the area containing variable information in the first document image to obtain the second document image specifically includes: The pixel values of each pixel in the variable information area of the first document image are set to preset values to obtain the second document image; or, Based on the location information of the variable information area in the first document image, a layer mask is generated to cover the variable information area in the first document image. The pixel values in the target area of the layer mask used to cover the variable information area in the first document image are preset values, and the transparency of the target area is less than a first threshold. Other areas of the layer mask are transparent areas. The first document image is overlaid with the layer mask to obtain the second document image.
4. The method as described in claim 1, wherein the step of performing image feature extraction processing on the second document image to obtain first image feature data specifically includes: The second document image is input into a visual representation model based on self-supervised learning, and the image feature vector output by the preset network layer in the visual representation model is extracted to obtain the first image feature data. or, The second document image is input into the image classification model, and the image feature vector output by the specified network layer in the image classification model is extracted to obtain the first image feature data.
5. The method of claim 4, further comprising: The image sample of the preset type of document, with the variable information area masked, is input into the initial visual representation model to obtain the reconstructed image output by the initial visual representation model. The initial visual representation model is optimized by minimizing the difference between the reconstructed image and the document image sample containing the unmasked variable information; or... Input the preset type of document image sample with the variable information area masked into the initial image classification model to obtain the predicted classification result output by the initial image classification model; The initial image classification model is optimized by minimizing the difference between the predicted classification result and the preset classification label of the document image sample, thus obtaining the image classification model.
6. The method of claim 5, wherein the visual representation model comprises: Any one of the following: masked autoencoder, large-scale image generation model, and multimodal large-scale model.
7. The method as described in claim 1, wherein generating the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data specifically includes: Calculate the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set; Determine whether there exists a target similarity value greater than or equal to the second threshold to obtain a first determination result; If the first judgment result indicates that there is a target similarity value greater than or equal to the second threshold, then result information indicating that the target user has not passed identity authentication is generated.
8. The method of claim 7, wherein calculating the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set specifically includes: Calculate the target similarity between the first image feature data and each of the forged document image feature data contained in the target feature data set; or, The forged document image feature data contained in the target feature data set is subjected to clustering processing a preset number of times to obtain multiple target clusters; Calculate the target similarity between the first image feature data and the target forged document image feature data in the target cluster; wherein, the target forged document image feature data includes the forged document image feature data at at least one of the cluster center point and edge point of the target cluster.
9. The method as described in claim 8, wherein performing clustering processing on the forged document image feature data contained in the target feature data set a preset number of times to obtain multiple target clusters specifically includes: Clustering processing is performed on the forged document image feature data contained in the target feature data set to obtain multiple first clusters; Determine whether the cumulative number of clustering operations has reached the preset number, and obtain a second determination result; If the second determination result indicates that the cumulative number of clustering processes performed has reached the preset number, then the first cluster is determined as the target cluster; If the second determination result indicates that the cumulative number of clustering processes performed has not reached the preset number, then the forged document image feature data contained in a single first cluster will be clustered again until the cumulative number of clustering processes performed reaches the preset number. The cluster generated by the last clustering process is determined as the target cluster.
10. The method of claim 8, further comprising, before calculating the target similarity between the first image feature data and the target forged document image feature data in the target cluster: For any of the target clusters, the forged document image feature data at the cluster center point of the target cluster is determined to obtain the target forged document image feature data; or, For any of the target clusters, a preset number of target forged document image feature data are determined sequentially based on the distance information between each of the forged document image feature data in the target cluster; wherein, the first target forged document image feature data is the forged document image feature data at the cluster center point of the target cluster, and the Nth target forged document image feature data is the forged document image feature data farthest from the previous N-1 target forged document image feature data.
11. The method as described in claim 1, wherein obtaining a first document image of a preset type required for identity authentication of the target user specifically includes: Obtain the initial ID image of the target user; wherein the initial ID image includes an ID area and a background area; Extract the image within the document area from the initial document image to obtain the first document image.
12. The method of claim 11, further comprising: The document area in the initial document image is masked to obtain the document background image; Image feature extraction processing is performed on the background image of the document to obtain second image feature data; Determine a second comparison result between the second image feature data and the forged document background image feature data; wherein, the forged document background image feature data is image feature data extracted from the preset type of forged initial document image with the document area masked; The generation of the target user's identity authentication result specifically includes: Based on the first comparison result and the second comparison result, the identity authentication result of the target user is generated.
13. An identity authentication device, comprising: The acquisition module is used to acquire images of the first type of document required for identity authentication of the target user. The first masking processing module is used to mask the variable information area in the first document image to obtain the second document image; The first feature extraction module is used to perform image feature extraction processing on the second document image to obtain first image feature data; wherein, the image feature extraction processing specifically includes inputting the second document image into a visual representation model based on self-supervised learning, and extracting the image feature vector output by a preset network layer in the visual representation model; the visual representation model is obtained by training the preset type of document image samples with the variable information masked as model input data and the document image samples with the variable information unmasked as label data; The authentication result generation module is used to generate the identity authentication result of the target user based on the first comparison result between the first image feature data and the forged document image feature data; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
14. The apparatus of claim 13, further comprising: The first variable information recognition module is used to determine the region where the characters are located in the first document image by using an optical character recognition algorithm, and to obtain the region where the variable information is located in the first document image. And / or, The second variable information recognition module is used to determine the area where the face image is located in the first document image by using a face recognition algorithm, and to obtain the area where the variable information is located in the first document image.
15. The apparatus of claim 13 or 14, wherein the first shielding processing module comprises: A pixel value setting unit is used to set the pixel value of each pixel in the area where the variable information is located in the first document image to a preset value to obtain the second document image; or, A layer mask generation unit is used to generate a layer mask for occluding the variable information in the first document image based on the location information of the variable information in the first document image. The pixel values in the target area of the layer mask used to occlude the variable information in the first document image are preset values, and the transparency of the target area is less than a first threshold. Other areas of the layer mask are transparent areas. The overlay processing unit is used to overlay the first document image with the layer mask to obtain the second document image.
16. The apparatus of claim 13, wherein the first feature extraction module specifically comprises: The first feature extraction unit is used to input the second document image into a visual representation model based on self-supervised learning, extract the image feature vector output by the preset network layer in the visual representation model, and obtain the first image feature data. or, The second feature extraction unit is used to input the second document image into the image classification model, extract the image feature vector output by a specified network layer in the image classification model, and obtain the first image feature data.
17. The apparatus of claim 16, further comprising: The first training module is used to input the preset type of document image samples with the variable information area masked into the initial visual representation model to obtain the reconstructed image output by the initial visual representation model. The first parameter optimization module is used to optimize the parameters of the initial visual representation model with the objective of minimizing the difference between the reconstructed image and the document image sample in the region where the variable information is not masked, thereby obtaining the visual representation model; or... The second training module is used to input the preset type of document image samples with the variable information area masked into the initial image classification model to obtain the predicted classification result output by the initial image classification model. The second parameter optimization module is used to optimize the parameters of the initial image classification model with the goal of minimizing the difference between the predicted classification result and the preset classification label of the document image sample, so as to obtain the image classification model.
18. The apparatus of claim 17, wherein the visual representation model comprises: Any one of the following: masked autoencoder, large-scale image generation model, and multimodal large-scale model.
19. The apparatus of claim 13, wherein the authentication result generation module comprises: A calculation unit is configured to calculate the target similarity between the first image feature data and at least a portion of the forged document image feature data contained in the target feature data set; The judgment unit is used to determine whether there is a target similarity value greater than or equal to the second threshold, and to obtain a first judgment result; The authentication result generation unit is used to generate result information indicating that the target user has not passed the identity authentication if the first judgment result indicates that there is a target similarity with a value greater than or equal to the second threshold.
20. The apparatus of claim 19, wherein the computing unit comprises: The first calculation subunit is used to calculate the target similarity between the first image feature data and each of the forged document image feature data contained in the target feature data set; or, The clustering subunit is used to perform a preset number of clustering processes on the forged document image feature data contained in the target feature data set to obtain multiple target clusters; The second calculation subunit is used to calculate the target similarity between the first image feature data and the target forged document image feature data in the target cluster; wherein, the target forged document image feature data includes the forged document image feature data at at least one of the cluster center point and edge point of the target cluster.
21. The apparatus of claim 20, wherein the clustering subunit is specifically used for: Clustering processing is performed on the forged document image feature data contained in the target feature data set to obtain multiple first clusters; Determine whether the cumulative number of clustering operations has reached the preset number, and obtain a second determination result; If the second determination result indicates that the cumulative number of clustering processes performed has reached the preset number, then the first cluster is determined as the target cluster; If the second determination result indicates that the cumulative number of clustering processes performed has not reached the preset number, then the forged document image feature data contained in a single first cluster will be clustered again until the cumulative number of clustering processes performed reaches the preset number. The cluster generated by the last clustering process is determined as the target cluster.
22. The apparatus of claim 20, wherein the computing unit further comprises: The first determining subunit is used to determine the forged document image feature data at the cluster center point of any target cluster, thereby obtaining the target forged document image feature data. or, The second determining subunit is used to determine a preset number of target forged document image feature data sequentially for any target cluster based on the distance information between each forged document image feature data in the target cluster; wherein, the first target forged document image feature data is the forged document image feature data at the cluster center point of the target cluster, and the Nth target forged document image feature data is the forged document image feature data farthest from the previous N-1 target forged document image feature data.
23. The apparatus of claim 13, wherein the acquisition module is specifically used for: Obtain the initial ID image of the target user; wherein, The initial document image includes a document area and a background area; Extract the image within the document area from the initial document image to obtain the first document image.
24. The apparatus of claim 23, further comprising: The second masking module is used to mask the document area in the initial document image to obtain a document background image; The second feature extraction module is used to perform image feature extraction processing on the background image of the document to obtain second image feature data. The comparison module is used to determine a second comparison result between the second image feature data and the forged document background image feature data; wherein, the forged document background image feature data is image feature data extracted from the preset type of forged initial document image with the document area shielded; The authentication result generation module is specifically used for: Based on the first comparison result and the second comparison result, the identity authentication result of the target user is generated.
25. An identity authentication device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, which, when executed by the at least one processor, enable the at least one processor to: Obtain the first image of a preset type of identification document required for identity verification of the target user; The variable information area in the first document image is masked to obtain the second document image; Image feature extraction processing is performed on the second document image to obtain first image feature data; wherein, the image feature extraction processing specifically includes inputting the second document image into a visual representation model based on self-supervised learning, and extracting the image feature vector output by a preset network layer in the visual representation model; the visual representation model is trained by using document image samples of the preset type with the variable information area masked as model input data, and document image samples with the variable information area not masked as label data; Based on the first comparison result between the first image feature data and the forged document image feature data, the identity authentication result of the target user is generated; wherein, the forged document image feature data is image feature data extracted from the preset type of forged document image with the variable information area masked.
Citation Information
Patent Citations
Texture-based Authentication of Digital Identity Documents
US20230191823A1
Collecting images and metadata of fake identification documents in database and providing access thereto by other entities for variety of applications
US20240005684A1