Certificate testing method, device, equipment and computer readable storage medium

By detecting the certificate type at the terminal and generating matching certificates for testing, the problem of low efficiency of certificate testing and privacy leakage is solved, and an efficient and safe certificate testing process is realized.

CN111178238BActive Publication Date: 2024-09-20北京砚拓科技有限公司
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN201911373722.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-25
Publication Date
2024-09-20
Estimated Expiration
2039-12-25

AI Technical Summary

Technical Problem

The efficiency of document testing in the existing technology is low, and it is difficult to avoid the problem of personal privacy leakage.

Method used

When conducting a certificate test through the detection terminal, the certificate type is determined and a matching test certificate is generated. If no matching certificate is received, a second test certificate is generated based on the type and scanned and entered to ensure test validity and privacy protection.

Benefits of technology

It improves the efficiency of certificate testing, avoids leakage of personal privacy, and solves the problem of being unable to test due to lack of test certificates.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111178238B
    Figure CN111178238B
Patent Text Reader

Abstract

The present invention relates to the field of image processing technology, and discloses a certificate testing method and device, equipment and computer-readable storage medium, the method comprising: when it is detected that a terminal performs a certificate test, determining the test certificate type corresponding to the certificate test, and detecting whether the terminal receives a first test certificate matching the test certificate type; if the terminal does not receive the first test certificate matching the test certificate type, generating a second test certificate based on the test certificate type; scanning the second test certificate to obtain target certificate information in the second test certificate, and entering the target certificate information into the terminal to complete the certificate test. The method solves the technical problem of low test efficiency when performing certificate testing in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a document testing method, device, equipment and computer-readable storage medium. Background Art

[0002] With the widespread use of OCR (Optical Character Recognition) technology, there are a large number of scenarios in APP for automatic identification of documents (ID cards, bank cards, passports, Hong Kong and Macao passes, Taiwan compatriots' certificates, etc.), which brings certain difficulties to the testing work. Since OCR scanning is basically implemented by embedding a third-party SDK (the abbreviation of Software Development Kit, which means "software development kit" in Chinese), it is difficult to perform mock (testing) at the interface or other levels. This requires testers to prepare a large number of test documents, and personal privacy will inevitably be leaked during the test, resulting in low testing efficiency when testers are conducting document testing. Summary of the invention

[0003] The main purpose of the present invention is to provide a certificate testing method, device, equipment and computer storage medium, aiming to solve the technical problem of low testing efficiency when performing certificate testing in the prior art.

[0004] To achieve the above object, the present invention provides a certificate testing method, the certificate testing method comprising:

[0005] When it is detected that the terminal performs a certificate test, determining a test certificate type corresponding to the certificate test, and detecting whether the terminal receives a first test certificate matching the test certificate type;

[0006] If the terminal does not receive a first test certificate matching the test certificate type, generating a second test certificate based on the test certificate type;

[0007] The second test certificate is scanned to obtain target certificate information in the second test certificate, and the target certificate information is entered into the terminal to complete the certificate test.

[0008] Optionally, the step of generating a second test certificate based on the test certificate type comprises:

[0009] Detecting whether the terminal has received certificate-related information matching the test certificate type;

[0010] If certificate-related information matching the test certificate type is received, the certificate-related information is matched with the preset certificate-related information;

[0011] If there is no match, the certificate-related information is adjusted according to the preset certificate-related information until the adjusted certificate-related information matches the preset certificate-related information, and a second test certificate is generated based on the adjusted certificate-related information, wherein the information adjustment includes completing the certificate-related information.

[0012] Optionally, the step of generating a second test certificate based on the adjusted certificate-related information includes:

[0013] Obtain a certificate template corresponding to the test certificate type, and place the adjusted certificate-related information into the certificate template to obtain a second test certificate.

[0014] Optionally, the step of obtaining a certificate template corresponding to the test certificate type includes:

[0015] Acquire multiple historical certificate images in the database of the terminal, and remove the certificate information of each of the historical certificate images to obtain blank templates;

[0016] Determine the document type corresponding to each of the blank templates, and match the test document type with each of the document types;

[0017] If there is a target certificate type matching the test certificate type in each of the certificate types, the blank template corresponding to the target certificate type is used as the certificate template corresponding to the test certificate type.

[0018] Optionally, after the step of detecting whether the terminal has received certificate-related information matching the test certificate type, the step further includes:

[0019] If certificate-related information matching the test certificate type is not received, the terminal generates random certificate information matching the test certificate type and places the random certificate information in a certificate template corresponding to the test certificate type to obtain a second test certificate.

[0020] Optionally, the random certificate information includes a customized certificate picture.

[0021] The step of the terminal generating random certificate information matching the test certificate type comprises:

[0022] Acquire multiple ID images in the terminal, and detect in turn whether each ID image matches a preset ID image;

[0023] If there is an ID card picture matching the preset ID card picture among the ID card pictures, the ID card picture matching the preset ID card picture is used as the customized ID card picture.

[0024] Optionally, after the step of sequentially detecting whether each of the certificate images matches a preset certificate image, the following steps are included:

[0025] If there is no ID card picture matching the preset ID card picture among the ID card pictures, the original picture in the terminal is obtained, the original picture is customized, and the customized original picture is used as the customized ID card picture.

[0026] In addition, to achieve the above-mentioned purpose, the present invention further provides a certificate testing device, the certificate testing device comprising:

[0027] A detection module, configured to, when detecting that a terminal performs a certificate test, determine a test certificate type corresponding to the certificate test, and detect whether the terminal receives a first test certificate matching the test certificate type;

[0028] a generating module, configured to generate a second test certificate based on the test certificate type if the terminal does not receive a first test certificate matching the test certificate type;

[0029] The scanning module is used to scan the second test certificate to obtain the target certificate information in the second test certificate, and enter the target certificate information into the terminal to complete the certificate test.

[0030] In addition, to achieve the above-mentioned purpose, the present invention also provides a certificate testing device;

[0031] The document testing device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein:

[0032] When the computer program is executed by the processor, the steps of the certificate testing method described above are implemented.

[0033] In addition, to achieve the above-mentioned purpose, the present invention also provides a computer-readable storage medium;

[0034] The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the certificate testing method as described above are implemented.

[0035] The present invention determines the test certificate type corresponding to the certificate test when it is detected that the terminal performs a certificate test, and detects whether the terminal receives a first test certificate matching the test certificate type; if the terminal does not receive the first test certificate matching the test certificate type, generates a second test certificate based on the test certificate type; scans the second test certificate to obtain the target certificate information in the second test certificate, and enters the target certificate information into the terminal to complete the certificate test. When the terminal performs a certificate test and the terminal does not receive the first test certificate matching the test certificate type, a second test certificate is generated according to the test certificate type, and the target certificate information of the second test certificate is entered into the terminal for certificate testing, thereby ensuring that the certificate test is effectively performed, avoiding the leakage of personal privacy, and also avoiding the phenomenon that the certificate test cannot be performed due to the absence of a test certificate, thereby improving the test efficiency of the certificate test. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 It is a schematic diagram of the terminal\device structure of the hardware operating environment involved in the embodiment of the present invention;

[0037] Figure 2 It is a schematic diagram of the flow chart of the first embodiment of the certificate testing method of the present invention;

[0038] Figure 3 It is a schematic diagram of the functional modules of the certificate testing device of the present invention.

[0039] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings in conjunction with the embodiments. DETAILED DESCRIPTION

[0040] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0041] like Figure 1 As shown, Figure 1 It is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0042] The terminal in the embodiment of the present invention is a certificate testing device.

[0043] like Figure 1As shown, the terminal may include: a processor 1001, such as a CPU, a network interface 1004, a user interface 1003, a memory 1005, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a WI-FI interface). The memory 1005 may be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.

[0044] Optionally, the terminal may also include a camera, an RF (Radio Frequency) circuit, a sensor, an audio circuit, a WiFi module, and the like. Among them, the sensors include light sensors, motion sensors, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display screen according to the brightness of the ambient light, and the proximity sensor may turn off the display screen and / or backlight when the terminal device is moved to the ear. Of course, the terminal device may also be configured with other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0045] Those skilled in the art will understand that Figure 1 The terminal structure shown in the figure does not constitute a limitation on the terminal, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.

[0046] like Figure 1 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a certificate testing program.

[0047] exist Figure 1 In the terminal shown, the network interface 1004 is mainly used to connect to the backend server and perform data communication with the backend server; the user interface 1003 is mainly used to connect to the client (user end) and perform data communication with the client; and the processor 1001 can be used to call the certificate test program stored in the memory 1005 and perform the following operations:

[0048] When it is detected that the terminal performs a certificate test, determining a test certificate type corresponding to the certificate test, and detecting whether the terminal receives a first test certificate matching the test certificate type;

[0049] If the terminal does not receive a first test certificate matching the test certificate type, generating a second test certificate based on the test certificate type;

[0050] The second test certificate is scanned to obtain target certificate information in the second test certificate, and the target certificate information is entered into the terminal to complete the certificate test.

[0051] Reference Figure 2 The present invention provides a certificate testing method. In an embodiment of the certificate testing method, the certificate testing method includes the following steps:

[0052] Step S10, when it is detected that the terminal performs a certificate test, determining a test certificate type corresponding to the certificate test, and detecting whether the terminal receives a first test certificate matching the test certificate type;

[0053] When it is detected that the user needs to perform a certificate test through the terminal, it can be determined first what kind of certificate test the user needs to perform, that is, determine the test certificate type of the certificate test, such as identity card test, passport test and bank card test. And after determining the test certificate type, it is also necessary to detect whether the terminal has received a certificate matching the test certificate type, that is, detect whether the first test certificate has been received. When it is determined that the first test certificate has been received in the terminal, the certificate test can be directly performed on the first test certificate, but when it is determined that the first test certificate has not been received in the terminal, the corresponding certificate can be automatically generated directly according to the test certificate type, so that the user can perform the corresponding certificate test, thereby meeting the user's needs. Among them, the certificate test needs to simulate the scene of a real user performing an OCR scan of a certificate, such as performing an OCR scan of a certificate in a dim scene, or performing an OCR scan of a certificate under light, etc.

[0054] Step S20, if the terminal does not receive a first test certificate matching the test certificate type, generating a second test certificate based on the test certificate type;

[0055] When it is found through judgment that the terminal has not received the first test certificate that matches the test certificate type, the second test certificate can be generated according to the test certificate type, that is, the blank template of the certificate that needs to be obtained is determined according to the certificate type, and then the certificate-related information is entered in the blank template to generate the second test certificate. For example, when the certificate type is an ID card, the blank template image of the ID card can be obtained in the terminal first, and then the relevant information of each certificate can be entered in the blank template to generate the ID card image required by the user. And when the second test certificate is obtained, the second test certificate needs to be scanned to obtain the certificate information of the second test certificate, thereby completing the certificate test.

[0056] And when the second test certificate is generated by the test certificate type in the terminal, it is necessary to first obtain the blank certificate template image associated with the test certificate type, and detect whether the certificate-related information matching the test certificate type input by the user is received. When it is determined that the certificate-related information matching the test certificate type is received, it is necessary to determine the integrity of the obtained certificate-related information, that is, to determine that when the certificate-related information is filled into the blank certificate template, the condition for generating the second test certificate is just met. When it is determined that the received certificate-related information is incomplete, the information will be supplemented according to the obtained certificate-related information. For example, when it is necessary to make an ID card, only the ID card number is obtained at this time, and no other information is obtained, other information matching the ID card number (such as date of birth, address, etc.) will be derived according to the ID card number, and this other information and the ID card number will be filled into the blank ID card template together to complete the generation of the second test certificate. Of course, if the certificate-related information is complete, all the certificate-related information can be directly filled into the blank certificate template to generate a second test certificate that meets the user's needs. However, when it is found through judgment that no certificate-related information matching the test certificate type is received, the terminal will automatically generate random certificate information matching the test type, and will automatically place the random certificate information in the certificate template corresponding to the test certificate type to generate a second test certificate. It should be noted that when obtaining random certificate information, the random certificate information includes a customized certificate image associated with the certificate template, and the acquisition of the customized image can be to first obtain the stored certificate images in the terminal, and compare these certificate images with the preset certificate images (the preset certificate images can be images set by the user in advance to match the certificate template), and when it is found that there is a certificate image matching the preset certificate image, the certificate image can be directly called into the certificate template to generate the second test certificate. However, when it is found through judgment that there is no ID picture that matches the preset ID picture, an original picture will be obtained in the terminal (the original picture can be an arbitrary picture randomly obtained in the terminal first, and then it is determined whether the picture matches the ID template. If it matches, the picture is directly used as the original picture. If it does not match, a new picture is obtained in the terminal until there is a picture that matches the ID template), and then the original picture is customized according to the requirements of the ID template (such as trimming the picture size, brightness, etc.), so as to obtain a customized ID picture, and the customized ID picture is placed in the ID template to generate a second test ID.Among them, the method of obtaining the certificate template can be to obtain blank template pictures of various certificates placed in the terminal in advance by the user. When the certificate template needs to be applied, it can be directly obtained from each blank template. It can also be obtained from the terminal's historical records of each historical certificate template information that has completed the certificate test, and the certificate template required for the current certificate test is selected from each historical certificate template information. The blank template can be to first obtain each real certificate photo, and then remove the content of each real certificate photo (such as PS, etc.), and erase the information content in the real certificate photo to generate a blank template. For example, obtain a real ID card photo, erase the name, address and other information on it, and get a template. This template is the blank template.

[0057] It is also necessary to explain that after receiving certificate-related information that matches the test certificate type, the certificate-related information needs to be matched with the preset certificate-related information in the terminal. If the certificate-related information and the preset certificate-related information do not match, it can be proved that the certificate-related information obtained by the terminal is incomplete. The certificate-related information can be automatically supplemented according to the preset certificate-related information and the certificate rules corresponding to the certificate-related information. After the certificate-related information is supplemented, it can be considered that the certificate-related information after the supplement information matches the preset certificate-related information, and a second test certificate will be generated based on the certificate-related information after the supplement information.

[0058] Step S30, scanning the second test certificate to obtain target certificate information in the second test certificate, and entering the target certificate information into the terminal to complete the certificate test.

[0059] When it is determined that the second test certificate is scanned successfully, the target certificate information (certificate information required for the certificate test) in the second test certificate can be directly extracted according to the scanning result, and the acquired target certificate information is entered into the terminal to complete the certificate test. However, when it is determined that the scan is not successful, and the scan is not successful within the preset number of times, a new test certificate can be generated again according to the test certificate type, and the scan is performed again until the scan is successful.

[0060] In this embodiment, when it is detected that the terminal performs a certificate test, the test certificate type corresponding to the certificate test is determined, and whether the terminal receives a first test certificate matching the test certificate type; if the terminal does not receive the first test certificate matching the test certificate type, a second test certificate is generated based on the test certificate type; the second test certificate is scanned to obtain the target certificate information in the second test certificate, and the target certificate information is entered into the terminal to complete the certificate test. When the terminal performs a certificate test and the terminal does not receive the first test certificate matching the test certificate type, a second test certificate is generated according to the test certificate type, and the target certificate information of the second test certificate is entered into the terminal to perform the certificate test, thereby ensuring that the certificate test is effectively performed, avoiding the leakage of personal privacy, and also avoiding the phenomenon that the certificate test cannot be performed due to the absence of a test certificate, thereby improving the test efficiency of the certificate test.

[0061] Further, based on the first embodiment of the present invention, a second embodiment of the certificate testing method of the present invention is proposed. This embodiment is a refinement of step S20 of the first embodiment of the present invention, and the step of generating a second test certificate based on the test certificate type includes:

[0062] Step a, detecting whether the terminal has received certificate-related information matching the test certificate type;

[0063] When the terminal does not receive the first test certificate that matches the test certificate type, it is necessary to first detect whether the terminal has received certificate-related information that matches the test certificate type (such as when the test certificate type is an ID card, the certificate-related information can be name, address, date of birth, etc.). When it is determined that the terminal has received certificate-related information that matches the test certificate type, it is necessary to determine the integrity of the acquired certificate-related information, that is, to determine that when the certificate-related information is filled into the blank certificate template, the conditions for generating the second test certificate are met. When it is determined that the received certificate-related information is incomplete, the information will be supplemented based on the acquired certificate-related information. For example, when an ID card needs to be made, only the ID card number is obtained at this time, and no other information is obtained, other information matching the ID card number (such as date of birth, address, etc.) will be derived based on the ID card number, and this other information and the ID card number will be filled into the blank ID card template together to complete the generation of the second test certificate. Of course, if the certificate-related information is complete, all certificate-related information can be directly filled into the blank certificate template to generate a second test certificate that meets the user's needs.

[0064] Step c, if certificate-related information matching the test certificate type is received, matching the certificate-related information with preset certificate-related information;

[0065] When it is determined that the terminal has received certificate-related information that matches the test certificate type, it is necessary to match the certificate-related information with the preset certificate-related information in the terminal system. If they match, it can be considered that the certificate-related information is complete, and the certificate-related information can be added to the certificate template corresponding to the test certificate to obtain a second test certificate. However, if they do not match, it is necessary to adjust the certificate-related information and obtain the second test certificate based on the adjusted certificate-related information.

[0066] Step d: If there is no match, the certificate-related information is adjusted according to the preset certificate-related information until the adjusted certificate-related information matches the preset certificate-related information, and a second test certificate is generated based on the adjusted certificate-related information, wherein the information adjustment includes completing the certificate-related information.

[0067] When it is found through judgment that the certificate-related information and the preset certificate-related information do not match, it can be proved that the certificate-related information obtained by the terminal is incomplete, and the certificate-related information can be automatically supplemented (i.e., information adjustment) according to the preset certificate-related information and the certificate rules corresponding to the certificate-related information. After the certificate-related information is supplemented, it can be considered that the certificate-related information after the supplement information matches the preset certificate-related information, and a second test certificate will be generated based on the certificate-related information after the supplement information, wherein the information adjustment includes completing the certificate-related information.

[0068] In this embodiment, the certificate-related information is matched with the preset certificate-related information, and when there is a mismatch, the certificate-related information is adjusted according to the preset certificate-related information, so that a second test certificate is generated according to the adjusted certificate-related information, thereby ensuring the accuracy of the obtained second test certificate.

[0069] Specifically, the step of generating a second test certificate based on the adjusted certificate-related information includes:

[0070] Step e: obtaining a certificate template corresponding to the test certificate type, and placing the adjusted certificate-related information into the certificate template to obtain a second test certificate.

[0071] After obtaining the adjusted certificate-related information, it is also necessary to obtain the certificate template corresponding to the test certificate type in the terminal, and place the adjusted certificate-related information into the certificate template to generate a second test certificate. Among them, the certificate template can be obtained by the user in advance in the terminal system The blank template pictures of various certificates are directly obtained in each blank template when the certificate template needs to be applied, or it can be obtained in the historical records of the terminal system. The information of each historical certificate template that has completed the certificate test is obtained, and the certificate template required for the current certificate test is selected in each historical certificate template information. The blank template can be first obtained from each real certificate photo, and each real certificate photo is processed to remove the content (such as PS, etc.), and the information content in the real certificate photo is erased to generate a blank template. For example, a real ID card photo is obtained, and the name, address and other information on it are erased to obtain a template, which is a blank template.

[0072] In this embodiment, the second test certificate is obtained by obtaining a certificate template and placing the adjusted certificate-related information in the certificate template, thereby ensuring the accuracy of the obtained second test certificate.

[0073] Specifically, the step of obtaining a certificate template corresponding to the test certificate type includes:

[0074] Step w, obtaining a plurality of historical certificate images from the database of the terminal, and removing the certificate information of each of the historical certificate images to obtain blank templates;

[0075] When obtaining the certificate template corresponding to the test certificate type, it is necessary to first obtain multiple historical certificate images in the terminal's database, and remove the content of the certificate information of these historical certificate images, such as using PS technology, and use the historical certificate images that have been processed with content removal as blank templates. Among them, the method of removing content processing is to delete the non-fixed item content in the historical certificate image based on the certificate rules corresponding to the historical certificate image, and retain the fixed item content. For example, assuming that the certificate information in a historical certificate image is name: Xiao Ming, work number: 123, department: X department, after the certificate information of the historical certificate image is removed, only the name, work number and department are retained, that is, Xiao Ming, 123 and X department are deleted.

[0076] Step y, determining the document type corresponding to each of the blank templates, and matching the test document type with each of the document types;

[0077] After obtaining each blank template, it is also necessary to detect and determine the document type corresponding to these blank templates, and determine whether the document type corresponding to the blank template is an ID card, a pass, etc. Then the test document type and the document type of these blank templates are matched in turn.

[0078] Step p: if there is a target certificate type matching the test certificate type in each of the certificate types, then the blank template corresponding to the target certificate type is used as the certificate template corresponding to the test certificate type.

[0079] When it is found through judgment that there is a target ID type matching the test ID type among various ID types, the blank template corresponding to the target ID type can be directly used as the ID template corresponding to the test ID type. However, when there is no target ID type matching the test ID type among various ID types, each real ID photo can be directly obtained, and the content of each real ID photo can be removed (such as PS, etc.), and the information content in the real ID photo can be erased to generate a blank template.

[0080] In this embodiment, various blank templates are obtained according to various historical certificate images, and certificate templates corresponding to the test certificate type are obtained from these blank templates, thereby ensuring the accuracy of the obtained certificate templates.

[0081] Further, after the step of detecting whether the terminal has received certificate-related information matching the test certificate type, the method further comprises:

[0082] Step f: If certificate-related information matching the test certificate type is not received, the terminal generates random certificate information matching the test certificate type and places the random certificate information in a certificate template corresponding to the test certificate type to obtain a second test certificate.

[0083] When it is determined that the terminal has not received certificate-related information matching the test certificate type, the terminal will automatically generate various random certificate information matching the test type, and automatically place the various random certificate information in a certificate template corresponding to the test certificate type to generate a second test certificate. The random certificate information may be certificate information automatically generated by the terminal according to the certificate rule corresponding to the test certificate type.

[0084] In this embodiment, when the terminal does not receive certificate-related information, random certificate information is automatically generated and placed in a certificate template to obtain a second test certificate, thereby ensuring that the terminal performs the certificate test normally.

[0085] Specifically, the step of the terminal generating random certificate information matching the test certificate type includes:

[0086] Step h, obtaining multiple ID images in the terminal, and sequentially detecting whether each ID image matches a preset ID image;

[0087] It should be noted that, in this embodiment, the random certificate information includes a customized certificate picture.

[0088] When the terminal obtains random certificate information that matches the test certificate type, it is necessary to obtain the customized certificate image in the random certificate information, and the acquisition of the customized certificate image can be to first obtain multiple certificate images stored in the terminal, and then match each certificate image with the preset certificate image in turn to detect whether there is a customized certificate image that matches the preset certificate image in each certificate image, and perform different operations based on different detection results. Among them, the preset certificate image can be an image that matches the preset certificate target set by the user in advance. The certificate image can be saved in the terminal in advance, such as an image that has been tested and applied before this certificate test.

[0089] Step k: if there is an ID picture matching the preset ID picture among the ID pictures, the ID picture matching the preset ID picture is used as the customized ID picture.

[0090] When it is determined that there is a customized ID picture matching the preset ID picture among the ID pictures, the customized ID picture can be obtained from the ID pictures so that the terminal can generate a second test ID according to the customized ID picture.

[0091] In this embodiment, when it is determined that the ID picture in the terminal matches the preset ID picture, the ID picture that matches the preset ID picture is used as the customized ID picture, thereby ensuring the validity of the obtained customized ID picture.

[0092] Further, after the step of sequentially detecting whether each of the certificate images matches the preset certificate image, the method further comprises:

[0093] Step x: if there is no ID card picture matching the preset ID card picture among the ID card pictures, then the original picture in the terminal is obtained, the original picture is customized, and the customized original picture is used as the customized ID card picture.

[0094] When it is found through judgment that there is no customized ID picture matching the preset ID picture among the ID pictures, an original picture is obtained in the terminal, and the original picture is customized according to the requirements of the ID template (such as trimming the image size, brightness, etc.), and the customized original picture is used as the customized ID picture, and then the customized ID picture is placed in the ID template to generate the second test ID. Among them, the original picture can be an arbitrary picture randomly obtained in the terminal in advance, and then it is determined whether the picture matches the ID template. If it matches, the picture is directly used as the original picture. If it does not match, a new picture is obtained in the terminal again until there is a picture that matches the ID template, and the picture that matches the ID template is used as the original picture.

[0095] In this embodiment, when it is determined that the ID picture in the terminal does not match the preset ID picture, the original picture in the terminal is obtained, and the original picture is customized to obtain a customized ID picture, thereby ensuring the timeliness of obtaining the customized ID picture.

[0096] In addition, refer to Figure 3 The embodiment of the present invention further provides a certificate testing device, the certificate testing device comprising:

[0097] A detection module, configured to, when detecting that a terminal performs a certificate test, determine a test certificate type corresponding to the certificate test, and detect whether the terminal receives a first test certificate matching the test certificate type;

[0098] a generating module, configured to generate a second test certificate based on the test certificate type if the terminal does not receive a first test certificate matching the test certificate type;

[0099] The scanning module is used to scan the second test certificate to obtain the target certificate information in the second test certificate, and enter the target certificate information into the terminal to complete the certificate test.

[0100] Furthermore, the generating module is also used for:

[0101] Detecting whether the terminal has received certificate-related information matching the test certificate type;

[0102] If certificate-related information matching the test certificate type is received, the certificate-related information is matched with the preset certificate-related information;

[0103] If there is no match, the certificate-related information is adjusted according to the preset certificate-related information until the adjusted certificate-related information matches the preset certificate-related information, and a second test certificate is generated based on the adjusted certificate-related information, wherein the information adjustment includes completing the certificate-related information.

[0104] Furthermore, the generating module is also used for:

[0105] Obtain a certificate template corresponding to the test certificate type, and place the adjusted certificate-related information into the certificate template to obtain a second test certificate.

[0106] Furthermore, the generating module is also used for:

[0107] Acquire multiple historical certificate images in the database of the terminal, and remove the certificate information of each of the historical certificate images to obtain blank templates;

[0108] Determine the document type corresponding to each of the blank templates, and match the test document type with each of the document types;

[0109] If there is a target certificate type matching the test certificate type in each of the certificate types, the blank template corresponding to the target certificate type is used as the certificate template corresponding to the test certificate type.

[0110] Furthermore, the generating module is also used for:

[0111] If certificate-related information matching the test certificate type is not received, the terminal generates random certificate information matching the test certificate type and places the random certificate information in a certificate template corresponding to the test certificate type to obtain a second test certificate.

[0112] Furthermore, the random certificate information includes a customized certificate image, and the generating module is further used to:

[0113] Acquire multiple ID images in the terminal, and sequentially detect whether each of the ID images matches a preset ID image;

[0114] If there is an ID card picture matching the preset ID card picture among the ID card pictures, the ID card picture matching the preset ID card picture is used as the customized ID card picture.

[0115] Furthermore, the generating module is also used for:

[0116] If there is no ID card picture matching the preset ID card picture among the ID card pictures, the original picture in the terminal is obtained, the original picture is customized, and the customized original picture is used as the customized ID card picture.

[0117] The steps implemented by the various functional modules of the certificate testing device may refer to the various embodiments of the certificate testing method of the present invention, and will not be described in detail here.

[0118] The present invention also provides a certificate testing device, which includes: a memory, a processor, and a certificate testing program stored in the memory; the processor is used to execute the certificate testing program to implement the steps of each embodiment of the above-mentioned certificate testing method.

[0119] The present invention also provides a computer-readable storage medium, which stores one or more programs. The one or more programs can also be executed by one or more processors to implement the steps of each embodiment of the above-mentioned certificate testing method.

[0120] The specific implementation of the computer-readable storage medium of the present invention is basically the same as the various embodiments of the above-mentioned certificate testing method, and will not be repeated here.

[0121] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.

[0122] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0123] 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 invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, 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 invention.

[0124] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. A certificate testing method, It is characterized in that The document testing method comprises the following steps: When it is detected that the terminal performs a certificate test, determining a test certificate type corresponding to the certificate test, and detecting whether the terminal receives a first test certificate matching the test certificate type; If the terminal does not receive the first test certificate that matches the test certificate type, generating a second test certificate based on the test certificate type, including: detecting whether the terminal receives certificate-related information that matches the test certificate type; if certificate-related information that matches the test certificate type is received, matching the certificate-related information with preset certificate-related information; if they do not match, adjusting the certificate-related information according to preset certificate-related information until the adjusted certificate-related information matches the preset certificate-related information, and generating a second test certificate based on the adjusted certificate-related information, wherein the information adjustment includes completing the certificate-related information; The second test certificate is scanned to obtain target certificate information in the second test certificate, and the target certificate information is entered into the terminal to complete the certificate test, including: if it is determined that the second test certificate is scanned successfully, the target certificate information in the second test certificate is directly extracted according to the scanning result, and the acquired target certificate information is entered into the terminal; if it is determined that the scan is not successful, and the scan is not successful within a preset number of times, a new test certificate is generated again according to the test certificate type, and the scan is performed again until the scan is successful.

2. The document testing method according to claim 1, It is characterized in that The step of generating a second test certificate based on the adjusted certificate-related information comprises: Obtain a certificate template corresponding to the test certificate type, and place the adjusted certificate-related information into the certificate template to obtain a second test certificate.

3. The document testing method as claimed in claim 2, It is characterized in that The step of obtaining a certificate template corresponding to the test certificate type includes: Acquire multiple historical certificate images in the database of the terminal, and remove the certificate information of each of the historical certificate images to obtain blank templates; Determine the document type corresponding to each of the blank templates, and match the test document type with each of the document types; If there is a target certificate type matching the test certificate type in each of the certificate types, the blank template corresponding to the target certificate type is used as the certificate template corresponding to the test certificate type.

4. The document testing method according to claim 1, It is characterized in that After the step of detecting whether the terminal has received certificate-related information matching the test certificate type, the method further comprises: If certificate-related information matching the test certificate type is not received, the terminal generates random certificate information matching the test certificate type and places the random certificate information in a certificate template corresponding to the test certificate type to obtain a second test certificate.

5. The document testing method as claimed in claim 4, It is characterized in that The random certificate information includes a customized certificate image, and the step of the terminal generating random certificate information matching the test certificate type includes: Acquire multiple ID images in the terminal, and detect in turn whether each ID image matches a preset ID image; If there is an ID card picture matching the preset ID card picture among the ID card pictures, the ID card picture matching the preset ID card picture is used as the customized ID card picture.

6. The document testing method as claimed in claim 5, It is characterized in that After the step of sequentially detecting whether each of the certificate images matches the preset certificate image, the method further comprises: If there is no ID card picture matching the preset ID card picture among the ID card pictures, the original picture in the terminal is obtained, the original picture is customized, and the customized original picture is used as the customized ID card picture.

7. A certificate testing device, It is characterized in that The document testing device comprises: A detection module, configured to, when detecting that a terminal performs a certificate test, determine a test certificate type corresponding to the certificate test, and detect whether the terminal receives a first test certificate matching the test certificate type; A generating module, for generating a second test certificate based on the test certificate type if the terminal does not receive the first test certificate matching the test certificate type, comprising: detecting whether the terminal receives certificate-related information matching the test certificate type; if certificate-related information matching the test certificate type is received, matching the certificate-related information with preset certificate-related information; if not matching, adjusting the certificate-related information according to preset certificate-related information until the adjusted certificate-related information matches the preset certificate-related information, and generating a second test certificate based on the adjusted certificate-related information, wherein the information adjustment includes completing the certificate-related information; A scanning module is used to scan the second test certificate to obtain the target certificate information in the second test certificate, and enter the target certificate information into the terminal to complete the certificate test, including: if it is determined that the second test certificate is scanned successfully, the target certificate information in the second test certificate is directly extracted according to the scanning result, and the acquired target certificate information is entered into the terminal; if it is determined that the scan is not successful, and the scan is not successful within a preset number of times, a new test certificate is generated again according to the test certificate type, and the scan is performed again until the scan is successful.

8. A document testing device, It is characterized in that The certificate testing device comprises: a memory, a processor, and a certificate testing program stored in the memory and executable on the processor, wherein the certificate testing program implements the steps of the certificate testing method according to any one of claims 1 to 6 when executed by the processor.

9. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a certificate testing program, which, when executed by a processor, implements the steps of the certificate testing method according to any one of claims 1 to 6.