Certificate verification method and device, storage medium and electronic equipment
By cutting and recognizing paper vouchers using OCR, the inefficiency of manual verification in the voucher issuance process of financial institutions has been solved, achieving efficient and accurate verification of voucher content.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- INDUSTRIAL AND COMMERCIAL BANK OF CHINA
- Filing Date
- 2023-03-10
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, the issuance process of certificates by financial institutions relies on manual verification, which results in a lengthy, error-prone, inefficient, and costly process.
An OCR recognition model is used to cut printed paper vouchers, obtain fragments, and identify text information and confidence values. The correctness of the voucher content is determined by comparison.
It improves the accuracy and efficiency of voucher verification, reduces manual intervention, and lowers operating costs.
Smart Images

Figure CN116343227B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of artificial intelligence technology, and more specifically, to a method and apparatus for verifying credentials, a storage medium, and an electronic device. Background Technology
[0002] In related technologies, the certificate issuance process of financial institutions is as follows: Figure 1 As shown, the process is as follows: First, the printing staff prints the relevant vouchers. Then, the printed vouchers are handed over to the quality inspection staff via a smart device. The quality inspection staff checks the content of the vouchers printed by the printing staff to ensure accuracy. If the quality inspection passes, the vouchers are handed over to the re-inspection staff. If they fail the quality inspection, they are handed over to the re-printing staff for re-printing. The re-printed vouchers are then handed over to the quality inspection staff for inspection again. Similarly, the re-inspection staff checks the printed vouchers again. If they pass the re-inspection, they are directly issued to the customer via a smart device. If they fail the re-inspection, they are handed over to the re-printing staff for re-printing. After re-printing, the re-printed vouchers are handed over to the quality inspection staff for inspection again. If they pass the quality inspection, they are then handed over to the re-inspection staff for inspection. In other words, the voucher issuance process in financial institutions using this technology involves printing relevant vouchers according to the system's workflow, then manually checking each item to ensure correct printing, including key information such as name, amount, and date, as well as crucial factors like quality control stamps. This process requires multiple personnel, including printing, reprinting, quality control, and re-inspection staff, making it lengthy, cumbersome, and prone to errors. Furthermore, the voucher issuance process in financial institutions using this technology lacks standardization and management; the large amount of manual operation results in slow processing speed and low operational efficiency; and the heavy workload of manual supervision increases costs.
[0003] There is currently no effective solution to the problem that manual verification of printed vouchers in related technologies results in poor verification quality. Summary of the Invention
[0004] The main objective of this application is to provide a method, apparatus, storage medium, and electronic device for verifying vouchers, in order to solve the problem that the manual verification of printed vouchers in related technologies results in poor verification effectiveness.
[0005] To achieve the above objectives, according to one aspect of this application, a method for verifying a document is provided. The method includes: acquiring an image of a target document, wherein the target document is a printed paper document; segmenting the image to obtain N fragments, where N is a positive integer greater than 1; inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information corresponds to a fragment, and each confidence value represents the accuracy of each target text information output by the OCR recognition model; and determining a verification result for the target document based on the N target text information and the N confidence values, wherein the verification result indicates whether the content of the target document is correct.
[0006] Further, based on N target text information and N confidence values, determining the verification result of the target credential includes: determining whether each confidence value is not less than a preset threshold; if each confidence value is not less than the preset threshold, then obtaining the electronic credential corresponding to the target credential; determining multiple target information in the electronic credential, wherein the multiple target information includes at least: the attribute information of the electronic credential and the attribute information of a first object, the first object being the object that applied for the electronic credential; and determining the verification result of the target credential based on the N target text information, the attribute information of the electronic credential, and the attribute information of the first object.
[0007] Further, based on N target text information, the attribute information of the electronic voucher, and the attribute information of the first object, determining the verification result of the target voucher includes: based on the N target text information, determining the attribute information of the target voucher and the attribute information of the target object, where the target object is the object applying for the target voucher; determining whether the attribute information of the target voucher and the attribute information of the electronic voucher are the same, and determining whether the attribute information of the target object and the attribute information of the first object are the same; if the attribute information of the target voucher and the attribute information of the electronic voucher are the same, and the attribute information of the target object and the attribute information of the first object are the same, then the verification result is determined to be that the content of the target voucher is correct; if the attribute information of the target voucher and the attribute information of the electronic voucher are not the same, and / or, the attribute information of the target object and the attribute information of the first object are not the same, then the verification result is determined to be that the content of the target voucher is incorrect.
[0008] Further, inputting N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values includes: preprocessing the N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; using a feature extraction method to extract N original text information from the fragment set; performing correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; comparing each target text information with text information in the database to obtain a numerical set, wherein the numerical set includes at least N confidence values.
[0009] Further, the image is segmented to obtain N fragments, including: obtaining the layout information of the target document; determining the segmentation position when segmenting the image based on the layout information of the target document; and segmenting the image based on the segmentation position to obtain N fragments.
[0010] Furthermore, obtaining the image of the target credential includes: obtaining the target credential; and scanning the target credential to obtain an image of the target credential.
[0011] Further, obtaining the target credential includes: obtaining a template library, wherein the template library is used to store templates corresponding to various credentials; determining a target template corresponding to the target credential from the template library; determining the content information of the target credential based on the target template; and obtaining the target credential based on the target template and the content information of the target credential.
[0012] To achieve the above objectives, according to another aspect of this application, a voucher verification device is provided. The device includes: a first acquisition unit for acquiring an image of a target voucher, wherein the target voucher is a printed paper voucher; a first processing unit for segmenting the image to obtain N fragments, where N is a positive integer greater than 1; a second processing unit for inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information corresponds to a fragment, and each confidence value represents the accuracy of each target text information output by the OCR recognition model; and a first determination unit for determining the verification result of the target voucher based on the N target text information and the N confidence values, wherein the verification result indicates whether the content of the target voucher is correct.
[0013] Further, the first determining unit includes: a first judging module, used to judge whether each confidence value is not less than a preset threshold; a first acquiring module, used to acquire the electronic certificate corresponding to the target certificate if each confidence value is not less than the preset threshold; a first determining module, used to determine multiple target information in the electronic certificate, wherein the multiple target information includes at least: attribute information of the electronic certificate and attribute information of a first object, the first object being the object applying for the electronic certificate; and a second determining module, used to determine the verification result of the target certificate based on N target text information, the attribute information of the electronic certificate, and the attribute information of the first object.
[0014] Further, the second determining module includes: a first determining submodule, used to determine the attribute information of the target credential and the attribute information of the target object based on N target text information, wherein the target object is the object applying for the target credential; a first judging submodule, used to judge whether the attribute information of the target credential and the attribute information of the electronic credential are the same, and to judge whether the attribute information of the target object and the attribute information of the first object are the same; a second determining submodule, used to determine that the verification result is that the content of the target credential is correct if the attribute information of the target credential and the attribute information of the electronic credential are the same, and the attribute information of the target object and the attribute information of the first object are the same; a third determining submodule, used to determine that the verification result is that the content of the target credential is incorrect if the attribute information of the target credential and the attribute information of the electronic credential are not the same, and / or the attribute information of the target object and the attribute information of the first object are not the same.
[0015] Further, the second processing unit includes: a first processing module, configured to preprocess N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; a first extraction module, configured to extract N original text information from the fragment set using a feature extraction method; a second processing module, configured to perform correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; and a first comparison module, configured to compare each target text information with text information in a database to obtain a numerical set, wherein the numerical set includes at least N reliable values.
[0016] Further, the first processing unit includes: a second acquisition module, used to acquire the layout information of the target voucher; a third determination module, used to determine the cutting position when cutting the image based on the layout information of the target voucher; and a third processing module, used to cut the image based on the cutting position to obtain N fragments after cutting.
[0017] Furthermore, the first acquisition unit includes: a third acquisition module for acquiring the target credential; and a fourth processing module for scanning the target credential to obtain an image of the target credential.
[0018] Furthermore, the third acquisition module includes: a first acquisition submodule for acquiring a template library, wherein the template library is used to store templates corresponding to various vouchers; a fourth determination submodule for determining a target template corresponding to the target voucher from the template library; a fifth determination submodule for determining the content information of the target voucher based on the target template; and a sixth determination submodule for obtaining the target voucher based on the target template and the content information of the target voucher.
[0019] To achieve the above objectives, according to another aspect of this application, a computer-readable storage medium is provided, the storage medium storing a program, wherein the program executes the credential verification method described in any one of the preceding claims.
[0020] To achieve the above objectives, according to another aspect of this application, an electronic device is provided, the electronic device including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the credential verification method described in any one of the above.
[0021] This application employs the following steps: acquiring an image of a target document, wherein the target document is a printed paper document; segmenting the image to obtain N fragments, where N is a positive integer greater than 1; inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information corresponds to the target text information of each fragment, and each confidence value represents the accuracy of each target text information output by the OCR recognition model; and determining the verification result of the target document based on the N target text information and N confidence values, wherein the verification result indicates whether the content of the target document is correct. This solves the problem in related technologies where manual verification of printed documents leads to poor verification results. By segmenting the image of the printed paper document to obtain N fragments, inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, and then verifying the content of the printed paper document based on the N target text information and N confidence values, the effectiveness of verifying printed documents is improved. Attached Figure Description
[0022] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0023] Figure 1 This is a schematic diagram of a financial institution's certificate issuance process based on existing technology;
[0024] Figure 2 This is a flowchart of a certificate verification method provided according to an embodiment of this application;
[0025] Figure 3 This is a schematic diagram of the voucher printing process in an embodiment of this application;
[0026] Figure 4 This is a schematic diagram of the cut fragment positions as defined in the embodiments of this application;
[0027] Figure 5 This is a schematic diagram of an optional certificate verification method provided according to an embodiment of this application;
[0028] Figure 6 This is a schematic diagram of the structure of the certificate verification device provided in the embodiments of this application;
[0029] Figure 7 This is a schematic diagram of the fragment cutting OCR recognition module in an embodiment of this application;
[0030] Figure 8This is a schematic diagram of the certificate model quality inspection module in an embodiment of this application;
[0031] Figure 9 This is a schematic diagram of a certificate verification device provided according to an embodiment of this application;
[0032] Figure 10 This is a schematic diagram of an electronic device provided according to an embodiment of this application. Detailed Implementation
[0033] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0034] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0035] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate for the embodiments of this application described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0036] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and corresponding operation portals are provided for users to choose to authorize or refuse.
[0037] For ease of description, the following explains some of the nouns or terms used in the embodiments of this application:
[0038] OCR (Optical Character Recognition) refers to the process by which electronic devices (such as scanners or digital cameras) examine printed characters on paper, determine their shapes by detecting dark and light patterns, and then translate the shapes into computer text using character recognition methods. In other words, for printed characters, optical methods are used to convert the text in paper documents into black and white dot matrix image files, and recognition software converts the text in the image into text format for further editing and processing by word processing software.
[0039] The present invention will now be described in conjunction with preferred implementation steps. Figure 2 This is a flowchart of a certificate verification method provided according to an embodiment of this application, such as... Figure 2 As shown, the method includes the following steps:
[0040] Step S201: Obtain an image of the target voucher, wherein the target voucher is a printed paper voucher.
[0041] For example, the relevant printed voucher (the target voucher mentioned above) can be scanned to form a voucher image (the image mentioned above), and the issuance record can be uploaded to the server. The voucher image (the image mentioned above) can then be retrieved from the server.
[0042] Step S202: The image is segmented to obtain N fragments, where N is a positive integer greater than 1.
[0043] For example, the obtained voucher image (the image mentioned above) can be segmented to form a fragment set [a, b, c...] under voucher ID [A] (the N fragments mentioned above).
[0044] Step S203: Input the N fragments into the OCR recognition model for recognition processing to obtain N target text information and N confidence values. Each target text information is the target text information corresponding to each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model.
[0045] For example, each fragment in the fragment set [a, b, c...] under credential ID [A] is input into the OCR recognition model, and the corresponding credential information string (the target text information mentioned above) and its respective credibility value (the credibility value mentioned above) are output for each fragment.
[0046] Step S204: Based on N target text information and N confidence values, determine the verification result of the target voucher, wherein the verification result is used to indicate whether the content of the target voucher is correct.
[0047] For example, multiple voucher information strings output by the OCR recognition model are obtained, namely the voucher information corresponding to the fragment set [a, b, c...] under voucher ID [A]. The multiple voucher information strings (the above N target text information) are compared with the voucher information stored in the background. Combined with the fragment confidence value (the above N confidence values), the quality inspection result is confirmed, that is, it is determined whether the content in the relevant printed voucher is correct.
[0048] Through the above steps S201 to S204, the image of the printed paper voucher is cut into N fragments, and the N fragments are input into the OCR recognition model for recognition processing to obtain N target text information and N confidence values. Then, the content of the printed paper voucher is checked for correctness based on the N target text information and N confidence values, thereby improving the effectiveness of checking the printed voucher.
[0049] Optionally, in the verification method for vouchers provided in this application embodiment, obtaining the target voucher includes: obtaining a template library, wherein the template library is used to store templates corresponding to various vouchers; determining the target template corresponding to the target voucher from the template library; determining the content information of the target voucher based on the target template; and obtaining the target voucher based on the target template and the content information of the target voucher.
[0050] For example, Figure 3 This is a schematic diagram of the voucher printing process in an embodiment of this application, such as... Figure 3 As shown, the voucher printing module for printing vouchers is divided into a template import stage and a printing stage.
[0051] Furthermore, the implementation scheme for the voucher template import stage can be as follows:
[0052] (1) Establish a voucher template library. The voucher library includes a voucher type dictionary, information components for printing various vouchers, coordinates for printing vouchers, a seal library, a printing glossary, and a data dictionary. The voucher type dictionary includes all vouchers that support printing, such as personal credit certificates, financial certificates, fund certificates, etc. The seal library includes business seals and legal person seals. The printing glossary includes eight commonly used languages, namely Chinese, Japanese, English, Russian, French, German, Portuguese, and Spanish.
[0053] (2) Use different voucher templates as printing samples, and normalize the templates after processing.
[0054] (3) Supports importing voucher templates and verifying printing samples, and allows adjustment of printing styles according to business needs, achieving fine-tuning of printing templates and supporting diverse configurations.
[0055] Alternatively, the printing phase can be implemented as follows:
[0056] (1) The operator inputs relevant task instructions, specifically using intelligent devices to activate the device.
[0057] (2) The automatic identification and sealing device processes the input signal and automatically determines the type of printing template based on the customer's application information.
[0058] (3) Extract features from the background data to obtain key information and automatically match relevant information based on the template component.
[0059] (4) Use the voucher template library to print components and output the voucher printing results.
[0060] (5) Supports automatic reprinting of vouchers that fail quality inspection.
[0061] Using the above method, the relevant vouchers can be automatically printed based on the templates in the voucher template library.
[0062] Optionally, in the verification method for credentials provided in this application embodiment, obtaining the image of the target credential includes: obtaining the target credential; and scanning the target credential to obtain an image of the target credential.
[0063] For example, the relevant printed voucher (the target voucher mentioned above) is scanned to form a voucher image (the image mentioned above), and the issuance record is uploaded to the server.
[0064] The above method allows for the quick and accurate scanning of printed vouchers into images.
[0065] Optionally, in the certificate verification method provided in this application embodiment, the process of cutting the image to obtain N fragments includes: obtaining the layout information of the target certificate; determining the cutting position when cutting the image based on the layout information of the target certificate; and cutting the image based on the cutting position to obtain N fragments.
[0066] For example, when cutting scanned document images, the format of various documents can be defined first, and the positions of the cut fragments can be defined. Furthermore, Figure 4 This is a schematic diagram of the cut fragment positions as defined in the embodiments of this application, such as... Figure 4 As shown, it can be like Figure 4 The document shown is cut into 6 pieces. Then, based on the format, the image is cut into multiple pieces.
[0067] Using the above method, the voucher image can be quickly and accurately cut into multiple fragments according to the defined cutting position.
[0068] Optionally, in the verification method for credentials provided in this application embodiment, inputting N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values includes: preprocessing the N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; using a feature extraction method to extract N original text information from the fragment set; performing correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; comparing each target text information with text information in the database to obtain a numerical set, wherein the numerical set includes at least N confidence values.
[0069] For example, the implementation scheme for the OCR recognition stage can be:
[0070] (1) Image preprocessing: The process of transforming a binary image that is either black or white, or a grayscale or color image, into individual text images is all considered image preprocessing. It includes image processing such as image normalization, noise removal, and image correction, as well as document preprocessing such as image and text analysis and text line and character separation.
[0071] (2) Text Feature Extraction: Two feature extraction methods are adopted: one is statistical features, such as the black / white point ratio within a text region. When a text is divided into several regions, the combined black / white point ratio of each region becomes a numerical vector in space. The other is structural features, such as obtaining the number and position of stroke ends and intersections after the text image is thinned, or using stroke segments as features, combined with special comparison methods.
[0072] (3) Comparison database: After the features of the input text are calculated, a comparison database or feature database is used for comparison. The content of the database should be the same as that of the comparison database, and the feature groups are obtained by the same feature extraction method as the input text.
[0073] (4) Comparison and recognition: Based on different feature characteristics, different mathematical distance functions are selected. Well-known comparison methods include Euclidean space comparison method, relaxation comparison method, dynamic programming (DP) comparison method, as well as database establishment and comparison of neural networks, HMM (Hidden Markov Model) and other methods to obtain the credibility value of fragment information. In order to make the recognition results more stable, the differences and complementarities of various feature comparison methods are utilized to make the recognition results more credible.
[0074] (5) Word post-processing: Since the recognition rate of OCR cannot reach 100%, some error correction or even correction functions have become a necessary module in the OCR system. Word post-processing is one example. It uses the recognized text after comparison with its possible similar candidate word groups to find the most logical word based on the recognized text before and after, and performs correction.
[0075] (6) Manual correction: A manual correction step can be set up to judge the correctness of the OCR recognition result and the voucher by human judgment.
[0076] (7) Output results: Based on the identification results of the fragment set [a, b, c...] under the voucher ID [A], output the voucher information string and their respective confidence values.
[0077] The above method can quickly and accurately obtain the text information corresponding to each fragment of the credential and the credibility value of each text information.
[0078] Optionally, in the verification method for the credential provided in this application embodiment, determining the verification result of the target credential based on N target text information and N confidence values includes: determining whether each confidence value is not less than a preset threshold; if each confidence value is not less than the preset threshold, then obtaining the electronic credential corresponding to the target credential; determining multiple target information in the electronic credential, wherein the multiple target information includes at least: the attribute information of the electronic credential and the attribute information of a first object, the first object being the object applying for the electronic credential; and determining the verification result of the target credential based on the N target text information, the attribute information of the electronic credential, and the attribute information of the first object.
[0079] For example, when verifying the correctness of the printed voucher's content based on the text information corresponding to each fragment output by the OCR recognition model and the confidence value of each text information, the confidence value corresponding to each text information can be compared with a pre-set threshold. Only after the confidence value of each text information reaches the target level can the relevant information of the electronic voucher stored in the background (the aforementioned attribute information of the electronic voucher and the attribute information of the first object) be obtained. Then, the correctness of the printed voucher's content can be verified based on the text information corresponding to each fragment output by the OCR recognition model and the obtained relevant information of the electronic voucher stored in the background. That is, when the pre-set threshold (the aforementioned target level) is 3, the confidence values of each text information output by the OCR recognition model are 6, 5, and 4, respectively, indicating that the confidence value of each text information output by the OCR recognition model is greater than the pre-set threshold (the aforementioned target level) of 3. Then, the relevant information of the pre-stored electronic voucher is obtained from the background.
[0080] In conclusion, by determining the credibility value of each textual information output by the OCR recognition model, the efficiency of verifying the correctness of printed vouchers can be improved.
[0081] Optionally, in the verification method for the credential provided in this application embodiment, determining the verification result of the target credential based on N target text information, the attribute information of the electronic credential, and the attribute information of the first object includes: determining the attribute information of the target credential and the attribute information of the target object in the target credential based on the N target text information, wherein the target object is the object applying for the target credential; determining whether the attribute information of the target credential is the same as the attribute information of the electronic credential, and determining whether the attribute information of the target object is the same as the attribute information of the first object; if the attribute information of the target credential is the same as the attribute information of the electronic credential, and the attribute information of the target object is the same as the attribute information of the first object, then the verification result is determined to be that the content of the target credential is correct; if the attribute information of the target credential is different from the attribute information of the electronic credential, and / or, the attribute information of the target object is different from the attribute information of the first object, then the verification result is determined to be that the content of the target credential is incorrect.
[0082] For example, after the credibility value corresponding to each text information output by the OCR recognition model reaches the target level, the voucher information string (the above N target text information) output by the fragment segmentation OCR recognition module is obtained, that is, the voucher information corresponding to the fragment set [a, b, c...] under voucher ID [A]. The fragment information (the above N target text information) is compared with the voucher backend information to confirm the quality inspection result. If it passes, it is issued to the customer; otherwise, it triggers reprinting and invalidates the original voucher.
[0083] The specific steps for comparing the fragmented information (the aforementioned N target text information) with the voucher backend information can be as follows:
[0084] (1) Based on the fragment identification information (the above N target text information), combined with the voucher cutting template configuration and the background information, one-to-one confirmation is achieved.
[0085] (2) The certificate application information may include customer name, customer number (ID), customer personal identification information, customer account information required for the certificate, etc. (the attribute information of the target object and the attribute information of the first object mentioned above).
[0086] (3) The voucher verification information may include voucher name, voucher number, voucher type, voucher quantity, voucher printing style, voucher printing date, and seal information (the attribute information of the target voucher and the attribute information of the electronic voucher mentioned above).
[0087] (4) If the quality inspection fails, the relevant vouchers will be voided and the relevant task will be returned to the voucher printing module for reprinting. At the same time, the relevant operators will be notified to process the relevant quality inspection information.
[0088] The above method can quickly and accurately determine whether the content of the printed voucher is correct.
[0089] For example, Figure 5 This is a schematic diagram of an optional certificate verification method provided according to an embodiment of this application, such as... Figure 5 As shown, the optional voucher verification method provided in this application mainly involves three parts: voucher printing module, fragment cutting OCR recognition module, and voucher model quality inspection module.
[0090] The main function of the voucher printing module is to receive the content of the voucher to be printed, obtain information such as seals, convert the relevant information into text and images, assemble and print the voucher, and also support automatic reprinting of vouchers that fail quality inspection.
[0091] The fragment cutting OCR recognition module is mainly responsible for scanning the vouchers printed by the printing module to form an image, cutting the image according to the coordinates of the voucher template information database, using OCR to recognize the fragments, and forming a voucher information string and the corresponding fragment information confidence value.
[0092] The function of the voucher model quality inspection module is to compare the voucher information string output by the fragmented OCR recognition module with the voucher background information. After the confidence value reaches the target level, it compares whether the information is consistent. If the confidence value meets the standard and the information is consistent, the quality inspection is considered to have passed. Otherwise, the quality inspection is considered to have failed. This module supports voiding the voucher and creating a reprint task, which is then sent to the voucher printing module.
[0093] The server pre-establishes a database containing customer information for receiving business applications and various voucher templates. The customer information for business applications includes the customer's name, customer ID, application submission information, and other relevant personal information. The voucher information includes the voucher name, voucher number, voucher type, voucher printing method, voucher stamp, fragment cutting coordinates, and confidence value.
[0094] in addition, Figure 6 This is a schematic diagram of the structure of the certificate verification device provided according to the embodiments of this application, as shown below. Figure 6 As shown, the voucher verification device provided in this application includes a voucher printing module, an OCR segmentation and recognition quality inspection module (including the aforementioned fragment segmentation OCR recognition module and voucher model quality inspection module), a voucher quality inspection packaging device based on the OCR fragmentation recognition model, a server, and a database. That is, the voucher quality inspection packaging device based on the OCR fragmentation recognition model may include a voucher printing module. After the voucher is printed by the voucher printing module, the data is uploaded to the database. Then, through OCR segmentation and recognition quality inspection, the data uploaded to the database is compared with the data pre-stored in the server to verify whether the content of the printed voucher is correct.
[0095] in addition, Figure 5 The implementation schemes for the three modules—the voucher printing module, the fragment cutting OCR recognition module, and the voucher model quality inspection module—can be as follows:
[0096] 1. The voucher printing module can be divided into a template import stage and a printing stage.
[0097] The implementation scheme for the template import phase can be as follows:
[0098] (1) Establish a voucher template library. The voucher library includes a voucher type dictionary, information components for printing various vouchers, coordinates for printing vouchers, a seal library, a printing glossary, and a data dictionary. The voucher type dictionary includes all vouchers that support printing, such as personal credit certificates, financial certificates, fund certificates, etc. The seal library includes business seals and legal person seals. The printing glossary includes eight commonly used languages, namely Chinese, Japanese, English, Russian, French, German, Portuguese, and Spanish.
[0099] (2) Use different voucher templates as printing samples, and normalize the templates after processing.
[0100] (3) Supports importing voucher templates and verifying printing samples, and allows adjustment of printing styles according to business needs, achieving fine-tuning of printing templates and supporting diverse configurations.
[0101] The printing phase can be implemented as follows:
[0102] (1) The operator inputs relevant task instructions, specifically using intelligent devices to activate the device.
[0103] (2) Process the input signal and automatically determine the type of print template based on the customer's application information.
[0104] (3) Extract features from customer information and voucher information to obtain key information and automatically match relevant information based on template components.
[0105] (4) Use the voucher template library to print components and output the voucher printing results.
[0106] (5) Supports automatic reprinting of vouchers that fail quality inspection.
[0107] 2. Fragment Segmentation OCR Recognition Module: This module is divided into a fragment segmentation stage and an OCR recognition stage. Furthermore, Figure 7 This is a schematic diagram of the fragment cutting OCR recognition module in an embodiment of this application, as shown below. Figure 7As shown, image fragments are cut from a voucher template, and the voucher information and corresponding confidence values are output by the OCR recognition module. From image to result output, the process involves image fragment input, image fragment preprocessing, text feature extraction, comparison and recognition, and finally manual correction to correct any misidentified text before outputting the result.
[0108] The implementation scheme for the fragmentation stage can be:
[0109] (1) Scan the relevant printed vouchers to form voucher images and upload the issuance records to the server.
[0110] (2) Define the format of various vouchers and define the position of the cut fragments.
[0111] (3) According to the layout, the image is cut to form a set of fragments [a, b, c...] under the voucher ID [A].
[0112] The implementation scheme for the OCR recognition stage can be:
[0113] (1) OCR (Optical Character Recognition) refers to the process of scanning text materials and then analyzing and processing image files to obtain text and layout information.
[0114] (2) Image preprocessing: The process of transforming a binary image (either black or white, or grayscale or color) into individual text images is all considered image preprocessing. It includes image processing such as image normalization, noise removal, and image correction, as well as document preprocessing such as image and text analysis and text line and character separation.
[0115] (3) Text feature extraction: Two feature extraction methods are adopted: one is statistical features, such as the black / white point ratio within a text region. When a text is divided into several regions, the combined black / white point ratio of each region becomes a numerical vector in space. The other is structural features, such as obtaining the number and position of stroke ends and intersections after the text image is thinned, or using stroke segments as features, combined with special comparison methods.
[0116] (4) Comparison database: After the features of the input text are calculated, a comparison database or feature database is used for comparison. The content of the database should be the same as that of the comparison database, and the feature groups are obtained by the same feature extraction method as the input text.
[0117] (5) Comparison and recognition: Based on different feature characteristics, different mathematical distance functions are selected. Well-known comparison methods include Euclidean space comparison method, relaxation comparison method, dynamic programming (DP) comparison method, as well as database establishment and comparison of neural networks, HMM (Hidden Markov Model) and other methods to obtain the credibility value of fragment information. In order to make the recognition results more stable, the differences and complementarities of various feature comparison methods are utilized to make the recognition results more reliable.
[0118] (6) Word post-processing: Since the recognition rate of OCR cannot reach 100%, some error-correction or even correction functions have become a necessary module in the OCR system. Word post-processing is one example. It uses the recognized text after comparison with its possible similar candidate word groups to find the most logical word based on the recognized text before and after, and performs correction.
[0119] (7) Manual correction: A manual correction step can be set up to judge the correctness of the OCR recognition result and the voucher by human judgment.
[0120] (8) Output results: Based on the identification results of the fragment set [a, b, c...] under the credential ID [A], output the credential information string and their respective confidence values.
[0121] 3. Voucher Model Quality Inspection Module: This module acquires the voucher information string output by the fragment segmentation OCR recognition module, specifically the voucher information corresponding to the fragment set [a, b, c...] under voucher ID [A]. It compares the fragment information with the voucher's backend information and, based on the fragment reliability value, confirms the quality inspection result. If it passes, the voucher is issued to the customer; otherwise, a reprint is triggered, and the original voucher is invalidated. Figure 8 This is a schematic diagram of the certificate model quality inspection module in an embodiment of this application.
[0122] Additionally, the verification information is as follows:
[0123] (1) Based on the fragment identification information, combined with the voucher cutting template configuration and the backend information, one-to-one confirmation is achieved.
[0124] (2) The certificate application information includes the customer's name, customer number (ID), customer's personal identification information, and the customer account required for the certificate.
[0125] (3) The voucher verification information includes voucher name, voucher number, voucher type, voucher quantity, voucher printing style, voucher printing date, and seal information.
[0126] (4) If the quality inspection fails, the relevant vouchers will be voided and the relevant task will be returned to the voucher printing module for reprinting. At the same time, the relevant operators will be notified to process the relevant quality inspection information.
[0127] The quality inspection module functions are encapsulated in an interface and used by calling methods.
[0128] Therefore, the above solution can eliminate manual printing, manual quality inspection, and manual re-inspection, realize automated operation, improve issuance efficiency, and establish an online management platform that tracks the entire life cycle of voucher circulation, archives in advance and verifies afterward, and makes the issuance process traceable.
[0129] Furthermore, currently, vouchers undergo quality inspection and re-inspection at financial institutions through back-end printing. This process is cumbersome, labor-intensive, and impacts distribution efficiency. Moreover, because distribution is done offline, the lack of online data collection hinders the retrieval of historical records. A voucher quality inspection device based on an OCR fragment recognition model can quickly perform voucher printing, quality inspection, and archiving, reducing production costs and improving work efficiency.
[0130] Furthermore, addressing the issues of high workload in voucher issuance, time-consuming and error-prone quality inspection, low business processing efficiency, and inability to collect online data, this embodiment utilizes a voucher quality inspection device based on an OCR fragment recognition model. This device combines fragment cutting, OCR recognition, and background quality inspection technologies to achieve voucher quality inspection, printing, and issuance, recording the issuance results online. This optimizes the voucher issuance scenario for financial institutions, thereby reducing issuance costs, workload, and improving issuance efficiency. Moreover, the method provided in this embodiment, through automatic background printing, fragment cutting and OCR recognition of vouchers, and automatic background quality inspection, can complete system quality inspection, archiving, and printing of vouchers, improving issuance efficiency.
[0131] The method provided in this application embodiment can achieve the following effects:
[0132] (1) Low labor costs. The issuance of vouchers is accomplished through a combination of three modules, requiring only the operator to submit the task, which reduces a significant amount of manpower and material costs. At the same time, the system automatically identifies and prints quality inspection documents, reducing the costs caused by quality inspection errors.
[0133] (2) High business processing efficiency. This method can realize automatic and fast printing, quality inspection and distribution of vouchers, reducing business processing time. At the same time, the automatic quality inspection by the device in the background greatly reduces human error and improves the speed and effectiveness of quality inspection.
[0134] (3) Improve the traceability and security of vouchers. This method uploads voucher image information to the server, which improves the security of data and voucher information and supports post-event inspection and traceability;
[0135] (4) The voucher template library supports flexible configuration. It can configure fragment coordinates and other information according to various vouchers and supports the cutting and recognition of multiple vouchers.
[0136] Alternatively, vouchers can be printed and delivered through other online methods, or their correctness can be verified through manual quality inspection, or they can be recorded by taking photos manually, or uploaded manually to a device capable of storing data.
[0137] In summary, the document verification method provided in this application involves acquiring an image of a target document, wherein the target document is a printed paper document; cutting the image to obtain N fragments, where N is a positive integer greater than 1; inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, where each target text information corresponds to a fragment, and each confidence value represents the accuracy of each target text information output by the OCR recognition model; and determining the verification result of the target document based on the N target text information and N confidence values, where the verification result indicates whether the content of the target document is correct. This solves the problem in related technologies where manual verification of printed documents leads to poor verification results. By cutting the image of the printed paper document to obtain N fragments, inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, and then verifying the content of the printed paper document based on the N target text information and N confidence values, the method improves the effectiveness of verifying printed documents.
[0138] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0139] This application also provides a voucher verification device. It should be noted that the voucher verification device of this application can be used to execute the voucher verification method provided in this application. The voucher verification device provided in this application is described below.
[0140] Figure 9 This is a schematic diagram of a certificate verification device according to an embodiment of this application. Figure 9 As shown, the device includes: a first acquisition unit 901, a first processing unit 902, a second processing unit 903, and a first determination unit 904.
[0141] Specifically, the first acquisition unit 901 is used to acquire an image of the target voucher, wherein the target voucher is a printed paper voucher;
[0142] The first processing unit 902 is used to perform segmentation processing on the image to obtain N fragments after segmentation, where N is a positive integer greater than 1;
[0143] The second processing unit 903 is used to input N fragments into the OCR recognition model for recognition processing to obtain N target text information and N confidence values. Each target text information is the target text information corresponding to each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model.
[0144] The first determining unit 904 is used to determine the verification result of the target voucher based on N target text information and N confidence values, wherein the verification result is used to indicate whether the content of the target voucher is correct.
[0145] In summary, the certificate verification device provided in this application embodiment acquires an image of the target certificate through a first acquisition unit 901, wherein the target certificate is a printed paper certificate; a first processing unit 902 performs segmentation processing on the image to obtain N fragments, wherein N is a positive integer greater than 1; a second processing unit 903 inputs the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information corresponds to the target text information of each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model; a first determining unit 904 determines the verification result of the target certificate based on the N target text information and the N confidence values, wherein the verification result is used to indicate whether the content of the target certificate is correct, thus solving the problem in related technologies where manual verification of printed certificates leads to poor verification results. By cutting the image of the printed paper voucher into N fragments, and then inputting the N fragments into an OCR recognition model for recognition processing, N target text information and N confidence values are obtained. The content of the printed paper voucher is then checked for correctness based on the N target text information and N confidence values, thereby improving the effectiveness of checking the printed voucher.
[0146] Optionally, in the certificate verification device provided in this application embodiment, the first determining unit includes: a first judging module, used to judge whether each confidence value is not less than a preset threshold; a first acquiring module, used to acquire the electronic certificate corresponding to the target certificate if each confidence value is not less than the preset threshold; a first determining module, used to determine multiple target information in the electronic certificate, wherein the multiple target information includes at least: attribute information of the electronic certificate and attribute information of a first object, the first object being the object applying for the electronic certificate; and a second determining module, used to determine the verification result of the target certificate based on N target text information, the attribute information of the electronic certificate, and the attribute information of the first object.
[0147] Optionally, in the certificate verification device provided in this application embodiment, the second determining module includes: a first determining submodule, used to determine the attribute information of the target certificate and the attribute information of the target object in the target certificate based on N target text information, wherein the target object is the object applying for the target certificate; a first judging submodule, used to judge whether the attribute information of the target certificate and the attribute information of the electronic certificate are the same, and to judge whether the attribute information of the target object and the attribute information of the first object are the same; a second determining submodule, used to determine the verification result as the content of the target certificate is correct if the attribute information of the target certificate and the attribute information of the electronic certificate are the same, and the attribute information of the target object and the attribute information of the first object are the same; and a third determining submodule, used to determine the verification result as the content of the target certificate is incorrect if the attribute information of the target certificate and the attribute information of the electronic certificate are not the same, and / or the attribute information of the target object and the attribute information of the first object are not the same.
[0148] Optionally, in the certificate verification device provided in this application embodiment, the second processing unit includes: a first processing module, used to preprocess N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; a first extraction module, used to extract N original text information from the fragment set using a feature extraction method; a second processing module, used to perform correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; and a first comparison module, used to compare each target text information with text information in the database to obtain a numerical set, wherein the numerical set includes at least N reliable values.
[0149] Optionally, in the certificate verification device provided in this application embodiment, the first processing unit includes: a second acquisition module, used to acquire the format information of the target certificate; a third determination module, used to determine the cutting position when cutting the image based on the format information of the target certificate; and a third processing module, used to cut the image based on the cutting position to obtain N fragments after cutting.
[0150] Optionally, in the certificate verification device provided in the embodiments of this application, the first acquisition unit includes: a third acquisition module for acquiring the target certificate; and a fourth processing module for scanning the target certificate to obtain an image of the target certificate.
[0151] Optionally, in the certificate verification device provided in this application embodiment, the third acquisition module includes: a first acquisition submodule, used to acquire a template library, wherein the template library is used to store templates corresponding to various certificates; a fourth determination submodule, used to determine the target template corresponding to the target certificate from the template library; a fifth determination submodule, used to determine the content information of the target certificate based on the target template; and a sixth determination submodule, used to obtain the target certificate based on the target template and the content information of the target certificate.
[0152] The verification device for the voucher includes a processor and a memory. The first acquisition unit 901, the first processing unit 902, the second processing unit 903, and the first determination unit 904 are all stored in the memory as program units. The processor executes the program units stored in the memory to achieve the corresponding functions.
[0153] The processor contains a kernel, which retrieves the corresponding program unit from memory. One or more kernels can be configured, and adjusting kernel parameters can improve the effectiveness of verifying printed documents.
[0154] The memory may include non-permanent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0155] This invention provides a computer-readable storage medium having a program stored thereon, which, when executed by a processor, implements the verification method for the credential.
[0156] This invention provides a processor for running a program, wherein the program executes a verification method for the credential during runtime.
[0157] like Figure 10As shown, this embodiment of the invention provides an electronic device, which includes a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it performs the following steps: acquiring an image of a target document, wherein the target document is a printed paper document; cutting the image to obtain N fragments, where N is a positive integer greater than 1; inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information corresponds to a fragment, and each confidence value represents the accuracy of each target text information output by the OCR recognition model; and determining the verification result of the target document based on the N target text information and the N confidence values, wherein the verification result represents whether the content of the target document is correct.
[0158] When the processor executes the program, it also performs the following steps: determining the verification result of the target credential based on N target text information and N confidence values, including: determining whether each confidence value is not less than a preset threshold; if each confidence value is not less than the preset threshold, then obtaining the electronic credential corresponding to the target credential; determining multiple target information in the electronic credential, wherein the multiple target information includes at least: the attribute information of the electronic credential and the attribute information of a first object, the first object being the object that applied for the electronic credential; and determining the verification result of the target credential based on the N target text information, the attribute information of the electronic credential, and the attribute information of the first object.
[0159] When the processor executes the program, it also performs the following steps: determining the verification result of the target credential based on N target text information, the attribute information of the electronic credential, and the attribute information of the first object, including: determining the attribute information of the target credential and the attribute information of the target object in the target credential based on N target text information, wherein the target object is the object that applied for the target credential; determining whether the attribute information of the target credential and the attribute information of the electronic credential are the same, and determining whether the attribute information of the target object and the attribute information of the first object are the same; if the attribute information of the target credential and the attribute information of the electronic credential are the same, and the attribute information of the target object and the attribute information of the first object are the same, then the verification result is determined to be that the content of the target credential is correct; if the attribute information of the target credential and the attribute information of the electronic credential are not the same, and / or, the attribute information of the target object and the attribute information of the first object are not the same, then the verification result is determined to be that the content of the target credential is incorrect.
[0160] The processor, when executing the program, also performs the following steps: inputting N fragments into the OCR recognition model for recognition processing to obtain N target text information and N reliable values, including: preprocessing the N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; using a feature extraction method to extract N original text information from the fragment set; performing correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; comparing each target text information with text information in the database to obtain a numerical set, wherein the numerical set includes at least N reliable values.
[0161] When the processor executes the program, it also performs the following steps: cutting the image to obtain N fragments, including: obtaining the layout information of the target document; determining the cutting position when cutting the image based on the layout information of the target document; and cutting the image based on the cutting position to obtain N fragments.
[0162] When the processor executes the program, it also performs the following steps: obtaining the image of the target credential includes: obtaining the target credential; scanning the target credential to obtain the image of the target credential.
[0163] When the processor executes the program, it also performs the following steps: obtaining the target credential includes: obtaining a template library, wherein the template library is used to store templates corresponding to various credentials; determining the target template corresponding to the target credential from the template library; determining the content information of the target credential based on the target template; and obtaining the target credential based on the target template and the content information of the target credential.
[0164] The devices mentioned in this article can be servers, PCs, tablets, mobile phones, etc.
[0165] This application also provides a computer program product, which, when executed on a data processing device, is suitable for executing an initialization program with the following method steps: acquiring an image of a target voucher, wherein the target voucher is a printed paper voucher; cutting the image to obtain N fragments, wherein N is a positive integer greater than 1; inputting the N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, wherein each target text information is the target text information corresponding to each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model; and determining the verification result of the target voucher based on the N target text information and the N confidence values, wherein the verification result is used to indicate whether the content of the target voucher is correct.
[0166] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: determining the verification result of the target credential based on N target text information and N confidence values, including: determining whether each confidence value is not less than a preset threshold; if each confidence value is not less than the preset threshold, then obtaining the electronic credential corresponding to the target credential; determining multiple target information in the electronic credential, wherein the multiple target information includes at least: the attribute information of the electronic credential and the attribute information of a first object, the first object being the object that applied for the electronic credential; and determining the verification result of the target credential based on the N target text information, the attribute information of the electronic credential, and the attribute information of the first object.
[0167] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: determining the verification result of the target credential based on N target text information, the attribute information of the electronic credential, and the attribute information of the first object, including: determining the attribute information of the target credential and the attribute information of the target object in the target credential based on N target text information, wherein the target object is the object applying for the target credential; determining whether the attribute information of the target credential is the same as the attribute information of the electronic credential, and determining whether the attribute information of the target object is the same as the attribute information of the first object; if the attribute information of the target credential is the same as the attribute information of the electronic credential, and the attribute information of the target object is the same as the attribute information of the first object, then the verification result is determined to be that the content of the target credential is correct; if the attribute information of the target credential is not the same as the attribute information of the electronic credential, and / or, the attribute information of the target object is not the same as the attribute information of the first object, then the verification result is determined to be that the content of the target credential is incorrect.
[0168] When executed on a data processing device, it is also suitable to execute an initialization program with the following steps: inputting N fragments into an OCR recognition model for recognition processing to obtain N target text information and N confidence values, including: preprocessing the N fragments to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, the preprocessing being at least one of the following: noise removal processing and correction processing; using a feature extraction method to extract N original text information from the fragment set; performing correction processing on the N original text information to obtain a target text set, wherein the target text set includes at least N target text information; comparing each target text information with text information in a database to obtain a numerical set, wherein the numerical set includes at least N confidence values.
[0169] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: cutting the image to obtain N fragments, including: obtaining the layout information of the target voucher; determining the cutting position when cutting the image based on the layout information of the target voucher; and cutting the image based on the cutting position to obtain N fragments.
[0170] When executed on a data processing device, it is also suitable to execute an initialization program having the following method steps: obtaining an image of a target credential includes: obtaining the target credential; scanning the target credential to obtain an image of the target credential.
[0171] When executed on a data processing device, it is also suitable to execute an initialization program with the following method steps: obtaining the target credential includes: obtaining a template library, wherein the template library is used to store templates corresponding to various credentials; determining the target template corresponding to the target credential from the template library; determining the content information of the target credential based on the target template; and obtaining the target credential based on the target template and the content information of the target credential.
[0172] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0173] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0174] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0175] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0176] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0177] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0178] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0179] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.
[0180] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0181] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A method for verifying vouchers, characterized in that, include: Obtain an image of the target voucher, wherein the target voucher is a printed paper voucher; The image is segmented to obtain N fragments, where N is a positive integer greater than 1; N fragments are input into the OCR recognition model for recognition processing to obtain N target text information and N confidence values. Each target text information is the target text information corresponding to each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model. The confidence value is obtained by comparing the target text information with the text information in the database. Based on N target text information and N confidence values, the verification result of the target credential is determined, wherein the verification result is used to indicate whether the content of the target credential is correct; The process of determining the verification result of the target credential based on N target text information and N confidence values includes: determining whether each confidence value is not less than a preset threshold; if each confidence value is not less than the preset threshold, then obtaining the electronic credential corresponding to the target credential; determining multiple target information in the electronic credential, wherein the multiple target information includes at least: the attribute information of the electronic credential and the attribute information of a first object, the first object being the object that applied for the electronic credential; and determining the verification result of the target credential based on the N target text information, the attribute information of the electronic credential, and the attribute information of the first object. The determination of the verification result of the target credential based on N target text information, the attribute information of the electronic credential, and the attribute information of the first object includes: determining the attribute information of the target credential and the attribute information of the target object, where the target object is the object applying for the target credential, based on the N target text information; determining whether the attribute information of the target credential is the same as the attribute information of the electronic credential, and determining whether the attribute information of the target object is the same as the attribute information of the first object; if the attribute information of the target credential is the same as the attribute information of the electronic credential, and the attribute information of the target object is the same as the attribute information of the first object, then the verification result is determined to be that the content of the target credential is correct; if the attribute information of the target credential is different from the attribute information of the electronic credential, and / or, the attribute information of the target object is different from the attribute information of the first object, then the verification result is determined to be that the content of the target credential is incorrect.
2. The method according to claim 1, characterized in that, Inputting N fragments into the OCR recognition model for processing yields N target text information and N confidence values, including: N fragments are preprocessed to obtain a fragment set, wherein the fragment set includes at least N preprocessed fragments, and the preprocessing is at least one of the following: noise removal processing and correction processing; Using feature extraction methods, N original text information items are extracted from the fragment set; Correction processing is performed on N original text information to obtain a target text set, wherein the target text set includes at least N target text information; Each target text information is compared with the text information in the database to obtain a set of values, wherein the set of values includes at least N reliable values.
3. The method according to claim 1, characterized in that, The image is segmented to obtain N fragments, including: Obtain the format information of the target voucher; Based on the layout information of the target voucher, determine the cutting position when cutting the image; Based on the cutting position, the image is cut to obtain N fragments.
4. The method according to claim 1, characterized in that, The image of the target credential includes: Obtain the target credential; The target credential is scanned to obtain an image of the target credential.
5. The method according to claim 4, characterized in that, Obtaining the target credential includes: Obtain a template library, wherein the template library is used to store templates corresponding to various vouchers; Determine the target template corresponding to the target voucher from the template library; Based on the target template, determine the content information of the target voucher; The target credential is obtained based on the content information of the target template and the target credential.
6. A device for verifying vouchers, characterized in that, include: The first acquisition unit is used to acquire an image of a target voucher, wherein the target voucher is a printed paper voucher; The first processing unit is used to cut the image to obtain N fragments, where N is a positive integer greater than 1. The second processing unit is used to input N fragments into the OCR recognition model for recognition processing to obtain N target text information and N confidence values. Each target text information is the target text information corresponding to each fragment, and each confidence value is used to represent the accuracy of each target text information output by the OCR recognition model. The confidence value is obtained by comparing the target text information with the text information in the database. The first determining unit is used to determine the verification result of the target credential based on N target text information and N confidence values, wherein the verification result is used to indicate whether the content of the target credential is correct; The first determining unit includes: a first judging module, used to judge whether each confidence value is not less than a preset threshold; a first acquiring module, used to acquire the electronic certificate corresponding to the target certificate if each confidence value is not less than the preset threshold; a first determining module, used to determine multiple target information in the electronic certificate, wherein the multiple target information includes at least: attribute information of the electronic certificate and attribute information of a first object, the first object being the object that applied for the electronic certificate; and a second determining module, used to determine the verification result of the target certificate based on N target text information, the attribute information of the electronic certificate, and the attribute information of the first object. The second determining module includes: a first determining submodule, used to determine the attribute information of the target credential and the attribute information of the target object based on N target text information, wherein the target object is the object applying for the target credential; a first judging submodule, used to judge whether the attribute information of the target credential and the attribute information of the electronic credential are the same, and to judge whether the attribute information of the target object and the attribute information of the first object are the same; a second determining submodule, used to determine that the verification result is that the content of the target credential is correct if the attribute information of the target credential and the attribute information of the electronic credential are the same, and the attribute information of the target object and the attribute information of the first object are the same; and a third determining submodule, used to determine that the verification result is that the content of the target credential is incorrect if the attribute information of the target credential and the attribute information of the electronic credential are not the same, and / or the attribute information of the target object and the attribute information of the first object are not the same.
7. A computer-readable storage medium, characterized in that, The storage medium stores a program, wherein the program executes the verification method for the credential as described in any one of claims 1 to 5.
8. An electronic device, characterized in that, It includes one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors cause the one or more processors to implement the credential verification method according to any one of claims 1 to 5.