Artificial intelligence-based identity recognition method and related device
By constructing natural person IDs and identity IDs, and combining text and image information for verification, the problem of low accuracy in identity recognition in existing technologies is solved, and an efficient and secure identity recognition method is achieved.
Patent Information
- Application Number
- CN202210784404.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-28
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2042-06-28
AI Technical Summary
In existing technologies, the accuracy of enterprise identification through recognizing personal information such as user names and ID card images is low, which cannot meet the needs for efficient and accurate identification.
An AI-based identity recognition method is adopted. By constructing natural person IDs and identity IDs, information is queried using a pre-set user database, and the text to be recognized and the certificate image are compared. The first verification result and the second verification result are calculated, and finally the identity recognition result is calculated. The verification is performed by combining text and image information.
It improves the accuracy and security of identity verification, protects users' key information from being leaked, and enhances the efficiency of querying target user information and the accuracy of identity verification.
Smart Images

Figure CN115223187B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of artificial intelligence, and particularly relates to an identity recognition method and device based on artificial intelligence, an electronic device and a storage medium. BACKGROUND
[0002] With the development of information technology, more and more users tend to use the Internet to obtain information or enjoy services, and at the same time, more and more enterprises tend to use Internet technology to provide services for users to improve business efficiency. This situation leads many enterprises to need to efficiently manage user information in order to accurately identify user identity and thus provide accurate and high-quality services.
[0003] At present, enterprises usually identify identity by recognizing one of personal information such as user name, certificate image, mobile phone number, etc. This way has low accuracy. Therefore, it is imperative to invent an accurate identity recognition method. SUMMARY
[0004] In view of the above, it is necessary to provide an identity recognition method based on artificial intelligence and related devices to solve the technical problem of how to improve the accuracy of identity recognition, wherein the related devices include an identity recognition device based on artificial intelligence, an electronic device and a storage medium.
[0005] The present application provides an identity recognition method based on artificial intelligence, which comprises:
[0006] According to the to-be-identified user information, a natural person ID and an identity ID of the user are constructed, wherein the to-be-identified user information includes to-be-identified text and to-be-identified certificate image;
[0007] According to the natural person ID and the identity ID, target user information is found from a preset user database, wherein the target user information includes target text and target certificate image;
[0008] A first verification result is obtained by comparing the to-be-identified text and the target text, wherein the first verification result includes a first verification label and a first confidence;
[0009] A second verification result is obtained by comparing the to-be-identified certificate image and the target certificate image, wherein the second verification result includes a second verification label and a second confidence;
[0010] An identity recognition result is calculated according to the first verification result and the second verification result.
[0011] In some embodiments, the to-be-identified text at least includes user name, certificate number, mobile phone number, and the construction of the natural person ID and the identity ID of the user according to the to-be-identified user information comprises:
[0012] query the encoding value corresponding to the user name according to the preset encoding format;
[0013] classify the certificate number according to a preset certificate number classification model to obtain a category of the certificate number, the category including an ID card number, a passport number, and a social security number;
[0014] if the category of the certificate number is an ID card number, combine the encoding value and the certificate number as a natural person code, and calculate a hash value of the natural person code as a natural person ID corresponding to the user to be identified;
[0015] if the category of the certificate number is not an ID card number, calculate a plurality of identity IDs corresponding to the user to be identified according to the encoding value, the certificate number, and the mobile phone number.
[0016] In this way, the non-numeric data in the user information to be identified is converted into an encoding value through a preset encoding format, and the natural person ID and the plurality of identity IDs corresponding to the encoding value and the numeric data are calculated according to a preset hash algorithm, which can provide data guidance for subsequent retrieval of user information and protect the key personal information of the user from being leaked, thereby improving the security of user data.
[0017] In some embodiments, the finding of target user information from a preset user database according to the natural person ID and the identity IDs includes:
[0018] finding user data corresponding to the natural person ID from the user database according to the natural person ID;
[0019] if the corresponding user data is found according to the natural person ID, the user data is taken as the target user information;
[0020] if the corresponding user data cannot be found according to the natural person ID, the corresponding user data of each identity ID is found according to each identity ID respectively, and if the corresponding user data is found according to any one identity ID, the user data is taken as the target user information;
[0021] if the target user information cannot be found according to the natural person ID and all the identity IDs, the natural person ID, the identity IDs, and the user information to be identified are stored into the user database to complete user registration.
[0022] In this way, the corresponding user data is found from the preset user database through the natural person ID and the plurality of identity IDs respectively, and the target user information is obtained according to the query result, and since the natural person ID and the identity IDs are calculated by the preset hash algorithm and are unique, the efficiency of querying the target user information is improved.
[0023] In some embodiments, the comparing the to-be-identified text and the target text obtains a first verification result, including:
[0024] Detecting text information in the to-be-identified certificate image obtains a plurality of first image texts, and taking all the first image texts and the to-be-identified text as a plurality of first texts;
[0025] Detecting text information in the target certificate image obtains a plurality of second image texts, and taking all the second image texts and the target text as a plurality of second texts;
[0026] Classifying the first texts and the second texts respectively obtains a category of each first text and each second text;
[0027] Comparing the first texts and the second texts with the same category obtains the first verification result.
[0028] In this way, a plurality of first texts and a plurality of second texts are obtained by detecting text information in the target certificate image and the to-be-identified certificate image respectively, a category of each first text and each second text is obtained by classifying the first texts and the second texts, and the first verification result is obtained by comparing the first texts and the second texts with the same category. The judgment of the text in the to-be-identified user information is made first, which provides data support for subsequent calculation of the global identity verification result, thereby improving the accuracy of identity verification.
[0029] In some embodiments, the comparing the first texts and the second texts with the same category to obtain the first verification result includes:
[0030] Comparing the first texts and the second texts with the same category in turn to calculate a first evaluation value;
[0031] Comparing the first evaluation value with a preset evaluation threshold to obtain a first verification label;
[0032] Calculating a first confidence degree according to the first evaluation value and the number of the first texts, and taking the first verification label and the first confidence degree as the first verification result.
[0033] In this way, the first evaluation value is calculated by comparing the first texts and the second texts, the first verification label is obtained by comparing the first evaluation value with the preset evaluation threshold, and the first confidence degree of the first verification label is calculated according to the first evaluation value and the number of the first texts to obtain the first verification result. The to-be-identified user information is evaluated by quantitative indicators, and the confidence degree is used to evaluate the credibility, thereby improving the accuracy of the verification result.
[0034] In some embodiments, the comparing the to-be-identified certificate image and the target certificate image obtains a second verification result, including:
[0035] inputting the target identification image into a preset target detection model to obtain a first user image, and inputting the target identification image into the target detection model to obtain a second user image;
[0036] performing semantic segmentation on the first user image to obtain a first face image, and performing semantic segmentation on the second user image to obtain a second face image;
[0037] comparing the first face image and the second face image to obtain a second verification result.
[0038] In this way, the first face image and the second face image are obtained by enhancing and segmenting the first user image and the second user image, the key points and the feature descriptors corresponding to each key point are obtained by detecting the key points in the first face image and the second face image, the second verification label and the confidence of the second verification label are calculated based on the feature descriptors corresponding to the key points as the second verification result, which provides data support for subsequent calculation of the identity recognition result, thereby improving the accuracy of the identity recognition result.
[0039] In some embodiments, the comparing the first face image and the second face image to obtain a second verification result comprises:
[0040] performing up-sampling on the first face image to obtain a first up-sampled image, and performing up-sampling on the second face image to obtain a second up-sampled image;
[0041] performing enhancement processing on the first up-sampled image to obtain a first enhanced image, and performing enhancement processing on the second up-sampled image to obtain a second enhanced image;
[0042] detecting a plurality of key points in the first enhanced image and the second enhanced image according to a preset key point detection algorithm;
[0043] comparing the key points in the first enhanced image with the key points in the second enhanced image to obtain a second verification result, the second verification result comprising a second verification label and a second verification confidence.
[0044] In this way, the first up-sampled image and the second up-sampled image are obtained by up-sampling the first face image and the second face image, the information of the face image is expanded, and thus the accuracy of the second verification result is improved.
[0045] The application also provides an identity recognition device based on artificial intelligence, which comprises:
[0046] a construction unit configured to construct a natural person ID and an identity ID of a user according to to-be-identified user information, the to-be-identified user information comprising to-be-identified text and to-be-identified identification image;
[0047] a searching unit configured to search for target user information from a preset user database according to the natural person ID and the identity ID, the target user information including target text and a target certificate image;
[0048] a first verification unit configured to compare the to-be-identified text with the target text to obtain a first verification result, the first verification result including a first verification label and a first confidence level;
[0049] a second verification unit configured to compare the to-be-identified certificate image with the target certificate image to obtain a second verification result, the second verification result including a second verification label and a second confidence level;
[0050] a calculating unit configured to calculate an identity recognition result according to the first verification result and the second verification result.
[0051] Embodiments of the present application also provide an electronic device, which comprises:
[0052] a memory configured to store computer readable instructions; and
[0053] a processor configured to execute the computer readable instructions stored in the memory to implement the artificial intelligence-based identity recognition method.
[0054] Embodiments of the present application also provide a computer readable storage medium, which stores computer readable instructions, and the computer readable instructions are executed by a processor in an electronic device to implement the artificial intelligence-based identity recognition method.
[0055] The artificial intelligence-based identity recognition method described above constructs a natural person ID and an identity ID of a user by using to-be-identified user information, queries target user information according to the natural person ID and the identity ID, compares the to-be-identified user information with the target user information to obtain a first verification result and a second verification result, and further calculates an identity recognition result according to the first verification result and the second verification result, thereby verifying the identity of the user from the perspective of text and image respectively, and improving the accuracy of identity recognition. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 is a flowchart of a preferred embodiment of an artificial intelligence-based identity recognition method related to the present application.
[0057] Figure 2 is a functional module diagram of a preferred embodiment of an artificial intelligence-based identity recognition device related to the present application.
[0058] Figure 3is a structural schematic diagram of an electronic device of a preferred embodiment of an artificial intelligence-based identity recognition method involved in the present application. DETAILED DESCRIPTION
[0059] In order to enable a more clear understanding of the purpose, features and advantages of the present application, the present application will be described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict. In the following description, a large number of specific details are set forth in order to facilitate a full understanding of the present application, and the described embodiments are only a part of the embodiments of the present application, but not all the embodiments.
[0060] In addition, the terms "first", "second" are only for descriptive purposes, and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which the present application belongs. The terms used in the specification of the present application are only for the purpose of describing the specific embodiments of the present application, and are not intended to limit the present application. The term "and / or" used herein includes any and all combinations of one or more of the related listed items.
[0062] The embodiments of the present application provide an artificial intelligence-based identity recognition method, which can be applied to one or more electronic devices. The electronic device is a device capable of automatically performing numerical calculation and / or information processing according to pre-set or stored instructions. The hardware thereof includes but is not limited to microprocessors, application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), digital signal processors (DSPs), embedded devices, etc.
[0063] The electronic device can be any electronic product that can interact with a user, such as a personal computer, a tablet computer, a smart phone, a personal digital assistant (PDA), a game console, an interactive Internet Protocol Television (IPTV), a smart wearable device, etc.
[0064] The electronic device can also include a network device and / or a user device. The network device includes, but is not limited to, a single network server, a server group composed of multiple network servers, or a cloud composed of a large number of hosts or network servers based on cloud computing.
[0065] The network in which the electronic device is located includes, but is not limited to, the Internet, a wide area network, a metropolitan area network, a local area network, a virtual private network (VPN), etc.
[0066] As shown in FIG. 1, the electronic device can be a network device and / or a user device. Figure 1 As shown in FIG. 2, which is a flowchart of a preferred embodiment of the identity recognition method based on artificial intelligence of the present application. The order of the steps in the flowchart can be changed according to different needs, and some steps can be omitted.
[0067] S10, constructing a natural person ID and an identity ID of a user according to user information to be recognized, the user information to be recognized including text to be recognized and an image of a certificate to be recognized.
[0068] In an optional embodiment, the text to be recognized includes at least a user name, a certificate number, and a mobile phone number, and the step of constructing a natural person ID and an identity ID of a user according to user information to be recognized includes:
[0069] querying an encoding value corresponding to the user name according to a preset encoding format;
[0070] classifying the certificate number according to a preset certificate number classification model to obtain a category of the certificate number, the category including an ID number, a passport number, and a social security number;
[0071] if the category of the certificate number is an ID number, combining the encoding value and the certificate number as a natural person code, and calculating a hash value of the natural person code as the natural person ID corresponding to the user to be recognized;
[0072] if the category of the certificate number is not an ID number, calculating a plurality of identity IDs corresponding to the user to be recognized according to the encoding value, the certificate number, and the mobile phone number.
[0073] In the optional embodiment, firstly, the encoding value corresponding to the user name in the to-be-identified user information can be queried according to a preset encoding format. The preset encoding format can be an existing Chinese encoding format such as GB2312, GBK, GB18030, and UTF-8. The function of the preset encoding format is to convert the user name in the to-be-identified user information into numerical data to facilitate subsequent identity recognition. Taking the GB2312 encoding format as an example, when the user name in the to-be-identified user information is “Li Ming”, the encoding value corresponding to the user name is 11000000111011101100001111110111.
[0074] In the optional embodiment, the certificate number can be classified according to a preset certificate number classification model to obtain the category of the certificate number. The category can be one of an ID number, a passport number, a social security number, and the like. The preset certificate number classification model can be any one of existing classification models such as a pre-trained random forest model, a decision tree model, and a support vector machine model, and the present application does not limit this.
[0075] In the optional embodiment, if the category of the certificate number is an ID number, the encoding value and the certificate number can be combined into a natural person code according to a preset combination order. The preset combination order can be “encoding value + certificate number”, or “certificate number + encoding value”. A hash value corresponding to the natural person code is calculated according to a preset hash algorithm to serve as the natural person ID of the user. The natural person ID can be denoted as ID 自然 . The preset hash algorithm can be an existing hash algorithm such as the SHA1 algorithm, the SHA224 algorithm, or the SHA256 algorithm, and the present application does not limit this.
[0076] In the optional embodiment, if the category of the certificate number is not an ID number, a plurality of identity IDs corresponding to the to-be-identified user can be calculated according to the encoding value, the certificate number, and the mobile phone number. The encoding value and the certificate number can be combined into a first sequence according to the preset combination order. A hash value of the first sequence is calculated as a first identity ID of the to-be-identified user according to the preset hash algorithm. A hash value of the mobile phone number is calculated as a second identity ID of the to-be-identified user. The first identity ID and the second identity ID serve as the plurality of identity IDs corresponding to the to-be-identified user.
[0077] In this way, the non-numerical data in the to-be-identified user information is converted into an encoding value through a preset encoding format, and a natural person ID and a plurality of identity IDs corresponding to the encoding value and the numerical data are calculated according to a preset hash algorithm, which can provide data guidance for subsequent retrieval of user information, protect the key personal information of the user from being leaked, and thus improve the security of user data.
[0078] S11, searching for target user information from a preset user database according to the natural person ID and the identity ID, the target user information including target text and target certificate image.
[0079] In an optional embodiment, the searching for target user information from a preset user database according to the natural person ID and the identity ID includes:
[0080] searching for user data corresponding to the natural person ID from the user database according to the natural person ID;
[0081] if the corresponding user data is found according to the natural person ID, taking the user data as the target user information;
[0082] if the corresponding user data is not found according to the natural person ID, searching for user data corresponding to each identity ID according to each identity ID respectively, and if the corresponding user data is found according to any one identity ID, taking the user data as the target user information;
[0083] if the target user information is not found according to the natural person ID and all the identity IDs, storing the natural person ID, the identity IDs and the to-be-identified user information into the user database to complete user registration.
[0084] In the optional embodiment, the preset user database is configured to store a plurality of user data, and the user data can include natural person ID, identity ID, user text and user certificate image.
[0085] In the optional embodiment, the user data corresponding to the natural person ID can be searched from the user database according to the natural person ID, and if the user data corresponding to the natural person ID is found, the user data is taken as the target user information to start identity verification.
[0086] In the optional embodiment, if the user data corresponding to the natural person ID is not found from the user database, it indicates that the natural person ID is not archived in the user database. Further, the user data corresponding to each identity ID can be searched from the preset user database according to each identity ID respectively.
[0087] In the optional embodiment, if the user data corresponding to the identity ID can be queried according to any identity ID, the user data is taken as the target user information; if no user data can be queried according to all the identity IDs, it indicates that the user information to be identified has never been stored in the user database, and the natural person ID, the identity ID and the user information to be identified can be stored in the user database to complete the registration of the user information to be identified.
[0088] In this way, the corresponding user data is queried from the preset user database through the natural person ID and the plurality of identity IDs respectively, and the registration or the target user information is obtained according to the query result. Since the natural person ID and the identity ID are calculated by the preset hash algorithm and have uniqueness, the efficiency of querying the target user information can be improved.
[0089] S12, obtaining a first verification result by comparing the text to be identified with the target text, the first verification result including a first verification label and a first confidence.
[0090] In an optional embodiment, the comparison of the text to be identified with the target text to obtain the first verification result includes:
[0091] Detecting text information in the image of the identification document to be identified to obtain a plurality of first image texts, and taking all the first image texts and the text to be identified as a plurality of first texts.
[0092] Detecting text information in the image of the target identification document to obtain a plurality of second image texts, and taking all the second image texts and the target text as a plurality of second texts.
[0093] Classifying the first texts and the second texts respectively to obtain the category of each first text and each second text.
[0094] Comparing the first texts and the second texts with the same category to obtain the first verification result.
[0095] In the optional embodiment, the image of the identification document to be identified and the image of the target identification document can be detected according to a preset text recognition algorithm to obtain a plurality of first image texts corresponding to the image of the identification document to be identified and a plurality of second image texts corresponding to the image of the target identification document. The preset text recognition algorithm can be a pre-trained TextFuseNet network (scene text detection network), CTPN network (Connectionist Text Proposal Network), Tesseract model or other existing text recognition model, which is not limited in the present application.
[0096] In the optional embodiment, the to-be-identified text and all the first image texts are taken as a plurality of first texts, and the target text and all the second image texts are taken as a plurality of second texts.
[0097] In the optional embodiment, the first texts and the second texts are classified according to a preset text classification model to obtain a category corresponding to each first text and a category corresponding to each second text, and the categories include information related to user certificates such as "ID number", "passport number", "social security number", "driver's license number", "name", "gender", "address", "age", "place of household registration", etc.
[0098] In an optional embodiment, the comparing the first texts and the second texts with the same category to obtain the first verification result comprises:
[0099] The first texts and the second texts with the same category are compared in sequence to calculate a first evaluation value.
[0100] The first evaluation value is compared with a preset evaluation threshold to obtain a first verification label.
[0101] A first confidence degree is calculated according to the first evaluation value and the number of the first texts, and the first verification label and the first confidence degree are taken as the first verification result.
[0102] In the optional embodiment, the first evaluation value is initialized to 0, if a certain first text is the same as the second text with the same category, the first evaluation value is increased by 1, otherwise, no operation is performed on the first evaluation value, the first texts and the second texts with the same category are compared to obtain the first evaluation value, and the first evaluation value is a positive integer greater than or equal to 0.
[0103] In the optional embodiment, if the first evaluation value is less than the preset evaluation threshold, it indicates that the similarity between the first texts and the second texts with the same category is low, and the first verification label can be recorded as "verification failed", according to the experience of multiple tests, the preset evaluation threshold can be 9, if the evaluation value is not less than the evaluation threshold, the first verification label can be recorded as "verification passed".
[0104] In the optional embodiment, since the number of the first texts and the number of the second texts can be inconsistent, which can cause a certain deviation of the first verification label, the ratio of the evaluation value to the number of the first texts can be calculated as a first confidence degree, and the first verification label and the first confidence degree are taken as the first verification result, the higher the first confidence degree is, the more first texts are the same as the second texts with the same category, and the higher the credibility of the first verification label is, in the present scheme, the first confidence degree can be recorded as T.1 The first confidence value is [0, 1].
[0105] In this way, a plurality of first texts and a plurality of second texts are obtained by respectively detecting the text information in the target certificate image and the to-be-identified certificate image, the categories of each of the first texts and the second texts are obtained by classifying the first texts and the second texts, and the first verification result is obtained by comparing the first texts and the second texts with the same category, so that the judgment on the text in the to-be-identified user information is made in advance, and data support is provided for subsequent calculation of the global identity verification result, thereby improving the accuracy of identity verification.
[0106] S13, comparing the to-be-identified certificate image and the target certificate image to obtain a second verification result, the second verification result including a second verification label and a second confidence value.
[0107] In an optional embodiment, the comparing the to-be-identified certificate image and the target certificate image to obtain a second verification result includes:
[0108] inputting the to-be-identified certificate image into a preset target detection model to obtain a first user image, and inputting the target certificate image into the target detection model to obtain a second user image;
[0109] performing semantic segmentation on the first user image to obtain a first face image, and performing semantic segmentation on the second user image to obtain a second face image;
[0110] comparing the first face image and the second face image to obtain a second verification result.
[0111] In the optional embodiment, in order to identify whether the to-be-identified certificate image and the target certificate image belong to the same user, the to-be-identified certificate image can be input into a preset target detection model to obtain a first target detection result, the first target detection result being a first user image, the first user image being a region belonging to a user portrait in the to-be-identified certificate image, and the target certificate image can be input into the target detection model to obtain a second target detection result, the second target detection result being a second user image, the second user image being a region belonging to a user portrait in the target certificate image. The preset target detection model can be an existing target detection model such as a YOLO network (You Only Look Once), an R-CNN (Region Convolution Neural Network), and an FCN (Fully Convolution Neural Network), and the present application does not limit this.
[0112] In the optional embodiment, in order to segment the face images from the first user image and the second user image to improve the accuracy of the second verification result, the first user image can be input into a preset semantic segmentation model to obtain a first face image, and the second user image can be input into the semantic segmentation model to obtain a second face image. The preset semantic segmentation model can be a U-Net model (U-network), a SegNet model (A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation, deep convolutional encoder-decoder architecture for image segmentation), or a SPNet (Pyramid Scene Parsing Network, pyramid scene parsing network), or other existing semantic segmentation models, which are not limited in the present application.
[0113] In an optional embodiment, the comparing the first face image and the second face image to obtain the second verification result comprises:
[0114] Upsampling the first face image to obtain a first upsampled image, and upsampling the second face image to obtain a second upsampled image;
[0115] Enhancing the first upsampled image to obtain a first enhanced image, and enhancing the second upsampled image to obtain a second enhanced image;
[0116] Detecting a plurality of key points in the first enhanced image and the second enhanced image according to a preset key point detection algorithm;
[0117] Comparing the key points in the first enhanced image with the key points in the second enhanced image to obtain the second verification result.
[0118] In the optional embodiment, since the first face image and the second face image are part of the to-be-identified certificate image and the target certificate image respectively, the first face image and the second face image are usually small in size and contain less image information. In order to improve the information richness of the first face image and the second face image, the first user image and the second user image need to be upscaled according to a preset upsampling algorithm to obtain a first upsampled image and a second upsampled image. The size of the first upsampled image is larger than that of the first face image, and the size of the second upsampled image is larger than that of the second face image. The preset upsampling algorithm can be a bilinear interpolation algorithm, a cubic linear interpolation algorithm, or a mean upsampling algorithm, or other existing upsampling algorithms, which are not limited in the present application. The purpose of the upsampling is to expand the features of the face image to improve the accuracy of the subsequent face comparison.
[0119] In the optional embodiment, since the up-sampling processing causes the first up-sampled image and the second up-sampled image to be blurred to a certain extent, a preset enhancement algorithm can be used to perform enhancement processing on the first up-sampled image and the second up-sampled image respectively to obtain a first enhanced image and a second enhanced image, the size of the first enhanced image is the same as that of the first up-sampled image, the size of the second enhanced image is the same as that of the second up-sampled image, and the preset enhancement algorithm can be a WLS algorithm (Weight Least Square), a Laplace filter algorithm, a Sobel filter algorithm, or other existing image enhancement algorithms.
[0120] In the optional embodiment, a plurality of first key points in the first enhanced image and a feature descriptor of each first key point can be detected according to a preset key point detection algorithm, and a plurality of second key points in the second enhanced image and a feature descriptor corresponding to each second key point can be detected according to the preset key point detection algorithm. The feature descriptor is a vector with multiple dimensions, and the preset key point detection algorithm can be a SIFT algorithm (Scale Invariant Feature Transform) or an ORB (Oriented Fast and Brief) algorithm, and the present application does not limit this.
[0121] In the optional embodiment, the feature descriptor of each first key point in the first enhanced image can be denoted as V 1i , where i represents the index of the first key point, i∈{1, n}, and n represents the number of the first key points; and the feature descriptor of each second key point in the second enhanced image can be denoted as V 2j , where j represents the index of the second key point, j∈{1, m}, and m represents the number of the second key points.
[0122] In the optional embodiment, the similarity of the corresponding feature descriptors of each first key point and each second key point can be compared respectively, and the calculation method of the similarity is as follows:
[0123] S ij = COS(V 1i ,V 2j )
[0124] , where S ij represents the similarity of the i th first key point feature descriptor and the j th second key point feature descriptor; COS represents a cosine similarity calculation formula, and COS(V 1i ,V 2j) represents the cosine similarity between the i-th key point feature descriptor in the first enhanced image and the j-th key point feature descriptor in the second enhanced image.
[0125] In the optional embodiment, the mean of all the similarities can be calculated as the global similarity between the first enhanced image and the second enhanced image, and the global similarity is compared with a preset similarity threshold S 阈值 . If the global similarity is higher than the similarity threshold, the second verification label can be recorded as "verification passed", and if the mean is not higher than the similarity threshold, the second verification label can be recorded as "verification failed". Exemplarily, the preset similarity threshold S 阈值 may be 0.9.
[0126] In the optional embodiment, the second confidence of the second verification label can be calculated according to the number n of the first key points and the number m of the second key points, the second confidence being used to represent the confidence degree of the second verification label. The greater the difference between the number n of the first key points and the number m of the second key points, the greater the difference between the first enhanced image and the second enhanced image, and even if the global similarity is relatively high, the confidence is relatively low. The calculation method of the second confidence satisfies the following piecewise function:
[0127]
[0128] wherein n represents the number of the first key points; m represents the number of the second key points; T 2 represents the second confidence.
[0129] Exemplarily, when the global similarity between the first enhanced image and the second enhanced image is 0.95, and the second confidence is 1, the second verification result is "verification passed" and the confidence is 100%.
[0130] In the optional embodiment, the second verification label and the second confidence can be taken as the second verification result.
[0131] In this way, the first face image and the second face image are obtained by enhancing and segmenting the first user image and the second user image, the key points in the first face image and the second face image are detected, the plurality of key points and the feature descriptors corresponding to each key point are obtained, the second verification label and the confidence of the second verification label are calculated as the second verification result based on the feature descriptors corresponding to the key points, which provides data support for subsequent calculation of the identity recognition result, so as to improve the accuracy of the identity recognition result.
[0132] S14, calculating an identity recognition result according to the first verification result and the second verification result.
[0133] In an optional embodiment, the calculating the identity recognition result according to the first verification result and the second verification result comprises:
[0134] If any one of the first verification label and the second verification label is a verification failure, the identity recognition result is a recognition failure;
[0135] If the first verification label and the second verification label are both verification passes, the identity recognition result is a recognition pass;
[0136] The global confidence of the identity recognition result is calculated according to the first confidence and the second confidence, and the identity recognition result and the global confidence are pushed to the user.
[0137] In the optional embodiment, if any one of the first verification label and the second verification label is a verification failure, it indicates that the similarity between the to-be-recognized user information and the target user information is low, and thus the identity recognition result can be recorded as a recognition failure.
[0138] In the optional embodiment, if the first verification label and the second verification label are both verification passes, it indicates that the similarity between the to-be-recognized user information and the target user information is high, and thus the identity recognition result can be recorded as a recognition pass.
[0139] In the optional embodiment, the global confidence of the identity recognition result can be calculated according to the first confidence and the second confidence, and the calculation method of the global confidence satisfies the following relationship:
[0140]
[0141] wherein, T represents the global confidence, the higher the value of the global confidence is, the higher the credibility of the identity recognition result is; T 1 represents the first confidence; T 2 represents the second confidence; a represents a preset harmonic parameter, and the value of the harmonic parameter can be 4.5 after multiple tests.
[0142] For example, when the first confidence is 0.9 and the second confidence is 0.95, the calculation method of the global confidence is:
[0143]
[0144] The value of the global confidence is 0.99.
[0145] For example, when the identity recognition result is "recognition passed" and the global confidence is 0.99, the user and the identity management unit can be pushed "99% possibility of identity recognition passed"; when the identity recognition result is "recognition failed" and the global confidence is 0.9, the user and the identity management unit can be pushed "90% possibility of identity recognition failed".
[0146] In this way, the identity recognition result is determined based on the first verification result and the second verification result, the text and the image information of the identification certificate in the to-be-identified information are comprehensively considered, so that the accuracy of identity recognition is improved, and the global confidence of the identity recognition result is calculated by using the first confidence and the second confidence, so that the fault tolerance of identity recognition is improved.
[0147] The above-mentioned identity recognition method based on artificial intelligence constructs the natural person ID and the identity ID of the user based on the to-be-identified user information, queries the target user information according to the natural person ID and the identity ID, and obtains the first verification result and the second verification result by comparing the to-be-identified user information and the target user information, and further calculates the identity recognition result according to the first verification result and the second verification result, so that the user identity is verified from the text and the image, thereby improving the accuracy of identity recognition.
[0148] As shown in Figure 2 The identity recognition device 11 based on artificial intelligence includes a construction unit 110, a searching unit 111, a first verification unit 112, a second verification unit 113, and a calculation unit 114. The modules / units referred to in the present application refer to a series of computer program segments that can be executed by the processor 13 and can complete a fixed function, which are stored in the memory 12. In the present embodiment, the functions of each module / unit will be described in detail in the subsequent embodiments.
[0149] In an optional embodiment, the construction unit 110 is configured to construct the natural person ID and the identity ID of the user according to the to-be-identified user information, wherein the to-be-identified user information includes to-be-identified text and to-be-identified image of an identification certificate.
[0150] In an optional embodiment, the to-be-identified text includes at least the user's name, the ID card number, and the mobile phone number, and the construction of the natural person ID and the identity ID of the user according to the to-be-identified user information includes:
[0151] In an optional embodiment, the to-be-identified text includes at least the user's name, the ID card number, and the mobile phone number, and the construction of the natural person ID and the identity ID of the user according to the to-be-identified user information includes:
[0152] According to the preset encoding format, the encoding value corresponding to the user name is queried;
[0153] According to the preset certificate number classification model, the certificate number is classified to obtain the category of the certificate number, and the category includes an ID card number, a passport number, and a social security number;
[0154] If the category of the certificate number is an ID card number, the encoding value and the certificate number are combined as a natural person code, a hash value of the natural person code is calculated as the natural person ID corresponding to the user to be identified;
[0155] If the category of the certificate number is not an ID card number, the encoding value, the certificate number, and the mobile phone number are used to calculate a plurality of identity IDs corresponding to the user to be identified.
[0156] In this optional embodiment, first, the encoding value corresponding to the user name in the user information to be identified is queried according to the preset encoding format. The preset encoding format can be GB2312, GBK, GB18030, UTF-8, and other existing Chinese encoding formats. The function of the preset encoding format is to convert the user name in the user information to be identified into numerical data to facilitate subsequent identity recognition. Taking the GB2312 encoding format as an example, when the user name in the user information to be identified is “Li Ming”, the encoding value corresponding to the user name is 11000000111011101100001111110111.
[0157] In this optional embodiment, the certificate number can be classified according to the preset certificate number classification model to obtain the category of the certificate number. The category is one of a plurality of types such as an ID card number, a passport number, and a social security number. The preset certificate number classification model can be any one of existing classification models such as a pre-trained random forest model, a decision tree model, and a support vector machine model, which are not limited in the present application.
[0158] In this optional embodiment, if the category of the certificate number is an ID card number, the encoding value and the certificate number can be combined as a natural person code according to a preset combination order. The preset combination order can be “encoding value + certificate number”, or “certificate number + encoding value”. A hash value corresponding to the natural person code is calculated as the natural person ID of the user according to a preset hash algorithm. The natural person ID can be recorded as ID 自然 The preset hash algorithm can be an existing hash algorithm such as SHA1 algorithm, SHA224, or SHA256 algorithm, which is not limited in the present application.
[0159] In the optional embodiment, if the type of the certificate number is not an ID number, the multiple identity IDs corresponding to the to-be-identified user can be calculated according to the encoding value, the certificate number and the mobile phone number. The encoding value and the certificate number can be combined into a first sequence according to the preset combination order, and the hash value of the first sequence calculated according to the preset hash algorithm is taken as the first identity ID of the to-be-identified user; and the hash value of the mobile phone number is taken as the second identity ID of the to-be-identified user, and the first identity ID and the second identity ID are taken as the multiple identity IDs corresponding to the to-be-identified user.
[0160] In an optional embodiment, the searching unit 111 is configured to search target user information from a preset user database according to the natural person ID and the identity ID, wherein the target user information comprises target text and a target certificate image.
[0161] In an optional embodiment, the searching target user information from the preset user database according to the natural person ID and the identity ID comprises:
[0162] searching user data corresponding to the natural person ID from the user database according to the natural person ID;
[0163] if the corresponding user data is queried according to the natural person ID, taking the user data as the target user information;
[0164] if the corresponding user data is not queried according to the natural person ID, querying user data corresponding to each identity ID according to each identity ID respectively, if the corresponding user data is queried according to any one identity ID, taking the user data as the target user information;
[0165] if the target user information is not queried according to the natural person ID and all the identity IDs, storing the natural person ID, the identity ID and the to-be-identified user information into the user database to complete user registration.
[0166] In the optional embodiment, the preset user database is configured to store multiple user data, and the user data can comprise a natural person ID, an identity ID, user text and a user certificate image of a user.
[0167] In the optional embodiment, the user data corresponding to the natural person ID can be queried from the user database according to the natural person ID first, if the user data corresponding to the natural person ID is queried, the user data is taken as the target user information to start identity verification.
[0168] In the optional embodiment, if the user data corresponding to the natural person ID cannot be queried from the user database, it indicates that the natural person ID is not archived in the user database. Further, the user data corresponding to each identity ID can be queried in the preset user database according to each identity ID.
[0169] In the optional embodiment, if the user data corresponding to any identity ID can be queried according to the identity ID, the user data is taken as the target user information; if any user data cannot be queried according to all the identity IDs, it indicates that the user information to be identified has never been stored in the user database, and the natural person ID, the identity ID, and the user information to be identified can be uniformly stored in the user database to complete the registration of the user information to be identified.
[0170] In an optional embodiment, the first verification unit 112 is configured to compare the text to be identified and the target text to obtain a first verification result, and the first verification result includes a first verification label and a first confidence.
[0171] In an optional embodiment, the comparison of the text to be identified and the target text to obtain a first verification result includes:
[0172] Detecting text information in the image of the identification document to be identified to obtain a plurality of first image texts, and taking all the first image texts and the text to be identified as a plurality of first texts.
[0173] Detecting text information in the image of the target identification document to obtain a plurality of second image texts, and taking all the second image texts and the target text as a plurality of second texts.
[0174] Classifying the first texts and the second texts respectively to obtain the category of each first text and each second text.
[0175] Comparing the first texts and the second texts with the same category to obtain a first verification result.
[0176] In the optional embodiment, the text to be identified and the target identification document can be detected according to a preset text recognition algorithm to obtain a plurality of first image texts corresponding to the text to be identified and a plurality of second image texts corresponding to the target identification document. The preset text recognition algorithm can be a pre-trained TextFuseNet network (scene text detection network), CTPN network (Connectionist Text Proposal Network), Tesseract model, or other existing text recognition model, which is not limited in the present application.
[0177] In the optional embodiment, the to-be-identified text and all the first image texts can be taken as a plurality of first texts, and the target text and all the second image texts can be taken as a plurality of second texts.
[0178] In the optional embodiment, the first texts and the second texts can be classified according to a preset text classification model to obtain a category corresponding to each first text and a category corresponding to each second text, and the categories include information related to user certificates such as "ID number", "passport number", "social security number", "driver's license number", "name", "gender", "address", "age", "place of household registration", and the like.
[0179] In an optional embodiment, the comparing the first texts and the second texts with the same category to obtain the first verification result includes:
[0180] The first texts and the second texts with the same category are compared in sequence to calculate a first evaluation value.
[0181] The first evaluation value is compared with a preset evaluation threshold to obtain a first verification label.
[0182] A first confidence is calculated according to the first evaluation value and the number of the first texts, and the first verification label and the first confidence are taken as the first verification result.
[0183] In the optional embodiment, the first evaluation value can be initialized to 0, if a certain first text is the same as the second text with the same category, the first evaluation value is increased by 1, otherwise, no operation is performed on the first evaluation value, the first texts and the second texts with the same category are compared to obtain the first evaluation value, and the first evaluation value is a positive integer greater than or equal to 0.
[0184] In the optional embodiment, if the first evaluation value is less than the preset evaluation threshold, it indicates that the similarity between the first texts and the second texts with the same category is low, and the first verification label can be recorded as "verification failed", according to the experience of multiple tests, the preset evaluation threshold can be 9, if the evaluation value is not less than the evaluation threshold, the first verification label can be recorded as "verification passed".
[0185] In the optional embodiment, since the number of the first texts and the number of the second texts can be inconsistent, which can cause a certain deviation of the first verification label, the ratio of the evaluation value to the number of the first texts can be calculated as the first confidence, and the first verification label and the first confidence are taken as the first verification result, the higher the first confidence is, the more first texts are the same as the second texts with the same category, and the higher the credibility of the first verification label is, in the present scheme, the first confidence can be recorded as T.1 The first confidence value is in the range of [0, 1].
[0186] In an optional embodiment, the second verification unit 113 is configured to compare the to-be-identified certificate image with the target certificate image to obtain a second verification result, the second verification result including a second verification label and a second confidence value.
[0187] In an optional embodiment, the comparing the to-be-identified certificate image with the target certificate image to obtain a second verification result includes:
[0188] inputting the to-be-identified certificate image into a preset target detection model to obtain a first user image, and inputting the target certificate image into the target detection model to obtain a second user image;
[0189] performing semantic segmentation on the first user image to obtain a first face image, and performing semantic segmentation on the second user image to obtain a second face image;
[0190] comparing the first face image with the second face image to obtain a second verification result.
[0191] In the optional embodiment, to identify whether the to-be-identified certificate image and the target certificate image belong to the same user, the to-be-identified certificate image can be input into a preset target detection model to obtain a first target detection result, the first target detection result being a first user image, the first user image being a region belonging to a user's head portrait in the to-be-identified certificate image; and the target certificate image can be input into the target detection model to obtain a second target detection result, the second target detection result being a second user image, the second user image being a region belonging to a user's head portrait in the target certificate image. The preset target detection model can be an existing target detection model such as a YOLO (You Only Look Once) network, an R-CNN (Region Convolution Neural Network), an FCN (Fully Convolution Neural Network), and the like, and the present application does not limit the same.
[0192] In the optional embodiment, in order to segment the face images from the first user image and the second user image to improve the accuracy of the second verification result, the first user image can be input into a preset semantic segmentation model to obtain a first face image, and the second user image can be input into the semantic segmentation model to obtain a second face image. The preset semantic segmentation model can be a U-Net model (U-network), a SegNet model (A Deep Convolutional Encoder-Decoder Architecture for Image Segmentation, deep convolutional encoder-decoder architecture for image segmentation), or a SPNet (Pyramid Scene Parsing Network, pyramid scene parsing network), or other existing semantic segmentation models, which are not limited in the present application.
[0193] In an optional embodiment, the comparing the first face image and the second face image to obtain the second verification result comprises:
[0194] Upsampling the first face image to obtain a first upsampled image, and upsampling the second face image to obtain a second upsampled image;
[0195] Enhancing the first upsampled image to obtain a first enhanced image, and enhancing the second upsampled image to obtain a second enhanced image;
[0196] Detecting a plurality of key points in the first enhanced image and the second enhanced image according to a preset key point detection algorithm;
[0197] Comparing the key points in the first enhanced image with the key points in the second enhanced image to obtain the second verification result.
[0198] In the optional embodiment, since the first face image and the second face image are part of the to-be-identified certificate image and the target certificate image respectively, the first face image and the second face image are usually small in size and contain less image information. In order to improve the information richness of the first face image and the second face image, the first user image and the second user image need to be upscaled according to a preset upsampling algorithm to obtain a first upsampled image and a second upsampled image. The size of the first upsampled image is larger than that of the first face image, and the size of the second upsampled image is larger than that of the second face image. The preset upsampling algorithm can be a bilinear interpolation algorithm, a cubic linear interpolation algorithm, or a mean upsampling algorithm, or other existing upsampling algorithms, which are not limited in the present application. The purpose of the upsampling is to expand the features of the face image to improve the accuracy of the subsequent face comparison.
[0199] In the optional embodiment, since the up-sampling processing causes the first up-sampled image and the second up-sampled image to be blurred to a certain extent, a preset enhancement algorithm can be used to perform enhancement processing on the first up-sampled image and the second up-sampled image respectively to obtain a first enhanced image and a second enhanced image, the size of the first enhanced image is the same as that of the first up-sampled image, the size of the second enhanced image is the same as that of the second up-sampled image, and the preset enhancement algorithm can be a WLS algorithm (Weight Least Square), a Laplace filter algorithm, a Sobel filter algorithm, or other existing image enhancement algorithms.
[0200] In the optional embodiment, a plurality of first key points in the first enhanced image and a feature descriptor of each first key point can be detected according to a preset key point detection algorithm, and a plurality of second key points in the second enhanced image and a feature descriptor corresponding to each second key point can be detected according to the preset key point detection algorithm, the feature descriptor is a vector with multiple dimensions, and the preset key point detection algorithm can be a SIFT algorithm (Scale Invariant Feature Transform) or an ORB (Oriented Fast and Brief) algorithm, which is not limited in the present application.
[0201] In the optional embodiment, the feature descriptor of each first key point in the first enhanced image can be denoted as V 1i , where i represents the index of the first key point, i ∈ {1, n}, and n represents the number of the first key points; and the feature descriptor of each second key point in the second enhanced image can be denoted as V 2j , where j represents the index of the second key point, j ∈ {1, m}, and m represents the number of the second key points.
[0202] In the optional embodiment, the similarity of the corresponding feature descriptors of each first key point and each second key point can be compared respectively, and the calculation method of the similarity is as follows:
[0203] S ij = COS(V 1i ,V 2j )
[0204] , where S ij represents the similarity of the i th first key point feature descriptor and the j th second key point feature descriptor; COS represents a cosine similarity calculation formula, and COS(V 1i ,V 2j) represents a cosine similarity between the i-th key point feature descriptor in the first enhanced image and the j-th key point feature descriptor in the second enhanced image.
[0205] In the optional embodiment, a mean value of all the similarities can be calculated as a global similarity between the first enhanced image and the second enhanced image, and the global similarity is compared with a preset similarity threshold S 阈值 . If the global similarity is higher than the similarity threshold, the second verification label can be recorded as "verification passed"; if the mean value is not higher than the similarity threshold, the second verification label can be recorded as "verification failed". Exemplarily, the preset similarity threshold S 阈值 may be 0.9.
[0206] In the optional embodiment, a second confidence of the second verification label can be calculated according to the number n of the first key points and the number m of the second key points, the second confidence being used to represent a confidence degree of the second verification label. The greater the difference between the number n of the first key points and the number m of the second key points, the greater the difference between the first enhanced image and the second enhanced image, and even if the global similarity is relatively high, the confidence is relatively low. The second confidence is calculated in a manner satisfying the following piecewise function:
[0207]
[0208] wherein n represents the number of the first key points; m represents the number of the second key points; T 2 represents the second confidence.
[0209] Exemplarily, when the global similarity between the first enhanced image and the second enhanced image is 0.95, and the second confidence is 1, the second verification result is "verification passed" and the confidence is 100%.
[0210] In the optional embodiment, the second verification label and the second confidence can be taken as a second verification result.
[0211] In one optional embodiment, the computing unit 114 is configured to calculate an identity recognition result according to the first verification result and the second verification result.
[0212] In one optional embodiment, the calculating an identity recognition result according to the first verification result and the second verification result comprises:
[0213] If any one of the first verification label and the second verification label is verification failed, the identity recognition result is identification failed;
[0214] If both the first verification label and the second verification label are verification passed, the identity recognition result is recognition passed;
[0215] A global confidence of the identity recognition result is calculated according to the first confidence and the second confidence, and the identity recognition result and the global confidence are pushed to a user.
[0216] In the optional embodiment, if any one of the first verification label and the second verification label is verification failed, it indicates that the similarity between the to-be-recognized user information and the target user information is low, and the identity recognition result can be recorded as recognition not passed.
[0217] In the optional embodiment, if both the first verification label and the second verification label are verification passed, it indicates that the similarity between the to-be-recognized user information and the target user information is high, and the identity recognition result can be recorded as recognition passed.
[0218] In the optional embodiment, a global confidence of the identity recognition result can be calculated according to the first confidence and the second confidence, and the calculation method of the global confidence satisfies the following relationship:
[0219]
[0220] Wherein, T represents the global confidence, and the higher the value of the global confidence is, the higher the credibility of the identity recognition result is; T 1 represents the first confidence; T 2 represents the second confidence; and a represents a preset harmonic parameter, and the value of the harmonic parameter can be 4.5 after multiple tests.
[0221] For example, when the first confidence is 0.9 and the second confidence is 0.95, the calculation method of the global confidence is:
[0222]
[0223] The value of the global confidence is 0.99.
[0224] For example, when the identity recognition result is recognition passed and the global confidence is 0.99, “99% possibility of identity recognition passed” can be pushed to a user and an identity management unit; and when the identity recognition result is recognition not passed and the global confidence is 0.9, “90% possibility of identity recognition not passed” can be pushed to the user and the identity management unit.
[0225] The artificial intelligence-based identity recognition method constructs a natural person ID and an identity ID of a user through user information to be recognized, queries target user information according to the natural person ID and the identity ID, and obtains a first verification result and a second verification result by comparing the user information to be recognized and the target user information, and further calculates an identity recognition result according to the first verification result and the second verification result, thereby verifying the user identity from the text and image angles, and improving the accuracy of identity recognition.
[0226] As Figure 3 shown is a structural schematic diagram of an electronic device provided by an embodiment of the present application. The electronic device 1 includes a memory 12 and a processor 13. The memory 12 is used to store computer readable instructions, and the processor 13 is used to execute the computer readable instructions stored in the memory to implement the artificial intelligence-based identity recognition method of any of the above embodiments.
[0227] In an optional embodiment, the electronic device 1 further includes a bus, a computer program stored in the memory 12 and executable on the processor 13, such as an artificial intelligence-based identity recognition program.
[0228] Figure 3 Only the electronic device 1 with components 12-13 is shown, and those skilled in the art can understand that Figure 3 the structure shown does not constitute a limitation on the electronic device 1, and can include fewer or more components than shown, or combine certain components, or different component arrangements.
[0229] In combination Figure 1 , the memory 12 in the electronic device 1 stores a plurality of computer readable instructions to implement an artificial intelligence-based identity recognition method, and the processor 13 can execute the plurality of instructions to implement:
[0230] constructing a natural person ID and an identity ID of a user according to user information to be recognized, the user information to be recognized including text to be recognized and an image of identification to be recognized;
[0231] finding target user information from a preset user database according to the natural person ID and the identity ID, the target user information including target text and a target image of identification;
[0232] comparing the text to be recognized and the target text to obtain a first verification result, the first verification result including a first verification label and a first confidence;
[0233] comparing the image of identification to be recognized and the target image of identification to obtain a second verification result, the second verification result including a second verification label and a second confidence;
[0234] calculating an identity recognition result according to the first verification result and the second verification result.
[0235] Specifically, the processor 13 can refer to the specific implementation method of the above instructions Figure 1 The description of the related steps in the corresponding embodiments will not be repeated here.
[0236] Those skilled in the art can understand that the schematic diagram is only an example of the electronic device 1 and does not constitute a limitation on the electronic device 1. The electronic device 1 can be a bus type structure or a star type structure. The electronic device 1 can also include more or less other hardware or software, or different component arrangements, such as input / output devices, network access devices, etc.
[0237] It should be noted that the electronic device 1 is only an example. Other existing or future electronic products, such as those adaptable to the present application, should also be included in the protection scope of the present application and are hereby incorporated by reference.
[0238] The memory 12 includes at least one type of readable storage medium, which can be non-volatile or volatile. The readable storage medium includes a flash memory, a mobile hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 12 can be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 12 can also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 1. Further, the memory 12 can include both an internal storage unit and an external storage device of the electronic device 1. The memory 12 can be used to store application software and various data installed in the electronic device 1, such as the code of an artificial intelligence-based identity recognition program, and can also be used to temporarily store data that has been output or will be output.
[0239] The processor 13 may, in some embodiments, be composed of integrated circuits, for example, can be composed of a single packaged integrated circuit, or can be composed of multiple packaged integrated circuits of the same function or different functions, including one or more combinations of central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and various control chips, etc. The processor 13 is the control core of the electronic device 1, and connects various components of the entire electronic device 1 through various interfaces and lines, and executes programs or modules stored in the memory 12 (such as executing artificial intelligence-based identity recognition programs, etc.), and calls data stored in the memory 12, to execute various functions of the electronic device 1 and process data.
[0240] The processor 13 executes the operating system of the electronic device 1 and various installed application programs. The processor 13 executes the application programs to implement the steps in the above various artificial intelligence-based identity recognition method embodiments, such as Figure 1 the steps shown.
[0241] For example, the computer program can be divided into one or more modules / units, which are stored in the memory 12 and executed by the processor 13 to complete the present application. The one or more modules / units can be a series of computer-readable instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program in the electronic device 1. For example, the computer program can be divided into a construction unit 110, a lookup unit 111, a first verification unit 112, a second verification unit 113, and a calculation unit 114.
[0242] The integrated units implemented in the form of software function modules described above can be stored in a computer-readable storage medium. The software function modules described above are stored in a storage medium, including a plurality of instructions for causing a computer device (which can be a personal computer, a computer device, or a network device, etc.) or a processor to execute part of the artificial intelligence-based identity recognition method described in each embodiment of the present application.
[0243] The integrated modules / units of the electronic device 1, if implemented in the form of software function units and sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above-mentioned embodiment methods can also be instructed by a computer program to complete related hardware devices, and the computer program can be stored in a computer-readable storage medium. The computer program, when executed by a processor, can implement the steps of each method embodiment described above.
[0244] The computer program includes computer program code in the form of source code, object code, executable files, or some intermediate forms, etc. The computer readable medium can include any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory, and other memories, etc.
[0245] Further, the computer readable storage medium can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required by at least one function, etc.; and the storage data area can store data created according to the use of the blockchain node, etc.
[0246] The blockchain referred to in the present application is a new application mode of distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm and other computer technologies. The blockchain is essentially a decentralized database, which is a series of data blocks associated using cryptographic methods, each data block contains the information of a batch of network transactions, and is used to verify the validity (anti-fake) of the information and generate the next block. The blockchain can include a blockchain underlying platform, a platform product service layer, and an application service layer, etc.
[0247] The bus can be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one arrow is used in Figure 3 , but it does not mean that there is only one bus or one type of bus. The bus is arranged to realize the connection and communication between the memory 12 and the at least one processor 13, etc.
[0248] The embodiment of the present application also provides a computer readable storage medium (not shown in the figure), and the computer readable storage medium stores computer readable instructions. The computer readable instructions are executed by the processor in the electronic device to realize the artificial intelligence-based identity recognition method described in any of the above embodiments.
[0249] In several embodiments provided in the present application, it should be understood that the disclosed system, device and method can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. In actual implementation, there can be another division manner.
[0250] The modules described as separate components may or may not be physically separate, and the components displayed as modules may or may not be physical units, i.e. may be located in one place, or may be distributed to multiple network units. Part or all of the modules can be selected according to actual needs to achieve the purpose of the embodiment scheme.
[0251] In addition, each functional module in each embodiment of the present application can be integrated in one processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of hardware plus software functional module.
[0252] In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. The plurality of units or devices stated in the specification can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names and do not mean any specific order.
[0253] Finally, it should be pointed out that the above embodiments are only used to illustrate the technical solutions of the present application and not to limit it, although the present application has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solutions of the present application can be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. An artificial intelligence-based identity recognition method, characterized by, The method comprises: constructing a natural person ID and an identity ID of a user according to to-be-identified user information, the to-be-identified user information comprising to-be-identified text and to-be-identified certificate images; finding target user information from a preset user database according to the natural person ID and the identity ID, the target user information comprising target text and target certificate images; comparing the to-be-identified text and the target text to obtain a first verification result, the first verification result comprising a first verification label and a first confidence level; wherein the comparison of the to-be-identified text and the target text to obtain the first verification result comprises: detecting text information in the to-be-identified certificate images to obtain a plurality of first image texts, and taking all the first image texts and the to-be-identified text as a plurality of first texts; detecting text information in the target certificate images to obtain a plurality of second image texts, and taking all the second image texts and the target text as a plurality of second texts; classifying the first texts and the second texts respectively to obtain the class of each first text and each second text; and comparing the first texts and the second texts with the same class to obtain the first verification result; comparing the to-be-identified certificate images and the target certificate images to obtain a second verification result, the second verification result comprising a second verification label and a second confidence level; wherein the comparison of the to-be-identified certificate images and the target certificate images to obtain the second verification result comprises: inputting the to-be-identified certificate images into a preset target detection model to obtain a first user image, and inputting the target certificate images into the target detection model to obtain a second user image; performing semantic segmentation on the first user image to obtain a first face image, and performing semantic segmentation on the second user image to obtain a second face image; and comparing the first face image and the second face image to obtain the second verification result; calculating an identity recognition result according to the first verification result and the second verification result. 2.The artificial intelligence-based identity recognition method of claim 1, wherein, The to-be-identified text at least comprises a user name, a certificate number, and a mobile phone number, and the construction of the natural person ID and the identity ID of the user according to the to-be-identified user information comprises: querying an encoding value corresponding to the user name according to a preset encoding format; classifying the certificate number according to a preset certificate number classification model to obtain the class of the certificate number, the class comprising an ID number, a passport number, and a social security number; if the class of the certificate number is an ID number, then combining the encoding value and the certificate number as a natural person code, and calculating a hash value of the natural person code as the natural person ID corresponding to the to-be-identified user; if the class of the certificate number is not an ID number, then calculating a plurality of identity IDs corresponding to the to-be-identified user according to the encoding value, the certificate number, and the mobile phone number. 3.The artificial intelligence-based identity recognition method of claim 1, wherein, The finding of the target user information from the preset user database according to the natural person ID and the identity ID comprises: finding user data corresponding to the natural person ID from the user database according to the natural person ID; if the corresponding user data is found according to the natural person ID, then taking the user data as the target user information. If the corresponding user data cannot be queried according to the natural person ID, the user data corresponding to each identity ID is queried according to each identity ID respectively, and if the corresponding user data is queried according to any one identity ID, the user data is taken as the target user information; If the target user information cannot be queried according to the natural person ID and all identity IDs, the natural person ID, identity ID and to-be-identified user information are stored in the user database to complete user registration. 4.The artificial intelligence-based identity recognition method of claim 1, wherein The comparison of the first text and the second text with the same category to obtain a first verification result comprises: sequentially comparing the first text and the second text with the same category to calculate a first evaluation value; comparing the first evaluation value with a preset evaluation threshold to obtain a first verification label; calculating a first confidence degree according to the first evaluation value and the number of the first text, and taking the first verification label and the first confidence degree as the first verification result. 5.The artificial intelligence-based identity recognition method of claim 1, wherein The comparison of the first face image and the second face image to obtain a second verification result comprises: up-sampling the first face image to obtain a first up-sampled image, and up-sampling the second face image to obtain a second up-sampled image; enhancing the first up-sampled image to obtain a first enhanced image, and enhancing the second up-sampled image to obtain a second enhanced image; detecting a plurality of key points in the first enhanced image and the second enhanced image according to a preset key point detection algorithm; comparing the key points in the first enhanced image with the key points in the second enhanced image to obtain a second verification result, the second verification result comprising a second verification label and a second verification confidence degree.
6. An artificial intelligence-based identity recognition device, characterized by, The device comprises units for implementing the method of any one of claims 1 to 5, and the device comprises: a construction unit configured to construct a natural person ID and an identity ID of a user according to to-be-identified user information, the to-be-identified user information comprising to-be-identified text and to-be-identified certificate image; a finding unit configured to find target user information from a preset user database according to the natural person ID and the identity ID, the target user information comprising target text and target certificate image; a first verification unit configured to compare the to-be-identified text with the target text to obtain a first verification result, the first verification result comprising a first verification label and a first confidence degree; a second verification unit configured to compare the to-be-identified certificate image with the target certificate image to obtain a second verification result, the second verification result comprising a second verification label and a second confidence degree; a calculation unit configured to calculate an identity recognition result according to the first verification result and the second verification result.
7. An electronic device, comprising: The electronic device comprises: a memory storing computer readable instructions; and a processor executing the computer readable instructions stored in the memory to implement the artificial intelligence-based identity recognition method of any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: The computer readable storage medium stores computer readable instructions, and the computer readable instructions are executed by a processor in an electronic device to implement the artificial intelligence-based identity recognition method of any one of claims 1 to 5.
Citation Information
Patent Citations
Face-to-face signature verification method and device, computer equipment and storage medium
CN112288398A
Identity authentication method, device, and apparatus based on face recognition, and storage medium
WO2019153739A1