CN116912833A - Text recognition method and device based on text error correction model - Google Patents

Text recognition method and device based on text error correction model Download PDF

Info

Publication number
CN116912833A
CN116912833A CN202310912550.XA CN202310912550A CN116912833A CN 116912833 A CN116912833 A CN 116912833A CN 202310912550 A CN202310912550 A CN 202310912550A CN 116912833 A CN116912833 A CN 116912833A
Authority
CN
China
Prior art keywords
text
error correction
recognition
correction model
character
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310912550.XA
Other languages
Chinese (zh)
Inventor
周敏飞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202310912550.XA priority Critical patent/CN116912833A/en
Publication of CN116912833A publication Critical patent/CN116912833A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/12Detection or correction of errors, e.g. by rescanning the pattern
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/14Image acquisition
    • G06V30/148Segmentation of character regions
    • G06V30/153Segmentation of character regions using recognition of characters or words
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V30/00Character recognition; Recognising digital ink; Document-oriented image-based pattern recognition
    • G06V30/10Character recognition
    • G06V30/19Recognition using electronic means
    • G06V30/191Design or setup of recognition systems or techniques; Extraction of features in feature space; Clustering techniques; Blind source separation
    • G06V30/19187Graphical models, e.g. Bayesian networks or Markov models

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Character Discrimination (AREA)

Abstract

The embodiment of the application provides a text recognition method and device based on a text error correction model, wherein the method comprises the following steps: performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result; obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises an association relation of each character in the initial text recognition result; the application can effectively improve the accuracy of character recognition.

Description

Text recognition method and device based on text error correction model
Technical Field
The application relates to the field of character recognition and also can be used in the financial field, in particular to a character recognition method and device based on a text error correction model.
Background
With the development and maturity of OCR (Optical Character Recognition) technology, OCR character recognition technology is being applied to more and more occasions. But the factors influencing the OCR recognition rate are more, including the quality of the printing of the text manuscript, the standardization degree of the handwriting, the quality of the image acquisition equipment and the like. According to statistics, the whole recognition rate of the current printing body can reach 95%, the handwriting is 90%, and the OCR recognition accuracy is a key index of OCR technology. If the OCR error recognition rate is higher, more manual intervention is often needed, the efficiency is influenced, the labor cost is wasted, and the improvement of the OCR recognition rate is a main research direction of the current OCR recognition development.
The inventor finds that the OCR recognition scheme in the prior art is to divide the area of an image containing characters and recognize the characters of a picture which is divided and contains a single character image, and finally integrate the result of each recognition into the text content.
Disclosure of Invention
Aiming at the problems in the prior art, the application provides a text recognition method and a text recognition device based on a text error correction model, which can effectively improve the accuracy of text recognition.
In order to solve at least one of the problems, the application provides the following technical scheme:
in a first aspect, the present application provides a text recognition method based on a text error correction model, including:
performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
Further, the obtaining the target text recognition result according to the initial text recognition result and the set text correction model includes:
determining the association relation of each character in the initial text recognition result according to a set text error correction model;
and determining a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation.
Further, the determining the target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation includes:
acquiring the recognition probability of each character in the initial text recognition result, and determining error correction parameters of the recognition probability according to the association relation of each character in a set text error correction model;
and determining a target text recognition result according to the error correction parameters and the recognition probability of each character.
Further, the determining the error correction parameter of the recognition probability according to the association relation between each character in the set text error correction model includes:
judging that the association relation between two adjacent characters in the text error correction model is larger than a threshold value;
if yes, determining that the error correction parameter of the identification probability is a positive value.
Further, the determining the error correction parameter of the recognition probability according to the association relation between each character in the set text error correction model includes:
judging that the association relationship between two adjacent characters in the text error correction model is smaller than a threshold value;
if yes, determining that the error correction parameter of the identification probability is a negative value.
Further, the determining the target text recognition result according to the error correction parameter and the recognition probability of each character includes:
correcting the recognition probability of each character according to the error correction parameters;
and determining a target text recognition result according to the corrected recognition probability.
Further, after obtaining the target text recognition result according to the initial text recognition result and the set text correction model, the method further comprises the following steps:
judging whether the character is the last character to be identified;
if yes, ending the current text recognition operation.
In a second aspect, the present application provides a text recognition device based on a text error correction model, including:
the segmentation recognition module is used for carrying out image segmentation processing on the target image, and carrying out optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
and the text correction module is used for obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
Further, the text error correction module includes:
the relation determining unit is used for determining the association relation of each character in the initial text recognition result according to the set text error correction model;
and the target recognition unit is used for determining a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation.
Further, the object recognition unit includes:
the error correction parameter determining subunit is used for obtaining the recognition probability of each character in the initial text recognition result and determining error correction parameters of the recognition probability according to the association relation of each character in the set text error correction model;
and the target result recognition subunit is used for determining a target text recognition result according to the error correction parameters and the recognition probability of each character.
Further, the error correction parameter determination subunit includes:
the first threshold judging subunit is used for judging that the association relationship between two adjacent characters in the text error correction model is larger than a threshold;
and the first parameter determination subunit is used for determining that the error correction parameter of the identification probability is a positive value if the identification probability is positive.
Further, the error correction parameter determination subunit includes:
the second threshold judging subunit is used for judging that the association relationship between two adjacent characters in the text error correction model is smaller than a threshold;
and the second parameter determining subunit is used for determining that the error correction parameter of the identification probability is a negative value if the second parameter is positive.
Further, the error correction parameter determination subunit includes:
the probability correction subunit is used for correcting the recognition probability of each character according to the error correction parameters;
and the probability determination subunit is used for determining a target text recognition result according to the corrected recognition probability.
Further, the text error correction module further includes:
the ending judging unit is used for judging whether the last character to be identified is the last character to be identified;
and the recognition result unit is used for ending the current text recognition operation if yes.
In a third aspect, the present application provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the text error correction model based text recognition method when executing the program.
In a fourth aspect, the present application provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the text error correction model based text recognition method.
In a fifth aspect, the present application provides a computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the text error correction model based text recognition method.
According to the technical scheme, the character recognition method and the character recognition device based on the text error correction model are provided, the OCR character recognition technology is organically combined with the text error correction model, and the OCR character recognition rate is improved by comprehensively considering the front-back relation of characters.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are some embodiments of the present application, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of a text error correction model-based text recognition method according to an embodiment of the application;
FIG. 2 is a second flow chart of a text error correction model-based text recognition method according to an embodiment of the application;
FIG. 3 is a third flow chart of a text error correction model-based text recognition method according to an embodiment of the application;
FIG. 4 is a flowchart of a text error correction model-based text recognition method according to an embodiment of the present application;
FIG. 5 is a flowchart of a text error correction model-based text recognition method according to an embodiment of the present application;
FIG. 6 is a flowchart of a text error correction model-based text recognition method according to an embodiment of the present application;
FIG. 7 is a flow chart of a text error correction model-based text recognition method according to an embodiment of the application;
FIG. 8 is a block diagram of a text error correction model-based text recognition device in accordance with an embodiment of the present application;
FIG. 9 is a second block diagram of a text recognition device based on a text correction model in an embodiment of the present application;
FIG. 10 is a third block diagram of a text recognition device based on a text correction model according to an embodiment of the present application;
FIG. 11 is a diagram showing a structure of a text recognition device based on a text correction model according to an embodiment of the present application;
FIG. 12 is a diagram showing a text error correction model-based character recognition apparatus according to an embodiment of the present application;
FIG. 13 is a diagram showing a structure of a text recognition device based on a text correction model according to an embodiment of the present application;
FIG. 14 is a diagram showing a text error correction model-based text recognition device according to an embodiment of the present application;
fig. 15 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present application more apparent, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The technical scheme of the application obtains, stores, uses, processes and the like the data, which all meet the relevant regulations of national laws and regulations.
Considering the scheme of OCR recognition in the prior art that images containing characters are subjected to area division, images containing single character images are subjected to character recognition after division, and finally, each recognition result is integrated into text content.
In order to effectively improve the accuracy of text recognition, the application provides an embodiment of a text error correction model-based text recognition method, referring to fig. 1, wherein the text error correction model-based text recognition method specifically comprises the following steps:
step S101: performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
alternatively, in the present application, the present application can be identified by "image segmentation" + "OCR recognition model".
For example, the result of recognizing an image of "chinese business bank" is "middle", "country", "worker", "quotient", "very" and "line" due to text font slackening or picture taking, etc., wherein the "silver" word is erroneously recognized as "very".
Step S102: and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
Optionally, in the application, the application can re-perform OCR recognition on all the results, organically combine the results of the text error correction model with the results of OCR recognition, specifically, take the first OCR result as the input of the text error correction model service, and integrate the two models to obtain the final text recognition result. As in the re-recognition of the "medium" word, OCR recognizes as "medium" 90%, "early" 2%, and "8%," other ", while inputting the result of the text error correction model: the "middle" is combined with the "country" of the last recognition result, and the text error correction model is output correctly. While "early" or other content cannot be associated with the context error correction model, resulting in the text error correction model being output as an error. Therefore, the probability of the final recognition result being 'medium' is 90% + K (K is the text error correction model duty ratio, the larger the K value is, the larger the text error correction model influence is, the smaller the OCR recognition image influence is, and the K value can be selected according to specific scenes, generally, K is not more than 30%, when K=0, the conventional OCR recognition is performed, and the recognition rate of 'early' words is still 2%,90% + K >2%, so the recognition result is 'medium'.
Alternatively, in the present application, when the character recognizes the "silver" character, the result of OCR recognition is "very" 53%, "silver" 44%, the other 3%. However, in combination with the text correction model, when the text is "very", the text correction model is output as error due to the fact that the text cannot be associated with the front and the rear, but when the text is "silver", the text correction model is output as correct. Finally, when the probability of combining the OCR recognition rate of silver is=44++K, and the K value is more than 9%, the erroneous OCR recognition result can be successfully corrected to silver.
From the above description, it can be seen that the text error correction model-based text recognition method provided by the embodiment of the application can organically combine the OCR text recognition technology with the text error correction model, and improve the OCR text recognition rate by comprehensively considering the front-back relation of the text.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 2, the following may be further specifically included:
step S201: determining the association relation of each character in the initial text recognition result according to a set text error correction model;
step S202: and determining a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation.
Optionally, in the application, the application can re-perform OCR recognition on all the results, organically combine the results of the text error correction model with the results of OCR recognition, and integrate the two models to obtain the final text recognition result.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 3, the following may be further specifically included:
step S301: acquiring the recognition probability of each character in the initial text recognition result, and determining error correction parameters of the recognition probability according to the association relation of each character in a set text error correction model;
step S302: and determining a target text recognition result according to the error correction parameters and the recognition probability of each character.
For example, the "early" or other content in the text error correction model cannot be associated with the previous and subsequent content, resulting in the text error correction model being output as an error. Therefore, the probability of the final recognition result being 'medium' is 90% + K (K is the text error correction model duty ratio, the larger the K value is, the larger the text error correction model influence is, the smaller the OCR recognition image influence is, and the K value can be selected according to specific scenes, generally, K is not more than 30%, when K=0, the conventional OCR recognition is performed, and the recognition rate of 'early' words is still 2%,90% + K >2%, so the recognition result is 'medium'.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 4, the following may be further specifically included:
step S401: judging that the association relation between two adjacent characters in the text error correction model is larger than a threshold value;
step S402: if yes, determining that the error correction parameter of the identification probability is a positive value.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 5, the following may be further specifically included:
step S501: judging that the association relationship between two adjacent characters in the text error correction model is smaller than a threshold value;
step S502: if yes, determining that the error correction parameter of the identification probability is a negative value.
Optionally, in the application, the application can re-perform OCR recognition on all the results, organically combine the results of the text error correction model with the results of OCR recognition, and integrate the two models to obtain the final text recognition result. As in the re-recognition of the "medium" word, OCR recognizes as "medium" 90%, "early" 2%, and "8%," other ", while inputting the result of the text error correction model: the "middle" is combined with the "country" of the last recognition result, and the text error correction model outputs correctly, i.e. the error correction parameter is a positive value.
While "early" or other content cannot be associated with the context error correction model, resulting in the text error correction model being output as erroneous, i.e., the error correction parameter being negative. Therefore, the probability of the final recognition result being 'medium' is 90% + K (K is the text error correction model duty ratio, the larger the K value is, the larger the text error correction model influence is, the smaller the OCR recognition image influence is, and the K value can be selected according to specific scenes, generally, K is not more than 30%, when K=0, the conventional OCR recognition is performed, and the recognition rate of 'early' words is still 2%,90% + K >2%, so the recognition result is 'medium'.
Alternatively, in the present application, when the character recognizes the "silver" character, the result of OCR recognition is "very" 53%, "silver" 44%, the other 3%. However, in combination with the text correction model, when the text is "very", the text correction model is output as error due to the fact that the text cannot be associated with the front and the rear, but when the text is "silver", the text correction model is output as correct. Finally, when the probability of combining the OCR recognition rate of silver is=44++K, and the K value is more than 9%, the erroneous OCR recognition result can be successfully corrected to silver.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 6, the following may be further specifically included:
step S601: correcting the recognition probability of each character according to the error correction parameters;
step S602: and determining a target text recognition result according to the corrected recognition probability.
In an embodiment of the text error correction model-based text recognition method of the present application, referring to fig. 7, the following may be further specifically included:
step S701: judging whether the character is the last character to be identified;
step S702: if yes, ending the current text recognition operation.
In order to effectively improve the accuracy of text recognition, the present application provides an embodiment of a text error correction model-based text recognition device for implementing all or part of the text error correction model-based text recognition method, referring to fig. 8, where the text error correction model-based text recognition device specifically includes:
the segmentation recognition module 10 is used for performing image segmentation processing on the target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
and the text correction module 20 is configured to obtain a target text recognition result according to the initial text recognition result and a set text correction model, where the text correction model includes an association relationship between each character in the initial text recognition result.
From the above description, it can be seen that the text recognition device based on the text error correction model provided by the embodiment of the application can organically combine the OCR text recognition technology with the text error correction model, and improve the OCR text recognition rate by comprehensively considering the front-back relation of the text.
In an embodiment of the text error correction model-based text recognition apparatus of the present application, referring to fig. 9, the text error correction module 20 includes:
a relationship determining unit 21, configured to determine an association relationship between each character in the initial text recognition result according to a set text correction model;
and a target recognition unit 22, configured to determine a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relationship.
In an embodiment of the text error correction model-based text recognition apparatus of the present application, referring to fig. 10, the object recognition unit 22 includes:
an error correction parameter determining subunit 221, configured to obtain a recognition probability of each character in the initial text recognition result, and determine an error correction parameter of the recognition probability according to a correlation relationship between each character in a set text error correction model;
the target result recognition subunit 222 is configured to determine a target text recognition result according to the error correction parameter and the recognition probability of each character.
In an embodiment of the text error correction model based text recognition apparatus of the present application, referring to fig. 11, the error correction parameter determining subunit 221 includes:
a first threshold value judging subunit 2211, configured to judge that an association relationship between two adjacent characters in the set text error correction model is greater than a threshold value;
the first parameter determining subunit 2212 is configured to determine that the error correction parameter of the identification probability is a positive value if yes.
In an embodiment of the text error correction model based text recognition apparatus of the present application, referring to fig. 12, the error correction parameter determining subunit 221 includes:
a second threshold value judging subunit 2213, configured to judge that the association relationship between two adjacent characters in the text error correction model is smaller than the threshold value;
the second parameter determining subunit 2214 is configured to determine that the error correction parameter of the identification probability is a negative value if yes.
In an embodiment of the text error correction model based text recognition apparatus of the present application, referring to fig. 13, the error correction parameter determining subunit 221 includes:
a probability correction subunit 2215, configured to correct the recognition probability of each character according to the error correction parameter;
the probability determination subunit 2216 is configured to determine a target text recognition result according to the recognition probability after the correction.
In an embodiment of the text error correction model-based text recognition apparatus of the present application, referring to fig. 14, the text error correction module 20 further includes:
an ending judging unit 23 for judging whether the last character to be recognized is the last character;
and the recognition result unit 24 is used for ending the current text recognition operation if yes.
In order to further explain the scheme, the application also provides a specific application example for realizing the text error correction model-based text recognition method by applying the text error correction model-based text recognition device, which specifically comprises the following contents:
(1) "image segmentation" + "OCR recognition model" recognition. The result of the recognition of the image of the "Chinese industry and commerce bank" is "Zhongzhu", "Guo", "Gong", "Shang", "very" and "Row" due to the poor text font or the picture shooting, etc., wherein the "silver" word is erroneously recognized as "very".
(2) And (3) re-performing OCR recognition on all the results, organically combining the results of the text error correction model with the results of OCR recognition, and synthesizing the two models to obtain a final text recognition result. As in the re-recognition of the "medium" word, OCR recognizes as "medium" 90%, "early" 2%, and "8%," other ", while inputting the result of the text error correction model: the "middle" is combined with the "country" of the last recognition result, and the text error correction model is output correctly. While "early" or other content cannot be associated with the context error correction model, resulting in the text error correction model being output as an error. Therefore, the probability of the final recognition result being 'medium' is 90% + K (K is the text error correction model duty ratio, the larger the K value is, the larger the text error correction model influence is, the smaller the OCR recognition image influence is, and the K value can be selected according to specific scenes, generally, K is not more than 30%, when K=0, the conventional OCR recognition is performed, and the recognition rate of 'early' words is still 2%,90% + K >2%, so the recognition result is 'medium'.
(3) When the word recognizes the silver word, the result of OCR recognition is 53% very, 44% silver, and 3% others. However, in combination with the text correction model, when the text is "very", the text correction model is output as error due to the fact that the text cannot be associated with the front and the rear, but when the text is "silver", the text correction model is output as correct. Finally, when the probability of combining the OCR recognition rate of silver is=44++K, and the K value is more than 9%, the erroneous OCR recognition result can be successfully corrected to silver.
(4) All the problems are sequentially executed and completed, and an OCR character recognition scheme based on the text error correction model is completed.
According to the application, the text error correction model is embedded in the OCR recognition process, so that the front and rear contents are combined during character recognition, thereby improving the accuracy of OCR character recognition, reducing the manual processing flow caused by OCR error recognition and saving the labor cost and time.
In order to effectively improve the accuracy of text recognition from a hardware level, the application provides an embodiment of an electronic device for implementing all or part of contents in the text error correction model-based text recognition method, wherein the electronic device specifically comprises the following contents:
a processor (processor), a memory (memory), a communication interface (Communications Interface), and a bus; the processor, the memory and the communication interface complete communication with each other through the bus; the communication interface is used for realizing information transmission between the text recognition device based on the text error correction model and related equipment such as a core service system, a user terminal, a related database and the like; the logic controller may be a desktop computer, a tablet computer, a mobile terminal, etc., and the embodiment is not limited thereto. In this embodiment, the logic controller may refer to an embodiment of the text error correction model-based text recognition method and an embodiment of the text error correction model-based text recognition device, and the contents thereof are incorporated herein and are not repeated here.
It is understood that the user terminal may include a smart phone, a tablet electronic device, a network set top box, a portable computer, a desktop computer, a Personal Digital Assistant (PDA), a vehicle-mounted device, a smart wearable device, etc. Wherein, intelligent wearing equipment can include intelligent glasses, intelligent wrist-watch, intelligent bracelet etc..
In practical application, part of the text recognition method based on the text error correction model can be executed on the electronic device side as described above, or all operations can be completed in the client device. Specifically, the selection may be made according to the processing capability of the client device, and restrictions of the use scenario of the user. The application is not limited in this regard. If all operations are performed in the client device, the client device may further include a processor.
The client device may have a communication module (i.e. a communication unit) and may be connected to a remote server in a communication manner, so as to implement data transmission with the server. The server may include a server on the side of the task scheduling center, and in other implementations may include a server of an intermediate platform, such as a server of a third party server platform having a communication link with the task scheduling center server. The server may include a single computer device, a server cluster formed by a plurality of servers, or a server structure of a distributed device.
Fig. 15 is a schematic block diagram of a system configuration of an electronic device 9600 according to an embodiment of the present application. As shown in fig. 15, the electronic device 9600 may include a central processor 9100 and a memory 9140; the memory 9140 is coupled to the central processor 9100. Notably, this fig. 15 is exemplary; other types of structures may also be used in addition to or in place of the structures to implement telecommunications functions or other functions.
In one embodiment, text recognition method functionality based on a text error correction model may be integrated into the central processor 9100. The central processor 9100 may be configured to perform the following control:
step S101: performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
step S102: and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
From the above description, it can be seen that, in the electronic device provided by the embodiment of the application, the OCR character recognition technology is organically combined with the text error correction model, and the OCR character recognition rate is improved by comprehensively considering the front-back relation of characters.
In another embodiment, the text error correction model-based text recognition apparatus may be configured separately from the central processor 9100, for example, the text error correction model-based text recognition apparatus may be configured as a chip connected to the central processor 9100, and the text error correction model-based text recognition method function is implemented under the control of the central processor.
As shown in fig. 15, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is noted that the electronic device 9600 need not include all of the components shown in fig. 15; in addition, the electronic device 9600 may further include components not shown in fig. 15, and reference may be made to the related art.
As shown in fig. 15, the central processor 9100, sometimes referred to as a controller or operational control, may include a microprocessor or other processor device and/or logic device, which central processor 9100 receives inputs and controls the operation of the various components of the electronic device 9600.
The memory 9140 may be, for example, one or more of a buffer, a flash memory, a hard drive, a removable media, a volatile memory, a non-volatile memory, or other suitable device. The information about failure may be stored, and a program for executing the information may be stored. And the central processor 9100 can execute the program stored in the memory 9140 to realize information storage or processing, and the like.
The input unit 9120 provides input to the central processor 9100. The input unit 9120 is, for example, a key or a touch input device. The power supply 9170 is used to provide power to the electronic device 9600. The display 9160 is used for displaying display objects such as images and characters. The display may be, for example, but not limited to, an LCD display.
The memory 9140 may be a solid state memory such as Read Only Memory (ROM), random Access Memory (RAM), SIM card, etc. But also a memory which holds information even when powered down, can be selectively erased and provided with further data, an example of which is sometimes referred to as EPROM or the like. The memory 9140 may also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application/function storage portion 9142, the application/function storage portion 9142 storing application programs and function programs or a flow for executing operations of the electronic device 9600 by the central processor 9100.
The memory 9140 may also include a data store 9143, the data store 9143 for storing data, such as contacts, digital data, pictures, sounds, and/or any other data used by an electronic device. The driver storage portion 9144 of the memory 9140 may include various drivers of the electronic device for communication functions and/or for performing other functions of the electronic device (e.g., messaging applications, address book applications, etc.).
The communication module 9110 is a transmitter/receiver 9110 that transmits and receives signals via an antenna 9111. A communication module (transmitter/receiver) 9110 is coupled to the central processor 9100 to provide input signals and receive output signals, as in the case of conventional mobile communication terminals.
Based on different communication technologies, a plurality of communication modules 9110, such as a cellular network module, a bluetooth module, and/or a wireless local area network module, etc., may be provided in the same electronic device. The communication module (transmitter/receiver) 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and to receive audio input from the microphone 9132 to implement usual telecommunications functions. The audio processor 9130 can include any suitable buffers, decoders, amplifiers and so forth. In addition, the audio processor 9130 is also coupled to the central processor 9100 so that sound can be recorded locally through the microphone 9132 and sound stored locally can be played through the speaker 9131.
An embodiment of the present application further provides a computer-readable storage medium capable of implementing all steps in the text error correction model-based text recognition method in which the execution subject is a server or a client, the computer-readable storage medium storing thereon a computer program which, when executed by a processor, implements all steps in the text error correction model-based text recognition method in which the execution subject is a server or a client, for example, the processor implements the steps of:
step S101: performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
step S102: and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
From the above description, it can be seen that the computer readable storage medium provided by the embodiments of the present application organically combines the OCR character recognition technology with the text error correction model, and improves the OCR character recognition rate by comprehensively considering the front-rear relationship of characters.
The embodiment of the present application further provides a computer program product capable of implementing all the steps in the text error correction model-based text recognition method in which the execution subject in the above embodiment is a server or a client, where the computer program/instructions implement the steps of the text error correction model-based text recognition method when executed by a processor, for example, the computer program/instructions implement the steps of:
step S101: performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
step S102: and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
From the above description, it can be seen that the computer program product provided by the embodiment of the application organically combines the OCR character recognition technology with the text error correction model, and improves the OCR character recognition rate by comprehensively considering the front-back relation of characters.
It will be apparent to those skilled in the art that embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may 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, and the like) having computer-usable program code embodied therein.
The present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may 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, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principles and embodiments of the present application have been described in detail with reference to specific examples, which are provided to facilitate understanding of the method and core ideas of the present application; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (13)

1. A text error correction model-based text recognition method, the method comprising:
performing image segmentation processing on a target image, and performing optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
and obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
2. The text recognition method based on the text correction model according to claim 1, wherein the obtaining the target text recognition result according to the initial text recognition result and the set text correction model comprises:
determining the association relation of each character in the initial text recognition result according to a set text error correction model;
and determining a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation.
3. The text recognition method based on the text correction model according to claim 2, wherein the determining the target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation comprises:
acquiring the recognition probability of each character in the initial text recognition result, and determining error correction parameters of the recognition probability according to the association relation of each character in a set text error correction model;
and determining a target text recognition result according to the error correction parameters and the recognition probability of each character.
4. A text error correction model based text recognition method according to claim 3, wherein said determining the error correction parameters of the recognition probability according to the association relation between each character in the set text error correction model comprises:
judging that the association relation between two adjacent characters in the text error correction model is larger than a threshold value;
if yes, determining that the error correction parameter of the identification probability is a positive value.
5. A text error correction model based text recognition method according to claim 3, wherein said determining the error correction parameters of the recognition probability according to the association relation between each character in the set text error correction model comprises:
judging that the association relationship between two adjacent characters in the text error correction model is smaller than a threshold value;
if yes, determining that the error correction parameter of the identification probability is a negative value.
6. A text recognition method based on a text correction model according to claim 3, wherein said determining a target text recognition result according to said correction parameters and said recognition probability of each character comprises:
correcting the recognition probability of each character according to the error correction parameters;
and determining a target text recognition result according to the corrected recognition probability.
7. The text recognition method based on the text correction model according to claim 1, further comprising, after the obtaining the target text recognition result according to the initial text recognition result and the set text correction model:
judging whether the character is the last character to be identified;
if yes, ending the current text recognition operation.
8. A text recognition device based on a text correction model, comprising:
the segmentation recognition module is used for carrying out image segmentation processing on the target image, and carrying out optical character recognition on the target image subjected to the image segmentation processing to obtain an initial text recognition result;
and the text correction module is used for obtaining a target text recognition result according to the initial text recognition result and a set text correction model, wherein the text correction model comprises the association relation of each character in the initial text recognition result.
9. The text error correction model based text recognition apparatus of claim 8, wherein the text error correction module comprises:
the relation determining unit is used for determining the association relation of each character in the initial text recognition result according to the set text error correction model;
and the target recognition unit is used for determining a target text recognition result according to the recognition probability of each character in the initial text recognition result and the association relation.
10. The text error correction model based text recognition apparatus of claim 9, wherein the object recognition unit includes:
the error correction parameter determining subunit is used for obtaining the recognition probability of each character in the initial text recognition result and determining error correction parameters of the recognition probability according to the association relation of each character in the set text error correction model;
and the target result recognition subunit is used for determining a target text recognition result according to the error correction parameters and the recognition probability of each character.
11. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the steps of the text recognition method based on a text error correction model according to any one of claims 1 to 7 when the program is executed by the processor.
12. A computer readable storage medium having stored thereon a computer program, characterized in that the computer program, when being executed by a processor, implements the steps of the text error correction model based text recognition method of any of claims 1 to 7.
13. A computer program product comprising computer programs/instructions which, when executed by a processor, implement the steps of the text error correction model based text recognition method of any one of claims 1 to 7.
CN202310912550.XA 2023-07-24 2023-07-24 Text recognition method and device based on text error correction model Pending CN116912833A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310912550.XA CN116912833A (en) 2023-07-24 2023-07-24 Text recognition method and device based on text error correction model

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310912550.XA CN116912833A (en) 2023-07-24 2023-07-24 Text recognition method and device based on text error correction model

Publications (1)

Publication Number Publication Date
CN116912833A true CN116912833A (en) 2023-10-20

Family

ID=88350850

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310912550.XA Pending CN116912833A (en) 2023-07-24 2023-07-24 Text recognition method and device based on text error correction model

Country Status (1)

Country Link
CN (1) CN116912833A (en)

Similar Documents

Publication Publication Date Title
CN111582273B (en) Image text recognition method and device
CN111652093B (en) Text image processing method and device
CN110956956A (en) Voice recognition method and device based on policy rules
CN111312283B (en) Cross-channel voiceprint processing method and device
CN111931835A (en) Image identification method, device and system
CN111680694A (en) Method and device for filtering colored seal in character image
CN112784112B (en) Message verification method and device
US11600279B2 (en) Transcription of communications
US20200075013A1 (en) Transcription presentation
CN111353493B (en) Text image direction correction method and device
CN113065879A (en) Data stream quality inspection method and system
CN115798458A (en) Classified language identification method and device
US11308317B2 (en) Electronic device and method for recognizing characters
CN116912833A (en) Text recognition method and device based on text error correction model
CN111931852A (en) Target object pricing method and device
CN115984853A (en) Character recognition method and device
CN114840576A (en) Data standard matching method and device
CN113206998B (en) Method and device for quality inspection of video data recorded by service
CN110399615B (en) Transaction risk monitoring method and device
CN114581804A (en) Bank card identification model training method and device and bank card identification method and device
CN115099970A (en) Transaction information automatic processing method and device
CN110931014A (en) Speech recognition method and device based on regular matching rule
CN113641876A (en) Method and system for practicing calligraphy based on dot matrix code and computer readable storage medium
CN113206996B (en) Quality inspection method and device for service recorded data
CN114529907A (en) Image character recognition information processing method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination