Text image recognition method, device and equipment
By extracting and comparing key information in text images and performing multiple identification checksum updates, the problem of low electronic management efficiency and accuracy of the fiscal and taxation system is solved, and more efficient and accurate management is achieved.
Patent Information
- Application Number
- CN202411652432.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-03-14
AI Technical Summary
In the prior art, the electronic management efficiency and accuracy of the fiscal and taxation system are low, mainly due to the time wasted and error rates caused by manual processing.
By extracting the first key information of the received text image and comparing it with the pre-stored key information, the target text category and template are obtained, and the recognition and verification are performed. In the event of failing the verification, the second key information is extracted multiple times and the target text is updated until all unit information passes the identification verification.
It effectively avoids the waste of time and high error rates caused by manual processing, and improves the efficiency and accuracy of electronic management of the fiscal and taxation system.
Smart Images

Figure CN119625751A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of financial and taxation systems, and in particular to a text image recognition method, device and equipment. Background Art
[0002] The finance and taxation system integrates the core functions of financial management and taxation management, aiming to provide enterprises with comprehensive and efficient finance and taxation management services. With the development of the digital economy and the gradual advancement of finance and taxation digital accounts, the digital transformation of enterprises requires the ability to archive data resources.
[0003] In the prior art, financial personnel manually convert various bills or contract texts into special electronic spreadsheets in the financial and taxation system for filing. However, manual processing not only wastes a lot of time, but is also prone to omissions, errors, inconsistent standards, and other problems, which in turn leads to low efficiency and accuracy in the electronic management of the financial and taxation system. Summary of the invention
[0004] The present invention provides a text image recognition method, device and equipment, which are used to solve the problem of low efficiency and accuracy of electronic management of financial and taxation systems caused by manual processing in the prior art.
[0005] In a first aspect, an embodiment of the present application provides a method for recognizing a text image, the method comprising:
[0006] Extracting first key information of the received text image;
[0007] Comparing the first key information with pre-stored key information to obtain a first target text category;
[0008] Acquire a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text;
[0009] The unit information of each unit in the target text is recognized and verified. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information. The step of recognizing and verifying the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
[0010] In a possible implementation manner, extracting the first key information of the received text image includes:
[0011] Performing text recognition on the text image to obtain a text recognition result;
[0012] Key information is extracted based on the text recognition result to obtain first key information of the text image.
[0013] In a possible implementation manner, comparing the first key information with pre-stored key information to obtain a first target text category includes:
[0014] Compare the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information;
[0015] The target pre-stored key sub-information corresponding to the maximum similarity value is determined, and the text category corresponding to the target pre-stored key sub-information is used as the first target text category.
[0016] In a possible implementation manner, the identifying and verifying the unit information of each unit in the target text includes:
[0017] Comparing the unit information with pre-stored unit information to obtain a comparison result;
[0018] When the comparison result is that the unit information exists, the unit information passes the identification check; when the comparison result is that the unit information does not exist, the unit information fails the identification check.
[0019] In a possible implementation, the method further includes:
[0020] When the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category;
[0021] In the case where the second target text category is inconsistent with the first target text category, obtaining a text template corresponding to the second target text category, and returning to the step of extracting the second key information of the text image;
[0022] In the case where the second target text category is consistent with the first target text category, the text image and the target text are sent to manual review.
[0023] In a second aspect, an embodiment of the present application provides a text image recognition device, the device comprising:
[0024] An element extraction module, used to extract the first key information of the received text image;
[0025] A comparison and filling module is used to compare the first key information with the pre-stored key information to obtain a first target text category; obtain a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text;
[0026] The recognition and verification module is used to perform recognition and verification on the unit information of each unit in the target text. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information, and the step of performing recognition and verification on the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
[0027] In a possible implementation, the element extraction module is specifically used to:
[0028] Performing text recognition on the text image to obtain a text recognition result;
[0029] Key information is extracted based on the text recognition result to obtain first key information of the text image.
[0030] In a possible implementation manner, the comparison and filling module is specifically used for:
[0031] Compare the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information;
[0032] The target pre-stored key sub-information corresponding to the maximum similarity value is determined, and the text category corresponding to the target pre-stored key sub-information is used as the first target text category.
[0033] In a possible implementation manner, the identification and verification module is specifically used to:
[0034] Comparing the unit information with pre-stored unit information to obtain a comparison result;
[0035] When the comparison result is that the unit information exists, the unit information passes the identification check; when the comparison result is that the unit information does not exist, the unit information fails the identification check.
[0036] In a possible implementation manner, the comparison and filling module is further used for:
[0037] When the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category;
[0038] The identification and verification module is also used for:
[0039] In the case where the second target text category is inconsistent with the first target text category, obtaining a text template corresponding to the second target text category, and returning to the step of extracting the second key information of the text image;
[0040] In the case where the second target text category is consistent with the first target text category, the text image and the target text are sent to manual review.
[0041] In a third aspect, an embodiment of the present application provides a text image recognition device, the device comprising a memory and a processor, wherein:
[0042] The memory is used to store computer programs;
[0043] The processor is used to execute the computer program to perform the following steps:
[0044] Extracting first key information of the received text image;
[0045] Comparing the first key information with pre-stored key information to obtain a first target text category;
[0046] Acquire a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text;
[0047] The unit information of each unit in the target text is recognized and verified. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information. The step of recognizing and verifying the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
[0048] The beneficial effects of the present invention are as follows:
[0049] The present application provides a method, device and equipment for recognizing text images, the method comprising: extracting the first key information of the received text image; comparing the first key information with the pre-stored key information to obtain a first target text category; obtaining a text template corresponding to the first target text category, updating the text template based on the first key information, and obtaining a target text; performing recognition verification on the unit information of each unit in the target text, and extracting the second key information of the text image when the unit information fails to pass the recognition verification, and updating the target text based on the second key information, and returning to the step of performing recognition verification on the unit information of each unit in the target text until the unit information of each unit in the target text passes the recognition verification. That is, the present application extracts the second key information from the text image multiple times, updates the target text based on the extracted second key information, until the unit information of each unit in the target text passes the recognition verification, thereby avoiding the problem of wasting time and high error rate caused by manual processing, thereby improving the efficiency and accuracy of electronic management of financial and taxation systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0051] Figure 1 A flowchart of a text image recognition method provided in an embodiment of the present application;
[0052] Figure 2 A schematic diagram of a flow chart of another text image recognition method provided in an embodiment of the present application;
[0053] Figure 3 A schematic diagram of a flow chart of another text image recognition method provided in an embodiment of the present application;
[0054] Figure 4 A schematic diagram of a flow chart of another text image recognition method provided in an embodiment of the present application;
[0055] Figure 5 A schematic diagram of a flow chart of another text image recognition method provided in an embodiment of the present application;
[0056] Figure 6 A schematic diagram of the structure of a text image recognition device provided in an embodiment of the present application;
[0057] Figure 7 A schematic diagram of the structure of a text image recognition device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0059] It should be noted that the terms "including" and "having" and their variations involved in the documents of this application are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0060] The terms "first" and "second" in this document are used for descriptive purposes only and should not be understood as explicitly or implicitly indicating relative importance or implicitly indicating the number of technical features indicated. Therefore, features defined as "first" and "second" may explicitly or implicitly include one or more of the features, and in the description of the embodiments of this application, unless otherwise specified, "plurality" means two or more.
[0061] The word “exemplary” is used hereinafter to mean “serving as an example, example, or illustration.” Any embodiment described as “exemplary” is not necessarily to be construed as preferred or advantageous over other embodiments.
[0062] The finance and taxation system integrates the core functions of financial management and taxation management, aiming to provide enterprises with comprehensive and efficient finance and taxation management services. With the development of the digital economy and the gradual advancement of finance and taxation digital accounts, the digital transformation of enterprises requires the ability to archive data resources.
[0063] In the prior art, financial personnel manually convert various bills or contract texts into special electronic spreadsheets in the financial and taxation system for filing. However, manual processing not only wastes a lot of time, but is also prone to omissions, errors, inconsistent standards, and other problems, which in turn leads to low efficiency and accuracy in the electronic management of the financial and taxation system.
[0064] Based on the above problems, the embodiment of the present application provides a text image recognition method, which is applied to the financial and taxation system. The method extracts the first key information of the received text image; compares the first key information with the pre-stored key information to obtain the first target text category; obtains the text template corresponding to the first target text category, updates the text template based on the first key information, and obtains the target text; performs recognition verification on the unit information of each unit in the target text, and extracts the second key information of the text image when the unit information fails to pass the recognition verification, and updates the target text based on the second key information, and returns to the step of performing recognition verification on the unit information of each unit in the target text until the unit information of each unit in the target text passes the recognition verification. That is to say, the present application extracts the second key information from the text image multiple times, updates the target text based on the extracted second key information, until the unit information of each unit in the target text passes the recognition verification, thereby avoiding the problem of wasting time and high error rate caused by manual processing, thereby improving the efficiency and accuracy of electronic management of the financial and taxation system.
[0065] The preferred embodiments of the present application are described below in conjunction with the drawings in the specification. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present application, and are not used to limit the present application. In addition, the embodiments and features in the embodiments of the present application may be combined with each other if there is no conflict.
[0066] like Figure 1 FIG. 1 is a flow chart of a text image recognition method provided in an embodiment of the present application, and the steps are as follows:
[0067] S101, extracting first key information of the received text image;
[0068] Specifically, the present application is applied to a finance and taxation system, and can be used to extract the first key information from text images of received bills, sales contracts, purchase contracts, etc. It can also be used to scan the original texts of bills, sales contracts, purchase contracts, etc., and extract the first key information from the scanned text images.
[0069] In a possible implementation, Figure 2 FIG. 1 is a flow chart of another text image recognition method provided in an embodiment of the present application, wherein the first key information is extracted through the following steps:
[0070] S201, performing text recognition on the text image to obtain a text recognition result;
[0071] S202: Extract key information based on the text recognition result to obtain first key information of the text image.
[0072] In a specific embodiment, text recognition is first performed on a text image, and a text recognition result obtained is the text information of the text image. Key information is extracted based on the text recognition result. For example, key information extraction is performed on the bill type information and amount information of a bill document to obtain the first key information of the bill document; key information extraction is performed on the customer information, contract type and amount of a sales contract to obtain the first key information of the sales contract; key information extraction is performed on the purchase type, contract type and amount information of a purchase contract to obtain the first key information of the purchase contract.
[0073] S102, comparing the first key information with the pre-stored key information to obtain a first target text category;
[0074] Specifically, the present application compares the extracted first key information with the pre-stored key information, and determines the first target text category of the received text image based on the comparison result, thereby avoiding the problem of time waste and high error rate caused by manual processing.
[0075] In a possible implementation, Figure 3 FIG. 1 is a flow chart of another text image recognition method provided in an embodiment of the present application, wherein the first target text category is obtained by the following steps:
[0076] S301, comparing the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information;
[0077] S302: Determine the target pre-stored key sub-information corresponding to the maximum similarity value, and use the text category corresponding to the target pre-stored key sub-information as the first target text category.
[0078] In a specific embodiment, the text categories may be financial and tax forms, invoice documents, reimbursement documents, sales contracts, and purchase contracts, etc. Each text category has corresponding pre-stored key sub-information, that is, the pre-stored key information includes pre-stored key sub-information corresponding to financial and tax forms, pre-stored key sub-information corresponding to invoice documents, pre-stored key sub-information corresponding to reimbursement documents, pre-stored key sub-information corresponding to sales contracts, and pre-stored key sub-information corresponding to purchase contracts.
[0079] For example, the first key information of the text image is A, and the pre-stored key sub-information in the pre-stored key information is B1, B2, B3 and B4. The first key information is compared with each pre-stored key sub-information in the pre-stored key information to obtain the similarity value between the first key information and each pre-stored key sub-information. If the similarity value corresponding to the pre-stored key sub-information B2 is the maximum similarity value pair, the pre-stored key sub-information B2 is used as the target pre-stored key sub-information, and the text category corresponding to the pre-stored key sub-information B2 is used as the first target text category. For example, if the text category corresponding to the pre-stored key sub-information B2 is a sales contract, the first target text category of the text image is determined to be a sales contract.
[0080] S103, obtaining a text template corresponding to the first target text category, and updating the text template based on the first key information to obtain a target text;
[0081] In a specific embodiment, after determining the first target text category of the received text image, a text template recognizable in the electronic management of the financial and taxation system corresponding to the first target text category is obtained, and the first key information is filled into the text template to implement an update of the text template based on the first key information to obtain the target text.
[0082] S104, performing recognition verification on the unit information of each unit in the target text, and if the unit information fails the recognition verification, extracting the second key information of the text image, and updating the target text based on the second key information, and returning to the step of performing recognition verification on the unit information of each unit in the target text, until the unit information of each unit in the target text passes the recognition verification.
[0083] In a specific embodiment, the unit information of each unit in the target text is identified and verified to determine whether the unit information in the target text is accurate, such as Figure 4 FIG. 1 is a flow chart of another text image recognition method provided in an embodiment of the present application, comprising:
[0084] S401, comparing the unit information with the pre-stored unit information to obtain a comparison result;
[0085] S402: When the comparison result shows that the unit information exists, the unit information passes the identification verification; when the comparison result shows that the unit information does not exist, the unit information fails the identification verification.
[0086] In a specific embodiment, for each unit information in the target text, the unit information is compared with the pre-stored unit information, and whether the unit information in the target text is accurate is determined based on the comparison result, thereby improving the efficiency and accuracy of the electronic management of the financial and taxation system. For example, in the process of identifying and verifying the unit information corresponding to the supplier information in the target text, if the obtained supplier information is A1234B, A1234B is compared with the pre-stored supplier information. If the comparison result is that A1234B exists in the pre-stored supplier information, the unit information passes the identification verification. If the comparison result is that A1234B does not exist in the pre-stored supplier information, the unit information fails the identification verification.
[0087] It should be noted that, when there is unit information in the target text that fails to pass the recognition verification, the second key information of the text image will continue to be extracted, and the target text will be updated based on the second key information, and the unit information of each unit in the target text will be recognized and verified until the unit information of each unit in the target text passes the recognition verification, thereby extracting the information in the text image multiple times, and updating the target text based on the second key information multiple times, thereby improving the efficiency and accuracy of the electronic management of the financial and taxation system.
[0088] In a possible implementation, when the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category; when the second target text category is inconsistent with the first target text category, a text template corresponding to the second target text category is obtained, and the process returns to the step of extracting the second key information of the text image; when the second target text category is consistent with the first target text category, the text image and the target text are sent for manual review.
[0089] In a specific embodiment, Figure 5 As shown, it is a complete flow chart of a text image recognition method provided in an embodiment of the present application, and the steps are as follows:
[0090] S501, extracting first key information of the received text image;
[0091] S502, comparing the first key information with the pre-stored key information to obtain a first target text category;
[0092] S503, obtaining a text template corresponding to the first target text category, and updating the text template based on the first key information to obtain the target text;
[0093] S504, the unit information of each unit in the target text is identified and verified, and it is determined whether the unit information of each unit in the target text passes the identification and verification. If the unit information of each unit in the target text passes the identification and verification, S505 is executed, otherwise, S506 is executed;
[0094] S505, archiving the target text;
[0095] S506, extracting the second key information of the text image, and updating the target text based on the second key information, returning to S504, until the number of times the second key information of the text image is extracted is greater than or equal to a preset value, executing S507;
[0096] S507, compare the second key information with the pre-stored key information to obtain the second target text category, and determine whether the second target text category is consistent with the first target text category. If they are consistent, execute S508, otherwise, execute S509;
[0097] S508, sending the text image and the target text to manual review;
[0098] S509: Obtain a text template corresponding to the second target text category, and return to S506.
[0099] In a possible implementation, when the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain the second target text category. If the second target text category is consistent with the first target text category, it indicates that there is an error in the extraction of the key information. The unit information that has not passed the recognition verification is corrected through manual review to make the target text pass the recognition verification. For example, if it is determined that the first target text category corresponding to the text image is a purchase contract, in which the supplier information is A1234B, the supplier information obtained by extracting the first key information is A1284B, and after multiple extractions of the second key information, the extracted supplier information is still A1284B, when the second key information is compared with the pre-stored key information and the second target text category is obtained as a purchase contract, it is determined that the second target text category is consistent with the first target text category, and the text image and the target text are sent to manual review, and the supplier information is corrected manually.
[0100] In another possible implementation, when the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category. If the second target text category is inconsistent with the first target text category, then there is an error in the determination process of the characterization text category. A text template corresponding to the second target text category is obtained, and the text template is updated based on the second key information to obtain the target text, and the step of performing recognition verification on the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition verification.
[0101] In another possible implementation, a text template corresponding to the second target text category is obtained, and the process returns to the step of extracting the second key information of the text image, and after the text template is updated based on the second key information, if the recognition verification of the target text is still not passed, the second key information of the text image is repeatedly extracted, and the target text is updated based on the second key information, and the process returns to the step of performing recognition verification on the unit information of each unit in the target text.
[0102] When the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a third target text category; when the third target text category and the second target text category are inconsistent, a text template corresponding to the third target text category is obtained, and the process returns to the step of extracting the second key information of the text image until the unit information of each unit in the target text passes the recognition verification; when the third target text category and the second target text category are consistent, the text image and the target text are sent to manual review.
[0103] Based on the same inventive concept, an embodiment of the present application also provides a text image recognition device, the principle of solving the problem by the device is similar to the principle of solving the problem by the above-mentioned text image recognition method, and the repeated parts will not be repeated.
[0104] like Figure 6 FIG. 1 is a schematic diagram of a text image recognition device provided in an embodiment of the present application, the device comprising:
[0105] An element extraction module 601 is used to extract the first key information of the received text image;
[0106] A comparison and filling module 602 is used to compare the first key information with the pre-stored key information to obtain a first target text category; obtain a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text;
[0107] The recognition and verification module 602 is used to perform recognition and verification on the unit information of each unit in the target text. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information, and the step of performing recognition and verification on the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
[0108] The present application provides a text image recognition method and device, including: extracting the first key information of the received text image; comparing the first key information with the pre-stored key information to obtain a first target text category; obtaining a text template corresponding to the first target text category, updating the text template based on the first key information, and obtaining a target text; performing recognition verification on the unit information of each unit in the target text, and extracting the second key information of the text image when the unit information fails to pass the recognition verification, and updating the target text based on the second key information, and returning to the step of performing recognition verification on the unit information of each unit in the target text until the unit information of each unit in the target text passes the recognition verification. That is, the present application extracts the second key information from the text image multiple times, updates the target text based on the extracted second key information, until the unit information of each unit in the target text passes the recognition verification, thereby avoiding the problem of wasting time and high error rate caused by manual processing, thereby improving the efficiency and accuracy of electronic management of financial and taxation systems.
[0109] In a possible implementation, the element extraction module 601 is specifically used to:
[0110] Performing text recognition on the text image to obtain a text recognition result;
[0111] Key information is extracted based on the text recognition result to obtain first key information of the text image.
[0112] In a possible implementation manner, the comparison and filling module 602 is specifically used for:
[0113] Compare the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information;
[0114] The target pre-stored key sub-information corresponding to the maximum similarity value is determined, and the text category corresponding to the target pre-stored key sub-information is used as the first target text category.
[0115] In a possible implementation manner, the identification verification module 603 is specifically used to:
[0116] Comparing the unit information with pre-stored unit information to obtain a comparison result;
[0117] When the comparison result is that the unit information exists, the unit information passes the identification check; when the comparison result is that the unit information does not exist, the unit information fails the identification check.
[0118] In a possible implementation manner, the comparison and filling module 602 is further used to:
[0119] When the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category;
[0120] The identification verification module 603 is also used for:
[0121] In the case where the second target text category is inconsistent with the first target text category, obtaining a text template corresponding to the second target text category, and returning to the step of extracting the second key information of the text image;
[0122] In the case where the second target text category is consistent with the first target text category, the text image and the target text are sent to manual review.
[0123] Based on the same inventive concept, an embodiment of the present application also provides a text image recognition device, the principle of solving the problem by the device is similar to the principle of solving the problem by the above-mentioned text image recognition method and device, and the repeated parts will not be repeated.
[0124] like Figure 7 , which is a schematic diagram of the structure of a text image recognition device provided in an embodiment of the present application, the device includes a memory 701 and a processor 702, wherein:
[0125] The memory 701 is used to store computer programs;
[0126] The processor 702 is configured to execute the computer program to perform the following steps:
[0127] Extracting first key information of the received text image;
[0128] Comparing the first key information with pre-stored key information to obtain a first target text category;
[0129] Acquire a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text;
[0130] The unit information of each unit in the target text is recognized and verified. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information. The step of recognizing and verifying the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
[0131] The memory 701 is used to store computer programs executed by the processor 702. The memory 701 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and programs required for running the instant messaging function, etc.; the data storage area may store various instant messaging information and operation instruction sets, etc.
[0132] The memory 701 may be a volatile memory, such as a random-access memory (RAM); the memory 701 may also be a non-volatile memory, such as a read-only memory, a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), or the memory 701 may be any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 701 may be a combination of the above memories.
[0133] The processor 702 may include one or more central processing units (CPU) or a digital processing unit, etc. The processor 702 is used to implement the risk operation test method in the above embodiment when calling the computer program stored in the memory 701 .
[0134] The specific connection medium between the memory 701 and the processor 702 is not limited in the embodiment of the present application. Figure 7 In the embodiment, the memory 701 and the processor 702 are connected via a bus 703. The bus 703 is connected to the processor 702 via a bus 703. Figure 7 The connections between other components are shown in bold lines, which are only for illustration and are not intended to be limiting. Bus 703 can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0135] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-readable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0136] The present application provides a method, device and equipment for recognizing text images, the method comprising: extracting the first key information of the received text image; comparing the first key information with the pre-stored key information to obtain a first target text category; obtaining a text template corresponding to the first target text category, updating the text template based on the first key information, and obtaining a target text; performing recognition verification on the unit information of each unit in the target text, and extracting the second key information of the text image when the unit information fails to pass the recognition verification, and updating the target text based on the second key information, and returning to the step of performing recognition verification on the unit information of each unit in the target text until the unit information of each unit in the target text passes the recognition verification. That is, the present application extracts the second key information from the text image multiple times, updates the target text based on the extracted second key information, until the unit information of each unit in the target text passes the recognition verification, thereby avoiding the problem of wasting time and high error rate caused by manual processing, thereby improving the efficiency and accuracy of electronic management of financial and taxation systems.
[0137] The present application is described above with reference to the block diagrams and / or flow charts showing the methods, devices (systems) and / or computer program products according to the embodiments of the present application. It should be understood that a block of the block diagram and / or flow chart diagram and a combination of blocks of the block diagram and / or flow chart diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer and / or other programmable data processing device to produce a machine, so that the instructions executed by the computer processor and / or other programmable data processing device create a method for implementing the functions / actions specified in the block diagram and / or flow chart block.
[0138] Accordingly, the present application may also be implemented with hardware and / or software (including firmware, resident software, microcode, etc.). Furthermore, the present application may take the form of a computer program product on a computer-usable or computer-readable storage medium, which has a computer-usable or computer-readable program code implemented in the medium, for use by an instruction execution system or in conjunction with an instruction execution system. In the context of the present application, a computer-usable or computer-readable medium may be any medium that may contain, store, communicate, transmit, or convey a program for use by an instruction execution system, device, or apparatus, or in conjunction with an instruction execution system, device, or apparatus.
[0139] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include these modifications and variations.
Claims
1. A text image recognition method, characterized in that: The method comprises: Extracting first key information of the received text image; Comparing the first key information with pre-stored key information to obtain a first target text category; Acquire a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text; The unit information of each unit in the target text is recognized and verified. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information. The step of recognizing and verifying the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
2. The method according to claim 1, characterized in that The step of extracting the first key information of the received text image includes: Performing text recognition on the text image to obtain a text recognition result; Key information is extracted based on the text recognition result to obtain first key information of the text image.
3. The method according to claim 1, characterized in that The step of comparing the first key information with the pre-stored key information to obtain a first target text category includes: Compare the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information; The target pre-stored key sub-information corresponding to the maximum similarity value is determined, and the text category corresponding to the target pre-stored key sub-information is used as the first target text category.
4. The method according to claim 1, characterized in that The identifying and verifying the unit information of each unit in the target text includes: Comparing the unit information with pre-stored unit information to obtain a comparison result; When the comparison result is that the unit information exists, the unit information passes the identification check; when the comparison result is that the unit information does not exist, the unit information fails the identification check.
5. The method according to any one of claims 1 to 4, characterized in that: The method further includes: When the number of times the second key information of the text image is extracted is greater than or equal to a preset value, the second key information is compared with the pre-stored key information to obtain a second target text category; In the case where the second target text category is inconsistent with the first target text category, obtaining a text template corresponding to the second target text category, and returning to the step of extracting the second key information of the text image; In the case where the second target text category is consistent with the first target text category, the text image and the target text are sent to manual review.
6. A text image recognition device, characterized in that: The device comprises: An element extraction module, used to extract the first key information of the received text image; A comparison and filling module is used to compare the first key information with the pre-stored key information to obtain a first target text category; obtain a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text; The recognition and verification module is used to perform recognition and verification on the unit information of each unit in the target text. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information, and the step of performing recognition and verification on the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
7. The device according to claim 6, characterized in that The element extraction module is specifically used for: Performing text recognition on the text image to obtain a text recognition result; Key information is extracted based on the text recognition result to obtain first key information of the text image.
8. The device according to claim 6, characterized in that The comparison filling module is specifically used for: Compare the first key information with each pre-stored key sub-information in the pre-stored key information to obtain a similarity value between the first key information and each pre-stored key sub-information; The target pre-stored key sub-information corresponding to the maximum similarity value is determined, and the text category corresponding to the target pre-stored key sub-information is used as the first target text category.
9. The device according to claim 6, characterized in that The identification and verification module is specifically used for: Comparing the unit information with pre-stored unit information to obtain a comparison result; When the comparison result is that the unit information exists, the unit information passes the identification check; when the comparison result is that the unit information does not exist, the unit information fails the identification check.
10. A text image recognition device, characterized in that: comprising a memory and a processor, wherein: The memory is used to store computer programs; The processor is used to execute the computer program to perform the following steps: Extracting first key information of the received text image; Comparing the first key information with pre-stored key information to obtain a first target text category; Acquire a text template corresponding to the first target text category, and update the text template based on the first key information to obtain a target text; The unit information of each unit in the target text is recognized and verified. If the unit information fails the recognition and verification, the second key information of the text image is extracted, and the target text is updated based on the second key information. The step of recognizing and verifying the unit information of each unit in the target text is returned until the unit information of each unit in the target text passes the recognition and verification.
Citation Information
Cited By
Finance and tax text data verification method and system
CN120544212A