Error character identification method and device, electronic equipment and storage medium

By acquiring the character recognition probability and contextual information of text images, and combining a correct character dictionary and a Transformer model, the problem of difficulty in identifying the location of misspelled characters in existing technologies is solved, and efficient and accurate location and classification of misspelled characters are achieved.

CN115294581BActive Publication Date: 2026-05-08深圳市星桐科技有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
深圳市星桐科技有限公司
Filing Date
2022-08-01
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing text recognition methods struggle to accurately identify the specific location of misspelled words in Chinese text, especially in homework correction within educational settings, where existing methods can only perform binary classification but cannot pinpoint the exact location of the error.

Method used

By acquiring the text image to be recognized, character recognition is performed and the recognition probability of each character is obtained. The location information of the target erroneous character is determined using contextual information and a correct character dictionary. The error category is identified by combining the Transformer model, and a phased training method is adopted to reduce the recognition difficulty.

Benefits of technology

It effectively reduces the solution space for error character recognition, improves the efficiency and accuracy of error character recognition, and can accurately locate the specific position of the error character.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115294581B_ABST
    Figure CN115294581B_ABST
Patent Text Reader

Abstract

The present disclosure provides a method and device for identifying an error character, electronic equipment and a storage medium, and belongs to the field of image processing. The method comprises: obtaining a text image to be identified; processing the text image to be identified to obtain a character recognition result of the text image to be identified, the character recognition result comprising at least one character and a recognition probability of the character; when it is determined based on the recognition probability that there is a target error character in the text image to be identified, obtaining context information of the target error character in the text image to be identified; based on a target character of the target error character in the character recognition result and a pre-set correct character dictionary, determining position information of the target character in the correct character dictionary; and processing the context information and the position information to obtain an error category of the target error character. By using the present disclosure, the error category of the error character can be identified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more particularly to a method, apparatus, electronic device, and storage medium for identifying erroneous characters. Background Technology

[0002] In educational settings, or specifically in the context of dictation exercises during homework correction, it is crucial to identify which word a student misspelled and point out where they went wrong.

[0003] Current text recognition methods can be divided into single-line recognition and multi-line recognition based on the number of text lines in the input image. In terms of annotation methods, there are two types: character-based and sequence-based. Generally speaking, single-line and sequence-based methods are the mainstream, forming a text recognition method paradigm that combines the correction part, feature extraction part, and recognition and decoding part in sequence. Most methods follow this paradigm and make specific improvements to address various problems such as curved text and blurred text.

[0004] However, when it comes to Chinese character recognition, there are very few methods that specifically identify misspelled characters. Most recognition methods are binary, that is, they can identify whether a character is misspelled, but they cannot identify exactly where the misspelling is. Summary of the Invention

[0005] In view of this, embodiments of the present disclosure provide a method, apparatus, electronic device, and storage medium for identifying erroneous characters, in order to solve the problem of not being able to identify the error category of erroneous characters.

[0006] According to one aspect of this disclosure, a method for identifying erroneous characters is provided, the method comprising:

[0007] Obtain the image of the text to be recognized;

[0008] The text image to be recognized is processed to obtain the character recognition result of the text image to be recognized, and the character recognition result includes at least one character and the recognition probability of the character;

[0009] When it is determined based on the recognition probability that a target error character exists in the text image to be recognized, the context information of the target error character in the text image to be recognized is obtained;

[0010] Based on the target character in the character recognition result and a pre-set correct character dictionary, determine the position information of the target character in the correct character dictionary;

[0011] The context information and the location information are processed to obtain the error category of the target error character.

[0012] According to another aspect of this disclosure, a text recognition device is provided, the device comprising:

[0013] The acquisition module is used to acquire the image of the text to be recognized;

[0014] The first recognition module is used to process the text image to be recognized to obtain the character recognition result of the text image to be recognized, wherein the character recognition result includes at least one character and the recognition probability of the character;

[0015] The second recognition module is used to, when it is determined based on the recognition probability that a target error character exists in the text image to be recognized, acquire the context information of the target error character in the text image to be recognized; determine the position information of the target character in the correct character dictionary based on the target character of the target error character in the character recognition result and a pre-set correct character dictionary; and process the context information and the position information to obtain the error category of the target error character.

[0016] According to another aspect of this disclosure, an electronic device is provided, comprising:

[0017] Processor; and

[0018] Stored program memory,

[0019] The program includes instructions that, when executed by the processor, cause the processor to perform the error character recognition method.

[0020] According to another aspect of this disclosure, a non-transitory computer-readable storage medium is provided that stores computer instructions, wherein the computer instructions are used to cause a computer to execute the aforementioned method for identifying erroneous characters.

[0021] In this disclosure, the error category of the target erroneous character is identified by using the position information of the target character in the correct character dictionary and the context information of the target erroneous character in the text image to be identified. Since the position of the target character in the correct character dictionary is unique, when using the position information for identification, the error category of the target character can be located, reducing the number of categories and thus effectively reducing the solution space. This improves the recognition efficiency of erroneous characters while identifying the error category. Attached Figure Description

[0022] Further details, features, and advantages of this disclosure are disclosed in the following description of exemplary embodiments in conjunction with the accompanying drawings, in which:

[0023] Figure 1 A flowchart illustrating a method for identifying error characters according to an exemplary embodiment of this disclosure is shown;

[0024] Figure 2A flowchart of a character recognition method provided according to an exemplary embodiment of the present disclosure is shown;

[0025] Figure 3 A flowchart of a model training method provided according to an exemplary embodiment of the present disclosure is shown;

[0026] Figure 4 A schematic block diagram of an error character recognition device provided according to an exemplary embodiment of the present disclosure is shown;

[0027] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement embodiments of the present disclosure is shown. Detailed Implementation

[0028] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.

[0029] It should be understood that the steps described in the method embodiments of this disclosure may be performed in different orders and / or in parallel. Furthermore, the method embodiments may include additional steps and / or omit the steps shown. The scope of this disclosure is not limited in this respect.

[0030] The term "comprising" and its variations as used herein are open-ended, meaning "including but not limited to". The term "based on" means "at least partially based on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Definitions of other terms will be given in the description below. It should be noted that the concepts of "first", "second", etc., used in this disclosure are only used to distinguish different devices, modules, or units, and are not intended to limit the order of functions performed by these devices, modules, or units or their interdependencies.

[0031] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".

[0032] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.

[0033] To clearly illustrate the technical solutions provided by the present disclosure, the technical background involved in the present disclosure will be introduced first.

[0034] The common text recognition solutions currently mainly target printed texts and handwritten texts, and different languages are included in printed texts and handwritten texts. Therefore, the research on text recognition methods mainly focuses on improving image quality, increasing semantic information, making full use of location information, and multi-language recognition, etc., and there is basically no research on misspelled word recognition. There are three main reasons. First, there are almost no misspelled words in printed texts. Second, there are relatively few misspelled words in handwritten text information. Third, recognition models all need dictionaries to achieve the conversion from probability positions to characters, and a single character may have various writing errors, which are difficult to handle. Generally speaking, the current recognition methods can perform binary classification on misspelled words (classifying all misspelled words into one category), but cannot specifically point out where a certain character is misspelled. However, in the educational scenario, or in the scenario of dictation of words and phrases in homework correction, it is crucial to determine which character the student has written wrong and at the same time point out where he is wrong.

[0035] In terms of Chinese character recognition, there are few methods for specifically recognizing its misspelled words. At the same time, due to its huge dictionary, each single character can have multiple possible wrong writings. For example, if the character "因" is written without the "一", then it is the character "囚", which is not a misspelled word. But if an extra "一" is written and there is a "夫" character inside, that is a misspelled word. Or if the "一" is written as "|", then it is also a misspelled word. Therefore, if all possible wrong writing forms are added to the dictionary, it will not only increase the number of classification categories, but also be very difficult to collect data samples corresponding to various wrong writing forms, which will result in an unbalanced sample distribution and poor recognition effect.

[0036] To solve the above technical problems, the present disclosure provides a method for recognizing wrong characters. Based on the technical concept of different stages, this method can reduce the number of wrong classifications in recognition and greatly reduce the recognition difficulty. This method can be completed by a terminal, a server, and / or other devices with processing capabilities. The method provided by the embodiments of the present disclosure can be completed by any of the above devices, or can be completed by multiple devices together. The present disclosure does not make any limitations in this regard.

[0037] Next, reference will be made to Figure 1 the flowchart of the method for recognizing wrong characters shown in the figure to introduce this method. This method includes the following steps 101-105.

[0038] Step 101, obtain the text image to be recognized.

[0039] In one possible implementation, when it is necessary to recognize characters in an image, a recognition signal can be triggered, and the image of the text to be recognized can be acquired. For example, a user can take a picture of the image using a terminal and click the option to recognize text, thereby triggering the recognition signal. Alternatively, a user can long-press the image displayed on the terminal and click the option to recognize text after it is displayed, thereby triggering the recognition signal. This embodiment does not limit the specific scenario for triggering the recognition signal.

[0040] In some application scenarios, the text image to be recognized can be an image containing handwriting. Due to the possibility of typos, the text image to be recognized may include correct characters and / or incorrect characters.

[0041] Step 102: Process the text image to be recognized to obtain the character recognition result of the text image to be recognized.

[0042] The character recognition result includes at least one character and the recognition probability of the character.

[0043] In one possible implementation, a pre-trained text recognition model can be used to process the text image to be recognized, identify at least one character included in the text image, and obtain the recognition probability corresponding to each character. The identified at least one character and the recognition probability corresponding to each character are then output as the character recognition result of the text image to be recognized.

[0044] Optional, refer to Figure 2 The flowchart of the character recognition method shown above indicates that the specific processing of step 102 can be carried out as follows: steps 201-205:

[0045] Step 201: Extract features from the text image to be recognized to obtain the feature mapping vector of the text image to be recognized;

[0046] Step 202: Construct multiple contextual information based on the feature mapping vector;

[0047] Step 203: Process each context information separately to obtain the character recognition probability corresponding to each context information;

[0048] Step 204: Based on the correct character dictionary and character recognition probability, determine the recognition result corresponding to each context information;

[0049] Step 205: Based on the recognition results, obtain at least one character and the recognition probability of the character, and generate the character recognition results of the text image to be recognized.

[0050] In one possible implementation, the text recognition model may include three parts: a feature extraction module, a context construction module, and a decoding module.

[0051] Upon receiving the aforementioned text image to be recognized, it can be input into the feature extraction module. The feature extraction module processes the text image to extract its feature information, yielding a feature mapping vector. As an example, the feature extraction module can employ a ResNet18 network (a residual network).

[0052] The aforementioned feature mapping vectors are input into the context building module for context modeling, and a set of feature mappings that enhances sequence relationships is output. As an example, the context building module can employ a two-layer bidirectional LSTM (Long Short-Term Memory) network.

[0053] The enhanced sequence relationship feature maps are input into the decoding module. The decoding module outputs the context information and the corresponding character recognition probability (i.e., the recognition result) for each time step based on the sequence relationship, thus obtaining multiple context information sets and their corresponding character recognition probabilities. As an example, the decoding module can employ an attention layer and a GRU (Gate Recurrent Unit) layer. Based on the enhanced sequence relationship feature maps with multiple time steps, the decoding module can decode them step-by-step to obtain multiple hidden state vectors. At each time step, the hidden state vector of the previous time step is used as the query vector, and the enhanced sequence relationship feature maps are used as the value and key vectors. An attention score is calculated based on the query vector, value vector, and key vector, and a context vector (i.e., the context information) is calculated based on the attention score. Then, using this context vector and the character recognition probability of the previous time step as input to the GRU layer, the hidden state vector of the current time step is obtained. Finally, the character recognition probability of the current time step is obtained based on the hidden state vector and the context vector.

[0054] The text recognition model can have a pre-set correct character dictionary, which stores multiple preset characters. The character recognition probability mentioned above refers to the probability that any character belongs to each preset character in the correct character dictionary. As an example, the character recognition probability can be in the form of a matrix, where each matrix position represents a preset character, and the probability value at the matrix position represents the probability that the character to be recognized is the preset character at that matrix position.

[0055] After determining the character recognition probability, the character to be recognized can be found in the correct character dictionary using greedy decoding or beamsearch decoding. Once the character is identified, its probability value in the character recognition probability matrix can be used as the recognition probability of that character.

[0056] Step 103: When it is determined that there is a target error character in the text image to be recognized based on the recognition probability, obtain the context information of the target error character in the text image to be recognized.

[0057] In one possible implementation, the recognition probability of each character in the above character recognition results can be compared with a pre-set probability threshold (e.g., 0.2) to determine whether there are any erroneous characters in the text image to be recognized. Since erroneous characters refer to characters that are not found in the correct character dictionary, the calculated recognition probability is relatively low when erroneous characters are present. When there are characters with recognition probabilities lower than the probability threshold, it indicates that there are erroneous characters in the text image to be recognized. In this case, the erroneous character corresponding to that character in the text image to be recognized is taken as the target erroneous character and used as the target character for subsequent processing. Furthermore, the context information used to recognize the target character in step 102 can be obtained, and this context information also represents the image information of the target erroneous character in the text image to be recognized.

[0058] Step 104: Based on the target character in the character recognition result and the pre-set correct character dictionary, determine the position information of the target character in the correct character dictionary.

[0059] In one possible implementation, the target character has a unique position in the correct character dictionary, so the position information of the target character can be determined based on this position. The specific processing can be as follows:

[0060] In the character recognition results, characters with recognition probabilities less than the probability threshold are selected as target characters in the character recognition results for the target error characters; the order information of the target characters in the correct character dictionary is obtained; the order information is encoded to determine the position information of the target characters in the correct character dictionary.

[0061] The process of determining the target character has been described above and will not be repeated here.

[0062] The order of the target character can be determined from the correct character dictionary, and this positional information can be encoded using sine and cosine functions to obtain the positional encoding vector of the target character, which serves as the positional information of the target character in the correct character dictionary. It should be noted that for the same character, regardless of its position in different text images, the positional information determined by the above method is unique.

[0063] Step 105: Process the context information and location information to obtain the error category of the target error character.

[0064] In one possible implementation, the aforementioned location information corresponds to a specific character, and the context information can represent the image information of the target erroneous character in the text image to be recognized. Therefore, by processing the context information and location information, the possible incorrect writing of the character can be identified based on the character and combined with the image information of the target erroneous character in the text image to be recognized, thus obtaining the error category of the target erroneous character.

[0065] Specifically, step 105 above can be achieved through the following processing:

[0066] The context information and location information are added point by point to obtain the first feature information of the target error character;

[0067] The first feature information is processed to obtain the second feature vector of the target error character. The second feature vector carries the classification feature information of the target error character.

[0068] Based on the second feature vector, the error category of the target erroneous character is identified.

[0069] As an example, the encoder module of the Transformer model (a text translation model) can be used to process the first feature information. Optionally, a traditional encoder module can have multiple basic modules; in this embodiment, two basic modules can be used to process the first feature information. After processing, a 512-dimensional vector can be output as a classification feature vector (i.e., the second feature vector mentioned above).

[0070] Since the classification feature vector can carry classification feature information of the target erroneous character, the error category of the target erroneous character can be identified based on this classification feature vector. The specific processing can be as follows:

[0071] The second feature vector is processed to calculate a preset number of classification probabilities for the target erroneous character;

[0072] Get the preset number of error categories corresponding to the target character;

[0073] Based on a preset number of classification probabilities, the error category of the target error character is determined from a preset number of error categories.

[0074] As an example, the second feature vector mentioned above can be processed using a fully connected layer. The number of nodes in the fully connected layer is the preset number mentioned above, representing the estimated number of misclassifications. Each node outputs the classification probability calculated for the error category corresponding to that node. For example, the number of nodes in the fully connected layer can be 10. Assuming there are 10 ways to write a character incorrectly, from error category 1 to error category 10, the fully connected layer can output the classification probability calculated for each error category. The higher the classification probability, the higher the probability that the target erroneous character belongs to that error category.

[0075] It should be noted that the above preset number can be the maximum number of misclassifications obtained by counting each character. For characters with fewer than the preset number of misclassifications, such as those with misclassifications including error categories 1 to 5, corresponding to nodes 1 to 5, the classification probabilities calculated for the remaining nodes 6 to 10 can be smaller and will not affect the determination of the corresponding error category based on the classification probabilities calculated for nodes 1 to 5.

[0076] Optionally, an error character dictionary can be used to store incorrect spellings of each preset character, with each incorrect spelling corresponding to an error category. The correct character dictionary can store multiple preset characters, and the error character dictionary can store a preset number of error categories for each preset character. Each preset character is stored in the same order in both the correct and error character dictionaries. For characters with fewer than the preset number of error categories, spaces can be used to pad the error categories in the error character dictionary to reach the preset number; this embodiment does not limit this.

[0077] Based on this, the process of obtaining a preset number of error categories corresponding to the target character can be as follows: According to the position information, obtain the preset number of error categories corresponding to the target character from a pre-set error character dictionary. Since each preset character is stored in the same order in the correct character dictionary and the error character dictionary, based on the position information of the target character in the correct character dictionary, the error category corresponding to the target character can be obtained from the error character dictionary. Therefore, under the error category of the target character, the error type of the target error character can be determined.

[0078] In this embodiment, the error category of the target erroneous character is identified by using the position information of the target character in the correct character dictionary and the context information of the target erroneous character in the text image to be recognized. Since the position of the target character in the correct character dictionary is unique, when using position information for recognition, the error category of the target character can be located, reducing the number of categories and thus effectively reducing the solution space. This improves the recognition efficiency of erroneous characters while identifying the error category. For example, if there are 6,000 commonly used Chinese characters, and each character is assumed to have 10 ways of being written incorrectly (i.e., 10 error categories), there will be a total of 60,000 error categories, increasing the difficulty of classification. However, with the method provided in this embodiment, the character is first identified among the 6,000 commonly used Chinese characters. When an erroneous character is found, the 10 error categories of the character are located through the correct Chinese character corresponding to the erroneous character. Thus, the specific error category can be determined from these 10 error categories, reducing the order of magnitude of the solution space.

[0079] The text recognition model, encoder module, and fully connected layer mentioned above can be trained before use. This embodiment will introduce the model training process.

[0080] Reference Figure 3 The flowchart shown illustrates the model training method, which includes the following steps 301-303.

[0081] Step 301: Construct the training dataset.

[0082] In one possible implementation, a large number of handwritten text images to be recognized are collected (which may include straight text, slanted text, and curved text images in terms of text layout, and regular blurred or photocopied text images in terms of image quality, as well as some other text images, but these text images are all single-line text images). Then, sequence labeling is performed manually. If there is a misspelling in the text image, the misspelling is marked with "EC", and the corresponding correct character is labeled. This is used to obtain a training dataset, in which samples with all correct characters constitute the first training dataset corresponding to the correct characters, and samples with misspelling characters constitute the second training dataset corresponding to the misspelling characters.

[0083] Furthermore, the correct characters in the first training dataset can be used as preset characters to build the aforementioned correct character dictionary. In the second training dataset, all possible misspelled spellings of the same character can be collected to build the aforementioned incorrect character dictionary.

[0084] Step 302: Train the text recognition model based on the training dataset.

[0085] In one possible implementation, a text recognition model can be constructed, specifically including the aforementioned feature extraction module, context construction module, and decoding module. The processing in the text recognition model is similar to step 102 described above. Training the text recognition model can be divided into two stages. The first stage uses the aforementioned first training dataset for training, employing a multi-class cross-entropy loss function. Upon completion of training, the text recognition model can recognize correct characters. The second stage uses the aforementioned second training dataset for training, employing a multi-class cross-entropy loss function. Upon completion of training, the text recognition model can recognize incorrect characters as their corresponding correct characters. Both training stages utilize the aforementioned correct character dictionary; therefore, the probability of recognizing correct characters as their corresponding characters is high, while the probability of recognizing incorrect characters as their corresponding characters is low. This recognition probability can then be used to determine whether an incorrect character exists. The number of samples with correct characters is greater than the number of samples with incorrect characters. When correct and incorrect characters are mixed together for training, the recognition accuracy of incorrect characters is low and the recognition effect is poor. However, in this embodiment, the above two-stage training is adopted. During the training process for recognizing incorrect characters, the proportion of samples with correct characters is reduced, which can effectively solve the problem of sample imbalance.

[0086] Step 303: Combine the text recognition model, encoder module, and fully connected layer, and train it based on the second training dataset corresponding to the erroneous characters.

[0087] In one possible implementation, after the training of the above two stages is completed, the model parameters of the text recognition model are frozen, that is, they will not be adjusted in subsequent training processes. Combined with the encoder module and the fully connected layer, a recognition model suitable for erroneous characters is constructed. The specific processing in this recognition model is the same as in steps 102-103 above.

[0088] During training, the second training dataset mentioned above was used, and the multi-class cross-entropy loss function was employed. Upon completion of training, the recognition model was able to perform the aforementioned process of identifying the error category of the erroneous character.

[0089] This disclosure provides an error character recognition device for implementing the aforementioned error character recognition method. Figure 4 The schematic block diagram shown illustrates that the error character recognition device 400 includes: an acquisition module 401, a first recognition module 402, and a second recognition module 403.

[0090] The acquisition module 401 is used to acquire the text image to be recognized;

[0091] The first recognition module 402 is used to process the text image to be recognized to obtain the character recognition result of the text image to be recognized, wherein the character recognition result includes at least one character and the recognition probability of the character;

[0092] The second recognition module 403 is used to, when it is determined based on the recognition probability that a target error character exists in the text image to be recognized, obtain the context information of the target error character in the text image to be recognized; determine the position information of the target character in the correct character dictionary based on the target character of the target error character in the character recognition result and a pre-set correct character dictionary; and process the context information and the position information to obtain the error category of the target error character.

[0093] Optionally, the first identification module 402 is used for:

[0094] Feature extraction is performed on the text image to be identified to obtain the feature mapping vector of the text image to be identified;

[0095] Based on the feature mapping vector, multiple contextual information is constructed;

[0096] Each context information is processed separately to obtain the character recognition probability corresponding to each context information;

[0097] Based on the correct character dictionary and the character recognition probability, the recognition result corresponding to each context information is determined;

[0098] Based on the recognition results, at least one character and the recognition probability of the character are obtained, and the character recognition result of the text image to be recognized is generated.

[0099] Optionally, the second identification module 403 is used for:

[0100] In the character recognition results, characters with a recognition probability less than a probability threshold are selected as the target characters for the target error characters in the character recognition results.

[0101] Obtain the order information of the target character in the correct character dictionary;

[0102] The sequence information is encoded to determine the position information of the target character in the correct character dictionary.

[0103] Optionally, the second identification module 403 is used for:

[0104] The context information and the location information are added point by point to obtain the first feature information of the target error character;

[0105] The first feature information is processed to obtain a second feature vector of the target error character, and the second feature vector carries the classification feature information of the target error character;

[0106] Based on the second feature vector, the error category of the target error character is identified.

[0107] Optionally, the second identification module 403 is used for:

[0108] The second feature vector is processed to calculate a preset number of classification probabilities for the target erroneous character;

[0109] Obtain the preset number of error categories corresponding to the target character;

[0110] Based on the preset number of classification probabilities, the error category of the target error character is determined from the preset number of error categories.

[0111] Optionally, the second identification module 403 is used for:

[0112] Based on the location information, obtain the preset number of error categories corresponding to the target character from a pre-set error character dictionary;

[0113] The correct character dictionary stores multiple preset characters, and the error character dictionary stores a preset number of error categories for each preset character. Each preset character is stored in the same order in the correct character dictionary and the error character dictionary.

[0114] In this embodiment, the error category of the target erroneous character is identified by the position information of the target character in the correct character dictionary and the context information of the target erroneous character in the text image to be identified. Since the position of the target character in the correct character dictionary is unique, when using the position information for identification, it can be located in the error category of the target character, reducing the number of categories and thus effectively reducing the solution space. This improves the identification efficiency of erroneous characters while identifying the error category.

[0115] Exemplary embodiments of this disclosure also provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor. The memory stores a computer program executable by the at least one processor, the computer program being executed by the at least one processor to cause the electronic device to perform a method according to an embodiment of this disclosure.

[0116] Exemplary embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing a computer program, wherein the computer program, when executed by a computer's processor, is used to cause the computer to perform a method according to embodiments of this disclosure.

[0117] Exemplary embodiments of this disclosure also provide a computer program product, including a computer program, wherein, when executed by a processor of a computer, the computer program is used to cause the computer to perform a method according to an embodiment of this disclosure.

[0118] refer to Figure 5 The present invention describes a structural block diagram of an electronic device 500 that can serve as a server or client of the present disclosure, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the present disclosure described and / or claimed herein.

[0119] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. The RAM 503 may also store various programs and data required for the operation of the device 500. The computing unit 501, ROM 502, and RAM 503 are interconnected via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0120] Multiple components in electronic device 500 are connected to I / O interface 505, including: input unit 506, output unit 507, storage unit 508, and communication unit 509. Input unit 506 can be any type of device capable of inputting information to electronic device 500. Input unit 506 can receive input digital or text information and generate key signal inputs related to user settings and / or function control of electronic device. Output unit 507 can be any type of device capable of presenting information and may include, but is not limited to, a display, speaker, video / audio output terminal, vibrator, and / or printer. Storage unit 508 may include, but is not limited to, disks and optical discs. Communication unit 509 allows electronic device 500 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks, and may include, but is not limited to, modems, network cards, infrared communication devices, wireless communication transceivers, and / or chipsets, such as Bluetooth devices, WiFi devices, WiMax devices, cellular communication devices, and / or the like.

[0121] The computing unit 501 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. The computing unit 501 performs the various methods and processes described above. For example, in some embodiments, the above-described error character recognition method can be implemented as a computer software program tangibly contained in a machine-readable medium, such as storage unit 508. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 500 via ROM 502 and / or communication unit 509. In some embodiments, the computing unit 501 can be configured to perform the above-described error character recognition method by any other suitable means (e.g., by means of firmware).

[0122] The program code used to implement the methods of this disclosure may be written in any combination of one or more programming languages. This program code may be provided to a processor or controller of a general-purpose computer, special-purpose computer, or other programmable data processing apparatus, such that when executed by the processor or controller, the program code causes the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The program code may be executed entirely on a machine, partially on a machine, as a standalone software package partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0123] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

[0124] As used in this disclosure, the terms "machine-readable medium" and "computer-readable medium" refer to any computer program product, device, and / or apparatus (e.g., disk, optical disk, memory, programmable logic device (PLD)) for providing machine instructions and / or data to a programmable processor, including machine-readable media that receive machine instructions as machine-readable signals. The term "machine-readable signal" refers to any signal for providing machine instructions and / or data to a programmable processor.

[0125] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device for displaying information to the user (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor); and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the computer. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0126] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as a data server), or computing systems that include middleware components (e.g., an application server), or computing systems that include frontend components (e.g., a user computer with a graphical user interface or web browser through which a user can interact with embodiments of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., a communication network). Examples of communication networks include local area networks (LANs), wide area networks (WANs), and the Internet.

[0127] Computer systems can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. Client-server relationships are created by computer programs running on the respective computers and having a client-server relationship with each other.

Claims

1. A method for identifying erroneous characters, characterized in that, The method includes: Obtain the image of the text to be recognized; The text image to be recognized is processed to obtain the character recognition result of the text image to be recognized, and the character recognition result includes at least one character and the recognition probability of the character; When it is determined based on the recognition probability that a target error character exists in the text image to be recognized, the context information of the target error character in the text image to be recognized is obtained; Based on the target character in the character recognition result and a pre-set correct character dictionary, determine the position information of the target character in the correct character dictionary; The context information and the location information are added point by point to obtain the first feature information of the target error character; The first feature information is processed to obtain a second feature vector of the target error character, and the second feature vector carries the classification feature information of the target error character; The second feature vector is processed to calculate a preset number of classification probabilities for the target erroneous character; Based on the location information, the preset number of error categories corresponding to the target character are obtained from a pre-set error character dictionary; wherein, the correct character dictionary stores multiple preset characters, and the error character dictionary stores a preset number of error categories for each preset character, and each preset character is stored in the same order in the correct character dictionary and the error character dictionary; Based on the preset number of classification probabilities, the error category of the target error character is determined from the preset number of error categories.

2. The method according to claim 1, characterized in that, The process of processing the text image to be recognized to obtain the character recognition result of the text image includes: Feature extraction is performed on the text image to be identified to obtain the feature mapping vector of the text image to be identified; Based on the feature mapping vector, multiple contextual information is constructed; Each context information is processed separately to obtain the character recognition probability corresponding to each context information; Based on the correct character dictionary and the character recognition probability, the recognition result corresponding to each context information is determined; Based on the recognition results, at least one character and the recognition probability of the character are obtained, and the character recognition result of the text image to be recognized is generated.

3. The method according to claim 1, characterized in that, The step of determining the position information of the target character in the correct character dictionary based on the target character in the character recognition result and a pre-set correct character dictionary includes: In the character recognition results, characters with a recognition probability less than a probability threshold are selected as the target characters for the target error characters in the character recognition results. Obtain the order information of the target character in the correct character dictionary; The sequence information is encoded to determine the position information of the target character in the correct character dictionary.

4. A device for recognizing erroneous characters, characterized in that, The device includes: The acquisition module is used to acquire the image of the text to be recognized; The first recognition module is used to process the text image to be recognized to obtain the character recognition result of the text image to be recognized, wherein the character recognition result includes at least one character and the recognition probability of the character; The second recognition module is used to: acquire context information of the target erroneous character in the text image to be recognized when it is determined based on the recognition probability; determine the position information of the target erroneous character in the correct character dictionary based on the target character in the character recognition result and a pre-set correct character dictionary; add the context information and the position information point by point to obtain the first feature information of the target erroneous character; process the first feature information to obtain the second feature vector of the target erroneous character, the second feature vector carrying the classification feature information of the target erroneous character; process the second feature vector to calculate a preset number of classification probabilities of the target erroneous character; acquire the preset number of error categories corresponding to the target character in the pre-set error character dictionary according to the position information; wherein the correct character dictionary stores multiple preset characters, the error character dictionary stores a preset number of error categories for each preset character, and each preset character is stored in the same order in the correct character dictionary and the error character dictionary; and determine the error category of the target erroneous character in the preset number of error categories based on the preset number of classification probabilities.

5. The apparatus according to claim 4, characterized in that, The second identification module is used for: In the character recognition results, characters with a recognition probability less than a probability threshold are selected as the target characters for the target error characters in the character recognition results. Obtain the order information of the target character in the correct character dictionary; The sequence information is encoded to determine the position information of the target character in the correct character dictionary.

6. An electronic device, comprising: processor; as well as Stored program memory, The program includes instructions that, when executed by the processor, cause the processor to perform the method according to any one of claims 1-3.

7. A non-transitory computer-readable storage medium storing computer instructions, wherein, The computer instructions are used to cause the computer to perform the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Character error calibrating device

    JP1999134335A

  • Character identification method and apparatus, and storage medium and electronic device

    WO2020010547A1