Intelligent document processing method and recognition system based on OCR (optical character recognition) and AI (artificial intelligence) technologies
Through an intelligent document processing method based on OCR and AI technology, the scanning method is judged using character similarity, combined with strong light scanning and angle rotation and scaling, the problem of handwriting affecting character recognition is solved and the accuracy of text recognition is improved.
Patent Information
- Application Number
- CN202411087052.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-08
- Publication Date
- 2024-12-10
- Estimated Expiration
- 2044-08-08
AI Technical Summary
During the text character recognition process, the handwriting imprint on paper will affect the scanning results, resulting in a decrease in the accuracy of character recognition, and the prior art is difficult to effectively solve this problem.
Using an intelligent document processing method based on OCR and AI technology, by obtaining the image to be recognized, identifying characters and judging the scanning method based on the similarity between the characters and the preset characters, selecting normal scanning or strong light scanning, combining angle rotation and scaling to remove handwriting To improve recognition accuracy.
Accurate recognition and removal of handwriting is achieved, the accuracy of character recognition is improved, and the accuracy of text recognition is ensured.
Smart Images

Figure CN119107658A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of image recognition, in particular to the technical field of character recognition, and specifically relates to an intelligent document processing method and a recognition system based on OCR and AI technologies. Background Art
[0002] During the text character recognition process, the paper with characters written on it needs to be scanned. When the paper is written with characters, the handwriting of the characters on the previous piece of paper will be printed on the next piece of paper, causing the handwriting of the characters on the previous piece of paper to be scanned during the scanning process, which will affect the subsequent text character recognition.
[0003] Therefore, due to the technical problem that the scanned image may contain the handwriting of the text on the previous piece of paper, which may affect character recognition, it is necessary to design a new intelligent document processing method and recognition system based on OCR and AI technology. Summary of the invention
[0004] The purpose of the present invention is to provide an intelligent document processing method and recognition system based on OCR and AI technology.
[0005] In order to solve the above technical problems, the present invention provides an intelligent document processing method based on OCR and AI technology, comprising: Obtain an image to be recognized; Scanning the image to be recognized and recognizing the characters in the image to be recognized; wherein In the process of identifying characters in the image to be identified, the scanning mode is determined according to the similarity between the characters and the preset characters.
[0006] Furthermore, the method of scanning the image to be recognized and recognizing characters in the image to be recognized includes: Scanning the image to be recognized in a normal scanning manner, recognizing the characters therein, arranging the recognized characters from small to large according to the number of strokes, and comparing the characters in sequence with the characters in a preset character library; The number of characters to be recognized is determined, and the number of samples is determined according to the number of characters, where the number of samples is less than the number of characters.
[0007] Furthermore, the method for determining the scanning mode according to the similarity between the character and the preset character during the process of recognizing the character in the image to be recognized includes: After normal scanning, the similarity of each character in the sample is obtained based on the comparison results of each character with the characters in the preset character library, and the similarities are sorted from small to large; The minimum similarity is selected, and whether strong light scanning is required is determined based on the minimum similarity.
[0008] Furthermore, the method for determining whether strong light scanning is required based on the minimum similarity includes: If the minimum similarity is greater than the preset standard similarity, it is determined that strong light scanning is not necessary; At this time, the characters are rotated and scaled according to the similarity of each character, and the number of times the image to be recognized needs to be scanned is determined according to the minimum similarity; Get the scan result after scanning the determined number of times and rotating and scaling the characters.
[0009] Furthermore, the method for determining whether strong light scanning is required based on the minimum similarity also includes: If the minimum similarity is less than the preset standard similarity, it is determined that strong light scanning is required; The characters obtained by the strong light scanning are compared with the characters obtained by the normal scanning to obtain trace samples, and the trace samples are compared.
[0010] Further, the method for comparing trace samples includes: Sort the characters in the trace sample by the number of strokes from small to large, compare each character with the characters in the preset character library in order, obtain the similarity of each character in the trace sample, and determine the number of samples corresponding to the trace sample; The traces are judged based on their similarity.
[0011] Furthermore, the method for judging traces according to similarity includes: Arrange the similarities of the characters in the trace sample from small to large, and determine the number of strong light scans required based on the smallest similarity; Obtain trace results after performing a corresponding number of strong light scans; Process the current image to be identified according to the trace results.
[0012] Furthermore, the method for processing the current image to be identified according to the trace result includes: Determine the corresponding image to be identified to which the trace in the current image to be identified belongs according to the trace result, so as to complete the trace, and after the trace is completed, remove the trace from the current image to be identified, and obtain the scanning result of the current image to be identified; and According to the corresponding image to be identified to which the trace in the current image to be identified belongs, the sorting position of the current image to be identified is determined.
[0013] Furthermore, the intelligent document processing method based on OCR and AI technology also includes: After obtaining the scanning result, the scanning result is input into a text image recognition model containing a mixed convolution kernel to obtain a convolution feature map corresponding to the scanning result.
[0014] Furthermore, the convolutional feature map is input into the recurrent neural network of the text image recognition model for feature extraction to obtain sequence features; Input the sequence features into the fully connected layer of the text image recognition model to obtain the character probability distribution result; The preset loss function is used to calculate the error loss of the character probability distribution result to obtain the text recognition result of the scan result.
[0015] On the other hand, the present invention also provides a recognition system using the above-mentioned intelligent document processing method based on OCR and AI technology, comprising: An acquisition module, configured to acquire an image to be recognized; A scanning module, which is configured to scan the image to be recognized and recognize characters in the image to be recognized; The judgment module is configured to judge the scanning mode according to the similarity between the characters and the preset characters in the process of recognizing the characters in the image to be recognized.
[0016] The beneficial effects of the present invention are that the present invention obtains an image to be identified; scans the image to be identified, and identifies characters in the image to be identified; wherein in the process of identifying characters in the image to be identified, the scanning method is determined according to the degree of similarity between the characters and preset characters; and the handwriting is scanned by strong light scanning, which is convenient for the identification of the handwriting. After the handwriting is identified, the handwriting can be removed from the image to be identified, so as to accurately identify the characters.
[0017] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention are realized and obtained by the structures particularly pointed out in the description and the drawings.
[0018] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 It is a flow chart of an intelligent document processing method based on OCR and AI technology of the present invention; Figure 2It is a specific flow chart of an intelligent document processing method based on OCR and AI technology of the present invention; Figure 3 It is a specific flow chart of the present invention for identifying characters in an image to be identified. DETAILED DESCRIPTION
[0021] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of 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.
[0022] like Figures 1 to 3 As shown, in at least one embodiment, an intelligent document processing method based on OCR and AI technology is provided, including: obtaining an image to be recognized; scanning the image to be recognized and recognizing characters in the image to be recognized; wherein in the process of recognizing the characters in the image to be recognized, the scanning method is determined according to the similarity between the characters and the preset characters; the handwriting is scanned by strong light scanning to facilitate the recognition of the handwriting, and after the handwriting is recognized, the handwriting can be removed from the image to be recognized to facilitate accurate recognition of the characters. OCR (Optical Character Recognition).
[0023] like Figure 3As shown, the method for scanning the image to be recognized and recognizing the characters in the image to be recognized includes: scanning the image to be recognized using the normal scanning method, recognizing the characters therein, arranging the recognized characters in ascending order according to the number of strokes, and comparing the characters with the characters in the preset character library in sequence; determining the number of recognized characters, and determining the number of samples according to the number of characters, where the number of samples is less than the number of characters; each image to be recognized is first scanned using the normal scanning method; comparing in the preset character library according to the number of strokes of the recognized characters, and quick judgment and comparison can be made according to the number of strokes. For example, according to the number of strokes of the character that has been judged, only the characters with the same or more strokes in the preset character library need to be compared, improving the comparison efficiency; the comparison items can be: the rotation angle, scaling ratio, whether there is a lack, etc. between the characters in the image to be recognized and the corresponding characters in the preset character library. Each comparison item can have a corresponding comparison value, and the similarity can be the average value of the corresponding comparison items of the characters; whether there is a lack can be whether there is a lack of strokes and whether there is a partial lack in a stroke; for the specific lack of strokes, it can be judged whether there is a lack of strokes according to the character structure in the scanned characters. For example, when recognizing "一", if the position of this part is on the same straight line as the corresponding position of the upper half of the other character structures on the left and right sides, it is judged that the recognized character is not "一", and "一" should be a part of the strokes of the current character. Compare all the characters in the character library whose upper half structure only has the stroke of "一" with it. The more strokes are missing, the smaller the corresponding value of whether the strokes of the character are missing, indicating the smaller the similarity degree. Take the smallest value as the value of whether the strokes of the character are missing; for the specific partial lack in a stroke, scan a character, and if there is a corresponding complete character in the character library, obtain the scaling ratio between the current character and the character in the character library. If the difference between the scaling value of the stroke in the current character (each stroke in the character will have a scaling value with the corresponding stroke in the compared character) and the scaling ratio is large, such as much smaller than the scaling ratio, it is judged that there is a missing part in the stroke of the current character. At this time, the difference can be recorded as the value corresponding to whether there is a partial lack in the stroke of the character.
[0024] The method for judging the scanning method according to the similarity degree between the characters and the preset characters during the process of recognizing the characters in the image to be recognized includes: after normal scanning, according to the comparison results of each character with the characters in the preset character library, obtain the similarity degree of each character in the sample, and sort the similarity degrees from small to large; select the smallest similarity degree, and judge whether strong light scanning is needed according to the smallest similarity degree; during the scanning process, due to reasons such as reflection, there may be situations where the scanned characters are missing, etc. Therefore, judge the number of scans according to the smallest similarity degree, and avoid the missing of characters caused by reasons such as light and reflection through multiple scans.
[0025] The method for judging whether strong light scanning is required based on the minimum similarity includes: if the minimum similarity is greater than the preset standard similarity, it is judged that strong light scanning is not required; at this time, the characters are rotated and scaled according to the similarity of each character, and the number of times the image to be identified needs to be scanned is judged according to the minimum similarity; the scanning result is obtained after the number of scans is judged and the character angles are rotated and scaled; when the minimum similarity is greater than the preset standard similarity, it is said that the character with the smallest similarity at this time is also very similar to the corresponding character in the preset character library, and the character can be obtained only through multiple ordinary scans.
[0026] The method for determining whether strong light scanning is required based on the minimum similarity also includes: if the minimum similarity is less than a preset standard similarity, determining that strong light scanning is required; comparing characters obtained by strong light scanning with characters obtained by normal scanning to obtain trace samples, and comparing the trace samples; when writing characters on a piece of paper, the handwriting will be printed on the next piece of paper, causing the characters written on the next piece of paper to overlap with the handwriting, making it difficult to identify during scanning.
[0027] The method for comparing trace samples includes: sorting the characters in the trace samples from small to large according to the number of strokes, comparing each character with the characters in a preset character library in order, obtaining the similarity of each character in the trace sample, and determining the number of samples corresponding to the trace sample; judging the trace according to the similarity; and judging and identifying the characters in the trace sample using the same principle and method as ordinary scanning.
[0028] The method for judging traces based on similarity includes: arranging the similarities of each character in the trace sample from small to large, judging the number of strong light scans required based on the smallest similarity; obtaining the trace result after performing the corresponding number of strong light scans; and processing the current image to be identified based on the trace result.
[0029] The method for processing the current image to be recognized according to the trace result comprises: judging the corresponding image to be recognized to which the trace in the current image to be recognized belongs according to the trace result, so as to complete the trace, and removing the trace from the current image to be recognized after the trace is completed, so as to obtain the scanning result of the current image to be recognized; and judging the sorting position of the current image to be recognized according to the corresponding image to be recognized to which the trace in the current image to be recognized belongs; judging the image to be recognized corresponding to the character in the trace result according to all the characters corresponding to the trace result and the sorting order of the characters, judging which image to be recognized has the handwriting of the character printed in the current image to be recognized, judging the sorting position of the current image to be recognized, and judging that the current image to be recognized should be arranged after the image to be recognized corresponding to the handwriting result; if there is no image to be recognized corresponding to the trace result in the scanned and recognized image to be recognized, judging that the sorting position of the current image to be recognized cannot be determined, and judging its position after scanning other images to be recognized; judging the characters and their positions in the trace result, and judging the characters and their corresponding positions in the image to be recognized whose scanning result has been obtained, judging which image to be recognized has the handwriting of the character printed in the current image to be recognized according to the trace result.
[0030] The intelligent document processing method based on OCR and AI technology also includes: after obtaining the scanning result, inputting the scanning result into a text image recognition model containing a mixed convolution kernel to obtain a convolution feature map corresponding to the scanning result; inputting the convolution feature map into the recurrent neural network of the text image recognition model for feature extraction to obtain sequence features; inputting the sequence features into the fully connected layer of the text image recognition model to obtain character probability distribution results; using a preset loss function to calculate the error loss of the character probability distribution result to obtain a text recognition result of the scanning result; the text image recognition model can accurately determine the text corresponding to the character.
[0031] In at least one other embodiment, a recognition system using the above-mentioned intelligent document processing method based on OCR and AI technology is also provided, including: an acquisition module, which is configured to acquire an image to be recognized; a scanning module, which is configured to scan the image to be recognized and recognize the characters in the image to be recognized; a judgment module, which is configured to judge the scanning method according to the degree of similarity between the characters and the preset characters in the process of recognizing the characters in the image to be recognized.
[0032] In summary, the present invention obtains an image to be identified; scans the image to be identified, and identifies characters in the image to be identified; wherein in the process of identifying characters in the image to be identified, the scanning method is determined according to the degree of similarity between the characters and preset characters; and realizes scanning of handwriting by strong light scanning, which is convenient for handwriting identification. After the handwriting is identified, the handwriting can be removed from the image to be identified to facilitate accurate character identification.
[0033] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0034] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0035] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0036] With the above-mentioned ideal embodiments of the present invention as inspiration, through the above-mentioned description content, relevant personnel can make various changes and modifications without departing from the scope of the technical idea of the present invention.
Claims
1. An intelligent document processing method based on OCR and AI technology, characterized in that: include: Obtain an image to be recognized; Scanning the image to be recognized and recognizing characters in the image to be recognized; in In the process of identifying characters in the image to be identified, the scanning mode is determined according to the similarity between the characters and the preset characters.
2. The intelligent document processing method based on OCR and AI technology as claimed in claim 1, characterized in that: The method of scanning the image to be recognized and recognizing characters in the image to be recognized includes: Scanning the image to be recognized in a normal scanning manner, recognizing the characters therein, arranging the recognized characters from small to large according to the number of strokes, and comparing the characters in sequence with the characters in a preset character library; The number of characters to be recognized is determined, and the number of samples is determined according to the number of characters, where the number of samples is less than the number of characters.
3. The intelligent document processing method based on OCR and AI technology as claimed in claim 2, characterized in that: The method for determining the scanning mode according to the similarity between the character and the preset character in the process of recognizing the character in the image to be recognized includes: After normal scanning, the similarity of each character in the sample is obtained based on the comparison results of each character with the characters in the preset character library, and the similarities are sorted from small to large; The minimum similarity is selected, and whether strong light scanning is required is determined based on the minimum similarity.
4. The intelligent document processing method based on OCR and AI technology as claimed in claim 3, characterized in that: The method for determining whether strong light scanning is required based on the minimum similarity includes: If the minimum similarity is greater than the preset standard similarity, it is determined that strong light scanning is not necessary; At this time, the characters are rotated and scaled according to the similarity of each character, and the number of times the image to be recognized needs to be scanned is determined according to the minimum similarity; Get the scan result after scanning the determined number of times and rotating and scaling the characters.
5. The intelligent document processing method based on OCR and AI technology as claimed in claim 4, characterized in that: The method for determining whether strong light scanning is required based on the minimum similarity also includes: If the minimum similarity is less than the preset standard similarity, it is determined that strong light scanning is required; The characters obtained by the strong light scanning are compared with the characters obtained by the normal scanning to obtain trace samples, and the trace samples are compared.
6. The intelligent document processing method based on OCR and AI technology as claimed in claim 5, characterized in that: The method for comparing trace samples comprises: Sort the characters in the trace sample by the number of strokes from small to large, compare each character with the characters in the preset character library in order, obtain the similarity of each character in the trace sample, and determine the number of samples corresponding to the trace sample; The traces are judged based on their similarity.
7. The intelligent document processing method based on OCR and AI technology as claimed in claim 6, characterized in that: The method for judging traces according to similarity includes: Arrange the similarities of the characters in the trace sample from small to large, and determine the number of strong light scans required based on the smallest similarity; Obtain trace results after performing a corresponding number of strong light scans; Process the current image to be identified according to the trace results.
8. The intelligent document processing method based on OCR and AI technology as claimed in claim 7, characterized in that: The method for processing the current image to be identified according to the trace result includes: Determine the corresponding image to be identified to which the trace in the current image to be identified belongs according to the trace result, so as to complete the trace, and after the trace is completed, remove the trace from the current image to be identified, and obtain the scanning result of the current image to be identified; and According to the corresponding image to be identified to which the trace in the current image to be identified belongs, the sorting position of the current image to be identified is determined.
9. The intelligent document processing method based on OCR and AI technology as claimed in claim 8, characterized in that: The intelligent document processing method based on OCR and AI technology also includes: After obtaining the scanning result, the scanning result is input into a text image recognition model containing a mixed convolution kernel to obtain a convolution feature map corresponding to the scanning result.
10. The intelligent document processing method based on OCR and AI technology as claimed in claim 9, characterized in that: The convolution feature map is input into the recurrent neural network of the text image recognition model for feature extraction to obtain sequence features; Input the sequence features into the fully connected layer of the text image recognition model to obtain the character probability distribution result; Using the preset loss function, the error loss is calculated for the character probability distribution result to obtain the text recognition result of the scan result.
11. A recognition system using the intelligent document processing method based on OCR and AI technology as claimed in claim 1, characterized in that: include: An acquisition module, configured to acquire an image to be recognized; A scanning module, which is configured to scan the image to be recognized and recognize characters in the image to be recognized; The judgment module is configured to judge the scanning mode according to the similarity between the character and the preset character during the process of recognizing the character in the image to be recognized.
Citation Information
Patent Citations
Character image recognition method and device based on hybrid convolution, equipment and storage medium
CN111666931A
Online exercise method and device with character recognition optimization function
CN113283304A
Scanning method and related equipment thereof
CN113723420A
Character recognition method and device and electronic equipment
CN113743102A
Character recognition method based on scanning software and scanning system
CN114419303A
