Certificate camouflage detection method and device, storage medium and electronic equipment
Through the combination of the local feature extraction model of the document image and the attack risk feature library, the problems of high cost and slow response of document camouflage detection in the existing technology are solved, efficient and accurate document camouflage detection is achieved, and user data security is improved.
Patent Information
- Application Number
- CN202410844128.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-26
- Publication Date
- 2024-10-29
AI Technical Summary
Existing document camouflage detection technology relies on visual artificial intelligence models, resulting in high model training and maintenance costs, inability to respond to new document attack risks in a timely manner, and low user data security.
The document image local feature extraction model is combined with the attack risk feature library to quickly determine the document camouflage detection results through similarity comparison between local image features and attack features, reduce model update frequency, and improve detection efficiency and accuracy.
It improves the recognition accuracy and efficiency of document camouflage detection, reduces training and maintenance costs, enables rapid response to new document attack risks, and improves the security of user data.
Smart Images

Figure CN118864893A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present specification relate to the field of computer technology, and more particularly to a method and device for detecting camouflage of a certificate, a storage medium, and an electronic device. Background Art
[0002] Trusted identity authentication technology refers to the use of AI (Artificial Intelligence) technology to remotely and automatically verify user identities and personal information registration and authentication, helping companies understand the true identities of users and reduce the risks of identity fraud. Compared with traditional offline identity authentication processes, online verification methods are simpler and more efficient, and provide a better user experience. For example, the electronic identity authentication platform eKYC and the digital identity authentication platform ADVANCE.AI that use trusted identity authentication technology.
[0003] At present, document disguise detection mainly relies on vision-based artificial intelligence model detection solutions, that is, the document image is input into the vision-based artificial intelligence model to obtain the document disguise detection result. However, the attack risk types of document disguise are constantly changing. Each change requires iterative updating of the vision-based artificial intelligence detection model. The model training and maintenance costs are high, and it cannot respond to new document attack risks in a timely manner, resulting in low security of user data. Summary of the invention
[0004] The embodiment of this specification provides a document disguise detection method. The method can quickly determine the document disguise detection result of the document image to be detected based on a document image local feature extraction model for extracting local image features, combined with an attack risk feature library storing document attack features, thereby improving the accuracy of the recognition detection result and the recognition detection efficiency, and improving the security of user data. The method includes:
[0005] Obtain the image of the document to be detected;
[0006] Inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected;
[0007] According to the similarity between each certificate attack feature in a preset attack risk feature library and the local image feature, the certificate disguise detection result of the certificate image to be detected is determined.
[0008] Furthermore, in some embodiments, the step of inputting the ID image to be detected into a trained local feature extraction model for ID images to obtain at least one local image feature corresponding to the ID image to be detected comprises: inputting the ID image to be detected into a trained local feature extraction model for ID images to obtain at least one image block after segmentation of the ID image to be detected and an image content type corresponding to the image block; and determining at least one local image feature corresponding to the ID image to be detected based on the image block and the image content type.
[0009] Furthermore, in some embodiments, determining at least one local image feature corresponding to the document image to be detected based on the image blocks and the image content type includes: splicing image blocks belonging to the same image content type to obtain local image features corresponding to each area of interest in the document image to be detected.
[0010] Furthermore, in some embodiments, the document image local feature extraction model includes at least an image feature embedding network, an image feature encoding network and an image feature classification network; the step of inputting the document image to be detected into the trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block includes: segmenting the document image to be detected into at least one image block through the image feature embedding network, and embedding the image block to obtain image block embedding features; inputting the image block embedding features into the image feature encoding network to obtain image block encoding features; and identifying and classifying the image block encoding features according to the image feature classification network to obtain the image content type corresponding to each image block.
[0011] Furthermore, in some embodiments, the document disguise detection result of the document image to be detected is determined based on the similarity between each document attack feature in a preset attack risk feature library and the local image feature, including: if the similarity between any document attack feature and the local image feature is greater than or equal to a preset similarity threshold, then it is determined that the document image to be detected has a document disguise attack risk, and the document disguise attack type corresponding to the document attack feature is used as the target document disguise attack type of the document image to be detected.
[0012] Furthermore, in some embodiments, the document disguise detection result of the document image to be detected is determined based on the similarity between each document attack feature in a preset attack risk feature library and the local image feature, including: if the similarity between any document attack feature and the local image feature is less than the similarity threshold, it is determined that the document image to be detected does not have the risk of document disguise attack.
[0013] Furthermore, in some embodiments, the method also includes: obtaining a historical attack disguised document image, and cropping the historical attack disguised document image to obtain a document attack local image; inputting the document attack local image into a trained document image local feature extraction model to obtain an image feature vector corresponding to the document attack local image; determining the document attack feature based on the image feature vector, and constructing the attack risk feature library through the document attack feature.
[0014] Furthermore, in some embodiments, determining the document attack feature based on the image feature vector includes: clustering the image feature vectors belonging to the same document disguise attack type to obtain multiple image feature vector clusters; determining the central image feature vector corresponding to the image feature vector cluster, and using the central image feature vector as the document attack feature.
[0015] Further, in some embodiments, determining the central image feature vector corresponding to the image feature vector cluster includes: determining an average value of all image feature vectors in the image feature vector cluster, and using the average value as the central image feature vector corresponding to the image feature vector cluster.
[0016] Furthermore, in some implementations, determining the certificate attack feature according to the image feature vector includes: using the image feature vector corresponding to each of the certificate attack partial images as the certificate attack feature.
[0017] Furthermore, in some embodiments, the method also includes: obtaining the latest attack disguised document image, the document disguise attack type corresponding to the latest attack disguised document image does not exist in the attack risk feature library; extracting new document attack features corresponding to the latest attack disguised document image, and updating the attack risk feature library according to the new document attack features.
[0018] The embodiment of this specification also proposes a device for detecting fake documents, including:
[0019] An image acquisition module, used to acquire the image of the document to be detected;
[0020] An image feature extraction module, used for inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected;
[0021] The detection result output module is used to determine the certificate disguise detection result of the certificate image to be detected according to the similarity between each certificate attack feature in the preset attack risk feature library and the local image feature.
[0022] The embodiments of the present specification also provide a computer program product, wherein the computer program product stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the steps of the document forgery detection method.
[0023] The embodiment of the present specification also provides a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the document forgery detection method.
[0024] The embodiment of the present specification also provides an electronic device, including: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the document forgery detection method.
[0025] In the embodiment of the present specification, by obtaining the certificate image to be detected and inputting it into the trained certificate image local feature extraction model, at least one local image feature corresponding to the certificate image to be detected is obtained, and then the certificate disguise detection result of the certificate image to be detected is determined according to the similarity between each certificate attack feature and the local image feature in the preset attack risk feature library. On the one hand, through the certificate image local feature extraction model and the attack risk feature library, it is possible to quickly realize the recognition and detection of various certificate disguises, and improve the accuracy of the recognition detection results and the recognition detection efficiency; on the other hand, when facing the situation where the certificate attack risk is constantly changing, compared with the method of directly outputting the detection results through the artificial intelligence model, it avoids the high training cost and iteration cost, and only needs to update the attack risk feature library, which is simpler to maintain, lower cost, and high update and iteration efficiency, and can achieve rapid response to various new certificate attack risk types, effectively improving the security of user data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] Figure 1 A schematic diagram of a system architecture of an exemplary application environment in which a method and device for detecting spoofed documents according to an embodiment of the present specification can be applied is shown.
[0027] Figure 2 A flowchart of a method for detecting spoofed documents is provided for the embodiments of this specification.
[0028] Figure 3 A schematic diagram of a process for extracting local image features provided in an embodiment of this specification.
[0029] Figure 4 A schematic diagram of a process for determining the image content type of each image block based on a document image local feature extraction model provided in an embodiment of this specification.
[0030] Figure 5A schematic diagram of the model structure of a document image local feature extraction model provided in an embodiment of this specification.
[0031] Figure 6 A schematic diagram of a process for constructing an attack risk feature library provided in an embodiment of this specification.
[0032] Figure 7 A schematic diagram of the principle of building an attack risk feature library provided in an embodiment of this specification.
[0033] Figure 8 A schematic diagram of the principle of determining a certificate forgery detection result provided in an embodiment of this specification.
[0034] Fig. 9 A schematic diagram of the structure of a device for detecting camouflage of a certificate provided in an embodiment of this specification.
[0035] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION
[0036] In order to make the purpose, technical solutions and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in combination with the specific embodiments of this specification and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of this specification, not all of them. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this specification.
[0037] Figure 1 A schematic diagram of a system architecture of an exemplary application environment in which a method and device for detecting spoofed documents according to an embodiment of the present specification can be applied is shown.
[0038] like Figure 1 As shown, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc. The terminal devices 101, 102, 103 may be various electronic devices with artificial intelligence (AI) computing capabilities, including but not limited to desktop computers, portable computers, smart phones, tablet computers, etc. It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. According to the implementation requirements, there may be any number of terminal devices, networks and servers. For example, the server 105 may be a server cluster composed of multiple servers.
[0039] The certificate forgery detection method provided in the embodiments of this specification is generally executed by the terminal devices 101, 102, and 103, and accordingly, the certificate forgery detection device is generally set in the terminal devices 101, 102, and 103. However, it is easy for those skilled in the art to understand that the certificate forgery detection method provided in the embodiments of this specification can also be executed by the server 105, and accordingly, the certificate forgery detection device can also be set in the server 105, which is not particularly limited in this exemplary embodiment.
[0040] See also Figure 2 , which is a flowchart of a method for detecting masquerading of a certificate in an embodiment of this specification. In the embodiment of this specification, the method for detecting masquerading of a certificate can be applied to a terminal device or a server, and this exemplary embodiment does not make any special restrictions on this. Figure 2 The process shown in the figure is described in detail. The method for detecting camouflage of a certificate in the embodiment of this specification may specifically include the following steps:
[0041] Step S210, obtaining an image of a document to be detected;
[0042] Step S220, inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected;
[0043] Step S230, determining a certificate disguise detection result of the certificate image to be detected according to the similarity between each certificate attack feature in a preset attack risk feature library and the local image feature.
[0044] According to the document disguise detection method in the embodiments of this specification, on the one hand, through the document image local feature extraction model and the attack risk feature library, various document disguises can be quickly recognized and detected, thereby improving the accuracy of the recognition and detection results and the recognition and detection efficiency; on the other hand, when faced with the situation where the document attack risk is constantly changing, compared to the method of directly outputting the detection results through the artificial intelligence model, it avoids high training costs and iteration costs, and only needs to update the attack risk feature library, which is easier to maintain, lower cost, and has high update and iteration efficiency. It can achieve rapid response to various new document attack risk types, effectively improving the security of user data.
[0045] The following is a detailed description of the document masquerade detection method provided in the embodiments of this specification.
[0046] In step S210, an image of a document to be detected is obtained.
[0047] In an example embodiment of the present specification, the document image to be detected refers to an image that needs to be detected for camouflage risk and contains personal document privacy information. For example, the document image to be detected can be a personal ID card image, a passport image, a driver's license image, etc. This example embodiment does not specifically limit the type of document image to be detected.
[0048] The image of the document to be detected can be obtained from a database that historically stores document images, or the image of the document to be detected corresponding to the document to be detected can be acquired in real time by an image acquisition unit. Of course, the image of the document to be detected can also be acquired from another terminal device equipped with an image acquisition unit through wireless communication technology. This embodiment does not specifically limit the method for acquiring the image of the document to be detected.
[0049] In step S220, the document image to be detected is input into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected.
[0050] In an example embodiment of the present specification, a local feature extraction model for an ID card image refers to an artificial intelligence model used to extract key local image features in an ID card image to be detected. For example, the local feature extraction model for an ID card image may be a self-supervised model based on VIT (Vision Transformer). For example, the local feature extraction model for an ID card image may be a DINOv2 model or a MAE (Masked Autoencoders) model, etc. This embodiment does not impose any special limitation on the model type adopted by the local feature extraction model for an ID card image.
[0051] Local image features refer to image features containing the area of interest of the document extracted from the document image to be detected by the document image local feature extraction model. For example, taking the document image to be detected as a personal ID card image, the local image features can be image features corresponding to the ID card number area in the document image to be detected, or they can be image features corresponding to the portrait area in the document image to be detected. This example embodiment does not specifically limit the specific content type of the local image features.
[0052] The document image to be detected can be input into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected. For example, the document image to be detected can be input into a trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block, and then at least one local image feature is obtained by splicing image blocks with the same content. For example, taking the document image to be detected as a personal ID card image as an example, the local image features obtained can be name image features, portrait image features, ID card number image features, etc.
[0053] In step S230, the document disguise detection result of the document image to be detected is determined according to the similarity between each document attack feature in the preset attack risk feature library and the local image feature.
[0054] In an example embodiment of this specification, the attack risk feature library refers to a pre-collected and constructed database containing various types of certificate attack features. The certificate attack feature refers to an image feature containing attack behavior extracted from a certificate image with a disguise risk or an attack risk through a certificate image local feature extraction model. For example, the certificate attack feature can be a handwriting tampering attack feature, a foreign object occlusion attack feature, or a single word tampering attack feature. This embodiment does not specifically limit the type of certificate attack feature.
[0055] The certificate disguise detection result refers to the detection result of the certificate disguise attack risk of the certificate image to be detected. For example, the certificate disguise detection result can be the presence or absence of the certificate disguise attack risk of the certificate image to be detected; the certificate disguise detection result can also be the certificate disguise attack type of the certificate disguise attack risk of the certificate image to be detected, and the certificate disguise attack type when there is no certificate disguise attack risk is the no certificate disguise attack type. Of course, the certificate disguise detection result can also be other types of data that can characterize the detection result, such as "0" (which can indicate that there is no certificate disguise attack risk) and "1" (which can indicate that there is a certificate disguise attack risk), or "True" (which can indicate that there is a certificate disguise attack risk) and "False" (which can indicate that there is no certificate disguise attack risk). This example embodiment does not specifically limit the characterization method of the certificate disguise detection result.
[0056] After obtaining the local image features of the ID image to be detected through the ID image local feature extraction model, the local image features can be compared with the ID attack features of each ID in the preset attack risk feature library, and the similarity between each ID attack feature and the local image features can be determined. When it is determined that the local image feature is similar to at least one local image feature, it can be considered that the ID image to be detected has the same ID disguise attack risk, thereby quickly obtaining the ID disguise detection result of the ID image to be detected.
[0057] Through the local feature extraction model of ID card images and the attack risk feature library, various ID card disguises can be quickly recognized and detected, improving the accuracy and efficiency of recognition and detection results; on the other hand, when faced with the ever-changing risk of ID card attacks, compared to directly outputting detection results through artificial intelligence models, it avoids high training costs and iteration costs. It only needs to update the attack risk feature library, which is easier to maintain, lower cost, and has high update and iteration efficiency. It can achieve rapid response to various new types of ID card attack risks and effectively improve the security of user data.
[0058] Next, the document forgery detection method in step S210 to step S230 is described in detail.
[0059] In an exemplary embodiment of this specification, it is possible to Figure 3 The steps in the above are to input the document image to be detected into the trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected, and refer to Figure 3 As shown, it may specifically include:
[0060] Step S310, inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block;
[0061] Step S320: determining at least one local image feature corresponding to the document image to be detected according to the image block and the image content type.
[0062] The image block refers to a small-sized image obtained by segmenting the large-sized document image to be detected according to a predetermined size by the document image local feature extraction model. For example, the document image to be detected may be an image of 224*224 size, and the predetermined size may be 16*16 size. Then, by segmenting the document image to be detected by the document image local feature extraction model, 196 image blocks may be obtained. Of course, this is only an illustrative example, and this exemplary embodiment does not specifically limit this.
[0063] The image content type refers to the type of image content in the image block detected by the local feature extraction model of the certificate image. For example, taking the certificate image to be detected as a personal identity card image, it can be divided into 12 image blocks through the local feature extraction model of the certificate image, among which the image content type corresponding to image block 1 and image block 2 is the name content type, and the image content type corresponding to image block 2, image block 3 and image block 4 is the portrait content type... Of course, this is only a schematic example and should not impose any limitation on this example embodiment.
[0064] After inputting the ID image to be detected into the trained ID image local feature extraction model to obtain at least one image block after segmentation of the ID image to be detected and the image content type corresponding to the image block, at least one local image feature corresponding to the ID image to be detected can be determined based on the image block and the image content type.
[0065] Optionally, image blocks belonging to the same image content type may be spliced to obtain local image features corresponding to each area of interest in the document image to be detected. For example, if the image content type corresponding to image block 1 and image block 2 is a name content type, image block 1 and image block 2 may be spliced to obtain local image features containing name content; similarly, if the image content type corresponding to image block 2, image block 3, and image block 4 is a portrait content type, image block 2, image block 3, and image block 4 may be spliced to obtain local image features containing portrait content, and so on, to obtain all local image features of the document image to be detected. Of course, this is only a schematic illustration and should not impose any limitation on this exemplary embodiment.
[0066] In an exemplary embodiment of the present specification, a document image local feature extraction model may include at least an image feature embedding network, an image feature encoding network, and an image feature classification network.
[0067] Optionally, you can Figure 4 The steps in the above are to input the ID image to be detected into the trained ID image local feature extraction model to obtain at least one image block after the ID image to be detected is segmented and the image content type corresponding to the image block. Figure 4 As shown, it may specifically include:
[0068] Step S410, segmenting the document image to be detected into at least one image block through the image feature embedding network, and embedding the image block to obtain an image block embedding feature;
[0069] Step S420, inputting the image block embedding feature into the image feature encoding network to obtain the image block encoding feature;
[0070] Step S430: identifying and classifying the image block encoding features according to the image feature classification network to obtain the image content type corresponding to each image block.
[0071] Among them, the image feature embedding network can be used to segment the image of the document to be detected into at least one image block, and embed the image block to obtain the image block embedding feature; for example, the image feature embedding network may include at least one convolution layer, and the convolution kernel in the convolution layer is used to segment the image of the document to be detected, and at least one image block obtained after the segmentation is embedded to obtain the image block embedding feature. Of course, the image feature embedding network can also be other types of networks that can segment the image of the document to be detected into at least one image block and embed it. This example embodiment does not specifically limit the structure of the image feature embedding network.
[0072] The image feature encoding network can be used to encode the image block embedding features so as to extract the image block encoding features contained in the image block; for example, the image feature encoding network can be composed of a normalization layer (LayerNorm), a multi-head self-attention layer, a multilayer perceptron (Multilayer Perceptron, MLP) and a residual connection module. Of course, the image feature encoding network can also be other types of networks that can realize the extraction of image features contained in the image block. This example embodiment does not specifically limit the structure of the image feature encoding network.
[0073] The image feature classification network can be used to identify and classify the image block coding features to obtain the image content type corresponding to each image block. For example, the image feature classification network can be an MLP Head classification network, such as the MLP Head classification network can be composed of a fully connected layer, a GELU activation function, and a Dropout layer. Of course, the image feature classification network can also be other types of networks that can realize the identification and classification of image block coding features. This example embodiment does not specifically limit the structure of the image feature classification network.
[0074] Through the image feature embedding network, image feature encoding network and image feature classification network in the document image local feature extraction model, the local image features in the document image to be detected can be quickly and accurately identified and classified, which can effectively improve the accuracy and efficiency of local image feature recognition in the document image to be detected.
[0075] Figure 5 A schematic diagram of the model structure of a document image local feature extraction model provided in an embodiment of this specification.
[0076] refer to Figure 5As shown, the document image local feature extraction model 500 may at least include an image feature embedding network 503, an image feature encoding network 505 and an image feature classification network 506. The document image 501 to be detected may be segmented into at least one image block 502 through the image feature embedding network 503, and the image block 502 may be embedded to represent the image block embedding feature 504. The image block embedding feature 504 may include image embedding and position embedding. Of course, the image block embedding feature 504 may also add an additional class image block to characterize the entire document image 501 to be detected; then the image block embedding feature may be input into the image feature encoding network 505 to obtain the image block encoding feature; specifically, the image feature encoding network 505 may at least include a normalization layer 5051, a multi-head self-attention layer 5052, a multi-layer perceptron 5053 and a residual connection module. Finally, the image feature classification network 506 may identify and classify the image block encoding features output by the image feature encoding network 505 to obtain the image content type corresponding to each image block. Of course, Figure 5 The model network structure of the document image local feature extraction model 500 is only a schematic example, and this embodiment is not limited to this.
[0077] In an exemplary embodiment of the present specification, the following steps may be used to determine the certificate disguise detection result of the certificate image to be detected according to the similarity between each certificate attack feature and the local image feature in the preset attack risk feature library, which may specifically include:
[0078] If the similarity between any ID attack feature and the local image feature is greater than or equal to a preset similarity threshold, it is determined that the ID image to be detected has the risk of ID disguise attack, and the ID disguise attack type corresponding to the ID attack feature is used as the target ID disguise attack type of the ID image to be detected; if the similarity between any ID attack feature and the local image feature is less than the similarity threshold, it is determined that the ID image to be detected does not have the risk of ID disguise attack.
[0079] Among them, similarity refers to data that measures the degree of similarity between the certificate attack feature and the local image feature. For example, the similarity between the certificate attack feature and the local image feature can be the cosine of the angle between the certificate attack feature and the local image feature, or the Euclidean distance between the certificate attack feature and the local image feature, or the Chebyshev distance between the certificate attack feature and the local image feature. Of course, the similarity between the certificate attack feature and the local image feature can also be other types of data that characterize the similarity between the vectors represented by the certificate attack feature and the local image feature. This example embodiment does not specifically limit this.
[0080] The similarity threshold refers to a preset threshold parameter used to determine whether the document attack feature and the local image feature belong to the same disguise attack risk. For example, the similarity threshold can be 0.95 or 0.9. The specific similarity threshold can be customized according to actual usage, and this example embodiment does not make any special limitations on this.
[0081] If the similarity between any certificate attack feature in the attack risk feature library and the local image feature is greater than or equal to a preset similarity threshold, it can be determined that the certificate image to be detected has a certificate disguise attack risk, and the certificate disguise attack type corresponding to the certificate attack feature is used as the target certificate disguise attack type of the certificate image to be detected. Optionally, if the similarity between any certificate attack feature in the attack risk feature library and the local image feature is less than the similarity threshold, it can be determined that the certificate image to be detected does not have a certificate disguise attack risk, and it is considered that the certificate image to be detected has passed the attack risk detection.
[0082] By comparing the similarity between the local image features extracted from the document image to be detected and the historical document attack features stored in the attack risk feature library, the possible disguise attack risks and the types of disguise attack risks in the document image to be detected can be quickly and accurately determined. Compared with the detection model used to detect disguise attack risks through iterative training in related technologies, the training and deployment cost is low, the recognition and detection efficiency is high, and the recognition and detection results are more accurate.
[0083] In an optional embodiment of this specification, it is possible to Figure 6 Build an attack risk signature library according to the steps in Figure 6 As shown, it may specifically include:
[0084] Step S610, obtaining a historical attack disguised document image, and cropping the historical attack disguised document image to obtain a document attack partial image;
[0085] Step S620, inputting the certificate attack partial image into a trained certificate image partial feature extraction model to obtain an image feature vector corresponding to the certificate attack partial image;
[0086] Step S630, determining the certificate attack feature according to the image feature vector, and constructing the attack risk feature library through the certificate attack feature.
[0087] Among them, a historical attack disguised ID image refers to an ID image that is detected to have a disguised attack risk during the historical ID image detection process. For example, the historical attack disguised ID image can be a ID image that is disguised by a detected handwriting tampering method, or it can be a ID image that is disguised by a detected foreign object occlusion method. This embodiment does not specifically limit the type of historical attack disguised ID images.
[0088] The local image of certificate attack refers to an image obtained by cropping the image area of the historical attack disguised certificate image where the disguised attack behavior exists. For example, taking the example that the disguised attack behavior in the historical attack disguised certificate image is tampering with the personal identification code with notes, the local image of certificate attack can be an image obtained by cropping the personal identification code image area of the historical attack disguised certificate image where the note tampering behavior exists. Of course, this is only a schematic example, and this embodiment does not make any special limitation to this.
[0089] The image feature vector refers to a feature vector obtained by extracting features from a local image of an ID card attack using a trained local feature extraction model for an ID card image. The model network structure of the local feature extraction model for an ID card image that extracts features from a local image of an ID card attack is the same as that of the local feature extraction model for an ID card image that extracts local image features from an ID card image to be detected. They may have the same model parameters or different model parameters, but this embodiment is not limited to this.
[0090] By extracting the image feature vector corresponding to the local image of the certificate attack through the local feature extraction model of the certificate image with the same structure to build an attack risk feature library, the accuracy of the similarity between the calculated certificate attack features and the local image features can be guaranteed, the calculation efficiency of the similarity can be improved, and thus the output efficiency of the certificate disguise detection results can be effectively improved.
[0091] Optionally, the following steps may be used to determine the document attack feature based on the image feature vector, which may specifically include:
[0092] The image feature vectors belonging to the same certificate disguise attack type can be clustered to obtain multiple image feature vector clusters, and then the central image feature vector corresponding to the image feature vector cluster can be determined, and the central image feature vector can be used as the certificate attack feature.
[0093] Among them, clustering refers to the process of dividing the set of image feature vectors belonging to the same document disguise attack type into a plurality of classes composed of similar image feature vectors. For example, the clustering of image feature vectors belonging to the same document disguise attack type can be implemented by the K-means clustering algorithm (K-Means). For example, K center points can be randomly selected from the set of image feature vectors belonging to the same document disguise attack type, and the distances from each image feature vector to the K center points can be calculated respectively. Then, the image feature vectors can be classified according to the distance, and the center vectors of the same type of image feature vectors are calculated as the center point positions of the class to be updated, and the center points are updated. The distances from each image feature vector to the K center points are recalculated until the sum of the distances from each image feature vector to the center point of the class to which it belongs no longer changes, thereby obtaining a plurality of image feature vector clusters. Of course, the clustering of image feature vectors belonging to the same document disguise attack type can also be implemented by the DBSCAN clustering algorithm to obtain a plurality of image feature vector clusters. This exemplary embodiment does not specifically limit the manner in which image feature vectors belonging to the same document disguise attack type are clustered.
[0094] The central image feature vector refers to the image feature vector at the center position of the image feature vector cluster. For example, the central image feature vector can be determined by determining the average value of all image feature vectors in the image feature vector cluster, or by determining the distances between all image feature vectors in the image feature vector cluster and sorting them, and taking the median as the central image feature vector of the image feature vector cluster. Of course, the central image feature vector of the image feature vector cluster can also be determined by other methods, and the present example embodiment is not limited to this.
[0095] Image feature vectors belonging to the same document disguise attack type can be clustered to obtain multiple image feature vector clusters. Then, the central image feature vector corresponding to the image feature vector cluster can be determined, and the central image feature vector can be used as the document attack feature. This can effectively reduce the amount of calculation of the similarity between local image features and each document attack feature in the attack risk feature library, improve the matching efficiency between local image features and document attack features, and thus improve the detection efficiency of document disguise detection results.
[0096] Optionally, the central image feature vector corresponding to the image feature vector cluster may be determined in the following manner, which may specifically include: determining the average value of all image feature vectors in the image feature vector cluster, and using the average value as the central image feature vector corresponding to the image feature vector cluster.
[0097] By taking the average value of all image feature vectors in an image feature vector cluster as the central image feature vector corresponding to the image feature vector cluster, the accuracy of the certificate attack feature in representing the same image feature vector cluster can be effectively improved, and the accuracy of the similarity between the calculated certificate attack feature and the local image feature can be improved.
[0098] In an optional embodiment of the present specification, the document attack feature may be determined based on the image feature vector in the following manner, which may specifically include: using the image feature vector corresponding to each document attack partial image as the document attack feature.
[0099] By using the image feature vectors corresponding to all the local images of certificate attack as the certificate attack features in the attack risk feature library, the comprehensiveness of the certificate attack features in the attack risk feature library can be effectively improved, and the coverage of the certificate attack features matching the local image features can be improved, thereby improving the matching accuracy of the local image features and effectively improving the accuracy and detection accuracy of the certificate disguise detection results.
[0100] In an example embodiment of the present specification, the attack risk feature library can be updated by the following steps: the latest attack disguised document image can be obtained; then the new document attack feature corresponding to the latest attack disguised document image can be extracted, and the attack risk feature library can be updated according to the new document attack feature.
[0101] The latest attack disguised document image refers to an attack disguised document image that does not exist in the attack risk feature library, and its corresponding document disguised attack type is also different from the document disguised attack type of each document attack feature in the attack risk feature library.
[0102] By updating the attack risk feature library with the latest attack disguised document images of new types of document disguise attacks, emergency response to the continuously iterative disguised attack risks can be completed. Compared with the related technology that requires re-iterative training of the entire detection model when new types of document disguise attacks exist, it can effectively improve the response efficiency to new types of document disguise attacks and reduce the cost of emergency response.
[0103] Figure 7 A schematic diagram of the principle of building an attack risk feature library provided in an embodiment of this specification.
[0104] refer to Figure 7As shown, a historical attack disguised document image can be obtained, and the historical attack disguised document image can be cropped to obtain a document attack local image. For example, the document attack local image can be a handwriting tampering image 701, a foreign object occlusion image 702, and a single word tampering image 703 cropped from the identity document image; then the document attack local images such as the handwriting tampering image 701, the foreign object occlusion image 702, and the single word tampering image 703 can be input into a trained document image local feature extraction model 704 to obtain an image feature vector corresponding to the document attack local image, and determine the document attack feature 705 based on the image feature vector, such as the document attack feature 705 can be a handwriting tampering feature, a foreign object occlusion feature, and a single word tampering feature, etc. Finally, the attack risk feature library can be constructed through the document attack feature 705.
[0105] Figure 8 A schematic diagram of the principle of determining a certificate forgery detection result provided in an embodiment of this specification.
[0106] refer to Figure 8 As shown, after the attack risk feature library storing the document attack feature 705 is constructed, the document image 801 to be detected can be input into the document image local feature extraction model 802 to obtain at least one image block 803 and the local image features corresponding to each image block 803. For example, the document image 801 to be detected can be input into the trained document image local feature extraction model 802 to obtain at least one image block 803 after the document image 801 to be detected is segmented and the image content type corresponding to the image block. Then, at least one local image feature 804 corresponding to the document image 801 to be detected can be determined according to the image block 803 and the image content type. Figure 8 As shown, the image content type of the image block 1 obtained from the ID image 801 to be detected is the name content, and the image content type of the image block 2 is the name content. Then, the image block 1 and the image block 2 belonging to the name content can be added or spliced to obtain the name feature, and so on, to obtain all the local image features 804 in the ID image 801 to be detected, such as the portrait feature, the ID card number feature, etc. Figure 8 The contents shown in the figure are merely illustrative examples and should not constitute any special limitation to the present exemplary embodiment.
[0107] In summary, according to the document disguise detection method provided in the embodiment of this specification, by obtaining the document image to be detected and inputting it into the trained document image local feature extraction model, at least one local image feature corresponding to the document image to be detected is obtained, and then the document disguise detection result of the document image to be detected is determined according to the similarity between each document attack feature and the local image feature in the preset attack risk feature library. On the one hand, through the document image local feature extraction model and the attack risk feature library, it is possible to quickly realize the recognition and detection of various document disguises, and improve the accuracy of the recognition detection results and the recognition detection efficiency; on the other hand, in the face of the situation where the document attack risk is constantly changing, compared with the method of directly outputting the detection results through the artificial intelligence model, it avoids the high training cost and iteration cost, and only needs to update the attack risk feature library, which is simpler to maintain, lower cost, and high update and iteration efficiency, and can achieve rapid response to various new document attack risk types, effectively improving the security of user data.
[0108] See also Fig. 9 , is a schematic diagram of the structure of a device for detecting camouflage of a certificate provided in an embodiment of this specification. Fig. 9 As shown, the document disguise detection device 900 can be implemented as all or part of an electronic device through software, hardware, or a combination of both. According to some embodiments, the document disguise detection device 900 may include an image acquisition module 910, an image feature extraction module 920, and a detection result output module 930, which may specifically include:
[0109] An image acquisition module 910 is used to acquire an image of a document to be detected;
[0110] An image feature extraction module 920 is used to input the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected;
[0111] The detection result output module 930 is used to determine the document disguise detection result of the document image to be detected according to the similarity between each document attack feature in the preset attack risk feature library and the local image feature.
[0112] In an exemplary embodiment of the present specification, the image feature extraction module 920 may include:
[0113] An image block recognition unit, used for inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block;
[0114] A local image feature generating unit is used to determine at least one local image feature corresponding to the document image to be detected according to the image block and the image content type.
[0115] In an exemplary embodiment of the present specification, the local image feature generating unit is configured as follows:
[0116] Image blocks belonging to the same image content type are spliced to obtain local image features corresponding to each region of interest in the document image to be detected.
[0117] In an exemplary embodiment of the present specification, the document image local feature extraction model includes at least an image feature embedding network, an image feature encoding network, and an image feature classification network; the image block recognition unit is configured as follows:
[0118] Segmenting the document image to be detected into at least one image block through the image feature embedding network, and embedding the image block to obtain an image block embedding feature;
[0119] Inputting the image block embedding feature into the image feature encoding network to obtain the image block encoding feature;
[0120] The image block encoding features are identified and classified according to the image feature classification network to obtain the image content type corresponding to each image block.
[0121] In an exemplary embodiment of the present specification, the detection result output module 930 is configured to:
[0122] If the similarity between any certificate attack feature and the local image feature is greater than or equal to a preset similarity threshold, it is determined that the certificate image to be detected has a risk of certificate forgery attack, and the certificate forgery attack type corresponding to the certificate attack feature is used as the target certificate forgery attack type of the certificate image to be detected.
[0123] In an exemplary embodiment of the present specification, the detection result output module 930 is configured to:
[0124] If the similarity between any certificate attack feature and the local image feature is less than the similarity threshold, it is determined that the certificate image to be detected does not have the risk of certificate forgery attack.
[0125] In an exemplary embodiment of the present specification, the document forgery detection device 900 further includes an attack risk feature library construction module, and the attack risk feature library construction module may include:
[0126] A local image cropping unit, used to obtain a historical attack disguised document image, and crop the historical attack disguised document image to obtain a document attack local image;
[0127] A feature vector generating unit, used for inputting the certificate attack local image into a trained certificate image local feature extraction model to obtain an image feature vector corresponding to the certificate attack local image;
[0128] An attack feature construction unit is used to determine a certificate attack feature according to the image feature vector, and to construct the attack risk feature library through the certificate attack feature.
[0129] In an exemplary embodiment of the present specification, the attack signature construction unit is configured to:
[0130] Clustering the image feature vectors belonging to the same certificate disguise attack type to obtain multiple image feature vector clusters;
[0131] A central image feature vector corresponding to the image feature vector cluster is determined, and the central image feature vector is used as the document attack feature.
[0132] In an exemplary embodiment of the present specification, the attack signature construction unit is configured to:
[0133] An average value of all image feature vectors in the image feature vector cluster is determined, and the average value is used as a central image feature vector corresponding to the image feature vector cluster.
[0134] In an exemplary embodiment of the present specification, the attack signature construction unit is configured to:
[0135] The image feature vector corresponding to each of the certificate attack partial images is used as the certificate attack feature.
[0136] In an exemplary embodiment of the present specification, the document forgery detection device 900 further includes an attack risk feature library update module, and the attack risk feature library update module is configured to:
[0137] Acquire the latest attack disguised document image, where the document disguised attack type corresponding to the latest attack disguised document image does not exist in the attack risk feature library;
[0138] A new certificate attack feature corresponding to the latest attack disguised certificate image is extracted, and the attack risk feature library is updated according to the new certificate attack feature.
[0139] The above device embodiments correspond to the method embodiments. For specific descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For specific descriptions, please refer to the corresponding method embodiments.
[0140] The present specification also provides a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded and executed by a processor as described above. Figure 2 to Figure 8 The method of the embodiment shown in the figure can be specifically executed by referring to Figure 2 to Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0141] The present specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is loaded and executed by the processor as described above. Figure 2 to Figure 8 The method of the embodiment shown in the figure can be specifically executed by referring to Figure 2 to Figure 8 The specific description of the illustrated embodiment will not be repeated here.
[0142] The embodiments of this specification also provide Fig.10 The structural diagram of the electronic device shown in FIG. Fig.10 At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and may also include hardware required for other services. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs it to implement the above-mentioned voice activity detection method.
[0143] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc., that is to say, the executor of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0144] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, 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, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.
[0145] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.
[0146] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0147] For the convenience of description, the above device is described in various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.
[0148] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0149] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0150] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0151] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0152] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0153] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0154] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules 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 technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0155] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0156] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, this specification may take the form of a computer program product implemented 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.
[0157] This specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0158] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0159] The above description is only an embodiment of the present specification and is not intended to limit the present specification. For those skilled in the art, the present specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification shall be included in the scope of the claims of the present specification.
Claims
1. A method for detecting camouflage of a certificate, the method comprising: Obtain the image of the document to be detected; Inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected; According to the similarity between each certificate attack feature in a preset attack risk feature library and the local image feature, the certificate disguise detection result of the certificate image to be detected is determined.
2. The document disguise detection method according to claim 1, wherein the step of inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected comprises: Inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block; At least one local image feature corresponding to the document image to be detected is determined according to the image block and the image content type.
3. The document disguise detection method according to claim 2, wherein the step of determining at least one local image feature corresponding to the document image to be detected according to the image block and the image content type comprises: Image blocks belonging to the same image content type are spliced to obtain local image features corresponding to each region of interest in the document image to be detected.
4. According to the document disguise detection method of claim 2, the document image local feature extraction model at least includes an image feature embedding network, an image feature encoding network and an image feature classification network; The step of inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one image block after segmentation of the document image to be detected and the image content type corresponding to the image block includes: Segmenting the document image to be detected into at least one image block through the image feature embedding network, and embedding the image block to obtain an image block embedding feature; Inputting the image block embedding feature into the image feature encoding network to obtain the image block encoding feature; The image block encoding features are identified and classified according to the image feature classification network to obtain the image content type corresponding to each image block.
5. According to the document disguise detection method of claim 1, the document disguise detection result of the document image to be detected is determined according to the similarity between each document attack feature in the preset attack risk feature library and the local image feature, comprising: If the similarity between any certificate attack feature and the local image feature is greater than or equal to a preset similarity threshold, it is determined that the certificate image to be detected has a risk of certificate forgery attack, and the certificate forgery attack type corresponding to the certificate attack feature is used as the target certificate forgery attack type of the certificate image to be detected.
6. The document disguise detection method according to claim 5, wherein the step of determining the document disguise detection result of the document image to be detected based on the similarity between each document attack feature in a preset attack risk feature library and the local image feature comprises: If the similarity between any certificate attack feature and the local image feature is less than the similarity threshold, it is determined that the certificate image to be detected does not have the risk of certificate forgery attack.
7. The method for detecting credential forgery according to claim 1, further comprising: Acquire a historical attack disguised document image, and crop the historical attack disguised document image to obtain a document attack partial image; Inputting the certificate attack local image into a trained certificate image local feature extraction model to obtain an image feature vector corresponding to the certificate attack local image; The document attack feature is determined according to the image feature vector, and the attack risk feature library is constructed through the document attack feature.
8. The document disguise detection method according to claim 7, wherein determining the document attack feature according to the image feature vector comprises: Clustering the image feature vectors belonging to the same certificate disguise attack type to obtain multiple image feature vector clusters; A central image feature vector corresponding to the image feature vector cluster is determined, and the central image feature vector is used as the document attack feature.
9. The document forgery detection method according to claim 8, wherein the step of determining the central image feature vector corresponding to the image feature vector cluster comprises: An average value of all image feature vectors in the image feature vector cluster is determined, and the average value is used as a central image feature vector corresponding to the image feature vector cluster.
10. The document disguise detection method according to claim 7, wherein determining the document attack feature according to the image feature vector comprises: The image feature vector corresponding to each of the certificate attack partial images is used as the certificate attack feature.
11. The method for detecting credential disguise according to claim 7, further comprising: Acquire the latest attack disguised document image, where the document disguised attack type corresponding to the latest attack disguised document image does not exist in the attack risk feature library; A new certificate attack feature corresponding to the latest attack disguised certificate image is extracted, and the attack risk feature library is updated according to the new certificate attack feature.
12. A device for detecting camouflage of a certificate, comprising: An image acquisition module, used to acquire the image of the document to be detected; An image feature extraction module, used for inputting the document image to be detected into a trained document image local feature extraction model to obtain at least one local image feature corresponding to the document image to be detected; The detection result output module is used to determine the certificate disguise detection result of the certificate image to be detected according to the similarity between each certificate attack feature in the preset attack risk feature library and the local image feature.
13. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
14. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 11.
15. A computer program product having at least one instruction stored thereon, characterized in that: When the at least one instruction is executed by the processor, the steps of the method described in any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
Face comparison authentication method and system based on identification photo and collected photo
CN103914686A
Face recognition method and device, electronic equipment and computer readable storage medium
CN112115866A
Certificate copying identification method and device, computer equipment and storage medium
CN113344000A
Anti-spoofing system and methods useful in conjunction therewith
US20180034852A1
Cited By
Method and apparatus for detecting injection attack
WO2026118743A1
