CN114637816A - Text recognition result processing method and device and computer readable storage medium - Google Patents

Text recognition result processing method and device and computer readable storage medium Download PDF

Info

Publication number
CN114637816A
CN114637816A CN202011487618.7A CN202011487618A CN114637816A CN 114637816 A CN114637816 A CN 114637816A CN 202011487618 A CN202011487618 A CN 202011487618A CN 114637816 A CN114637816 A CN 114637816A
Authority
CN
China
Prior art keywords
text
recognition result
text recognition
word
matched
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
CN202011487618.7A
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.)
4Paradigm Beijing Technology Co Ltd
Original Assignee
4Paradigm Beijing Technology Co Ltd
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 4Paradigm Beijing Technology Co Ltd filed Critical 4Paradigm Beijing Technology Co Ltd
Priority to CN202011487618.7A priority Critical patent/CN114637816A/en
Priority to PCT/CN2021/135047 priority patent/WO2022127610A1/en
Publication of CN114637816A publication Critical patent/CN114637816A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • G06F16/316Indexing structures
    • G06F16/319Inverted lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/31Indexing; Data structures therefor; Storage structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • G06F40/289Phrasal analysis, e.g. finite state techniques or chunking

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Software Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Character Discrimination (AREA)

Abstract

The disclosure provides a text recognition result processing method, a text recognition result processing device and a computer-readable storage medium. The method comprises the following steps: acquiring a text recognition result of the text recognition model, and detecting whether a text matched with the text recognition result exists in a word stock; under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set; acquiring a text set matched with the text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank; and selecting one text from the text set as a final text recognition result. Through the method and the device, the problem of low accuracy of the text recognition result in the related technology is solved.

Description

Text recognition result processing method and device and computer readable storage medium
Technical Field
The present application relates to the field of computers, and the following description relates to a text recognition result processing method, apparatus, and computer-readable storage medium.
Background
People need to process a large amount of words, reports and texts in production and life. In order to reduce the labor of people and improve the processing efficiency, a general character recognition method is discussed in the 50 s, and the text recognition is divided into two specific steps: the detection of characters and the recognition of characters are both indispensable, and for the text recognition, it is agreed that the accuracy of numbers in the text is generally high (more than 95%), while for the characters in the text, one type is non-open text (the range of values can be enumerated, such as capitalization date, each city name, capitalization amount, etc.), the accuracy can be generally improved to more than 90%, and the other type is open text (the range of values can not be enumerated, such as the recognition of company name, etc.), because of the continuous increase of data and the diversity of characters, the accuracy of the model is generally 75%, and this effect is basically not applicable to the production business system, and the problems of the frequency of change of samples and the difficulty of self-learning, etc., make the defect of this problem increasingly obvious.
At present, a commonly used text Recognition method is Optical Character Recognition (ocr for short), but no matter a traditional ocr means, or an end-to-end deep learning ocr Recognition network, such as crnn, crnn + ctc, seq2 seq-attribute, and the like, needs richer samples to train and learn, which is a precondition, and satisfies the precondition, the field of open text Recognition can be usually only 75%, and many small banks or small companies do not have enough samples to support when facing the actual problem, and if only a Recognition model trained by a small data amount is used to support a business system, the effort is not good, and at this time, an engineering model compensation scheme for improving the overall accuracy rate is important.
Aiming at the problem of low accuracy of a text recognition result in the related technology, no solution is provided.
Disclosure of Invention
An exemplary embodiment of the present disclosure is to provide a text recognition result processing method, apparatus, and computer-readable storage medium, which can solve the problem of low accuracy of a text recognition result in the related art.
According to an exemplary embodiment of the present invention, there is provided a text recognition result processing method including: acquiring a text recognition result of the text recognition model, and detecting whether a text matched with the text recognition result exists in a word stock; under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set; acquiring a text set matched with a text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank; and selecting one text from the text set as a final text recognition result.
Optionally, obtaining, according to the inverted index information of each word in the word set in the inverted index of the thesaurus, a text set matched with the text recognition result includes: inquiring reverse index information of each term in the term set in a reverse index of a word stock; acquiring a text identification set of a text matched with each word according to the inverted index information; determining the occurrence frequency of each text identifier in the text identifier set; and combining the texts corresponding to the text identifications with the times exceeding the preset times into a text set matched with the text recognition result.
Optionally, the selecting a text from the text set as the final text recognition result includes: acquiring the editing distance between each text in the text set and the text recognition result; sequencing the editing distances to obtain the minimum editing distance in the editing distances; and determining the text corresponding to the minimum editing distance as a final text recognition result.
Optionally, before obtaining the text recognition result of the text recognition model, the method further includes: when the text recognition service is detected to be started, maintaining the word stock and the inverted index of the words in the word stock into a buffer memory; detecting whether the text matched with the text recognition result exists in the word stock comprises the following steps: and detecting whether the text matched with the text recognition result exists in the buffer memory.
Optionally, after selecting one text from the text collection as a final text recognition result, the method further includes: and sending the final text recognition result to the client.
Optionally, after sending the final text recognition result to the client, the method further includes: receiving an error correction request sent by a client based on the fed-back final text recognition result, wherein the error correction request carries a correct text corresponding to the fed-back final text recognition result; the correct text is stored in a buffer memory.
Optionally, before maintaining the words in the thesaurus and the inverted indexes corresponding to the words in the buffer memory, the method further includes: acquiring a word bank; performing word segmentation on all texts in a word bank; and acquiring the inverted index information of each word after word cutting.
Optionally, the method further includes: and feeding back the text corresponding to the text recognition result to the client under the condition that the obtained text recognition result is matched with the corresponding text.
According to another exemplary embodiment of the present invention, a text recognition result processing apparatus, wherein the method comprises: the storage unit is used for storing a word stock and an inverted index of words in the word stock; the compensation processing unit is used for acquiring a text recognition result of the text recognition model and detecting whether a text matched with the text recognition result exists in the word stock; under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set; acquiring a text set matched with a text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank; and selecting one text from the text set as a final text recognition result.
Optionally, the compensation processing unit is further configured to query inverted index information of each term in the term set in an inverted index of the thesaurus; acquiring a text identification set of a text matched with each word according to the inverted index information; determining the occurrence frequency of each text identifier in the text identifier set; and combining the texts corresponding to the text identifications with the times exceeding the preset times into a text set matched with the text recognition result.
Optionally, the compensation processing unit is further configured to obtain an editing distance between each text in the text set and the text recognition result; sequencing the editing distances to obtain the minimum editing distance in the editing distances; and determining the text corresponding to the minimum editing distance as a final text recognition result.
Optionally, the compensation processing unit is further configured to detect that a text recognition service is started before a text recognition result of the text recognition model is obtained, and maintain the word bank and the inverted index of the words in the word bank in the buffer memory; and detecting whether the text matched with the text recognition result exists in the buffer memory.
Optionally, the compensation processing unit is further configured to send the final text recognition result to the client after selecting one text from the text set as the final text recognition result.
Optionally, the compensation processing unit is further configured to receive an error correction request sent by the client based on the fed-back final text recognition result after the final text recognition result is sent to the client, where the error correction request carries a correct text corresponding to the fed-back final text recognition result; the correct text is stored in a buffer memory.
Optionally, the compensation processing unit is further configured to obtain a word bank before maintaining the words in the word bank and the inverted indexes corresponding to the words in the buffer memory; performing word segmentation on all texts in a word bank; and acquiring the inverted index information of each word after word cutting.
Optionally, the compensation processing unit is further configured to, in a case that it is detected that the obtained text recognition result matches the corresponding text, feed back the text corresponding to the text recognition result to the client.
According to another exemplary embodiment of the present invention, there is provided a computer-readable storage medium storing instructions that, when executed by at least one computing device, cause the at least one computing device to perform the text recognition result processing method as described above.
According to another exemplary embodiment of the present invention, a system is provided comprising at least one computing device and at least one storage device storing instructions, wherein the instructions, when executed by the at least one computing device, cause the at least one computing device to perform the text recognition result processing method as described above.
According to the text recognition result processing method of the exemplary embodiment, when the text recognition result of the obtained text recognition model is not in the memory, the recognition result is segmented, the appropriate text set is matched according to the inverted index information of the segmented words, and the final text recognition result fed back to the client is determined from the text set, so that the text recognition result fed back to the client is more accurate, the accuracy of the recognition result is improved, and the problem of low accuracy of the text recognition result in the related technology is solved.
Drawings
These and/or other aspects and advantages of the present invention will become apparent and more readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 illustrates a flowchart of a text recognition result processing method according to an exemplary embodiment of the present disclosure;
FIG. 2 shows a flowchart illustration of a preferred text recognition result processing method according to an exemplary embodiment of the present disclosure;
fig. 3 illustrates an overall architecture diagram of a text recognition result processing method according to an exemplary embodiment of the present disclosure;
fig. 4 illustrates a block diagram of a structure of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure.
Detailed Description
The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of embodiments of the invention defined by the claims and their equivalents. Various specific details are included to aid understanding, but these are to be considered exemplary only. Accordingly, those of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the invention. In addition, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
In this case, the expression "at least one of the items" in the present disclosure means a case where three types of parallel expressions "any one of the items", "a combination of any plural ones of the items", and "the entirety of the items" are included. For example, "including at least one of a and B" includes the following three cases in parallel: (1) comprises A; (2) comprises B; (3) including a and B. For another example, "at least one of the first step and the second step is performed", which means that the following three cases are juxtaposed: (1) executing the step one; (2) executing the step two; (3) and executing the step one and the step two.
Reference will now be made in detail to embodiments of the present disclosure, examples of which are illustrated in the accompanying drawings. The embodiments are described below in order to explain the present invention by referring to the figures.
Fig. 1 illustrates a flowchart of a text recognition result processing method according to an exemplary embodiment of the present disclosure.
Referring to fig. 1, in step S101, a text recognition result of a text recognition model is obtained, and it is detected whether a text matching the text recognition result exists in a lexicon;
in an embodiment of the present disclosure, before obtaining a text recognition result of the text recognition model, the method further includes: when the text recognition service is detected to be started, maintaining the word stock and the inverted index of the words in the word stock into a buffer memory; detecting whether the text matched with the text recognition result exists in the word stock comprises the following steps: and detecting whether the text matched with the text recognition result exists in the buffer memory. By the embodiment, the cache is maintained by reversely indexing the word set, and the query from the cache is quicker.
In one embodiment of the present disclosure, before maintaining the words in the word bank and the inverted indexes corresponding to the words in the buffer memory, the method further includes: acquiring a word bank; performing word segmentation on all texts in a word bank; and acquiring the inverted index information of each word after word cutting. By the embodiment, the reverse index information of the words is acquired in advance, and the text recognition result is directly inquired when processed, so that the processing time is saved.
It should be noted that Inverted index (Inverted index), also commonly referred to as Inverted index, posting profile or Inverted profile, is an indexing method used to store a mapping of the storage location of a word in a document or a group of documents under a full-text search. It is the most common data structure in document retrieval systems. By inverted indexing, a list of documents containing a word can be quickly retrieved from that word.
It should be noted that the word bank may be obtained according to the service type pertinence to which the text to be recognized by the text recognition service belongs, and if the text is banking, the word bank related to the banking service is obtained.
In an embodiment of the present disclosure, the word segmentation is performed on all texts in the word bank in a search engine mode, wherein the word segmentation is performed on the text recognition result in a search engine mode, and the long words after the word segmentation are further segmented twice in the search engine mode.
In step S102, when there is no matched text, performing word segmentation on the text recognition result to obtain a word set;
in an embodiment of the disclosure, the word segmentation is performed on the text recognition result in an accurate mode word segmentation manner, wherein the accurate mode word segmentation manner does not perform secondary word segmentation on the long word after word segmentation.
In step S103, a text set matching the text recognition result is obtained according to the inverted index information of each word in the word set in the inverted index of the thesaurus;
in an embodiment of the present disclosure, obtaining a text set matching a text recognition result according to inverted index information of each word in the word set in an inverted index of a thesaurus includes: inquiring reverse index information of each term in the term set in a reverse index of a word stock; acquiring a text identification set of a text matched with each word according to the inverted index information; determining the occurrence frequency of each text identifier in the text identifier set; and combining the texts corresponding to the text identifications with the times exceeding the preset times into a text set matched with the text recognition result. Through the embodiment, some irrelevant texts are removed, so that the number of texts of which the editing distance needs to be calculated is greatly reduced.
In step S104, one text is selected from the text collection as a final text recognition result.
In one embodiment of the present disclosure, selecting one text from the set of texts as a final text recognition result includes: acquiring the editing distance between each text in the text set and the text recognition result; sequencing the editing distances to obtain the minimum editing distance in the editing distances; and determining the text corresponding to the minimum editing distance as a final text recognition result.
In an embodiment of the present disclosure, after selecting one text from the text collection as the final text recognition result, the method further includes: and sending the final text recognition result to the client.
In one embodiment of the present disclosure, after sending the final text recognition result to the client, the method further includes: receiving an error correction request sent by a client based on the fed-back final text recognition result, wherein the error correction request carries a correct text corresponding to the fed-back final text recognition result; the correct text is stored in a buffer memory. According to the embodiment, when the client judges that the returned text recognition result is wrong, the correct result is stored in the buffer memory, the accuracy of the wrong text recognition result in the future is ensured without depending on frequent updating of the model, and the problem that a model is difficult to learn closed loop by self through engineering closed loop is solved.
In one embodiment of the present disclosure, the method further includes: and feeding back the text corresponding to the text recognition result to the client under the condition that the obtained text recognition result is matched with the corresponding text. Through the embodiment, when the recognized text is in the memory, the text can be directly fed back to the client.
In summary, for the problem that the recognition accuracy of the text recognition model is not high, the text recognition result processing method according to the exemplary embodiment performs cache hit determination on the text recognition result after obtaining the text recognition result of the text recognition model, that is, determines whether the text recognition result is in an existing lexicon, and if the text recognition result is in the existing lexicon, immediately returns the text recognition result. If the word bank does not exist, performing accurate mode word segmentation on the text recognition result, calculating a text set A in the word bank which is most matched with the text recognition result based on inverted index information of each word after word segmentation, after the calculation, greatly reducing a phrase set to be searched, and feeding back the text corresponding to the minimum distance to the client by calculating the editing distance between the text recognition result and each text in the text set A and theoretically the result which should be returned by the model, thereby greatly improving the accuracy of the text recognition result. Moreover, by introducing cache and Chinese word segmentation of a buffer memory, the possibility of calculating mass editing distance in real time is provided.
Aiming at the problems of sample shortage and slow accumulation, which lead to difficult self-learning, the text recognition result processing method of the exemplary embodiment adds a design of correct result (label) feedback, when the client judges that the returned text recognition result is wrong, the correct result is sent to the buffer memory, specifically, the correct result can be sent to the designed reflow interface, and the accuracy of the same wrong text in the future is ensured through the solution of the engineering end without depending on frequent updating of the model.
The following takes an example that the text recognition result is "i come to Beijing Qing university", and details how the text recognition result processing method of the present disclosure solves the problem of low model recognition accuracy.
As shown in fig. 2, first, initiating (start) an online requirement (online request), recognizing a text recognition result "i comes to the beijing university" according to an online requirement online recognition model, performing cache hit judgment on the "i comes to the beijing university", and if the text recognition result is determined to be in the existing Hash structure Hash, immediately returning (i.e. hit). If the Hash does not indicate that the Chinese character I comes to Beijing Qing university, word cutting is carried out on the Chinese character I comes to Beijing Qing university, a word cutting set of the Chinese character I comes to the Beijing Qing university, text identifications corresponding to texts matched with the words are obtained based on inverted index information of the words after word cutting, the frequency of occurrence of each text identification is calculated, texts corresponding to the text identifications with the frequency of occurrence exceeding 50 are combined together to serve as a text set A in a word bank most matched with the text identification result, the editing distance between the text identification result and each text in the text set A is calculated, and the text corresponding to the person with the smallest distance is fed back to the client.
It should be noted that, in the virtual hash slot partitioned storage and operator-based design based on the redis-cluster, whether compensation intervention is performed on the recognition model result or not can be controlled by configuring some parameters of an operator, and real-time compensation under massive phrases can also be achieved.
The exemplary embodiment of the present disclosure may be divided into 3 parts from bottom to top, the first part is a cold start stage, a historical word stock is prepared, search mode word segmentation is performed on all phrases in the word stock, and inverted index information of all word segmentation is calculated. The second part is an online service stage, when the service is started, the word bank and the inverted index information of the first part are maintained in a redis-cluster (or other cache structures), the online model recognition result is subjected to accurate mode word cutting, a phrase set which is most matched with the word cutting is calculated, and then the edit Distance (Levenshtein Distance) between the recognition result and the phrases is calculated. And the third part is label result feedback, and when the returned result is judged to be wrong in the client system, the correct result is fed back to the system.
As will be described in detail with reference to fig. 3, as shown in fig. 3, the whole scheme can be divided into three parts, i.e., a cold start phase and an online service & label feedback phase. The overall architecture is as follows:
1. and in the cold starting stage, a word stock file is prepared, and a corresponding inverted index file is generated through a word segmentation script.
2. When the service is started, the word stock file and the inverted index file are loaded into a redis-cluster cache, and in order to improve the query effect, the word stock file can be stored redundantly, for example, the word stock information is stored by using id dimension and name dimension respectively.
3. When an online service request is made, obtaining a model identification result, searching whether the model identification result exists through the name dimension, if the model identification result exists, returning to the client immediately, otherwise, segmenting the identification result, calculating a maximum matching phrase id set through inverted index information, inquiring the phrase set through the id dimension, calculating a phrase with the shortest distance through the editing distance, and returning to the client.
4. If the user judges that the returned result is still wrong, the correct label corresponding to the request needs to be fed back to the designed backflow interface.
Fig. 4 shows a block diagram of a structure of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure. As shown in fig. 4, the apparatus includes:
a storage unit 40, configured to store a word bank and an inverted index of words in the word bank;
the compensation processing unit 42 is configured to obtain a text recognition result of the text recognition model, and detect whether a text matching the text recognition result exists in the lexicon; under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set; acquiring a text set matched with the text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank; and selecting one text from the text set as a final text recognition result.
In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to query the reverse index information of each term in the term set in the reverse index of the thesaurus; acquiring a text identification set of a text matched with each word according to the inverted index information; determining the occurrence frequency of each text identifier in the text identifier set; and combining the texts corresponding to the text identifications with the times exceeding the preset times into a text set matched with the text recognition result.
In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to obtain an edit distance between each text in the text set and the text recognition result; sequencing the editing distances to obtain the minimum editing distance in the editing distances; and determining the text corresponding to the minimum editing distance as a final text recognition result.
Optionally, the compensation processing unit 42 is further configured to detect that the text recognition service is started before obtaining the text recognition result of the text recognition model, and maintain the word bank and the inverted index of the words in the word bank in the buffer memory; and detecting whether the text matched with the text recognition result exists in the buffer memory.
In an embodiment of the disclosure, the compensation processing unit is further configured to send the final text recognition result to the client after selecting one text from the text set as the final text recognition result.
In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to receive an error correction request sent by the client based on the fed-back final text recognition result after sending the final text recognition result to the client, where the error correction request carries a correct text corresponding to the fed-back final text recognition result; the correct text is stored in a buffer memory.
In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to obtain a word bank before maintaining the words in the word bank and the inverted indexes corresponding to the words in the buffer memory; performing word segmentation on all texts in a word bank; and acquiring the inverted index information of each word after word cutting.
In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to, in a case that it is detected that the obtained text recognition result matches the corresponding text, feed back the text corresponding to the text recognition result to the client.
The invention discloses an engineering solution for improving the accuracy of an open text recognition model to a low degree, which is used for solving the ocr field, such as the situation that the accuracy of some similar fields in bank note recognition can not reach the standard, the accuracy of the open text recognition model in the industry is usually about 75%, and the problems that the accuracy can not be improved by automatically obtaining a large number of samples to carry out self-learning and updating the model in real time can not be solved. With the engineering solution of the present disclosure, the accuracy can be generally improved to over 90%.
The text recognition result processing method and apparatus according to the exemplary embodiment of the present disclosure have been described above with reference to fig. 1 to 4.
The respective units in the text recognition result processing apparatus shown in fig. 4 may be configured as software, hardware, firmware, or any combination thereof that performs a specific function. For example, each unit may correspond to an application-specific integrated circuit, to pure software code, or to a module combining software and hardware. Furthermore, one or more functions implemented by the respective units may also be uniformly performed by components in a physical entity device (e.g., a processor, a client, a server, or the like).
Further, the text recognition result processing method described with reference to fig. 1 may be implemented by a program (or instructions) recorded on a computer-readable storage medium. For example, according to an exemplary embodiment of the present disclosure, a computer-readable storage medium storing instructions may be provided, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform a method of assisting artificial text annotation according to the present disclosure.
The computer program in the computer-readable storage medium may be executed in an environment deployed in a computer device such as a client, a host, a proxy device, a server, and the like, and it should be noted that the computer program may also be used to perform additional steps other than the above steps or perform more specific processing when the above steps are performed, and the content of the additional steps and the further processing are already mentioned in the description of the related method with reference to fig. 1, and therefore will not be described again here to avoid repetition.
It should be noted that each unit in the text recognition result processing apparatus according to the exemplary embodiment of the present disclosure may completely depend on the execution of the computer program to realize the corresponding function, that is, each unit corresponds to each step in the functional architecture of the computer program, so that the entire system is called by a special software package (e.g., lib library) to realize the corresponding function.
Alternatively, the various elements shown in FIG. 4 may be implemented by hardware, software, firmware, middleware, microcode, or any combination thereof. When implemented in software, firmware, middleware or microcode, the program code or code segments to perform the corresponding operations may be stored in a computer-readable medium such as a storage medium so that a processor may perform the corresponding operations by reading and executing the corresponding program code or code segments.
For example, exemplary embodiments of the present disclosure may also be implemented as a computing device including a storage part in which a set of computer-executable instructions is stored and a processor, which, when executed by the processor, performs a text recognition result processing method according to exemplary embodiments of the present disclosure.
In particular, computing devices may be deployed in servers or clients, as well as on node devices in a distributed network environment. Further, the computing device may be a PC computer, tablet device, personal digital assistant, smart phone, web application, or other device capable of executing the set of instructions.
The computing device need not be a single computing device, but can be any device or collection of circuits capable of executing the instructions (or sets of instructions) described above, individually or in combination. The computing device may also be part of an integrated control system or system manager, or may be configured as a portable electronic device that interfaces with local or remote (e.g., via wireless transmission).
In a computing device, a processor may include a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a programmable logic device, a special purpose processor system, a microcontroller, or a microprocessor. By way of example, and not limitation, processors may also include analog processors, digital processors, microprocessors, multi-core processors, processor arrays, network processors, and the like.
Some operations described in the text recognition result processing method according to the exemplary embodiment of the present disclosure may be implemented by software, some operations may be implemented by hardware, and further, the operations may be implemented by a combination of hardware and software.
The processor may execute instructions or code stored in one of the memory components, which may also store data. The instructions and data may also be transmitted or received over a network via a network interface device, which may employ any known transmission protocol.
The memory component may be integral to the processor, e.g., having RAM or flash memory disposed within an integrated circuit microprocessor or the like. Further, the storage component may comprise a stand-alone device, such as an external disk drive, storage array, or any other storage device usable by a database system. The storage component and the processor may be operatively coupled or may communicate with each other, such as through an I/O port, a network connection, etc., so that the processor can read files stored in the storage component.
In addition, the computing device may also include a video display (such as a liquid crystal display) and a user interaction interface (such as a keyboard, mouse, touch input device, etc.). All components of the computing device may be connected to each other via a bus and/or a network.
The text recognition result processing method according to the exemplary embodiment of the present disclosure may be described as various interconnected or coupled functional blocks or functional diagrams. However, these functional blocks or functional diagrams may be equally integrated into a single logic device or operated on by non-exact boundaries.
Accordingly, the text recognition result processing method described with reference to fig. 1 may be implemented by a system including at least one computing device and at least one storage device storing instructions.
According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for performing a text recognition result processing method according to an exemplary embodiment of the present disclosure, and a storage device having stored therein a set of computer-executable instructions that, when executed by the at least one computing device, performs the text recognition result processing method described with reference to fig. 1.
While various exemplary embodiments of the present disclosure have been described above, it should be understood that the above description is exemplary only, and not exhaustive, and that the present disclosure is not limited to the disclosed exemplary embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the disclosure. Therefore, the protection scope of the present disclosure should be subject to the scope of the claims.

Claims (10)

1. A text recognition result processing method, wherein the method comprises the following steps:
acquiring a text recognition result of a text recognition model, and detecting whether a text matched with the text recognition result exists in a word stock;
under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set;
acquiring a text set matched with the text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank;
and selecting one text from the text set as a final text recognition result.
2. The method of claim 1, wherein the obtaining the text set matching the text recognition result according to the inverted index information of each word in the word set in the inverted index of the thesaurus comprises:
inquiring the reverse index information of each term in the term set in the reverse index of the word stock;
acquiring a text identification set of the text matched with each word according to the inverted index information;
determining the occurrence frequency of each text identifier in the text identifier set;
and combining the texts corresponding to the text identifications with the times exceeding the preset times into a text set matched with the text recognition result.
3. The method of claim 1, wherein the selecting a text from the set of texts as a final text recognition result comprises:
acquiring the editing distance between each text in the text set and the text recognition result;
sequencing the editing distances to obtain the minimum editing distance in the editing distances;
and determining the text corresponding to the minimum editing distance as a final text recognition result.
4. The method of claim 1,
before obtaining the text recognition result of the text recognition model, the method further comprises the following steps: detecting the starting of the text recognition service, and maintaining a word bank and an inverted index of words in the word bank into a buffer memory;
the detecting whether the text matched with the text recognition result exists in the word bank comprises: and detecting whether the text matched with the text recognition result exists in the buffer memory.
5. The method of claim 4, wherein after selecting a text from the set of texts as a final text recognition result, further comprising: and sending the final text recognition result to the client.
6. The method as claimed in claim 5, wherein after sending the final text recognition result to the client, further comprising:
receiving an error correction request sent by the client based on the fed-back final text recognition result, wherein the error correction request carries a correct text corresponding to the fed-back final text recognition result;
storing the correct text in the buffer memory.
7. The method of claim 4, wherein prior to maintaining the words in the thesaurus and the inverted indexes corresponding to the words in a buffer memory, further comprising:
acquiring a word bank;
performing word segmentation on all texts in the word stock;
and acquiring the inverted index information of each word after word cutting.
8. A text recognition result processing apparatus, wherein the method comprises:
the storage unit is used for storing a word stock and an inverted index of words in the word stock;
the compensation processing unit is used for acquiring a text recognition result of a text recognition model and detecting whether a text matched with the text recognition result exists in the word stock; under the condition that no matched text exists, word segmentation is carried out on the text recognition result to obtain a word set; acquiring a text set matched with the text recognition result according to the inverted index information of each word in the word set in the inverted index of the word bank; and selecting one text from the text set as a final text recognition result.
9. A computer-readable storage medium storing instructions that, when executed by at least one computing device, cause the at least one computing device to perform a text recognition result processing method according to any one of claims 1 to 7.
10. A system comprising at least one computing device and at least one storage device storing instructions that, when executed by the at least one computing device, cause the at least one computing device to perform the text recognition result processing method of any one of claims 1 to 7.
CN202011487618.7A 2020-12-16 2020-12-16 Text recognition result processing method and device and computer readable storage medium Pending CN114637816A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202011487618.7A CN114637816A (en) 2020-12-16 2020-12-16 Text recognition result processing method and device and computer readable storage medium
PCT/CN2021/135047 WO2022127610A1 (en) 2020-12-16 2021-12-02 Text recognition result processing system, method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011487618.7A CN114637816A (en) 2020-12-16 2020-12-16 Text recognition result processing method and device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN114637816A true CN114637816A (en) 2022-06-17

Family

ID=81944944

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011487618.7A Pending CN114637816A (en) 2020-12-16 2020-12-16 Text recognition result processing method and device and computer readable storage medium

Country Status (2)

Country Link
CN (1) CN114637816A (en)
WO (1) WO2022127610A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7610281B2 (en) * 2006-11-29 2009-10-27 Oracle International Corp. Efficient computation of document similarity
CN101206672A (en) * 2007-12-25 2008-06-25 北京科文书业信息技术有限公司 Commercial articles searching non result intelligent processing system and method
CN104462085B (en) * 2013-09-12 2019-04-12 腾讯科技(深圳)有限公司 Search key error correction method and device
CN109710929A (en) * 2018-12-18 2019-05-03 金蝶软件(中国)有限公司 A kind of bearing calibration, device, computer equipment and the storage medium of speech recognition text
CN111428474A (en) * 2020-03-11 2020-07-17 中国平安人寿保险股份有限公司 Language model-based error correction method, device, equipment and storage medium

Also Published As

Publication number Publication date
WO2022127610A1 (en) 2022-06-23

Similar Documents

Publication Publication Date Title
US10565273B2 (en) Tenantization of search result ranking
US11182445B2 (en) Method, apparatus, server, and storage medium for recalling for search
CN107992585B (en) Universal label mining method, device, server and medium
WO2019091026A1 (en) Knowledge base document rapid search method, application server, and computer readable storage medium
CN113204621B (en) Document warehouse-in and document retrieval method, device, equipment and storage medium
CN114595686B (en) Knowledge extraction method, and training method and device of knowledge extraction model
CN111191105B (en) Method, device, system, equipment and storage medium for searching government affair information
CN113836314B (en) Knowledge graph construction method, device, equipment and storage medium
US11887011B2 (en) Schema augmentation system for exploratory research
CN116028618B (en) Text processing method, text searching method, text processing device, text searching device, electronic equipment and storage medium
CN113836316B (en) Processing method, training method, device, equipment and medium for ternary group data
CN113408660A (en) Book clustering method, device, equipment and storage medium
CN116150376A (en) Sample data distribution optimization method, device and storage medium
CN114637816A (en) Text recognition result processing method and device and computer readable storage medium
CN114048315A (en) Method and device for determining document tag, electronic equipment and storage medium
CN112926297A (en) Method, apparatus, device and storage medium for processing information
CN113326438A (en) Information query method and device, electronic equipment and storage medium
CN110083817B (en) Naming disambiguation method, device and computer readable storage medium
CN111782958A (en) Recommendation word determining method and device, electronic device and storage medium
CN111930955A (en) Method and device for disambiguating author name and electronic equipment
CN111581950A (en) Method for determining synonym and method for establishing synonym knowledge base
CN116644724B (en) Method, device, equipment and storage medium for generating bid
CN111309865B (en) Similar defect report recommendation method, system, computer device and storage medium
US9508101B1 (en) Systems and methods for providing stock ticker information
CN116150497A (en) Text information recommendation method and device, electronic equipment and storage medium

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