Card authentication method and device, computer equipment and storage medium

By collecting card certificate videos in the preset lighting change mode and using the frame selection algorithm to select images under different lighting conditions for combination, the problem of low efficiency and accuracy of card certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate certificate False results of verification.

CN119169319APending Publication Date: 2024-12-20PING AN TECH (SHENZHEN) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202411132810.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2024-12-20

AI Technical Summary

Technical Problem

The existing card verification and verification techniques are relatively low in efficiency and accuracy. Users need to adjust the shooting angle multiple times, which is easily affected by factors such as light and shadow, resulting in misidentification or missed identification.

Method used

In the preset lighting change mode, the card certificate video is collected from the preset angle, and the first image under standard lighting and the second and third images under flash lighting are selected through the preset frame selection algorithm, and the image is combined, and the image is combined. Combine the image to verify the fake model to generate fake results.

Benefits of technology

This avoids the operation of users adjusting the shooting angle multiple times, improves the user experience, ensures image quality, reduces the possibility of misidentification and misidentification, and improves the efficiency and accuracy of card verification and falsification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119169319A_ABST
    Figure CN119169319A_ABST
Patent Text Reader

Abstract

The embodiment of the invention belongs to the field of artificial intelligence, and relates to a card authentication method, which comprises the following steps: acquiring a card video of a card from a preset angle in a preset illumination change mode; through a preset frame selection algorithm, selecting a first image under standard illumination and a second image and a third image under flash illumination from the card video; combining the first image and the second image to obtain a first image combination, and combining the first image and the third image to obtain a second image combination; inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result; and generating a card authentication result of the card according to the first authentication result and the second authentication result. The invention further provides a card authentication device, computer equipment and a storage medium. According to the invention, the efficiency and accuracy of card authentication are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and in particular to a card authentication method, device, computer equipment and storage medium. Background Art

[0002] In the financial and insurance sectors, identity authentication is a key step in preventing fraud and ensuring transaction security, which can be achieved by verifying the authenticity of the cards that record identity information. At present, mobile card verification technology mainly relies on taking photos of the card and performing visual analysis. Existing card verification technology often requires users to adjust the shooting angle and distance multiple times. This complicated operation process not only wastes user time, but also easily leads to user fatigue and dissatisfaction. In actual applications, card photos may be affected by factors such as blur, insufficient light, and shadows, resulting in misidentification or missed identification, reducing the accuracy of verification. In addition, different shooting angles may cause the truncation or deformation of photo information, affecting the accuracy of verification. Therefore, existing card verification technology is insufficient in both efficiency and accuracy. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a card authentication method, device, computer equipment and storage medium to solve the problem of low efficiency and accuracy of the card authentication committee.

[0004] In order to solve the above technical problems, the present application provides a card authentication method, which adopts the following technical solutions:

[0005] Under the preset light change mode, capture the card video from the preset angle;

[0006] Selecting a first image under standard lighting and a second image and a third image under flash lighting from the card video by a preset frame selection algorithm;

[0007] Combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination;

[0008] Inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result;

[0009] A card authentication result of the card is generated according to the first authentication result and the second authentication result.

[0010] In order to solve the above technical problems, the embodiment of the present application further provides a card authentication device, which adopts the following technical solution:

[0011] A video acquisition module, used to acquire the card video of the card from a preset angle under a preset light change mode;

[0012] An image selection module, used to select a first image under standard lighting and a second image and a third image under flash lighting from the card video by using a preset frame selection algorithm;

[0013] An image combination module, configured to combine the first image with the second image to obtain a first image combination, and to combine the first image with the third image to obtain a second image combination;

[0014] A combination input module, used for inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result;

[0015] The result generating module is used to generate a card authentication result of the card according to the first authentication result and the second authentication result.

[0016] In order to solve the above technical problems, the embodiment of the present application further provides a computer device, which adopts the following technical solution:

[0017] Under the preset light change mode, capture the card video from the preset angle;

[0018] Selecting a first image under standard lighting and a second image and a third image under flash lighting from the card video by a preset frame selection algorithm;

[0019] Combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination;

[0020] Inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result;

[0021] A card authentication result of the card is generated according to the first authentication result and the second authentication result.

[0022] In order to solve the above technical problems, the embodiment of the present application further provides a computer-readable storage medium, which adopts the following technical solution:

[0023] Under the preset light change mode, capture the card video from the preset angle;

[0024] Selecting a first image under standard lighting and a second image and a third image under flash lighting from the card video by a preset frame selection algorithm;

[0025] Combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination;

[0026] Inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result;

[0027] A card authentication result of the card is generated according to the first authentication result and the second authentication result.

[0028] Compared with the prior art, the embodiments of the present application mainly have the following beneficial effects: shooting a card video from a preset angle under a preset lighting change mode, avoiding the user's operation of adjusting the shooting angle multiple times, and improving the user experience; using a preset frame selection algorithm to select a first image under standard lighting and a second image and a third image under flash lighting from the card video, ensuring the quality of the selected images, which is conducive to capturing the visual features of the card under different lighting conditions, and obtaining more information, ensuring the accuracy of subsequent image processing; combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination, and then inputting the first image combination and the second image combination into the card authentication model, which can more effectively extract and identify the authentication features in the image; fusing the authentication results of the two combinations to obtain the card authentication result, reducing the possibility of misidentification and missed identification, and improving the efficiency and accuracy of card authentication. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the scheme in the present application, a brief introduction is given below to the drawings required for use in the description of the embodiments of the present application. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0030] Figure 1 is an exemplary system architecture diagram to which the present application may be applied;

[0031] Figure 2 is a flow chart of an embodiment of a card authentication method according to the present application;

[0032] Figure 3 is a structural schematic diagram of an embodiment of a card authentication device according to the present application;

[0033] Figure 4 It is a structural diagram of an embodiment of a computer device according to the present application. DETAILED DESCRIPTION

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by technicians in the technical field of the present application; the terms used in the specification of the application herein are only for the purpose of describing specific embodiments and are not intended to limit the present application; the terms "including" and "having" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. The terms "first", "second", etc. in the specification and claims of the present application or the above-mentioned drawings are used to distinguish different objects, not to describe a specific order.

[0035] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0036] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the accompanying drawings.

[0037] like Figure 1 As shown, the system architecture 100 may include terminal devices 101, 102, 103, a network 104 and a server 105. The network 104 is used to provide a medium for communication links between the terminal devices 101, 102, 103 and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0038] Users can use terminal devices 101, 102, 103 to interact with server 105 through network 104 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 101, 102, 103, such as web browser applications, shopping applications, search applications, instant messaging tools, email clients, social platform software, etc.

[0039] The terminal devices 101, 102, and 103 can be various electronic devices with display screens and supporting web browsing, including but not limited to smart phones, tablet computers, e-book readers, MP3 players (Moving Picture Experts Group Audio Layer III), MP4 (Moving Picture Experts Group Audio Layer IV) players, laptop computers, desktop computers, etc.

[0040] The server 105 may be a server that provides various services, such as a background server that provides support for web pages displayed on the terminal devices 101 , 102 , and 103 .

[0041] It should be noted that the card authentication method provided in the embodiment of the present application is generally executed by a terminal device, and accordingly, the card authentication device is generally disposed in the terminal device.

[0042] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0043] Continue to refer Figure 2 , shows a flow chart of an embodiment of a card authentication method according to the present application. The card authentication method comprises the following steps:

[0044] Step S201: Under a preset illumination change mode, a card video of the card is captured from a preset angle.

[0045] In this embodiment, the electronic device (eg Figure 1 The terminal device shown in the figure can communicate with the server through a wired connection or a wireless connection. It should be noted that the above wireless connection method may include but is not limited to 3G / 4G / 5G connection, Wi-Fi connection, Bluetooth connection, Wi MAX connection, Zigbee connection, UWB (Ultra Wi-Fi Band) connection, and other wireless connection methods currently known or to be developed in the future.

[0046] Specifically, the terminal instructs the user to place the card at a fixed shooting angle and start the shooting process to obtain the card video. Usually, the video is recorded from the front of the card. The video recording follows the preset lighting change mode, which means that there will be changes in the flash on and off during the shooting process.

[0047] Step S202: Selecting a first image under standard lighting and a second image and a third image under flash lighting from the card video using a preset frame selection algorithm.

[0048] Specifically, the card video contains a large number of video frames. For example, a 1.5-second recording contains about 30 frames of images. Card authentication only requires two frames in which the authentication features show obvious texture changes or optical changes. The required images can be obtained through the frame selection algorithm.

[0049] The video is processed using the preset frame selection algorithm. The frame selection algorithm detects each frame in the card video from the preset detection dimension and selects the frame images that meet the conditions. It selects a suitable first image under standard lighting (no flash) and two suitable images under flash lighting as the second and third images.

[0050] Step S203: combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination.

[0051] Specifically, the first image without flash and the second image with flash are combined into a first image combination; similarly, the first image and the third image are combined into a second image combination. In one embodiment, the combination method can be feature-level fusion, that is, extracting features of the two images and fusing them.

[0052] Step S204: input the first image combination into the card authentication model to obtain a first authentication result, and input the second image combination into the card authentication model to obtain a second authentication result.

[0053] Specifically, the first image combination and the second image combination are respectively input into a pre-trained card authentication model. The model can be constructed based on a Shufflenet network, and after a large amount of training, it can identify authentication features in the image. The model will output a first authentication result of the first image combination and a second authentication result of the second image combination, which represent the authenticity judgment of each pair of combined images.

[0054] Shufflenet is a lightweight convolutional neural network designed for resource-constrained environments such as mobile devices and embedded systems, aiming to reduce computational cost and number of parameters while maintaining high accuracy. It improves efficiency through two innovations: Channel Shuffling and Group Convolution.

[0055] Shufflenet divides the standard convolution operation into multiple groups, each group performs convolution operation separately, which significantly reduces the amount of calculation, but also leads to insufficient information exchange between channels.

[0056] Channel shuffling is to solve the problems caused by group convolution. After each group convolution, the network rearranges (shuffles) each channel so that the feature information between different groups can be fully integrated, ensuring the transmission and exchange of feature information in the entire network and improving the expression ability of the model.

[0057] Channel shuffling and grouped convolution enable Shufflenet to achieve significant optimization in computational complexity and model size, making it very suitable for running in resource-constrained environments while achieving high accuracy in tasks such as image classification.

[0058] Step S205: generating a card authentication result of the card according to the first authentication result and the second authentication result.

[0059] Specifically, the first authentication result and the second authentication result are combined to generate the final card authentication result. The combination method can be a logical operation or a weighted voting mechanism to improve the reliability of the result.

[0060] Furthermore, the above step S205 may include: when both the first authentication result and the second authentication result show that the card is authentic, generating a card authentication result indicating that the card is authentic; when both the first authentication result and the second authentication result do not show that the card is authentic, generating a card authentication result indicating that the card is false.

[0061] Specifically, the first image combination and the second image combination are respectively input into the card authentication model to obtain a first authentication result and a second authentication result. The two authentication results are checked. If both results indicate that the card is authentic, a final card authentication result is generated to indicate that the card is authentic.

[0062] If one or both of the first authentication result and the second authentication result show that the card certificate is fake, a final card authentication result is generated to indicate that the card certificate is fake.

[0063] This judgment method ensures strict control of the authenticity of the card and improves the accuracy and security of counterfeit identification.

[0064] In this embodiment, the final authentication result indicating that the card certificate is authentic is generated only when both the first authentication result and the second authentication result show that the card certificate is authentic, thereby ensuring the rigor of the judgment. The double verification mechanism improves the security of the authentication of the card certificate and reduces the risk of misjudgment. When one of the two authentication results shows that the card certificate is false, the final authentication result indicating that the card certificate is false is generated. The conservative judgment strategy prevents the passage of false cards and improves the ability to identify false cards.

[0065] In this embodiment, the card video is shot from a preset angle under a preset illumination change mode, thereby avoiding the user's operation of adjusting the shooting angle multiple times and improving the user experience; the first image under standard illumination and the second image and the third image under flash illumination are selected from the card video using a preset frame selection algorithm, thereby ensuring the quality of the selected images, facilitating capturing the visual features of the card under different illumination conditions and obtaining more information, thereby ensuring the accuracy of subsequent image processing; the first image is combined with the second image to obtain a first image combination, and the first image is combined with the third image to obtain a second image combination, and then the first image combination and the second image combination are input into the card authentication model, thereby being able to more effectively extract and identify authentication features in the image; the authentication results of the two combinations are fused to obtain the card authentication result, thereby reducing the possibility of misidentification and missed identification and improving the efficiency and accuracy of card authentication.

[0066] Furthermore, the above step S201 may include: turning on the flash, and recording the card video from a preset angle under flash lighting; turning off the flash, and continuing to record the card video from a preset angle under standard lighting to obtain a card video of the card.

[0067] Specifically, the user places the card at a fixed shooting angle, and the terminal can start the flash. Under the flash light, the terminal continuously captures multiple frames of images to form a video. This video contains clear details of the card under the flash light, especially some authentication features that can be seen under strong light.

[0068] The flash was then turned off and the video was switched to standard lighting conditions without flash to continue shooting multiple frames. The second half of the video recorded the state of the card under natural light, retaining the natural color and texture of the card.

[0069] The result is a video of the card under two lighting conditions, which improves image diversity and quality. The video frame under flash lighting can highlight certain authentication features of the card, such as invisible anti-counterfeiting marks and reflective elements, while the video frame under standard lighting retains the natural appearance and details of the card. The user only needs to point the card at the terminal and take a single shot.

[0070] In this embodiment, two modes, flash and standard lighting, are used for video recording, ensuring that the visual features of the card under different lighting conditions are captured, so that more information can be obtained, which helps the subsequent frame selection algorithm to provide high-quality input for the counterfeit detection model.

[0071] Furthermore, the above step S202 may include: gray-scaling each frame image in the card video to obtain a gray-scale image of each frame image; cropping each gray-scale image to obtain a target image in each gray-scale image; screening target images whose gray-scale values ​​meet the gray-scale value conditions to obtain multiple first target images; screening first target images whose clarity meets the clarity conditions to obtain multiple candidate images; selecting a candidate image under standard lighting as the first image, and selecting two candidate images under flash lighting as the second image and the third image, respectively.

[0072] Specifically, each frame of the card video is grayed to obtain a grayscale image of each frame, so as to reduce the complexity and computational complexity of the image data and retain the main structural information of the image. A grayscale image only contains brightness information but not color information.

[0073] Each grayscale image is cropped to extract the target area in the image, that is, the part where the card is located. Cropping is usually based on a preset ROI (Region of Interest) to ensure that subsequent processing is only for the card itself and other irrelevant content in the image is ignored.

[0074] The target image obtained after cropping is screened for grayscale value. A grayscale value threshold is set in advance. If the grayscale value of the target image is less than or equal to the grayscale value threshold, the grayscale value condition is met, that is, the brightness meets the condition. In one embodiment, if the grayscale value of the target image is greater than 220, it is considered to meet the grayscale value condition. Through the grayscale value condition, target images whose brightness does not meet the condition can be eliminated, which is beneficial to subsequent counterfeit detection analysis. After screening, multiple first target images are obtained, and their grayscale values ​​are all within a suitable range, ensuring the visibility of the image.

[0075] Next, the clarity of the first target image is screened. Clarity is one of the important indicators for measuring image quality, and is particularly important for counterfeit detection analysis. The clarity value of the first target image can be calculated. If the clarity value meets the preset clarity condition, the clarity of the first target image meets the requirements and can be used as a candidate image, ensuring the accuracy of subsequent counterfeit detection analysis.

[0076] From the candidate images, one image under standard illumination is selected as the first image, and two images under flash illumination are selected as the second image and the third image respectively. These three images will be used as the input of the authentication model for the subsequent authentication analysis process.

[0077] In one embodiment, according to a preset acquisition time period (e.g., the acquisition process is completed within 1.5 seconds), the time when the flash is turned on and off is known. Therefore, the frames with the flash turned on and off can be automatically distinguished according to the time sequence of acquisition, so as to select the image under standard lighting and the image under flash lighting.

[0078] In this embodiment, through the steps of grayscale processing, cropping, grayscale value screening and clarity screening, low-quality images are effectively eliminated and high-quality images are retained for counterfeit identification analysis, thereby reducing the algorithm's misrecognition rate and improving the accuracy of counterfeit identification; in addition, the unique frame selection algorithm and efficient image processing process make the entire counterfeit identification process faster and improve processing efficiency.

[0079] Furthermore, the above-mentioned step of screening the first target image whose clarity meets the clarity condition to obtain multiple candidate images may include: for each first target image, performing Fourier transform on the first target image to obtain a power spectrum of the first target image; performing spectral center exchange on the power spectrum to obtain a second target image; performing inverse Fourier transform on the second target image to obtain a third target image; setting the center area of ​​the third target image to zero according to a preset area size to obtain a fourth target image, and calculating the pixel average of the fourth target image; when the pixel average is greater than a preset average threshold, determining that the first target image meets the clarity condition, and using the first target image as a candidate image.

[0080] Specifically, each first target image is subjected to Fourier transform, and converted from the spatial domain to the frequency domain to obtain the power spectrum of the image. The power spectrum reflects the energy distribution of the image at different frequency components.

[0081] The power spectrum is subjected to spectral center exchange, that is, the center and edge of the spectrum are exchanged. This process rearranges the frequency components so that the low-frequency components are located in the central area of ​​the image. In one embodiment, the size of the first target image is N×N. After obtaining its power spectrum, it is divided into four quadrants with the center point of the power spectrum image as the segmentation point. The spectral center exchange is to exchange the first quadrant with the third quadrant, and the second quadrant with the fourth quadrant.

[0082] After the center of the spectrum is exchanged, a second target image is obtained, and an inverse Fourier transform is performed on the second target image to convert it from the frequency domain back to the spatial domain to obtain a third target image.

[0083] Then obtain two pre-set hyperparameters F1 and F2, where F1 is the region size and F2 is the average value threshold of the pixel.

[0084] According to the preset area size, the central area of ​​the third target image is set to zero, thereby removing the low-frequency components (usually corresponding to the overall brightness and general outline of the image) and retaining the high-frequency components (usually corresponding to the details of the image) to obtain the fourth target image. The central area is set to zero, and the pixel values ​​in the area [(N-F1) / 2:(N+F1) / 2,(N-F1) / 2:(N+F1) / 2] in the third target image are set to 0 (continuing from the previous text, the size of the third target image is N×N).

[0085] The pixel average value of the fourth target image is calculated, and this average value reflects the clarity of the image details. If the pixel average value of the fourth target image is greater than the preset average value threshold F2, it means that the image has sufficient clarity. At this time, it is determined that the first target image meets the clarity condition and is used as a candidate image; otherwise, it is considered that the first target image does not meet the clarity condition.

[0086] In this embodiment, the image is converted from the spatial domain to the frequency domain through Fourier transform, so that the frequency characteristics of the image can be displayed; the frequency components of the image are further processed through spectrum center exchange and inverse Fourier transform, so that low-frequency components and high-frequency components can be distinguished; the low-frequency components are removed by setting the central area to zero, retaining high-frequency details, and calculating the pixel average of the high-frequency part of the image to effectively evaluate the clarity of the image; the preset average value threshold is used to screen out images that meet the clarity conditions, ensuring that high-quality images are used in subsequent processing, thereby improving the accuracy of image clarity judgment and enhancing the image processing capabilities in various complex environments, making card authentication more accurate.

[0087] Furthermore, before the above-mentioned step of setting the central area of ​​the third target image to zero according to a preset area size to obtain the fourth target image, it can also include: obtaining a data set containing multiple clear images and multiple blurred images; at each candidate area size, calculating the pixel average value of all images in the data set; among the pixel average values ​​of each clear image, selecting the minimum pixel average value as the candidate average value threshold; based on the candidate average value threshold, calculating the recognition accuracy of each blurred image according to the pixel average values ​​and labels of each blurred image; selecting the candidate area size corresponding to the maximum recognition accuracy and its corresponding candidate average value threshold, respectively as the area size and average value threshold when applied.

[0088] Specifically, a dataset is prepared, which contains a large number of labeled clear images and blurred images. The clear images will be used as positive samples X_P, and the blurred images will be used as negative samples X_N. These images will be used to optimize the region size and the average value threshold.

[0089] The interval range of candidate region sizes [F1_a, F1_b] is preset. For each possible candidate region size within the interval, the pixel average value of all images in the data set at this region size is calculated (the calculation process refers to the description above. The central area of ​​the image is set to zero according to the candidate region size, and then the pixel average value of each pixel in the new image is calculated) to find the image feature performance under different region sizes.

[0090] For each candidate region size, the smallest pixel average value is selected from the pixel average values ​​of all clear images as the candidate average value threshold corresponding to the candidate region size.

[0091] The obtained candidate average value threshold is used to calculate the pixel average value of each blurred image in the candidate area size (the calculation process refers to the description above, the central area of ​​the image is set to zero according to the candidate area size, and then the pixel average value of each pixel in the new image is calculated), and based on the label of the blurred image (the label indicates that the image is a blurred image), its recognition accuracy pre_N is calculated. Recognition accuracy refers to the accuracy of the algorithm in recognizing blurred images.

[0092] That is, after calculating the pixel average value of each blurred image at the candidate area size, the pixel average value of each blurred image is compared with the candidate average value threshold corresponding to the candidate area size. If the pixel average value is less than or equal to the candidate average value threshold, it means that the algorithm being optimized recognizes that the image is indeed a blurred image and completes the correct recognition. Then, the recognition accuracy can be calculated based on the prediction results of each blurred image.

[0093] Finally, the candidate region size with the highest recognition accuracy and its corresponding candidate average value threshold are selected as the region size and average value threshold in actual application, ensuring that the system uses the optimal parameters for image clarity judgment in the real environment.

[0094] In this embodiment, the preset data set includes two types of images, clear and blurred, which provides a reliable basis for parameter optimization; at each candidate area size, the pixel averages of all images are calculated and compared, so that the performance of image features at different candidate area sizes can be fully evaluated; the minimum pixel average of each clear image is selected as the candidate threshold to ensure that the judgment standard of clear images is strict at different candidate area sizes; the recognition accuracy of the blurred image is calculated to find the candidate area size and average threshold that make the blurred image judgment most accurate; the parameters with the highest recognition accuracy are selected to ensure that the image clarity can be judged more accurately in actual applications, thereby improving the accuracy of card authentication. The data-driven parameter optimization method enhances the adaptability in complex environments and ensures the reliability of image clarity judgment under various lighting and shooting conditions.

[0095] Furthermore, the above-mentioned step of inputting the first image combination into the card and certificate authentication model to obtain the first authentication result may include: inputting the first image combination into the card and certificate authentication model for feature extraction to obtain a first authentication feature vector of the first image and a second authentication feature vector of the second image; combining the first authentication feature vector and the second authentication feature vector to obtain a combined authentication feature vector; and inputting the combined authentication feature vector into a classifier in the card and certificate authentication model to obtain the first authentication result.

[0096] Specifically, the first image combination (the first image in the non-flash mode and the second image in the flash mode) is input into the card authentication model. The card authentication model processes the first image and the second image respectively, extracts their authentication features, and generates a first authentication feature vector and a second authentication feature vector.

[0097] The anti-counterfeiting feature vectors extracted from the two images are combined to form a comprehensive combined anti-counterfeiting feature vector, which realizes the fusion of feature information under two different lighting conditions and enhances the comprehensiveness and robustness of feature representation.

[0098] The combined authentication feature vector is input into the classifier in the card authentication model. The classifier determines the authenticity of the card based on the combined authentication feature vector and generates a first authentication result.

[0099] It can be understood that the card authentication model processes the second image combination in the same manner, which will not be described in detail here.

[0100] In this embodiment, the first image in the non-flash mode and the second image in the flash mode are combined and input into the model, rich authentication features are extracted from different lighting conditions, and the first authentication feature vector and the second authentication feature vector are generated, thereby ensuring the comprehensiveness of the feature information; the two feature vectors are combined, and the feature information under different lighting conditions is comprehensively utilized to form a more robust combined authentication feature vector; the combined feature vector is input into the classifier for classification processing, which can more accurately judge the authenticity of the card, improve the accuracy of feature extraction and classification, and enhance the authentication ability of the card in various complex environments.

[0101] It should be emphasized that in order to further ensure the privacy and security of the above-mentioned card video, the above-mentioned card video can also be stored in a node of a blockchain.

[0102] The blockchain referred to in this application is a new application model of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0103] The embodiments of the present application can acquire and process relevant data based on artificial intelligence technology. Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results.

[0104] AI basic technologies generally include sensors, dedicated AI chips, cloud computing, distributed storage, big data processing technology, operation / interaction systems, mechatronics, etc. AI software technologies mainly include computer vision technology, robotics technology, biometrics technology, speech processing technology, natural language processing technology, and machine learning / deep learning.

[0105] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through computer-readable instructions, and the computer-readable instructions can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, the aforementioned storage medium can be a non-volatile storage medium such as a disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM).

[0106] It should be understood that, although the steps in the flowchart of the accompanying drawings are displayed in sequence as indicated by the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least a part of the steps in the flowchart of the accompanying drawings may include multiple sub-steps or multiple stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.

[0107] Further references Figure 3 , as a response to the above Figure 2 In order to realize the method shown in the figure, the present application provides an embodiment of a card authentication device. Figure 2 Corresponding to the method embodiment shown, the device can be specifically applied to various electronic devices.

[0108] like Figure 3 As shown, the card authentication device 300 of this embodiment includes: a video acquisition module 301, an image selection module 302, an image combination module 303, a combination input module 304 and a result generation module 305, wherein:

[0109] The video acquisition module 301 is used to acquire the card video of the card from a preset angle under a preset illumination change mode.

[0110] The image selection module 302 is used to select the first image under standard lighting and the second image and the third image under flash lighting from the card video by using a preset frame selection algorithm.

[0111] The image combination module 303 is used to combine the first image with the second image to obtain a first image combination, and to combine the first image with the third image to obtain a second image combination.

[0112] The combination input module 304 is used to input the first image combination into the card authentication model to obtain a first authentication result, and to input the second image combination into the card authentication model to obtain a second authentication result.

[0113] The result generation module 305 is used to generate a card authentication result of the card according to the first authentication result and the second authentication result.

[0114] In this embodiment, the card video is shot from a preset angle under a preset illumination change mode, thereby avoiding the user's operation of adjusting the shooting angle multiple times and improving the user experience; the first image under standard illumination and the second image and the third image under flash illumination are selected from the card video using a preset frame selection algorithm, thereby ensuring the quality of the selected images, facilitating capturing the visual features of the card under different illumination conditions and obtaining more information, thereby ensuring the accuracy of subsequent image processing; the first image is combined with the second image to obtain a first image combination, and the first image is combined with the third image to obtain a second image combination, and then the first image combination and the second image combination are input into the card authentication model, thereby being able to more effectively extract and identify authentication features in the image; the authentication results of the two combinations are fused to obtain the card authentication result, thereby reducing the possibility of misidentification and missed identification and improving the efficiency and accuracy of card authentication.

[0115] In some optional implementations of this embodiment, the video acquisition module 301 may include:

[0116] The flash recording submodule is used to turn on the flash and record the card video from a preset angle under the flash light.

[0117] The standard recording submodule is used to turn off the flash and continue to record the card video from a preset angle under standard lighting to obtain the card video of the card.

[0118] In some optional implementations of this embodiment, the image selection module 302 may include:

[0119] The grayscale processing submodule is used to perform grayscale processing on each frame image in the card video to obtain a grayscale image of each frame image.

[0120] The image cropping submodule is used to crop each grayscale image to obtain a target image in each grayscale image.

[0121] The grayscale screening submodule is used to screen target images whose grayscale values ​​meet the grayscale value conditions to obtain multiple first target images.

[0122] The clarity screening submodule is used to screen the first target image whose clarity meets the clarity condition to obtain multiple candidate images.

[0123] The candidate selection submodule is used to select a candidate image under standard illumination as the first image, and select two candidate images under flash illumination as the second image and the third image respectively.

[0124] In some optional implementations of this embodiment, the clear screening submodule may include:

[0125] The Fourier transform unit is used to perform Fourier transform on each first target image to obtain a power spectrum of the first target image.

[0126] The center exchange unit is used to perform spectrum center exchange on the power spectrum to obtain a second target image.

[0127] The inverse transform unit is used to perform inverse Fourier transform on the second target image to obtain a third target image.

[0128] The center zeroing unit is used to perform center zeroing on the third target image according to a preset area size to obtain a fourth target image, and calculate a pixel average value of the fourth target image.

[0129] The clarity determination unit is used to determine that the first target image meets the clarity condition when the pixel average value is greater than a preset average value threshold, and use the first target image as a candidate image.

[0130] In some optional implementations of this embodiment, the clear screening submodule may further include:

[0131] The data set acquisition unit is used to acquire a data set including a plurality of clear images and a plurality of blurred images.

[0132] The average calculation unit is used to calculate the pixel average of all images in the data set at each candidate region size.

[0133] The minimum selection unit is used to select the minimum pixel average value from the pixel average values ​​of each clear image as the candidate average value threshold value.

[0134] The accuracy calculation unit is used to calculate the recognition accuracy of each blurred image based on the candidate average value threshold and the pixel average value and label of each blurred image.

[0135] The maximum selection unit is used to select the candidate region size corresponding to the maximum recognition accuracy and its corresponding candidate average value threshold, which are used as the region size and average value threshold in application respectively.

[0136] In some optional implementations of this embodiment, the combined input module 304 may include:

[0137] The first input submodule is used to input the first image combination into the card authentication model for feature extraction to obtain a first authentication feature vector of the first image and a second authentication feature vector of the second image.

[0138] The vector combination submodule is used to combine the first authentication feature vector and the second authentication feature vector to obtain a combined authentication feature vector.

[0139] The combined input submodule is used to input the combined authentication feature vector into the classifier in the card authentication model to obtain a first authentication result.

[0140] In some optional implementations of this embodiment, the result generation module 305 may include:

[0141] The first generating submodule is used for generating a card authentication result indicating that the card is authentic when both the first authentication result and the second authentication result indicate that the card is authentic.

[0142] The second generation submodule is used to generate a card authentication result indicating that the card is false when the first authentication result and the second authentication result do not both indicate that the card is authentic.

[0143] To solve the above technical problems, the present application also provides a computer device. Figure 4 , Figure 4 This is a basic structural block diagram of the computer device in this embodiment.

[0144] The computer device 4 includes a memory 41, a processor 42, and a network interface 43 that are interconnected through a system bus. It should be noted that the figure only shows a computer device 4 with components 41-43, but it should be understood that it is not required to implement all the components shown, and more or fewer components can be implemented instead. Among them, those skilled in the art can understand that the computer device here is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), digital processors (DSPs), embedded devices, etc.

[0145] The computer device may be a computing device such as a desktop computer, a notebook, a PDA, a cloud server, etc. The computer device may interact with a user through a keyboard, a mouse, a remote controller, a touch pad, or a voice control device.

[0146] The memory 41 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, hard disk, multimedia card, card-type memory (for example, SD or DX memory, etc.), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, etc. In some embodiments, the memory 41 can be an internal storage unit of the computer device 4, such as a hard disk or memory of the computer device 4. In other embodiments, the memory 41 can also be an external storage device of the computer device 4, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (FlashCard), etc. equipped on the computer device 4. Of course, the memory 41 can also include both the internal storage unit of the computer device 4 and its external storage device. In this embodiment, the memory 41 is generally used to store the operating system and various application software installed on the computer device 4, such as computer-readable instructions of the card authentication method, etc. In addition, the memory 41 can also be used to temporarily store various types of data that have been output or are to be output.

[0147] The processor 42 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips in some embodiments. The processor 42 is generally used to control the overall operation of the computer device 4. In this embodiment, the processor 42 is used to run the computer-readable instructions stored in the memory 41 or process data, such as running the computer-readable instructions of the card authentication method.

[0148] The network interface 43 may include a wireless network interface or a wired network interface. The network interface 43 is generally used to establish a communication connection between the computer device 4 and other electronic devices.

[0149] The computer device provided in this embodiment can execute the above-mentioned card authentication method, which can be the card authentication method of each of the above-mentioned embodiments.

[0150] In this embodiment, the card video is shot from a preset angle under a preset illumination change mode, thereby avoiding the user's operation of adjusting the shooting angle multiple times and improving the user experience; the first image under standard illumination and the second image and the third image under flash illumination are selected from the card video using a preset frame selection algorithm, thereby ensuring the quality of the selected images, facilitating capturing the visual features of the card under different illumination conditions and obtaining more information, thereby ensuring the accuracy of subsequent image processing; the first image is combined with the second image to obtain a first image combination, and the first image is combined with the third image to obtain a second image combination, and then the first image combination and the second image combination are input into the card authentication model, thereby being able to more effectively extract and identify authentication features in the image; the authentication results of the two combinations are fused to obtain the card authentication result, thereby reducing the possibility of misidentification and missed identification and improving the efficiency and accuracy of card authentication.

[0151] The present application also provides another implementation, namely, providing a computer-readable storage medium, wherein the computer-readable storage medium stores computer-readable instructions, and the computer-readable instructions can be executed by at least one processor to enable the at least one processor to perform the steps of the card authentication method as described above.

[0152] In this embodiment, the card video is shot from a preset angle under a preset illumination change mode, thereby avoiding the user's operation of adjusting the shooting angle multiple times and improving the user experience; the first image under standard illumination and the second image and the third image under flash illumination are selected from the card video using a preset frame selection algorithm, thereby ensuring the quality of the selected images, facilitating capturing the visual features of the card under different illumination conditions and obtaining more information, thereby ensuring the accuracy of subsequent image processing; the first image is combined with the second image to obtain a first image combination, and the first image is combined with the third image to obtain a second image combination, and then the first image combination and the second image combination are input into the card authentication model, thereby being able to more effectively extract and identify authentication features in the image; the authentication results of the two combinations are fused to obtain the card authentication result, thereby reducing the possibility of misidentification and missed identification and improving the efficiency and accuracy of card authentication.

[0153] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0154] Obviously, the embodiments described above are only some embodiments of the present application, rather than all embodiments. The preferred embodiments of the present application are given in the accompanying drawings, but they do not limit the patent scope of the present application. The present application can be implemented in many different forms. On the contrary, the purpose of providing these embodiments is to make the understanding of the disclosure of the present application more thorough and comprehensive. Although the present application is described in detail with reference to the aforementioned embodiments, for those skilled in the art, it is still possible to modify the technical solutions recorded in the aforementioned specific implementation methods, or to perform equivalent replacement of some of the technical features therein. Any equivalent structure made using the contents of the specification and drawings of this application, directly or indirectly used in other related technical fields, is similarly within the scope of patent protection of this application.

Claims

1. A card authentication method, characterized in that: The steps include: Under the preset light change mode, capture the card video from the preset angle; Selecting a first image under standard lighting and a second image and a third image under flash lighting from the card video by a preset frame selection algorithm; Combining the first image with the second image to obtain a first image combination, and combining the first image with the third image to obtain a second image combination; Inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result; A card authentication result of the card is generated according to the first authentication result and the second authentication result.

2. The card authentication method according to claim 1, characterized in that: The step of capturing a card video of the card from a preset angle under a preset illumination change mode includes: Turn on the flash and record the card from a preset angle under the flash light; The flash is turned off, and the video of the card is continued to be recorded from the preset angle under standard lighting to obtain a card video of the card.

3. The card authentication method according to claim 1, characterized in that: The step of selecting the first image under standard lighting and the second image and the third image under flash lighting from the card video by using a preset frame selection algorithm includes: Performing grayscale processing on each frame image in the card video to obtain a grayscale image of each frame image; Cropping each grayscale image to obtain a target image in each grayscale image; Screening target images whose grayscale values ​​meet the grayscale value condition to obtain a plurality of first target images; Screening a first target image whose definition meets the definition condition to obtain a plurality of candidate images; A candidate image under standard illumination is selected as the first image, and two candidate images under flash illumination are selected as the second image and the third image respectively.

4. The card authentication method according to claim 3, characterized in that: The step of screening the first target image whose definition meets the definition condition to obtain a plurality of candidate images comprises: For each first target image, performing Fourier transform on the first target image to obtain a power spectrum of the first target image; Performing spectrum center swapping on the power spectrum to obtain a second target image; Performing inverse Fourier transform on the second target image to obtain a third target image; According to a preset area size, the central area of ​​the third target image is set to zero to obtain a fourth target image, and a pixel average value of the fourth target image is calculated; When the pixel average value is greater than a preset average value threshold, it is determined that the first target image meets the clarity condition, and the first target image is used as a candidate image.

5. The card authentication method according to claim 4, characterized in that: Before the step of performing zeroing of the central area of ​​the third target image according to the preset area size to obtain the fourth target image, the method further includes: Get a dataset containing multiple clear images and multiple blurred images; At each candidate region size, calculating the pixel average of all images in the data set; Among the pixel averages of each clear image, the minimum pixel average is selected as the candidate average threshold; Based on the candidate average value threshold, according to the pixel average value and label of each blurred image, calculating the recognition accuracy of each blurred image; The candidate region size corresponding to the maximum recognition accuracy and its corresponding candidate average value threshold are selected as the region size and average value threshold during application, respectively.

6. The card authentication method according to claim 1, characterized in that: The step of inputting the first image combination into the card authentication model to obtain a first authentication result comprises: Inputting the first image combination into a card authentication model for feature extraction to obtain a first authentication feature vector of the first image and a second authentication feature vector of the second image; Combining the first authentication feature vector and the second authentication feature vector to obtain a combined authentication feature vector; The combined authentication feature vector is input into the classifier in the card authentication model to obtain a first authentication result.

7. The card authentication method according to claim 1, characterized in that: The step of generating the card authentication result of the card according to the first authentication result and the second authentication result comprises: When both the first authentication result and the second authentication result show that the card certificate is authentic, generating a card authentication result showing that the card certificate is authentic; When the first authentication result and the second authentication result do not both show that the card certificate is authentic, a card authentication result indicating that the card certificate is fake is generated.

8. A card authentication device, characterized in that: include: A video acquisition module, used to acquire the card video of the card from a preset angle under a preset light change mode; An image selection module, used to select a first image under standard lighting and a second image and a third image under flash lighting from the card video by using a preset frame selection algorithm; An image combination module, configured to combine the first image with the second image to obtain a first image combination, and to combine the first image with the third image to obtain a second image combination; A combination input module, used for inputting the first image combination into a card authentication model to obtain a first authentication result, and inputting the second image combination into the card authentication model to obtain a second authentication result; The result generating module is used to generate a card authentication result of the card according to the first authentication result and the second authentication result.

9. A computer device, comprising a memory and a processor, wherein the memory stores computer-readable instructions, and the processor implements the steps of the card authentication method according to any one of claims 1 to 7 when executing the computer-readable instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-readable instructions, and when the computer-readable instructions are executed by a processor, the steps of the card authentication method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Anti-counterfeit detection method and device, electronic device, and storage medium

    CN109359502A

  • Infrared image quality evaluation method and infrared equipment detection method using same

    CN117710298A

  • Mobile terminal card authentic identification method, device, equipment and medium

    CN118097385A