Certificate identification method and related device

Through the segmentation and mapping of document images, combined with feature extraction and recognition networks, the problem of banks' insufficient ability to identify the authenticity of documents is solved, and the effective identification of forged documents and the accuracy of identity authentication are achieved.

CN118609133APending Publication Date: 2024-09-06BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202410638762.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-22
Publication Date
2024-09-06

AI Technical Summary

Technical Problem

Banking institutions have a weak ability to identify the authenticity of documents, which leads to the frequent use of forged documents for deposit fraud and identity theft. An effective document authenticity identification method is needed to detect the use of forged documents in a timely manner.

Method used

By obtaining the image of the document to be recognized, it is divided into image blocks of the same size and mapped into a vector set in the form of a two-dimensional array. The feature extraction network is used to extract the vector features, and the feature recognition network is used to determine the forgery feature probability value of the vector feature, and then the document is judged. of authenticity.

Benefits of technology

It realizes the identification of authenticity of documents, can detect the use of forged documents in time, ensures the correctness of user identity authentication, and improves the detection ability of forged documents.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118609133A
    Figure CN118609133A
Patent Text Reader

Abstract

The invention discloses a certificate identification method and a related device, which can be applied to the field of artificial intelligence or finance. The method comprises the following steps: segmenting a to-be-identified certificate picture into a plurality of picture blocks with the same size, respectively mapping each picture block into a corresponding picture vector to obtain a vector set in a two-dimensional array form, extracting vector features from the vector set by adopting a feature extraction network, and determining a probability value that the vector features have counterfeit features by adopting a feature identification network, and obtaining a certificate authenticity identification result based on the probability value. According to the method, the to-be-identified certificate picture is segmented and mapped, the feature extraction network is adopted to extract the vector features, and the feature identification network is adopted to identify the counterfeit features, so that authenticity identification of the certificate is realized, and the behavior of falsely using the identity or counterfeiting by using the counterfeit certificate can be found in time; and the correctness of user identity authentication is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image recognition technology, and in particular to a document recognition method and related devices. Background Art

[0002] At present, certificates have been widely used in identity authentication scenarios such as Internet finance. User identity authentication is achieved by extracting and identifying user information on the certificate (such as user name, birthday, certificate validity period, etc.).

[0003] However, the current ability of banks to identify the authenticity of documents is weak, resulting in frequent deposit fraud using forged documents, and depositors' deposits are often fraudulently withdrawn. Therefore, how to identify the authenticity of documents and promptly detect the use of forged documents to impersonate or forge identities has become a technical problem that technicians in this field need to solve urgently. Summary of the invention

[0004] In view of the above problems, the present application provides a document recognition method and related devices to achieve the purpose of identifying the authenticity of documents. The specific scheme is as follows:

[0005] A document recognition method, comprising:

[0006] Get the image of the document to be identified;

[0007] Dividing the document image to be identified into multiple image blocks of the same size;

[0008] Mapping each of the picture blocks to a corresponding picture vector to obtain a vector set in a two-dimensional array form;

[0009] Extracting vector features from the vector set using a feature extraction network;

[0010] Using a feature recognition network to determine the probability value of the vector feature containing a forged feature;

[0011] The authenticity identification result of the certificate is obtained based on the size of the probability value.

[0012] Optionally, dividing the to-be-recognized document image into a plurality of image blocks of the same size comprises:

[0013] Adjusting the resolution of the ID card image to be identified to the target resolution to obtain the target ID card image;

[0014] The target document image is divided into a plurality of image blocks of the same size.

[0015] Optionally, the feature extraction network includes N feature extraction blocks, where N is a positive integer;

[0016] Each of the feature extraction blocks includes: a two-dimensional convolution residual layer, a two-dimensional convolution layer and an affine transformation layer;

[0017] The two-dimensional convolution residual layer and the two-dimensional convolution in the two-dimensional convolution layer use a GELU activation function and a normalization layer BatchNorm.

[0018] Optionally, the feature recognition network has multiple forged feature recognition branches, and different forged feature recognition branches recognize different categories of forged features.

[0019] Optionally, the parameters in the feature recognition network are predicted by meta-learning with the document type ID as a condition.

[0020] Optionally, obtaining a result of document authenticity identification based on the probability value includes:

[0021] Determining whether the probability value is less than the preset probability value;

[0022] If yes, it is determined that the ID image to be identified is a real ID;

[0023] If not, it is determined that the ID image to be identified is a forged ID.

[0024] A document recognition device, comprising:

[0025] An acquisition unit, used to acquire the image of the document to be identified;

[0026] A segmentation unit, used to segment the document image to be identified into a plurality of image blocks of the same size;

[0027] A mapping unit, used to map each of the picture blocks to a corresponding picture vector to obtain a vector set in a two-dimensional array form;

[0028] A feature extraction unit, used to extract vector features from the vector set using a feature extraction network;

[0029] A probability value determination unit, used to determine the probability value of the vector feature having a forged feature by using a feature recognition network;

[0030] The authenticity identification unit is used to obtain the authenticity identification result of the document based on the size of the probability value.

[0031] A computer program product includes computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements the above-mentioned document recognition method.

[0032] An electronic device, characterized in that it comprises at least one processor and a memory connected to the processor, wherein:

[0033] The memory is used to store computer programs;

[0034] The processor is used to execute the computer program so that the electronic device can implement the document recognition method described above.

[0035] A computer storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement the document recognition method described above.

[0036] From the above technical solution, it can be known that the present invention discloses a document recognition method and related devices, which divide the document image to be identified into multiple image blocks of the same size, map each image block to a corresponding image vector, obtain a vector set in the form of a two-dimensional array, use a feature extraction network to extract vector features from the vector set, and use a feature recognition network to determine the probability value of the vector feature having a forged feature, and obtain the document authenticity recognition result based on the size of the probability value. The present invention realizes the authenticity recognition of the document by segmenting and mapping the document image to be identified, and uses a feature extraction network to extract vector features and a feature recognition network to recognize forged features, so that the use of forged documents to impersonate or forge can be discovered in a timely manner, ensuring the correctness of user identity authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0038] Figure 1 A schematic diagram of a system architecture provided for this application;

[0039] Figure 2 A schematic diagram of an optional hardware structure of a terminal 100 provided in this application;

[0040] Figure 3 A schematic diagram of the structure of a server 200 provided in this application;

[0041] Figure 4 A flow chart of a document recognition method provided in an embodiment of the present application;

[0042] Figure 5 A schematic diagram of dividing a document image to be identified into multiple image blocks of the same size provided in an embodiment of the present application;

[0043] Figure 6A schematic diagram of mapping the segmented image blocks into a vector set in the form of a two-dimensional array provided in an embodiment of the present application;

[0044] Figure 7 A flow chart of a method for dividing a document image to be identified into multiple image blocks of the same size provided in an embodiment of the present application;

[0045] Figure 8 A flow chart of a method for obtaining a certificate authenticity identification result based on a probability value provided in an embodiment of the present application;

[0046] Fig. 9 A schematic diagram of a meta-learning structure provided in an embodiment of the present application;

[0047] Fig.10 A schematic diagram of the structure of a document recognition device provided in an embodiment of the present application;

[0048] Fig.11 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0049] It should be noted that the document recognition method and related device provided by the present invention can be used in the field of artificial intelligence or finance. The above is only an example and does not limit the application field of the document recognition method and related device provided by the present invention.

[0050] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.

[0051] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0052] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.

[0053] See also Figure 1 , Figure 1 A schematic diagram of a system architecture is shown. The system may include a terminal 100 and a server 200. The server 200 may include one or more servers ( Figure 1 In the example, a server is included, and the server 200 can provide the method provided in the embodiment of the present application for one or more terminals.

[0054] Among them, an application corresponding to the third-party system can be installed on the terminal 100. The above application and web page can provide an interface. The terminal 100 can receive relevant parameters entered by the user on the interface and send the above parameters to the server 200. The server 200 can obtain processing results based on the received parameters and return the processing results to the terminal 100.

[0055] It should be understood that in some optional implementations, the terminal 100 can also complete the action of obtaining the processing result based on the received parameters by itself without the cooperation of the server, and the embodiments of the present application are not limited to this.

[0056] Next describe Figure 1 The product form of the mid-terminal 100;

[0057] The terminal 100 in the embodiment of the present application can be a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., and the embodiment of the present application does not impose any limitation on this.

[0058] Figure 2 An optional hardware structure diagram of the terminal 100 is shown.

[0059] refer to Figure 2 As shown, the terminal 100 may include a radio frequency unit 110, a memory 120, an input unit 130, a display unit 140, a camera 150 (optional), an audio circuit 160 (optional), a speaker 161 (optional), a microphone 162 (optional), an earphone jack 163 (optional), a processor 170, an external interface 180, a power supply 190 and other components. Those skilled in the art will appreciate that Figure 2 These are merely examples of terminals or multi-function devices and do not constitute limitations on the terminals or multi-function devices, which may include more or fewer components than those shown in the figures, or combinations of certain components, or different components.

[0060] The input unit 130 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the portable multifunctional device. Specifically, the input unit 130 may include a touch screen 131 (optional) and / or other input devices 132. The touch screen 131 can collect the user's touch operations on or near it (such as the user's operation on or near the touch screen using any suitable object such as fingers, joints, stylus, etc.), and drive the corresponding connection device according to a pre-set program. The touch screen can detect the user's touch action on the touch screen, convert the touch action into a touch signal and send it to the processor 170, and can receive and execute the command sent by the processor 170; the touch signal at least includes the touch point coordinate information. The touch screen 131 can provide an input interface and an output interface between the terminal 100 and the user. In addition, the touch screen can be implemented using multiple types such as resistive, capacitive, infrared and surface acoustic wave. In addition to the touch screen 131, the input unit 130 can also include other input devices. Specifically, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (such as a volume control key, a switch key, etc.), a trackball, a mouse, a joystick, and the like.

[0061] Among them, the input device 132 can receive input data and the like.

[0062] The display unit 140 may be used to display information input by a user or provided to a user, various menus of the terminal 100, an interactive interface, file display, and / or playback of any multimedia file.

[0063] The memory 120 can be used to store instructions and data. The memory 120 can mainly include an instruction storage area and a data storage area. The data storage area can store various data, such as multimedia files, texts, etc.; the instruction storage area can store software units such as operating systems, applications, instructions required for at least one function, or their subsets and extensions. It can also include a non-volatile random access memory; provide the processor 170 with hardware, software and data resources including management of computing and processing equipment, and support control software and applications. It is also used for the storage of multimedia files, and the storage of running programs and applications.

[0064] The processor 170 is the control center of the terminal 100. It uses various interfaces and lines to connect various parts of the entire terminal 100. By running or executing instructions stored in the memory 120 and calling data stored in the memory 120, it executes various functions of the terminal 100 and processes data, thereby controlling the terminal device as a whole. Optionally, the processor 170 may include one or more processing units; preferably, the processor 170 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface and application program, and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 170. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips. The processor 170 may also be used to generate corresponding operation control signals, send them to corresponding components of the computing and processing device, read and process data in the software, especially read and process data and programs in the memory 120, so that each functional module therein performs corresponding functions, thereby controlling the corresponding components to act according to the requirements of the instructions.

[0065] The memory 120 may be used to store relevant software codes, the processor 170 may execute the steps of the relevant method, and may also schedule other units (such as the above-mentioned input unit 130 and display unit 140) to implement corresponding functions.

[0066] The radio frequency unit 110 (optional) can be used for receiving and sending information or receiving and sending signals during a call, for example, after receiving the downlink information of the base station, it is sent to the processor 170 for processing; in addition, the designed uplink data is sent to the base station. Generally, the RF circuit includes but is not limited to an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, etc. In addition, the radio frequency unit 110 can also communicate with network devices and other devices through wireless communication. The wireless communication can use any communication standard or protocol, including but not limited to Global System of Mobile communication (Global System of Mobile communication, GSM), General Packet Radio Service (General Packet Radio Service, GPRS), Code Division Multiple Access (Code Division Multiple Access, CDMA), Wideband Code Division Multiple Access (Wideband Code Division Multiple Access, WCDMA), Long Term Evolution (Long Term Evolution, LTE), email, Short Messaging Service (SMS), etc.

[0067] In this embodiment of the present application, the RF unit 110 can send data to the server 200 and receive processing results sent by the server 200.

[0068] It should be understood that the radio frequency unit 110 is optional and can be replaced by other communication interfaces, such as a network port.

[0069] The terminal 100 also includes a power supply 190 (such as a battery) for supplying power to various components. Preferably, the power supply can be logically connected to the processor 170 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0070] The terminal 100 further includes an external interface 180 , which may be a standard Micro USB interface or a multi-pin connector, and may be used to connect the terminal 100 to communicate with other devices, or to connect a charger to charge the terminal 100 .

[0071] Although not shown, the terminal 100 may also include a flashlight, a wireless fidelity (WiFi) module, a Bluetooth module, sensors with different functions, etc., which are not described in detail here. Some or all of the methods described below may be applied in the following embodiments. Figure 2 In the terminal 100 shown.

[0072] Next describe Figure 1 The product form of the server 200;

[0073] Figure 3 A structural diagram of a server 200 is provided, such as Figure 3 As shown, the server 200 includes a bus 201, a processor 202, a communication interface 203, and a memory 204. The processor 202, the memory 204, and the communication interface 203 communicate with each other via the bus 201.

[0074] The bus 201 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 3 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0075] The processor 202 may be any one or more of a central processing unit (CPU), a graphics processing unit (GPU), a microprocessor (MP), or a digital signal processor (DSP).

[0076] The memory 204 may include a volatile memory, such as a random access memory (RAM). The memory 204 may also include a non-volatile memory, such as a read-only memory (ROM), a flash memory, a hard drive (HDD), or a solid state drive (SSD).

[0077] The memory 204 may be used to store relevant software codes, the processor 202 may execute steps of relevant chip methods, and may also schedule other units to implement corresponding functions.

[0078] It should be understood that the above-mentioned terminal 100 and server 200 can be centralized or distributed devices, and the processors in the above-mentioned terminal 100 and server 200 (such as processor 170 and processor 202) can be hardware circuits (such as application specific integrated circuit (ASIC), field-programmable gate array (FPGA), general-purpose processor, digital signal processor (DSP), microprocessor or microcontroller, etc.), or a combination of these hardware circuits. For example, the processor can be a hardware system with an instruction execution function, such as a CPU, DSP, etc., or a hardware system without an instruction execution function, such as an ASIC, FPGA, etc., or a combination of the above-mentioned hardware systems without an instruction execution function and hardware systems with an instruction execution function.

[0079] In the financial field, in order to ensure the authenticity of user identities, document recognition technology is needed to assist bank employees and business to complete the identification of the authenticity of documents, especially to identify forged documents such as photocopied, printed and photographed documents, so as to promptly discover the use of forged documents to impersonate others or commit fraud.

[0080] In order to solve the above problems, the present application provides a document recognition method. The document recognition method provided by the present application is described in detail below in conjunction with the accompanying drawings.

[0081] The most difficult task in document authenticity identification is mainly in screen copying and print copying. In digital signal processing, both screen copying and print copying can be roughly regarded as the original signal passing through a channel, which can be written as a convolution form: x′(t)=x(t)*h(t). The work of identification is to detect the h(t) component in the signal. Approximately, x and x′ can be regarded as two vector distributions in the vector space, and h can be regarded as an offset on the vector set x, so that its distribution becomes x′.

[0082] Based on the above theoretical analysis, refer to Figure 4 , Figure 4 A process diagram of a document recognition method provided in an embodiment of the present application, the method comprising:

[0083] Step S401, obtaining a picture of a document to be identified.

[0084] In Internet finance and other businesses (such as bank deposit business), user real-name authentication is required. Users take and upload ID photos through mobile terminals to further confirm the user's identity. For example, when a user opens a savings card account, the user is required to upload an ID photo. At this time, the user takes the ID photo through a mobile phone or other terminal and uploads it.

[0085] Step S402: dividing the document image to be identified into a plurality of image blocks of the same size.

[0086] For easier understanding, see Figure 5 , a schematic diagram of dividing a to-be-identified document image into multiple image blocks of the same size disclosed in an embodiment of the present invention, the size of each image block obtained by dividing the to-be-identified document image is determined according to actual conditions, such as 14×14, and the present invention is not limited here.

[0087] Step S403: Map each of the picture blocks to a corresponding picture vector to obtain a vector set in a two-dimensional array form.

[0088] This embodiment maps each image block to a corresponding image vector through a linear layer in a neural network, and obtains a vector set consisting of all image vectors. The vector set is saved in the form of a two-dimensional array to save the relative position relationship between each image vector.

[0089] For easier understanding, see Figure 6 , a schematic diagram of mapping the segmented image blocks into a vector set in the form of a two-dimensional array disclosed in an embodiment of the present invention, see Figure 6, assuming that the document image to be identified is divided into six image blocks of the same size, and each image block is mapped to a separate image vector, then a vector set containing six image vectors in the form of a two-dimensional array is obtained.

[0090] Step S404: extracting vector features from the vector set using a feature extraction network.

[0091] In this embodiment, the feature extraction network includes N feature extraction blocks, each of which includes: a two-dimensional convolution residual layer, a two-dimensional convolution layer and an affine transformation layer; the two-dimensional convolution in the two-dimensional convolution residual layer and the two-dimensional convolution layer uses a GELU activation function and a normalization layer BatchNorm.

[0092] Wherein, N is a positive integer, and the value of N is determined according to actual needs, for example, N is 16.

[0093] GELU is a common activation function, the full name is Gaussian Error Linear Unit, which is used in deep learning models. GELU is based on the Gaussian error function and provides a smoother activation method, which helps to improve the convergence speed and performance of the training process.

[0094] The working principle of the normalization layer BatchNorm is to normalize each feature channel in each training batch so that the mean is close to 0 and the variance is close to 1.

[0095] Each feature extraction block of the feature extraction network may further include a hidden layer, and the dimension of each hidden layer may be 512.

[0096] It should be noted that, in the training stage of the feature extraction network, the present invention enhances the image features by affine transformation to simulate the feature distribution in different fields.

[0097] The vector features extracted from the vector set may include: partial document information and noise information generated by counterfeiting technology.

[0098] Step S405: using a feature recognition network to determine the probability value of the vector feature containing a forged feature.

[0099] In this embodiment, the feature recognition network has multiple forged feature recognition branches, and different forged feature recognition branches recognize different types of forged features.

[0100] In practical applications, each forgery feature recognition branch can be constructed by a linear layer.

[0101] In this embodiment, a feature recognition network includes five forged feature recognition branches as an example. The five forged feature recognition branches respectively focus on real information, screen copy information, paper copy information, printing information and photo paste information in the vector features. Each forged feature recognition branch identifies and processes the information of concern from the vector features to obtain a binary classification judgment result.

[0102] After all the forged feature recognition branches in the feature recognition network have identified and processed the information they are concerned about, the probability value of the vector feature containing forged features can be obtained, and the value range of the probability value is [0, 1].

[0103] Step S406: Obtain a certificate authenticity identification result based on the probability value.

[0104] In practical applications, a probability value close to 0 indicates that the ID image to be identified is a real ID, and a probability value close to 1 indicates that the ID image to be identified is a forged ID.

[0105] In summary, the present invention discloses a method for document recognition, which obtains a document image to be recognized, divides the document image to be recognized into a plurality of image blocks of the same size, maps each image block to a corresponding image vector, obtains a vector set in the form of a two-dimensional array, extracts vector features from the vector set using a feature extraction network, and determines the probability value of the vector features having forged features using a feature recognition network, and obtains the document authenticity recognition result based on the probability value. The present invention realizes the authenticity recognition of the document by segmenting and mapping the document image to be recognized, and uses a feature extraction network to extract vector features and a feature recognition network to recognize forged features, so that the use of forged documents to impersonate or forge can be discovered in a timely manner, thereby ensuring the correctness of user identity authentication.

[0106] See also Figure 7 , a flow chart of a method for dividing a document image to be identified into multiple image blocks of the same size disclosed in an embodiment of the present invention, the method comprising:

[0107] Step S501: Adjust the resolution of the ID card image to be identified to the target resolution to obtain the target ID card image.

[0108] It is understandable that the resolutions of the ID card images to be identified that are taken and uploaded by users through different mobile terminals may be different. Therefore, in order to improve the accuracy and consistency of subsequent ID card image recognition, after obtaining the ID card images to be identified, this application adjusts the resolution of the ID card images to be identified to a unified target resolution. The value of the target resolution is determined according to actual needs, for example, 112×112, and the present invention is not limited here.

[0109] Step S502: split the target document image into multiple image blocks of the same size.

[0110] The size of the image blocks obtained by segmenting the target document image is determined according to actual conditions, such as 14×14, and the present invention does not limit this.

[0111] To further optimize the above embodiment, see Figure 8 , a flow chart of a method for obtaining a certificate authenticity identification result based on a probability value disclosed in an embodiment of the present invention, the method comprising:

[0112] Step S601, determine whether the probability value of the vector feature having a forged feature is less than a preset probability value, if yes, execute step S602, if no, execute step S603;

[0113] In this embodiment, when the probability value is close to 1, it is determined that the ID image to be identified is a forged ID, and when the probability value is close to 0, it is determined that the ID image to be identified is a real ID. Based on this, the preset probability value in this embodiment is 0.5.

[0114] Step S602: Determine whether the ID image to be identified is a genuine ID;

[0115] Step S603: Determine whether the ID image to be identified is a forged ID.

[0116] In summary, the present invention determines whether the ID card image to be identified is a real ID card or a forged ID card by comparing the probability value of the existence of forged features in the vector feature with the preset probability value, thereby realizing the authenticity identification of the ID card, so that the use of forged ID cards to impersonate others or forge identities can be discovered in time, thereby ensuring the correctness of user identity authentication.

[0117] It should be noted that steps S403 to S406 in this embodiment can be used as the working principle process of a document recognition model, and the document image authenticity recognition result obtained by the document recognition model and the real label of the document image can be optimized by using binary cross entropy loss. The document recognition model uses an SGD (Stochastic Gradient Descent) optimizer with an initial learning rate of 0.01, and a cosine annealing strategy is used to decay the learning rate.

[0118] Among them, the present invention balances the data of each type of certificate when sampling the certificate recognition model, ensuring that the amount of data of each type of certificate in each training batch is the same.

[0119] In addition, in order to enable the feature recognition network to better process the differentiated information between different types of certificates, the parameters in the feature recognition network in the present invention are predicted by meta-learning with the certificate type ID as a condition, so that the feature recognition network can adapt to the task environment of multiple certificates. Certificate type ID, for example, identity card is 1, passport is 2.

[0120] For a better understanding of meta-learning, see Fig. 9 , a schematic diagram of the structure of a meta-learning disclosed in an embodiment of the present invention, based on the idea of ​​meta-learning, for each linear layer in the feature recognition network, an embedding layer and three linear layers are used to assign different weights and biases according to different document type IDs, thereby realizing a differentiated feature recognition network for different document type IDs.

[0121] To facilitate explanation of how the document recognition method disclosed in this application can improve the accuracy of document recognition, the recognition results of the document recognition model of this application and the document recognition model in the traditional solution are compared. The whole process is as follows:

[0122] See Table 1 for the amount of data and annotation method used for model training.

[0123] Table 1

[0124] Type Label Number (num) The certificate is normal (front) 0000000 943 The certificate is normal (back side) 0100000 306 Screen shot (front view) 1000001 829 Screen shot (reverse side) 1100001 157 Printing and copying fraud (front) 1000010 1043 Printing and copying fraud (back side) 1100010 483 Post photo (front) 1000100 760

[0125] Among them, screen capture is a second shot of a picture facing the display showing the ID card image; print and copy fraud is a second shot of a picture on the printed and copied ID card image; pasted photo is a picture taken with a one-inch photo covering the portrait of the ID card. Each type of data is divided into training set, development set and test set in a ratio of 8:1:1.

[0126] Table 2 is a comparison table of the parameter amounts of the document recognition model in the present invention and the parameter amounts of several common classification networks. The parameter amounts required for model training in the present invention are much smaller than those of several common classification networks. Even for the ViT (Visual Transformer) method, which is also relatively small, the parameter amount of the present invention is only half of that. At the same time, since the Transformer structure of ViT lacks inductive bias, the training data required for its training is much larger than that of the network based on CNN (Convolutional Neural Network).

[0127] Among them, Transformer is a deep learning model architecture for natural language processing and other sequence-to-sequence tasks.

[0128] ViT is a model proposed by the Google team in 2020 to apply Transformer to image classification.

[0129] Table 2

[0130] Model Parameter quantity (10^6) ViT 11.0 Resnet 152 60.2 Resnet 101 44.6 Resnet 50 25.6 Inception v3 24.7 The present invention 5.4

[0131] Among them, the full English name of Resnet is: Residual Network, and the Chinese explanation is: residual network.

[0132] Inception v3 mainly proposed decomposed convolution, factorizing large convolution into small convolution and asymmetric convolution.

[0133] The present invention selects Resnet 50 and Inception v3 with fewer parameters to compare with the document recognition method of the present invention. These two types of models are trained based on the same training data as the model used in the present invention. Table 3 shows the prediction accuracy of the three models for various types of test data. Although the method of the present invention has only about one-fifth of the parameters of Resnet 50 and Inception v3, it achieves higher classification accuracy.

[0134] Table 3. Judgment accuracy of the present invention and the comparison model in the test set

[0135]

[0136] Considering that there are many ways to forge in actual applications, it is difficult to cover all types of forgeries through training. Therefore, the present invention tests the model's ability to detect unknown attacks. The present invention also produced 200 forged data of portraits that have been PSed, and calculated the accuracy of the three models in judging that they are not true. As shown in Table 4, the robustness of the proposed method to unknown attack types is significantly better than Resnet 50 and Inception v3.

[0137] Table 4, the judgment accuracy of the present invention and the comparison model in out-of-set attack (PS)

[0138] Model Authenticity judgment accuracy Inception v3 65.79% Resnet50 68.42% The present invention 91.01%

[0139] In addition, the present invention also uses the open source portrait forgery data CASIA-SURF with sufficient data volume and about 600 internal passport data to verify the effectiveness of the meta-learning-based lifelong learning training strategy used in the present invention in cross-domain adaptation. As shown in Table 5, the document recognition method proposed in the present invention is due to the commonly used fine-tuning strategy when adapting to cross-domains, especially when the amount of data is scarce.

[0140] Table 5. True or false judgment accuracy of cross-domain forgery detection task

[0141] Cross-domain tasks Portrait forgery Passport forgery Fine-tuning method 94.4% 44.8% Lifelong Learning + Meta-Learning 95.1% 92.7%

[0142] A document recognition method provided in an embodiment of the present application is introduced above, and a device for executing the above document recognition method will be introduced below.

[0143] See also Fig.10 , Fig.10 A schematic diagram of the structure of a document recognition device provided in an embodiment of the present application, the device comprising:

[0144] The acquisition unit 701 is used to acquire the image of the document to be identified.

[0145] In Internet finance and other businesses (such as bank deposit business), user real-name authentication is required. Users take and upload ID photos through mobile terminals to further confirm the user's identity. For example, when a user opens a savings card account, the user is required to upload an ID photo. At this time, the user takes the ID photo through a mobile phone or other terminal and uploads it.

[0146] The segmentation unit 702 is used to segment the document image to be identified into a plurality of image blocks of the same size.

[0147] The segmentation unit 702 may be specifically used for:

[0148] Adjusting the resolution of the ID card image to be identified to the target resolution to obtain the target ID card image;

[0149] The target document image is divided into a plurality of image blocks of the same size.

[0150] The mapping unit 703 is used to map each of the picture blocks to a corresponding picture vector to obtain a vector set in the form of a two-dimensional array.

[0151] This embodiment maps each image block to a corresponding image vector through a linear layer in a neural network, and obtains a vector set consisting of all image vectors. The vector set is saved in the form of a two-dimensional array to save the relative position relationship between each image vector.

[0152] The feature extraction unit 704 is used to extract vector features from the vector set using a feature extraction network.

[0153] In this embodiment, the feature extraction network includes N feature extraction blocks, each of which includes: a two-dimensional convolution residual layer, a two-dimensional convolution layer and an affine transformation layer; the two-dimensional convolution in the two-dimensional convolution residual layer and the two-dimensional convolution layer uses a GELU activation function and a normalization layer BatchNorm.

[0154] The probability value determination unit 705 is used to determine the probability value of the vector feature containing a forged feature by using a feature recognition network.

[0155] In this embodiment, the feature recognition network has multiple forged feature recognition branches, and different forged feature recognition branches recognize different types of forged features.

[0156] In practical applications, each forgery feature recognition branch can be constructed by a linear layer.

[0157] In this embodiment, a feature recognition network includes five forged feature recognition branches as an example. The five forged feature recognition branches respectively focus on real information, screen copy information, paper copy information, printing information and photo paste information in the vector features. Each forged feature recognition branch identifies and processes the information of concern from the vector features to obtain a binary classification judgment result.

[0158] After all the forged feature recognition branches in the feature recognition network have identified and processed the information they are concerned about, the probability value of the vector feature containing forged features can be obtained, and the value range of the probability value is [0, 1].

[0159] The authenticity identification unit 706 is used to obtain the authenticity identification result of the document based on the size of the probability value.

[0160] In practical applications, a probability value close to 0 indicates that the ID image to be identified is a real ID, and a probability value close to 1 indicates that the ID image to be identified is a forged ID.

[0161] In summary, the present invention discloses a document recognition device, which obtains a document image to be recognized, divides the document image to be recognized into multiple image blocks of the same size, maps each image block to a corresponding image vector, obtains a vector set in the form of a two-dimensional array, extracts vector features from the vector set using a feature extraction network, and determines the probability value of the vector features having forged features using a feature recognition network, and obtains the document authenticity recognition result based on the probability value. The present invention realizes the authenticity recognition of the document by segmenting and mapping the document image to be recognized, and uses a feature extraction network to extract vector features and a feature recognition network to recognize forged features, so that the use of forged documents to impersonate or forge can be discovered in a timely manner, thereby ensuring the correctness of user identity authentication.

[0162] To further optimize the above embodiment, the authenticity identification unit 706 can be specifically used for:

[0163] Determine whether the probability value is less than the preset probability value;

[0164] If yes, it is determined that the ID image to be identified is a real ID;

[0165] If not, it is determined that the ID image to be identified is a forged ID.

[0166] In summary, the present invention determines whether the ID card image to be identified is a real ID card or a forged ID card by comparing the probability value of the existence of forged features in the vector feature with the preset probability value, thereby realizing the authenticity identification of the ID card, so that the use of forged ID cards to impersonate others or forge identities can be discovered in time, thereby ensuring the correctness of user identity authentication.

[0167] The present application also provides an electronic device in an embodiment. Fig.11 As shown, it shows a schematic diagram of the structure of an electronic device suitable for implementing the embodiments of the present application. The electronic device in the embodiments of the present application may include but is not limited to fixed terminals such as mobile phones, notebook computers, PDAs (personal digital assistants), PADs (tablet computers), desktop computers, etc. Fig.11 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0168] like Fig.11 As shown, the electronic device may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. When the electronic device is powered on, various programs and data required for the operation of the electronic device are also stored in the RAM 803. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0169] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touch pad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a memory card, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. Although Fig.11 An electronic device having various devices is shown, but it should be understood that it is not required to implement or possess all the devices shown. More or fewer devices may be implemented or possessed instead.

[0170] An embodiment of the present application also provides a computer program product including computer-readable instructions. When the computer-readable instructions are executed on an electronic device, the electronic device implements any one of the document recognition methods provided in the embodiments of the present application.

[0171] A computer-readable storage medium is also provided in an embodiment of the present application. The storage medium carries one or more computer programs. When the one or more computer programs are executed by an electronic device, the electronic device can implement any one of the document recognition methods provided in the embodiment of the present application.

[0172] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.

[0173] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0174] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.

[0175] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.

Claims

1. A document recognition method, characterized in that: include: Get the image of the document to be identified; Dividing the document image to be identified into multiple image blocks of the same size; Mapping each of the picture blocks to a corresponding picture vector to obtain a vector set in a two-dimensional array form; Extracting vector features from the vector set using a feature extraction network; Using a feature recognition network to determine the probability value of the vector feature containing a forged feature; The authenticity identification result of the certificate is obtained based on the size of the probability value.

2. The document recognition method according to claim 1, characterized in that: The document image to be identified is divided into a plurality of image blocks of the same size, including: Adjusting the resolution of the ID card image to be identified to the target resolution to obtain the target ID card image; The target document image is divided into a plurality of image blocks of the same size.

3. The document recognition method according to claim 1 or 2, characterized in that: The feature extraction network includes N feature extraction blocks, where N is a positive integer; Each of the feature extraction blocks includes: a two-dimensional convolution residual layer, a two-dimensional convolution layer and an affine transformation layer; The two-dimensional convolution residual layer and the two-dimensional convolution in the two-dimensional convolution layer use a GELU activation function and a normalization layer BatchNorm.

4. The document recognition method according to claim 1 or 2, characterized in that: The feature recognition network has multiple forged feature recognition branches, and different forged feature recognition branches recognize different categories of forged features.

5. The document recognition method according to claim 4, characterized in that: The parameters in the feature recognition network are predicted by meta-learning with the document type ID as a condition.

6. The document recognition method according to claim 1, characterized in that: The result of the document authenticity identification is obtained based on the probability value, including: Determining whether the probability value is less than the preset probability value; If yes, it is determined that the ID image to be identified is a real ID; If not, it is determined that the ID image to be identified is a forged ID.

7. A document recognition device, characterized in that: include: An acquisition unit, used to acquire the image of the document to be identified; A segmentation unit, used to segment the document image to be identified into a plurality of image blocks of the same size; A mapping unit, used to map each of the picture blocks to a corresponding picture vector to obtain a vector set in a two-dimensional array form; A feature extraction unit, used to extract vector features from the vector set using a feature extraction network; A probability value determination unit, used to determine the probability value of the vector feature having a forged feature by using a feature recognition network; The authenticity identification unit is used to obtain the authenticity identification result of the document based on the size of the probability value.

8. A computer program product, characterized in that It comprises computer-readable instructions, and when the computer-readable instructions are executed on an electronic device, the electronic device implements the document recognition method as claimed in any one of claims 1 to 6.

9. An electronic device, characterized in that: The method comprises at least one processor and a memory connected to the processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program so that the electronic device can implement the document recognition method as described in any one of claims 1 to 6.

10. A computer storage medium, characterized in that: The storage medium carries one or more computer programs, and when the one or more computer programs are executed by an electronic device, the electronic device can implement the document recognition method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Certificate authenticity identification method and device

    CN111324874A

  • Data authentic identification method, device, equipment and medium

    CN113034433A

  • Certificate verification method and device, electronic equipment and storage medium

    CN113591603A

  • Certificate identification model training method, certificate identification method, certificate identification system, certificate identification equipment and medium

    CN114118412A

  • Method and apparatus for certificate identification

    US20200279138A1