WO2022127610A1 - Text recognition result processing system, method and device - Google Patents

Text recognition result processing system, method and device Download PDF

Info

Publication number
WO2022127610A1
WO2022127610A1 PCT/CN2021/135047 CN2021135047W WO2022127610A1 WO 2022127610 A1 WO2022127610 A1 WO 2022127610A1 CN 2021135047 W CN2021135047 W CN 2021135047W WO 2022127610 A1 WO2022127610 A1 WO 2022127610A1
Authority
WO
WIPO (PCT)
Prior art keywords
text
recognition result
text recognition
word
thesaurus
Prior art date
Application number
PCT/CN2021/135047
Other languages
French (fr)
Chinese (zh)
Inventor
杨建国
詹镇江
Original Assignee
第四范式(北京)技术有限公司
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 第四范式(北京)技术有限公司 filed Critical 第四范式(北京)技术有限公司
Publication of WO2022127610A1 publication Critical patent/WO2022127610A1/en

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

Definitions

  • the present disclosure relates to the field of computers, and the following description relates to a text recognition result processing system, method and apparatus.
  • Text recognition In production and life, people have to deal with a large number of words, reports and texts. In order to reduce people's labor and improve processing efficiency, general text recognition methods began to be discussed in the 1950s. Text recognition is divided into two specific steps: text detection and text recognition, both of which are indispensable. For text recognition, the industry has reached a consensus.
  • the accuracy of the numbers in the text is generally high (above 95%), while for the text in the text, one type is non-open text (the range of values can be enumerated, such as capitalized dates, local city names, capitalized amount, etc.), the accuracy rate can generally be increased to more than 90%, the other type is open text (the range of values is not enumerable, such as the recognition of company names, etc.), because of the continuous increase of data & the diversity of characters, resulting in the model's
  • the industry standard for the accuracy rate is usually 75%, and this effect cannot be applied to the production business system.
  • the frequency of sample changes and the difficulty of self-learning make the defects of this problem increasingly obvious.
  • the commonly used text recognition method is optical character recognition (Optical Character Recognition, abbreviated as ocr), but whether it is the traditional ocr method or the end-to-end deep learning ocr recognition network, such as crnn, crnn+ctc, seq2seq-attention, etc., It is a prerequisite for training and learning, which is a prerequisite. If this prerequisite is met, the field of open text recognition usually only reaches 75%, and many small banks or small companies are facing this problem. When there is a practical problem, there are not enough samples to support it. If only the recognition model trained with a small amount of data is used to support the business system, it will not be enough. At this time, the engineering model compensation scheme to improve the overall accuracy rate is particularly important.
  • Exemplary embodiments of the present disclosure are to provide a text recognition result processing system, method and apparatus, which can solve the problem of low accuracy of text recognition results in the related art.
  • a system 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
  • the following method of executing the text recognition result processing method obtain the text recognition result of the text recognition model, and detect whether there is text matching the text recognition result in the thesaurus; when there is no matching text, cut the text recognition result. word to obtain a word set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, a text set matching the text recognition result is obtained; a text is selected from the text set as the final text recognition result.
  • a method for processing a text recognition result comprising: acquiring a text recognition result of a text recognition model, and detecting whether there is text matching the text recognition result in the thesaurus; In the case of text, segment the text recognition result to obtain a word set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result; Select a text in the collection as the final text recognition result.
  • a text recognition result processing device includes: a storage unit for storing a thesaurus and an inverted index of words in the thesaurus; a compensation processing unit for acquiring a text recognition model Text recognition results, and detect whether there is text matching the text recognition results in the thesaurus; when there is no matching text, segment the text recognition results to obtain a word set; The inverted index information in the inverted index of , obtains a text set that matches the text recognition result; selects a text from the text set as the final text recognition result.
  • a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform the text recognition result processing as described above method.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure
  • the text recognition result processing method comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure The text recognition result processing method.
  • the recognition result processing system, method, and device of the present exemplary embodiment when the text recognition result obtained by the text recognition model is not in the memory, the recognition result is segmented, and a suitable word is matched according to the inverted index information of the segmented words.
  • FIG. 1 shows a flowchart of a method for processing a text recognition result according to an exemplary embodiment of the present disclosure
  • FIG. 2 shows a schematic flowchart of a preferred text recognition result processing method according to an exemplary embodiment of the present disclosure
  • FIG. 3 shows an overall architecture diagram of a method for processing a text recognition result according to an exemplary embodiment of the present disclosure
  • FIG. 4 shows a structural block diagram of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure.
  • FIG. 1 shows a flowchart of a text recognition result processing method according to an exemplary embodiment of the present disclosure.
  • step S101 the text recognition result of the text recognition model is obtained, and it is detected whether there is a text matching the text recognition result in the thesaurus;
  • the method before acquiring the text recognition result of the text recognition model, the method further includes: detecting that the text recognition service is started, maintaining the thesaurus and the inverted index of the words in the thesaurus in the buffer memory; detecting Whether there is text matching the text recognition result in the thesaurus includes: detecting whether there is text matching the text recognition result in the buffer memory.
  • the inverted index of the word set is maintained in the cache, and the query from the cache is faster.
  • the method before maintaining the words in the thesaurus and the inverted index corresponding to the words in the buffer memory, the method further includes: acquiring the thesaurus; segmenting all the texts in the thesaurus; acquiring the segmented words Inverted index information for each subsequent word.
  • the inverted index information of the words is acquired in advance, and the text recognition result can be directly queried, which saves processing time.
  • an inverted index also often referred to as an inverted index, an inserted file or a reversed file, is an indexing method that is used to store a word in a document under full-text search. Or a map of storage locations within a set of documents. It is the most commonly used data structure in document retrieval systems. With an inverted index, you can quickly get a list of documents that contain a word based on that word.
  • the above-mentioned thesaurus can be obtained in a targeted manner according to the business type of the text to be recognized by the text recognition service. For example, if the text is a banking business, a thesaurus related to the banking business is obtained.
  • the above-mentioned word segmentation for all texts in the thesaurus can be performed by using a search engine mode word segmentation method to segment the text recognition results, wherein the search engine mode word segmentation method will Long words are further divided into secondary words.
  • step S102 when there is no matching text, the text recognition result is segmented to obtain a word set
  • the above-mentioned word segmentation of the text recognition result can be performed by using the precise mode word segmentation method to segment the text recognition result, wherein the precise mode word segmentation method does not further segment the long words Secondary participle.
  • step S103 according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result;
  • acquiring a text set that matches the text recognition result includes: querying the word set for each word in the word set The inverted index information in the inverted index of the library; according to the inverted index information, obtain the text identification set of the text matching each word; determine the number of occurrences of each text identification in the text identification set; The text corresponding to the text identifier is merged into a text set matching the text recognition result.
  • some irrelevant texts are removed first, which greatly reduces the amount of texts that need to be calculated for the edit distance.
  • step S104 a text is selected from the text set as the final text recognition result.
  • selecting a text from the text set as the final text recognition result includes: obtaining an edit distance between each text in the text set and the text recognition result; Minimum edit distance; determine the text corresponding to the minimum edit distance as the final text recognition result.
  • the method further includes: sending the final text recognition result to the client.
  • the method further includes: receiving an error correction request sent by the client based on the feedback final text recognition result, wherein the error correction request carries The correct text corresponding to the final text recognition result with feedback; the correct text is stored in the buffer memory.
  • the client determines that the returned text recognition result is wrong, the correct result is stored in the buffer memory, which ensures the accuracy of the wrong text recognition result in the future without relying on frequent updates of the model , and solve a class of model self-learning closed-loop difficult problems through engineering closed-loop.
  • the above method further includes: in the case where it is detected that the acquired text recognition result matches the corresponding text, feeding back the text corresponding to the text recognition result to the client.
  • the recognized text when it is in the memory, it can be directly fed back to the client.
  • the text recognition result processing method of this exemplary embodiment after acquiring the text recognition result of the text recognition model, performs a cache hit judgment on the text recognition result. , that is, to determine whether the text recognition result is in the existing thesaurus, and if it is in the existing thesaurus, return it immediately. If there is no word in the thesaurus, perform precise pattern segmentation on the text recognition result, and calculate the text set A in the thesaurus that best matches the text recognition result based on the inverted index information of each word after word segmentation.
  • the text recognition result processing method of this exemplary embodiment adds the design of correct result (label) feedback.
  • the correct result is sent to the buffer memory, specifically, it can be sent to the designed backflow interface, and the solution of the engineering end can ensure the accuracy of the same error text in the future, without relying on frequent updates of the model.
  • the online recognition model recognizes the text recognition result "I came to Beijing Qing University", and makes a cache hit judgment for "I came to Beijing Qing University". If it is determined to be in the existing hash structure Hash, Return immediately (ie hit). If there is no "I came to Beijing Qing University” in the Hash, then "I came to Beijing Qing University” will be segmented, and the set of words “I”, “Come”, “Beijing", “Qing” and “University” will be obtained. The inverted index information of each word after the word, the text identifier corresponding to the text matched by each word is obtained, and the number of occurrences of each text identifier is calculated. The text set A in the thesaurus that most matches the text recognition result, and then by calculating the edit distance between the text recognition result and each text in the text set A, the text corresponding to the smallest distance is fed back to the client.
  • the exemplary embodiment of the present disclosure can be divided into three parts from bottom to top.
  • the first part is the cold start stage, preparing a historical thesaurus, performing search mode segmentation on all phrases in the thesaurus, and calculating the inverse of all the segmented words. Sort index information.
  • the second part is the online service stage. When the service is started, the thesaurus and the inverted index information of the first part are maintained in the redis-cluster (or other cache structures), and the online model recognition results are accurately modeled. Calculate the set of phrases that best match the word segmentation, and then calculate the edit distance (Levenshtein Distance) between the recognition result and these phrases.
  • the third part is the label result feedback. When the returned result is judged wrong in the client system, the correct result is fed back to the system.
  • thesaurus files can be stored redundantly, for example, thesaurus information is stored in the id dimension and the name dimension respectively.
  • FIG. 4 shows a structural block diagram of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure. As shown in Figure 4, the device includes:
  • the storage unit 40 is used to store the thesaurus and the inverted index of the words in the thesaurus;
  • the compensation processing unit 42 is used to obtain the text recognition result of the text recognition model, and detects whether there is a text matching the text recognition result in the thesaurus; when there is no matching text, the text recognition result is segmented to obtain words Set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result; select a text from the text set as the final text recognition result.
  • the compensation processing unit 42 is further configured to query the inverted index information of each word in the word set in the inverted index of the thesaurus; according to the inverted index information, obtain a match for each word The text identification set of the text; determine the number of occurrences of each text identification in the text identification set; merge the texts corresponding to the text identifications whose frequency exceeds a predetermined number of times into a text set matching the text recognition result.
  • the compensation processing unit 42 is further configured to obtain the edit distance between each text in the text set and the text recognition result; sort the edit distances to obtain the minimum edit distance among the edit distances; The text corresponding to the distance is determined as the final text recognition result.
  • the compensation processing unit 42 is further configured to detect that the text recognition service is started before acquiring the text recognition result of the text recognition model, and maintain the thesaurus and the inverted index of the words in the thesaurus in the buffer memory; detecting Whether there is text matching the text recognition result in the buffer memory.
  • the compensation processing unit is further configured to send the final text recognition result to the client after selecting a text from the text set as the final text recognition result.
  • the compensation processing unit 42 is further configured to, after sending the final text recognition result to the client, receive an error correction request sent by the client based on the feedback final text recognition result, wherein the correction
  • the error request carries the correct text corresponding to the feedback final text recognition result; the correct text is stored in the buffer memory.
  • the compensation processing unit 42 is further configured to obtain the thesaurus before maintaining the words in the thesaurus and the inverted index corresponding to the words in the buffer memory; cut all the texts in the thesaurus word; obtains the inverted index information of each word after word segmentation.
  • the compensation processing unit 42 is further configured to feed back the text corresponding to the text recognition result to the client when it is detected that the acquired text recognition result matches the corresponding text.
  • the present disclosure constructs an engineering solution for improving the low accuracy rate of an open text recognition model, which is used to solve the problem in the ocr field, such as the situation where the accuracy rate of some similar fields in bank bill recognition cannot meet the standard, and the industry is in the open text
  • the accuracy of the recognition model is usually around 75%. This kind of problem usually cannot be self-learned by automatically acquiring a large number of samples and updating the model in real time to improve the accuracy.
  • the accuracy rate can typically be improved to over 90%.
  • Each unit in the text recognition result processing apparatus shown in FIG. 4 may be configured as software, hardware, firmware or any combination of the above items to perform specific functions.
  • each unit may correspond to a dedicated integrated circuit, may also correspond to a pure software code, or may correspond to a module combining software and hardware.
  • one or more functions implemented by each unit can also be uniformly performed by components in a physical entity device (eg, a processor, a client or a server, etc.).
  • the text recognition result processing method described with reference to FIG. 1 may be implemented by a program (or instruction) recorded on a computer-readable storage medium.
  • a computer-readable storage medium storing instructions may be provided that, when executed by at least one computing device, cause the at least one computing device to perform assisted labor according to the present disclosure Method for text annotation.
  • the computer program in the above-mentioned computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above-mentioned steps or More specific processing is performed when the above steps are performed, and the contents of these additional steps and further processing have been mentioned in the description of the related method with reference to FIG. 1 , and thus will not be repeated here to avoid repetition.
  • each unit in the text recognition result processing apparatus can completely rely on the running 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 invoked through specialized software packages (eg, lib libraries) to implement corresponding functions.
  • specialized software packages eg, lib libraries
  • each unit shown in FIG. 4 can also be implemented by hardware, software, firmware, middleware, microcode or any combination thereof.
  • program codes or code segments for performing corresponding operations may be stored in a computer-readable medium such as a storage medium, so that a processor can read and execute the corresponding program by reading code or code segment to perform the corresponding action.
  • exemplary embodiments of the present disclosure may also be implemented as a computing device including a storage component and a processor, the storage component stores a computer-executable instruction set, and when the computer-executable instruction set is executed by the processor, executes the A text recognition result processing method according to an exemplary embodiment of the present disclosure.
  • the computing device may be deployed in a server or a client, or may be deployed on a node device in a distributed network environment.
  • the computing device may be a PC computer, a tablet device, a personal digital assistant, a smartphone, a web application, or other device capable of executing the set of instructions described above.
  • the computing device does not have to be a single computing device, but can also be any set of devices or circuits capable of individually or jointly executing the above-mentioned instructions (or instruction sets).
  • 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 locally or remotely (eg, via wireless transmission).
  • 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.
  • 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 an exemplary embodiment of the present disclosure may be implemented by software, some operations may be implemented by hardware, and in addition, these operations may also be implemented by a combination of software and hardware operate.
  • the processor may execute instructions or code stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
  • the memory component may be integrated with the processor, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Additionally, the storage components may include separate devices, such as external disk drives, storage arrays, or any other storage device that may be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor to read files stored in the storage component.
  • 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 network.
  • a video display such as a liquid crystal display
  • a user interaction interface such as a keyboard, mouse, touch input device, etc.
  • the text recognition result processing method 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 logical device or operate along non-precise boundaries.
  • the text recognition result processing method described with reference to FIG. 1 can be implemented by a system including at least one computing device and at least one storage device storing instructions.
  • At least one computing device is a computing device for executing a method for processing a text recognition result according to an exemplary embodiment of the present disclosure, and a computer-executable instruction set is stored in the storage device.
  • the text recognition result processing method described with reference to FIG. 1 is executed.
  • an electronic device comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a reference Figure 1 describes the text recognition result processing method.
  • the recognition result processing method of the present disclosure when the text recognition result obtained by the text recognition model is not in the memory, the recognition result is segmented, and a suitable text set is matched according to the inverted index information of the segmented words, and the text set is obtained from the text set.
  • the final text recognition result fed back to the customer is determined in the middle of the paper, which makes the text recognition result fed back to the customer more accurate, improves the accuracy of the recognition result, and solves the problem of low accuracy of the text recognition result in related technologies.

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 present disclosure provides a text recognition result processing system, method and device. Said method comprises: acquiring a text recognition result of a text recognition model, and detecting whether a text matching the text recognition result exists in a word library; if there is no matched text, performing word segmentation on the text recognition result, to obtain a word set; according to inverted index information of each word of the word set in an inverted index of the word library, acquiring a text set matching the text recognition result; and selecting one text from the text set as a final text recognition result. The present disclosure solves the problem of low accuracy of a text recognition result in the related art.

Description

文本识别结果处理系统、方法及装置Text recognition result processing system, method and device
本公开要求申请号为202011487618.7,申请日为2020年12月16日,名称为“文本识别结果处理方法、装置及计算机可读存储介质”的中国专利申请的优先权,其中,上述申请公开的内容通过引用结合在本公开中。This disclosure claims the priority of a Chinese patent application with an application number of 202011487618.7 and an application date of December 16, 2020, titled "Text Recognition Result Processing Method, Device and Computer-readable Storage Medium", wherein the content disclosed in the above application Incorporated in this disclosure by reference.
技术领域technical field
本公开涉及计算机领域,以下描述涉及一种文本识别结果处理系统、方法及装置。The present disclosure relates to the field of computers, and the following description relates to a text recognition result processing system, method and apparatus.
背景技术Background technique
人们在生产和生活中,要处理大量的文字、报表和文本。为了减轻人们的劳动,提高处理效率,50年代开始探讨一般文字识别方法,文本识别分为两个具体步骤:文字的检测和文字的识别,两者缺一不可,而对于文本识别,业界达成共识的是,文本中的数字的准确率普遍很高(95%以上),而对于文本中的文字,一类是非开放性文本(值的范围可枚举,譬如大写日期,各地级市名称,大写金额等),准确率可以普遍提高到90%以上,另一类是开放性文本(值的范围不可枚举,譬如公司名称的识别等),因为数据的持续增加&字符多样性,导致模型的准确率业界标准通常在75%,而这个效果基本是无法应用于生产业务系统的,且样本的变化频率和自学习困难等问题,使得这一问题的缺陷日益明显。In production and life, people have to deal with a large number of words, reports and texts. In order to reduce people's labor and improve processing efficiency, general text recognition methods began to be discussed in the 1950s. Text recognition is divided into two specific steps: text detection and text recognition, both of which are indispensable. For text recognition, the industry has reached a consensus. The accuracy of the numbers in the text is generally high (above 95%), while for the text in the text, one type is non-open text (the range of values can be enumerated, such as capitalized dates, local city names, capitalized amount, etc.), the accuracy rate can generally be increased to more than 90%, the other type is open text (the range of values is not enumerable, such as the recognition of company names, etc.), because of the continuous increase of data & the diversity of characters, resulting in the model's The industry standard for the accuracy rate is usually 75%, and this effect cannot be applied to the production business system. The frequency of sample changes and the difficulty of self-learning make the defects of this problem increasingly obvious.
目前,常用的文本识别方法为光学字符识别(Optical Character Recognition,简称为ocr),但无论是传统ocr手段,还是端到端的深度学习ocr识别网络,如crnn、crnn+ctc、seq2seq-attention等,都需要比较丰富的样本来训练学习,这是一个前提条件,满足了这个前提,对开放性文本识别这一领域,通常也只能到75%,而很多小银行或者小公司,在面对这一实际问题时,并没有足够的样本来支撑,若只通过小数据量训练的识别模型来支撑业务系统,显得力不从心,此时用于提高整体准确率的工程化模型补偿方案便显得尤为重要。At present, the commonly used text recognition method is optical character recognition (Optical Character Recognition, abbreviated as ocr), but whether it is the traditional ocr method or the end-to-end deep learning ocr recognition network, such as crnn, crnn+ctc, seq2seq-attention, etc., It is a prerequisite for training and learning, which is a prerequisite. If this prerequisite is met, the field of open text recognition usually only reaches 75%, and many small banks or small companies are facing this problem. When there is a practical problem, there are not enough samples to support it. If only the recognition model trained with a small amount of data is used to support the business system, it will not be enough. At this time, the engineering model compensation scheme to improve the overall accuracy rate is particularly important.
针对相关技术中文本识别结果的准确率低的问题,尚未有解决方案。There is no solution for the problem of low accuracy of text recognition results in the related art.
发明内容SUMMARY OF THE INVENTION
本公开的示例性实施例在于提供一种文本识别结果处理系统、方法及装置,其能够解决相关技术中文本识别结果的准确率低的问题。Exemplary embodiments of the present disclosure are to provide a text recognition result processing system, method and apparatus, which can solve the problem of low accuracy of text recognition results in the related art.
根据本公开的第一方面,提供一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行文本识别结果处理方法的以下方法:获取文本识别模型的文本识别结果,并检测词库中是否存在与文本识别结果匹配的文本;当不存在匹配的文本的情况下,对文本识别结果进行切词得到词语集合;根据词语集合中每个词语在词库的倒排索引中的倒排索引信息,获取与文本识别结果匹配的文本集合;从文本集合中选择一个文本作为最终的文本识别结果。According to a first aspect of the present disclosure, there is provided a system 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 The following method of executing the text recognition result processing method: obtain the text recognition result of the text recognition model, and detect whether there is text matching the text recognition result in the thesaurus; when there is no matching text, cut the text recognition result. word to obtain a word set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, a text set matching the text recognition result is obtained; a text is selected from the text set as the final text recognition result.
根据本公开的第二方面,提供了一种文本识别结果处理方法,该方法包括:获取文本识别模型的文本识别结果,并检测词库中是否存在与文本识别结果匹配的文本;当不存在匹配的文本的情况下,对文本识别结果进行切词得到词语集合;根据词语集合中每个词语在词库的倒排索引中的倒排索引信息,获取与文本识别结果匹配的文本集合;从文本集合中选择一个文本作为最终的文本识别结果。According to a second aspect of the present disclosure, there is provided a method for processing a text recognition result, the method comprising: acquiring a text recognition result of a text recognition model, and detecting whether there is text matching the text recognition result in the thesaurus; In the case of text, segment the text recognition result to obtain a word set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result; Select a text in the collection as the final text recognition result.
根据本公开的第三方面,一种文本识别结果处理装置,该装置包括:存储单元,用于存储词库和词库中的词语的倒排索引;补偿处理单元,用于获取文本识别模型的文本识别结果,并检测词库中是否存在与文本识别结果匹配的文本;当不存在匹配的文本的情况下,对文本识别结果进行切词得到词语集合;根据词语集合中每个词语在词库的倒排索引中的倒排索引信息,获取与文本识别结果匹配的文本集合;从文本集合中选择一个文本作为最终的文本识别结果。According to a third aspect of the present disclosure, a text recognition result processing device includes: a storage unit for storing a thesaurus and an inverted index of words in the thesaurus; a compensation processing unit for acquiring a text recognition model Text recognition results, and detect whether there is text matching the text recognition results in the thesaurus; when there is no matching text, segment the text recognition results to obtain a word set; The inverted index information in the inverted index of , obtains a text set that matches the text recognition result; selects a text from the text set as the final text recognition result.
根据本公开的第四方面,提供一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行如上所述的文本识别结果处理方法。According to a fourth aspect of the present disclosure, there is provided a computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform the text recognition result processing as described above method.
根据本公开的第五方面,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现本公开的文本识别结果处理方法。According to a fifth aspect of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the present disclosure The text recognition result processing method.
根据本示例性实施例的文本识别结果处理系统、方法及装置,在获取文本识别模型的文本识别结果不在存储器中时,对识别结果进行分词,根据分词后的词语的倒排索引信息匹配适合的文本集合,从该文本集合中确定最终的反馈给客户的文本识别结果,使得反馈给客户的文本识别结果更准确,提升了识别结果的准确率,解决了相关技术中文本识别结果的准确率低的问题。According to the text recognition result processing system, method, and device of the present exemplary embodiment, when the text recognition result obtained by the text recognition model is not in the memory, the recognition result is segmented, and a suitable word is matched according to the inverted index information of the segmented words. A text set, from which the final text recognition result fed back to the customer is determined, so that the text recognition result fed back to the customer is more accurate, the accuracy of the recognition result is improved, and the low accuracy of the text recognition result in related technologies is solved. The problem.
附图说明Description of drawings
通过结合附图,从实施例的下面描述中,本公开这些和/或其它方面及优点将会变得清楚,并且更易于理解,其中:These and/or other aspects and advantages of the present disclosure will become apparent, and be more readily understood, from the following description of embodiments, taken in conjunction with the accompanying drawings, wherein:
图1示出根据本公开示例性实施例的文本识别结果处理方法的流程图;1 shows a flowchart of a method for processing a text recognition result according to an exemplary embodiment of the present disclosure;
图2示出根据本公开示例性实施例的优选的文本识别结果处理方法的流程图示意图;2 shows a schematic flowchart of a preferred text recognition result processing method according to an exemplary embodiment of the present disclosure;
图3示出根据本公开示例性实施例的文本识别结果处理方法的总体架构图;FIG. 3 shows an overall architecture diagram of a method for processing a text recognition result according to an exemplary embodiment of the present disclosure;
图4示出根据本公开示例性实施例的文本识别结果处理装置的结构框图。FIG. 4 shows a structural block diagram of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure.
具体实施方式Detailed ways
提供参照附图的以下描述以帮助对由权利要求及其等同物限定的本公开的实施例的全面理解。包括各种特定细节以帮助理解,但这些细节仅被视为是示例性的。因此,本领域的普通技术人员将认识到在不脱离本公开的范围和精神的情况下,可对描述于此的实施例进行各种改变和修改。此外,为了清楚和简洁,省略对公知的功能和结构的描述。The following description with reference to the accompanying drawings is provided to assist in a comprehensive understanding of embodiments of the present disclosure as defined by the claims and their equivalents. Various specific details are included to aid in that understanding, but are to be regarded as 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 present disclosure. Also, descriptions of well-known functions and constructions are omitted for clarity and conciseness.
在此需要说明的是,在本公开中出现的“若干项之中的至少一项”均表示包含“该若干项中的任意一项”、“该若干项中的任意多项的组合”、“该若干项的全体”这三类并列的情况。例如“包括A和B之中的至少一个”即包括如下三种并列的情况:(1)包括A;(2)包括B;(3)包括A和B。又例如“执行步骤一和步骤二之中的至少一个”,即表示如下三种并列的情况:(1)执行步骤一;(2)执行步骤二;(3)执行步骤一和步骤二。也就是说,“A和/或B”也可被表示为“A和B之中的至少一个”,“执行步骤一和/或步骤二”也可被表示为“执行步骤一和步骤二之中的至少一个”。It should be noted here that "at least one of several items" in the present disclosure all means including "any one of the several items", "a combination of any of the several items", The three categories of "the whole of the several items" are juxtaposed. For example, "including at least one of A and B" includes the following three parallel situations: (1) including A; (2) including B; (3) including A and B. Another example is "execute at least one of step 1 and step 2", which means the following three parallel situations: (1) execute step 1; (2) execute step 2; (3) execute step 1 and step 2. That is to say, "A and/or B" can also be expressed as "at least one of A and B", and "execute step 1 and/or step 2" can also be expressed as "execute step 1 and step 2" at least one of".
现将详细参照本公开的实施例,所述实施例的示例在附图中示出。以下 将通过参照附图来说明所述实施例,以便解释本公开。Reference will now be made in detail to the 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 disclosure by referring to the figures.
图1示出根据本公开示例性实施例的文本识别结果处理方法的流程图。FIG. 1 shows a flowchart of a text recognition result processing method according to an exemplary embodiment of the present disclosure.
参照图1,在步骤S101中,获取文本识别模型的文本识别结果,并检测词库中是否存在与文本识别结果匹配的文本;1, in step S101, the text recognition result of the text recognition model is obtained, and it is detected whether there is a text matching the text recognition result in the thesaurus;
在本公开的一个实施例中,在获取文本识别模型的文本识别结果之前,还包括:检测到文本识别服务启动,将词库和词库中的词语的倒排索引维护到缓冲存储器中;检测词库中是否存在与文本识别结果匹配的文本包括:检测缓冲存储器中否存在与文本识别结果匹配的文本。通过本实施例,将词语集倒排索引维护在缓存器中,从缓存器查询更快速。In an embodiment of the present disclosure, before acquiring the text recognition result of the text recognition model, the method further includes: detecting that the text recognition service is started, maintaining the thesaurus and the inverted index of the words in the thesaurus in the buffer memory; detecting Whether there is text matching the text recognition result in the thesaurus includes: detecting whether there is text matching the text recognition result in the buffer memory. Through this embodiment, the inverted index of the word set is maintained in the cache, and the query from the cache is faster.
在本公开的一个实施例中,在将词库中的词语和词语对应的倒排索引维护到缓冲存储器中之前,还包括:获取词库;对词库中所有文本进行切词;获取切词后的每个词语的倒排索引信息。通过本实施例,提前获取词语的倒排索引信息,处理文本识别结果时直接查询即可,节省处理时间。In an embodiment of the present disclosure, before maintaining the words in the thesaurus and the inverted index corresponding to the words in the buffer memory, the method further includes: acquiring the thesaurus; segmenting all the texts in the thesaurus; acquiring the segmented words Inverted index information for each subsequent word. Through this embodiment, the inverted index information of the words is acquired in advance, and the text recognition result can be directly queried, which saves processing time.
需要说明的是,倒排索引(Inverted index),也常被称为反向索引、置入档案或反向档案,是一种索引方法,被用来存储在全文搜索下某个单词在一个文档或者一组文档中的存储位置的映射。它是文档检索系统中最常用的数据结构。通过倒排索引,可以根据单词快速获取包含这个单词的文档列表。It should be noted that an inverted index (Inverted index), also often referred to as an inverted index, an inserted file or a reversed file, is an indexing method that is used to store a word in a document under full-text search. Or a map of storage locations within a set of documents. It is the most commonly used data structure in document retrieval systems. With an inverted index, you can quickly get a list of documents that contain a word based on that word.
需要说明的是,上述获取词库可以根据文本识别服务需要识别的文本所属的业务类型针对性的获取词库,如,文本是银行业务,则获取银行业务相关的词库。It should be noted that, the above-mentioned thesaurus can be obtained in a targeted manner according to the business type of the text to be recognized by the text recognition service. For example, if the text is a banking business, a thesaurus related to the banking business is obtained.
在本公开的一个实施例中,上述对词库中所有文本进行切词,可以采用搜索引擎模式切词方式对文本识别结果进行切词,其中,搜索引擎模式切词方式会对切词后的长词进一步二次分词。In an embodiment of the present disclosure, the above-mentioned word segmentation for all texts in the thesaurus can be performed by using a search engine mode word segmentation method to segment the text recognition results, wherein the search engine mode word segmentation method will Long words are further divided into secondary words.
在步骤S102中,当不存在匹配的文本的情况下,对文本识别结果进行切词得到词语集合;In step S102, when there is no matching text, the text recognition result is segmented to obtain a word set;
在本公开的一个实施例中,上述对文本识别结果进行切词,可以采用精确模式切词方式对文本识别结果进行切词,其中,精确模式切词方式不会对切词后的长词进一步二次分词。In an embodiment of the present disclosure, the above-mentioned word segmentation of the text recognition result can be performed by using the precise mode word segmentation method to segment the text recognition result, wherein the precise mode word segmentation method does not further segment the long words Secondary participle.
在步骤S103中,根据词语集合中每个词语在词库的倒排索引中的倒排索引信息,获取与文本识别结果匹配的文本集合;In step S103, according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result;
在本公开的一个实施例中,根据词语集合中每个词语在词库的倒排索引 中的倒排索引信息,获取与文本识别结果匹配的文本集合包括:查询词语集合中每个词语在词库的倒排索引中的倒排索引信息;根据倒排索引信息,获取与每个词语匹配的文本的文本标识集合;确定文本标识集合中每个文本标识出现的次数;将次数超过预定次数的文本标识对应的文本,合并为与文本识别结果匹配的文本集合。通过本实施例,先剔除一些无关文本,大大减少了需要计算编辑距离的文本数量。In an embodiment of the present disclosure, according to the inverted index information of each word in the word set in the inverted index of the thesaurus, acquiring a text set that matches the text recognition result includes: querying the word set for each word in the word set The inverted index information in the inverted index of the library; according to the inverted index information, obtain the text identification set of the text matching each word; determine the number of occurrences of each text identification in the text identification set; The text corresponding to the text identifier is merged into a text set matching the text recognition result. With this embodiment, some irrelevant texts are removed first, which greatly reduces the amount of texts that need to be calculated for the edit distance.
在步骤S104中,从文本集合中选择一个文本作为最终的文本识别结果。In step S104, a text is selected from the text set as the final text recognition result.
在本公开的一个实施例中,从文本集合中选择一个文本作为最终的文本识别结果包括:获取文本集合中每个文本与文本识别结果的编辑距离;对编辑距离进行排序,获取编辑距离中的最小编辑距离;将最小编辑距离对应的文本确定为最终的文本识别结果。In an embodiment of the present disclosure, selecting a text from the text set as the final text recognition result includes: obtaining an edit distance between each text in the text set and the text recognition result; Minimum edit distance; determine the text corresponding to the minimum edit distance as the final text recognition result.
在本公开的一个实施例中,在从文本集合中选择一个文本作为最终的文本识别结果之后,还包括:将最终的文本识别结果发送给客户端。In an embodiment of the present disclosure, after selecting a text from the text set as the final text recognition result, the method further includes: sending the final text recognition result to the client.
在本公开的一个实施例中,在将最终的文本识别结果发送给客户端之后,方法还包括:接收客户端基于反馈的最终的文本识别结果发送的纠错请求,其中,纠错请求中携带有反馈的最终的文本识别结果对应的正确文本;将正确文本存储于缓冲存储器。通过本实施例,当客户端在判断返回的文本识别结果是错误时,则把正确的结果存储到缓冲存储器中,保证了该错误文本识别结果在未来的准确率,而不依赖模型的频繁更新,并且通过工程闭环解决一类模型自学习闭环难的问题。In an 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 the client based on the feedback final text recognition result, wherein the error correction request carries The correct text corresponding to the final text recognition result with feedback; the correct text is stored in the buffer memory. Through this embodiment, when the client determines that the returned text recognition result is wrong, the correct result is stored in the buffer memory, which ensures the accuracy of the wrong text recognition result in the future without relying on frequent updates of the model , and solve a class of model self-learning closed-loop difficult problems through engineering closed-loop.
在本公开的一个实施例中,上述方法还包括:在检测到获取的文本识别结果匹配到对应的文本的情况下,将文本识别结果对应的文本反馈给客户端。通过本实施例,在识别出来的文本在存储器中时,直接反馈客户端即可。In an embodiment of the present disclosure, the above method further includes: in the case where it is detected that the acquired text recognition result matches the corresponding text, feeding back the text corresponding to the text recognition result to the client. With this embodiment, when the recognized text is in the memory, it can be directly fed back to the client.
综上,针对文本识别模型识别准确率不高的问题,本示例性实施例的文本识别结果处理方法在获取到文本识别模型的文本识别结果后,对该文本识别结果进行高速缓冲存储器cache hit判断,即判断该文本识别结果是否在已有的词库里,如果在已有的词库里,立即返回。若词库里没有,对文本识别结果进行精确模式切词,基于切词后每个词语的倒排索引信息,计算与该文本识别结果最为匹配的词库中的文本集合A,这个计算之后,大大减少了待搜索短语集,再通过计算文本识别结果与文本集合A中每个文本的编辑距离,距离最小者对应的文本,理论上是模型最应该返回的一个结果,将距离最小 者对应的文本反馈给客户端,大大提高了文本识别结果的准确率。再有,通过引入缓冲存储器cache&中文分词,为实时计算海量编辑距离提供了可能。To sum up, in view of the problem that the recognition accuracy of the text recognition model is not high, the text recognition result processing method of this exemplary embodiment, after acquiring the text recognition result of the text recognition model, performs a cache hit judgment on the text recognition result. , that is, to determine whether the text recognition result is in the existing thesaurus, and if it is in the existing thesaurus, return it immediately. If there is no word in the thesaurus, perform precise pattern segmentation on the text recognition result, and calculate the text set A in the thesaurus that best matches the text recognition result based on the inverted index information of each word after word segmentation. After this calculation, The set of phrases to be searched is greatly reduced, and then by calculating the edit distance between the text recognition result and each text in the text set A, the text corresponding to the smallest distance is theoretically the one result that the model should return most, and the text corresponding to the smallest distance is calculated. The text is fed back to the client, which greatly improves the accuracy of text recognition results. Furthermore, by introducing the buffer memory cache & Chinese word segmentation, it is possible to calculate massive edit distances in real time.
针对样本匮乏,累积缓慢而导致自学习难的问题,本示例性实施例的文本识别结果处理方法增加了正确结果(label)反馈的设计,当客户端在判断返回的文本识别结果是错误时,则把正确的结果发送到缓冲存储器中,具体地,可以发送给设计好的回流接口,通过工程端的解决方案来保证相同错误文本在未来的准确率,而不依赖模型的频繁更新。Aiming at the problem of lack of samples, slow accumulation and difficulty in self-learning, the text recognition result processing method of this exemplary embodiment adds the design of correct result (label) feedback. When the client determines that the returned text recognition result is wrong, Then, the correct result is sent to the buffer memory, specifically, it can be sent to the designed backflow interface, and the solution of the engineering end can ensure the accuracy of the same error text in the future, without relying on frequent updates of the model.
下面以文本识别结果是“我来到北京清大学”为例,详细说明本公开的文本识别结果处理方法如何解决模型识别准确率不高的问题。The following takes the text recognition result as "I came to Beijing Qing University" as an example to describe in detail how the text recognition result processing method of the present disclosure solves the problem of low model recognition accuracy.
如图2所示,首先,在线识别模型识别出文本识别结果“我来到北京清大学”,对“我来到北京清大学”进行cache hit判断,如果确定在已有哈希结构Hash中,立即返回(即hit)。若Hash中没有“我来到北京清大学”,则对“我来到北京清大学”进行切词,获取切词集合“我”“来到”“北京”“清”“大学”,基于切词后每个词语的倒排索引信息,获取每个词语匹配到的文本对应的文本标识,并计算每个文本标识出现的次数,将出现次数超过50的文本标识对应的文本合并在一起,作为与该文本识别结果最为匹配的词库中的文本集合A,再通过计算文本识别结果与文本集合A中每个文本的编辑距离,将距离最小者对应的文本反馈给客户端。As shown in Figure 2, first, the online recognition model recognizes the text recognition result "I came to Beijing Qing University", and makes a cache hit judgment for "I came to Beijing Qing University". If it is determined to be in the existing hash structure Hash, Return immediately (ie hit). If there is no "I came to Beijing Qing University" in the Hash, then "I came to Beijing Qing University" will be segmented, and the set of words "I", "Come", "Beijing", "Qing" and "University" will be obtained. The inverted index information of each word after the word, the text identifier corresponding to the text matched by each word is obtained, and the number of occurrences of each text identifier is calculated. The text set A in the thesaurus that most matches the text recognition result, and then by calculating the edit distance between the text recognition result and each text in the text set A, the text corresponding to the smallest distance is fed back to the client.
需要说明的是,基于redis-cluster集群的虚拟哈希槽分区存储&算子化的设计,可通过配置算子的一些参数,来控制是否对识别模型结果进行补偿干预,也可做到海量短语下的实时补偿。It should be noted that, based on the virtual hash slot partition storage & operator design of redis-cluster cluster, it is possible to configure some parameters of the operator to control whether to intervene in the recognition model results, and also to achieve a large number of phrases. real-time compensation.
本公开的示例性实施例自下而上可以分为3个部分,第一部分是冷启动阶段,准备历史词库,并对词库中的所有短语进行搜索模式切词,计算所有切词的倒排索引信息。第二部分是在线服务阶段,服务启动时,把第一部分的词库和倒排索引信息维护到redis-cluster中(也可以是其它cache结构),把在线的模型识别结果进行精准模式切词,计算与切词最匹配的短语集合,然后计算识别结果与这些短语的编辑距离(Levenshtein Distance)。第三部分是label结果反馈,当返回的结果在客户端系统判断错误时,把正确结果反馈给系统。The exemplary embodiment of the present disclosure can be divided into three parts from bottom to top. The first part is the cold start stage, preparing a historical thesaurus, performing search mode segmentation on all phrases in the thesaurus, and calculating the inverse of all the segmented words. Sort index information. The second part is the online service stage. When the service is started, the thesaurus and the inverted index information of the first part are maintained in the redis-cluster (or other cache structures), and the online model recognition results are accurately modeled. Calculate the set of phrases that best match the word segmentation, and then calculate the edit distance (Levenshtein Distance) between the recognition result and these phrases. The third part is the label result feedback. When the returned result is judged wrong in the client system, the correct result is fed back to the system.
下面结合图3进行详细说明,如图3所示,整个方案可以分为三个部分,冷启动阶段、在线服务& label反馈阶段。总体架构如下:The following is a detailed description in conjunction with Figure 3. As shown in Figure 3, the entire solution can be divided into three parts, the cold start stage, the online service & label feedback stage. The overall structure is as follows:
1、冷启动阶段,准备好词库文件,通过分词脚本生成对应的倒排索引文件。1. In the cold start stage, prepare the thesaurus file, and generate the corresponding inverted index file through the word segmentation script.
2、服务启动时,加载词库文件&倒排索引文件到redis-cluster缓存中,为了提高查询效果,可冗余存储词库文件,譬如分别以id维度,name维度存储词库信息。2. When the service is started, load thesaurus file & inverted index file into the redis-cluster cache. In order to improve the query effect, thesaurus files can be stored redundantly, for example, thesaurus information is stored in the id dimension and the name dimension respectively.
3、在线服务请求时,先获取到模型识别结果,然后通过name维度查找是否存在,如果存在,则立即返回客户端,否则对识别结果进行分词,通过倒排索引信息计算最大匹配短语id集合,以id维度查询短语集合,再通过编辑距离计算距离最短的短语,并返回客户端。3. When requesting an online service, first obtain the model recognition result, and then check whether it exists through the name dimension. If it exists, it will return to the client immediately. Otherwise, the recognition result will be segmented, and the maximum matching phrase id set will be calculated through the inverted index information. Query the phrase set in the id dimension, calculate the phrase with the shortest distance through the edit distance, and return it to the client.
4、若用户判断返回的结果仍是错误,需要把此次请求对应的正确label反馈给设计好的回流接口。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 reflow interface.
图4示出根据本公开示例性实施例的文本识别结果处理装置的结构框图。如图4所示,该装置包括:FIG. 4 shows a structural block diagram of a text recognition result processing apparatus according to an exemplary embodiment of the present disclosure. As shown in Figure 4, the device includes:
存储单元40,用于存储词库和词库中的词语的倒排索引;The storage unit 40 is used to store the thesaurus and the inverted index of the words in the thesaurus;
补偿处理单元42,用于获取文本识别模型的文本识别结果,并检测词库中是否存在与文本识别结果匹配的文本;当不存在匹配的文本的情况下,对文本识别结果进行切词得到词语集合;根据词语集合中每个词语在词库的倒排索引中的倒排索引信息,获取与文本识别结果匹配的文本集合;从文本集合中选择一个文本作为最终的文本识别结果。The compensation processing unit 42 is used to obtain the text recognition result of the text recognition model, and detects whether there is a text matching the text recognition result in the thesaurus; when there is no matching text, the text recognition result is segmented to obtain words Set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result; select a text from the text set as the final text recognition result.
在本公开的一个实施例中,补偿处理单元42,还用于查询词语集合中每个词语在词库的倒排索引中的倒排索引信息;根据倒排索引信息,获取与每个词语匹配的文本的文本标识集合;确定文本标识集合中每个文本标识出现的次数;将次数超过预定次数的文本标识对应的文本,集合合并为与文本识别结果匹配的文本集合。In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to query the inverted index information of each word in the word set in the inverted index of the thesaurus; according to the inverted index information, obtain a match for each word The text identification set of the text; determine the number of occurrences of each text identification in the text identification set; merge the texts corresponding to the text identifications whose frequency exceeds a predetermined number of times into a text set matching the text recognition result.
在本公开的一个实施例中,补偿处理单元42,还用于获取文本集合中每个文本与文本识别结果的编辑距离;对编辑距离进行排序,获取编辑距离中的最小编辑距离;将最小编辑距离对应的文本确定为最终的文本识别结果。In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to obtain the edit distance between each text in the text set and the text recognition result; sort the edit distances to obtain the minimum edit distance among the edit distances; The text corresponding to the distance is determined as the final text recognition result.
可选地,补偿处理单元42,还用于在获取文本识别模型的文本识别结果之前,检测到文本识别服务启动,将词库和词库中的词语的倒排索引维护到缓冲存储器中;检测缓冲存储器中否存在与文本识别结果匹配的文本。Optionally, the compensation processing unit 42 is further configured to detect that the text recognition service is started before acquiring the text recognition result of the text recognition model, and maintain the thesaurus and the inverted index of the words in the thesaurus in the buffer memory; detecting Whether there is text matching the text recognition result in the buffer memory.
在本公开的一个实施例中,补偿处理单元,还用于在从文本集合中选择 一个文本作为最终的文本识别结果之后,将最终的文本识别结果发送给客户端。In an embodiment of the present disclosure, the compensation processing unit is further configured to send the final text recognition result to the client after selecting a text from the text set as the final text recognition result.
在本公开的一个实施例中,补偿处理单元42,还用于在将最终的文本识别结果发送给客户端之后,接收客户端基于反馈的最终的文本识别结果发送的纠错请求,其中,纠错请求中携带有反馈的最终的文本识别结果对应的正确文本;将正确文本存储于缓冲存储器。In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to, after sending the final text recognition result to the client, receive an error correction request sent by the client based on the feedback final text recognition result, wherein the correction The error request carries the correct text corresponding to the feedback final text recognition result; the correct text is stored in the buffer memory.
在本公开的一个实施例中,补偿处理单元42,还用于在将词库中的词语和词语对应的倒排索引维护到缓冲存储器中之前,获取词库;对词库中所有文本进行切词;获取切词后的每个词语的倒排索引信息。In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to obtain the thesaurus before maintaining the words in the thesaurus and the inverted index corresponding to the words in the buffer memory; cut all the texts in the thesaurus word; obtains the inverted index information of each word after word segmentation.
在本公开的一个实施例中,补偿处理单元42,还用于在检测到获取的文本识别结果匹配到对应的文本的情况下,将文本识别结果对应的文本反馈给客户端。In an embodiment of the present disclosure, the compensation processing unit 42 is further configured to feed back the text corresponding to the text recognition result to the client when it is detected that the acquired text recognition result matches the corresponding text.
本公开构建了一种用于提高开放性文本识别模型准确率偏低的工程解决方案,用来解决ocr领域,譬如银行票据识别中某些类似字段准确率无法达标的情况,业界在开放性文本识别模型的准确率通常在75%上下,这类问题通常无法通过自动获取大量样本来进行自学习,实时更新模型来提高准确率。利用本公开的工程解决方案,通常可将准确率提升到90%以上。The present disclosure constructs an engineering solution for improving the low accuracy rate of an open text recognition model, which is used to solve the problem in the ocr field, such as the situation where the accuracy rate of some similar fields in bank bill recognition cannot meet the standard, and the industry is in the open text The accuracy of the recognition model is usually around 75%. This kind of problem usually cannot be self-learned by automatically acquiring a large number of samples and updating the model in real time to improve the accuracy. With the engineering solutions of the present disclosure, the accuracy rate can typically be improved to over 90%.
以上已参照图1至图4描述了根据本公开示例性实施例的文本识别结果处理方法和装置。The method and apparatus for processing a text recognition result according to an exemplary embodiment of the present disclosure have been described above with reference to FIGS. 1 to 4 .
图4所示出的文本识别结果处理装置中的各个单元可被配置为执行特定功能的软件、硬件、固件或上述项的任意组合。例如,各个单元可对应于专用的集成电路,也可对应于纯粹的软件代码,还可对应于软件与硬件相结合的模块。此外,各个单元所实现的一个或多个功能也可由物理实体设备(例如,处理器、客户端或服务器等)中的组件来统一执行。Each unit in the text recognition result processing apparatus shown in FIG. 4 may be configured as software, hardware, firmware or any combination of the above items to perform specific functions. For example, each unit may correspond to a dedicated integrated circuit, may also correspond to a pure software code, or may correspond to a module combining software and hardware. In addition, one or more functions implemented by each unit can also be uniformly performed by components in a physical entity device (eg, a processor, a client or a server, etc.).
此外,参照图1所描述的文本识别结果处理方法可通过记录在计算机可读存储介质上的程序(或指令)来实现。例如,根据本公开的示例性实施例,可提供存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行根据本公开的辅助人工文本标注的方法。Furthermore, the text recognition result processing method described with reference to FIG. 1 may be implemented by a program (or instruction) recorded on a computer-readable storage medium. For example, in accordance with exemplary embodiments of the present disclosure, a computer-readable storage medium storing instructions may be provided that, when executed by at least one computing device, cause the at least one computing device to perform assisted labor according to the present disclosure Method for text annotation.
上述计算机可读存储介质中的计算机程序可在诸如客户端、主机、代理装置、服务器等计算机设备中部署的环境中运行,应注意,计算机程序还可 用于执行除了上述步骤以外的附加步骤或者在执行上述步骤时执行更为具体的处理,这些附加步骤和进一步处理的内容已经在参照图1进行相关方法的描述过程中提及,因此这里为了避免重复将不再进行赘述。The computer program in the above-mentioned computer-readable storage medium can run in an environment deployed in computer equipment such as a client, a host, an agent device, a server, etc. It should be noted that the computer program can also be used to perform additional steps in addition to the above-mentioned steps or More specific processing is performed when the above steps are performed, and the contents of these additional steps and further processing have been mentioned in the description of the related method with reference to FIG. 1 , and thus will not be repeated here to avoid repetition.
应注意,根据本公开示例性实施例的文本识别结果处理装置中的各个单元可完全依赖计算机程序的运行来实现相应的功能,即,各个单元在计算机程序的功能架构中与各步骤相应,使得整个系统通过专门的软件包(例如,lib库)而被调用,以实现相应的功能。It should be noted that each unit in the text recognition result processing apparatus according to the exemplary embodiment of the present disclosure can completely rely on the running 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 invoked through specialized software packages (eg, lib libraries) to implement corresponding functions.
另一方面,图4所示的各个单元也可以通过硬件、软件、固件、中间件、微代码或其任意组合来实现。当以软件、固件、中间件或微代码实现时,用于执行相应操作的程序代码或者代码段可以存储在诸如存储介质的计算机可读介质中,使得处理器可通过读取并运行相应的程序代码或者代码段来执行相应的操作。On the other hand, each unit shown in FIG. 4 can also be implemented by hardware, software, firmware, middleware, microcode or any combination thereof. When implemented in software, firmware, middleware, or microcode, program codes or code segments for performing corresponding operations may be stored in a computer-readable medium such as a storage medium, so that a processor can read and execute the corresponding program by reading code or code segment to perform the corresponding action.
例如,本公开的示例性实施例还可以实现为计算装置,该计算装置包括存储部件和处理器,存储部件中存储有计算机可执行指令集合,当计算机可执行指令集合被处理器执行时,执行根据本公开的示例性实施例的文本识别结果处理方法。For example, exemplary embodiments of the present disclosure may also be implemented as a computing device including a storage component and a processor, the storage component stores a computer-executable instruction set, and when the computer-executable instruction set is executed by the processor, executes the A text recognition result processing method according to an exemplary embodiment of the present disclosure.
具体说来,计算装置可以部署在服务器或客户端中,也可以部署在分布式网络环境中的节点装置上。此外,计算装置可以是PC计算机、平板装置、个人数字助理、智能手机、web应用或其他能够执行上述指令集合的装置。Specifically, the computing device may be deployed in a server or a client, or may be deployed on a node device in a distributed network environment. Furthermore, the computing device may be a PC computer, a tablet device, a personal digital assistant, a smartphone, a web application, or other device capable of executing the set of instructions described above.
这里,计算装置并非必须是单个的计算装置,还可以是任何能够单独或联合执行上述指令(或指令集)的装置或电路的集合体。计算装置还可以是集成控制系统或系统管理器的一部分,或者可被配置为与本地或远程(例如,经由无线传输)以接口互联的便携式电子装置。Here, the computing device does not have to be a single computing device, but can also be any set of devices or circuits capable of individually or jointly executing the above-mentioned instructions (or instruction sets). 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 locally or remotely (eg, via wireless transmission).
在计算装置中,处理器可包括中央处理器(CPU)、图形处理器(GPU)、可编程逻辑装置、专用处理器系统、微控制器或微处理器。作为示例而非限制,处理器还可包括模拟处理器、数字处理器、微处理器、多核处理器、处理器阵列、网络处理器等。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 an exemplary embodiment of the present disclosure may be implemented by software, some operations may be implemented by hardware, and in addition, these operations may also be implemented by a combination of software and hardware operate.
处理器可运行存储在存储部件之一中的指令或代码,其中,存储部件还 可以存储数据。指令和数据还可经由网络接口装置而通过网络被发送和接收,其中,网络接口装置可采用任何已知的传输协议。The processor may execute instructions or code stored in one of the storage components, which may also store data. Instructions and data may also be sent and received over a network via a network interface device, which may employ any known transport protocol.
存储部件可与处理器集成为一体,例如,将RAM或闪存布置在集成电路微处理器等之内。此外,存储部件可包括独立的装置,诸如,外部盘驱动、存储阵列或任何数据库系统可使用的其他存储装置。存储部件和处理器可在操作上进行耦合,或者可例如通过I/O端口、网络连接等互相通信,使得处理器能够读取存储在存储部件中的文件。The memory component may be integrated with the processor, eg, RAM or flash memory arranged within an integrated circuit microprocessor or the like. Additionally, the storage components may include separate devices, such as external disk drives, storage arrays, or any other storage device that may be used by a database system. The storage component and the processor may be operatively coupled, or may communicate with each other, eg, through I/O ports, network connections, etc., to enable the processor to 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 network.
根据本公开示例性实施例的文本识别结果处理方法可被描述为各种互联或耦合的功能块或功能示图。然而,这些功能块或功能示图可被均等地集成为单个的逻辑装置或按照非确切的边界进行操作。The text recognition result processing method according to an 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 logical device or operate along non-precise boundaries.
因此,参照图1所描述的文本识别结果处理方法可通过包括至少一个计算装置和至少一个存储指令的存储装置的系统来实现。Therefore, the text recognition result processing method described with reference to FIG. 1 can be implemented by a system including at least one computing device and at least one storage device storing instructions.
根据本公开的示例性实施例,至少一个计算装置是根据本公开示例性实施例的用于执行文本识别结果处理方法的计算装置,存储装置中存储有计算机可执行指令集合,当计算机可执行指令集合被至少一个计算装置执行时,执行参照图1所描述的文本识别结果处理方法。According to an exemplary embodiment of the present disclosure, at least one computing device is a computing device for executing a method for processing a text recognition result according to an exemplary embodiment of the present disclosure, and a computer-executable instruction set is stored in the storage device. When the collection is executed by at least one computing device, the text recognition result processing method described with reference to FIG. 1 is executed.
根据本公开的示例性实施例,提供一种电子设备,包括:处理器;用于存储所述处理器可执行指令的存储器;其中,所述处理器被配置为执行所述指令,以实现参照图1所描述的文本识别结果处理方法。According to an exemplary embodiment of the present disclosure, there is provided an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement a reference Figure 1 describes the text recognition result processing method.
以上描述了本公开的各示例性实施例,应理解,上述描述仅是示例性的,并非穷尽性的,本公开不限于所披露的各示例性实施例。在不偏离本公开的范围和精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。因此,本公开的保护范围应该以权利要求的范围为准。Various exemplary embodiments of the present disclosure have been described above, and it should be understood that the above description is merely exemplary and not exhaustive, and the present disclosure is not limited to the disclosed exemplary embodiments. Numerous modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of this disclosure. Therefore, the scope of protection of the present disclosure should be determined by the scope of the claims.
工业实用性Industrial Applicability
根据本公开的文本识别结果处理方法,在获取文本识别模型的文本识别结果不在存储器中时,对识别结果进行分词,根据分词后的词语的倒排索引信息匹配适合的文本集合,从该文本集合中确定最终的反馈给客户的文本识 别结果,使得反馈给客户的文本识别结果更准确,提升了识别结果的准确率,解决了相关技术中文本识别结果的准确率低的问题。According to the text recognition result processing method of the present disclosure, when the text recognition result obtained by the text recognition model is not in the memory, the recognition result is segmented, and a suitable text set is matched according to the inverted index information of the segmented words, and the text set is obtained from the text set. The final text recognition result fed back to the customer is determined in the middle of the paper, which makes the text recognition result fed back to the customer more accurate, improves the accuracy of the recognition result, and solves the problem of low accuracy of the text recognition result in related technologies.

Claims (19)

  1. 一种包括至少一个计算装置和至少一个存储指令的存储装置的系统,其中,所述指令在被所述至少一个计算装置运行时,促使所述至少一个计算装置执行文本识别结果处理方法的以下步骤:A system 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 following steps of a text recognition result processing method :
    获取文本识别模型的文本识别结果,并检测词库中是否存在与所述文本识别结果匹配的文本;Obtain the text recognition result of the text recognition model, and detect whether there is text matching the text recognition result in the thesaurus;
    当不存在匹配的文本的情况下,对所述文本识别结果进行切词得到词语集合;When there is no matching text, segment the text recognition result to obtain a word set;
    根据所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息,获取与所述文本识别结果匹配的文本集合;According to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result;
    从所述文本集合中选择一个文本作为最终的文本识别结果。One text is selected from the text set as the final text recognition result.
  2. 根据权利要求1中所述的系统,其中,所述根据所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息,获取与所述文本识别结果匹配的文本集合包括:The system according to claim 1, wherein, according to the inverted index information of each word in the word set in the inverted index of the thesaurus, acquiring a text set matching the text recognition result include:
    查询所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息;query the inverted index information of each word in the word set in the inverted index of the thesaurus;
    根据所述倒排索引信息,获取与所述每个词语匹配的文本的文本标识集合;According to the inverted index information, obtain a text identification set of the text matching each word;
    确定所述文本标识集合中每个文本标识出现的次数;Determining the number of occurrences of each text identifier in the text identifier set;
    将所述次数超过预定次数的文本标识对应的文本,合并为与所述文本识别结果匹配的文本集合。The texts corresponding to the text identifiers whose number of times exceeds a predetermined number of times are combined into a text set matching the text recognition result.
  3. 根据权利要求1中所述的系统,其中,所述从所述文本集合中选择一个文本作为最终的文本识别结果包括:The system according to claim 1, wherein the selecting a text from the text set as the final text recognition result comprises:
    获取所述文本集合中每个文本与所述文本识别结果的编辑距离;Obtain the edit distance between each text in the text set and the text recognition result;
    对所述编辑距离进行排序,获取所述编辑距离中的最小编辑距离;Sorting the edit distances to obtain the minimum edit distance among the edit distances;
    将所述最小编辑距离对应的文本确定为最终的文本识别结果。The text corresponding to the minimum edit distance is determined as the final text recognition result.
  4. 根据权利要求1中所述的系统,其中,The system of claim 1, wherein,
    所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行以下步骤:在获取文本识别模型的文本识别结果之前,检测到所述文本识别服务启动,将词库和所述词库中的词语的倒排索引维护到缓冲存储器中;When executed by the at least one computing device, the instruction further causes the at least one computing device to perform the following steps: before acquiring the text recognition result of the text recognition model, detecting that the text recognition service is started, and converting the thesaurus to the text recognition service. maintaining the inverted index of the words in the thesaurus in the buffer memory;
    所述检测词库中是否存在与所述文本识别结果匹配的文本包括:检测所述缓冲存储器中否存在与所述文本识别结果匹配的文本。The detecting whether the text matching the text recognition result exists in the thesaurus includes: detecting whether the text matching the text recognition result exists in the buffer memory.
  5. 根据权利要求4中所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行以下步骤:在从所述文本集合中选择一个文本作为最终的文本识别结果之后,将最终的文本识别结果发送给客户端。5. The system of claim 4, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the step of selecting a text from the set of texts as a final After the text recognition result is obtained, the final text recognition result is sent to the client.
  6. 根据权利要求5中所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行以下步骤:在将最终的文本识别结果发送给客户端之后,6. The system of claim 5, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the step of: after sending the final text recognition result to the client ,
    接收所述客户端基于反馈的最终的文本识别结果发送的纠错请求,其中,所述纠错请求中携带有反馈的最终的文本识别结果对应的正确文本;receiving an error correction request sent by the client based on the feedback final text recognition result, wherein the error correction request carries the correct text corresponding to the feedback final text recognition result;
    将所述正确文本存储于所述缓冲存储器。The correct text is stored in the buffer memory.
  7. 根据权利要求4中所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行以下步骤:在将所述词库中的词语和所述词语对应的倒排索引维护到缓冲存储器中之前,获取词库;5. The system of claim 4, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the step of: comparing the terms in the thesaurus with the Obtain the thesaurus before the inverted index corresponding to the word is maintained in the buffer memory;
    对所述词库中所有文本进行切词;segmenting all texts in the thesaurus;
    获取切词后的每个词语的倒排索引信息。Obtain the inverted index information of each word after word segmentation.
  8. 根据权利要求1至7中任一项所述的系统,其中,所述指令在被所述至少一个计算装置运行时,还促使所述至少一个计算装置执行以下步骤::7. The system of any one of claims 1 to 7, wherein the instructions, when executed by the at least one computing device, further cause the at least one computing device to perform the following steps:
    在检测到获取的文本识别结果匹配到对应的文本的情况下,将所述文本识别结果对应的文本反馈给客户端。When it is detected that the acquired text recognition result matches the corresponding text, the text corresponding to the text recognition result is fed back to the client.
  9. 一种文本识别结果处理方法,其中,所述方法包括:A text recognition result processing method, wherein the method comprises:
    获取文本识别模型的文本识别结果,并检测词库中是否存在与所述文本识别结果匹配的文本;Obtain the text recognition result of the text recognition model, and detect whether there is text matching the text recognition result in the thesaurus;
    当不存在匹配的文本的情况下,对所述文本识别结果进行切词得到词语集合;When there is no matching text, word segmentation is performed on the text recognition result to obtain a word set;
    根据所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息,获取与所述文本识别结果匹配的文本集合;According to the inverted index information of each word in the word set in the inverted index of the thesaurus, acquiring a text set that matches the text recognition result;
    从所述文本集合中选择一个文本作为最终的文本识别结果。One text is selected from the text set as the final text recognition result.
  10. 根据权利要求9中所述的方法,其中,所述根据所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息,获取与所述文本识别结果 匹配的文本集合包括:The method according to claim 9, wherein, according to the inverted index information of each word in the word set in the inverted index of the thesaurus, acquiring a text set matching the text recognition result include:
    查询所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息;query the inverted index information of each word in the word set in the inverted index of the thesaurus;
    根据所述倒排索引信息,获取与所述每个词语匹配的文本的文本标识集合;According to the inverted index information, obtain a text identification set of the text matching each word;
    确定所述文本标识集合中每个文本标识出现的次数;Determining the number of occurrences of each text identifier in the text identifier set;
    将所述次数超过预定次数的文本标识对应的文本,合并为与所述文本识别结果匹配的文本集合。The texts corresponding to the text identifiers whose number of times exceeds a predetermined number of times are combined into a text set matching the text recognition result.
  11. 根据权利要求9中所述的方法,其中,所述从所述文本集合中选择一个文本作为最终的文本识别结果包括:The method according to claim 9, wherein the selecting a text from the text set as the final text recognition result comprises:
    获取所述文本集合中每个文本与所述文本识别结果的编辑距离;Obtain the edit distance between each text in the text set and the text recognition result;
    对所述编辑距离进行排序,获取所述编辑距离中的最小编辑距离;Sorting the edit distances to obtain the minimum edit distance among the edit distances;
    将所述最小编辑距离对应的文本确定为最终的文本识别结果。The text corresponding to the minimum edit distance is determined as the final text recognition result.
  12. 根据权利要求9中所述的方法,其中,The method of claim 9, wherein,
    在获取文本识别模型的文本识别结果之前,还包括:检测到所述文本识别服务启动,将词库和所述词库中的词语的倒排索引维护到缓冲存储器中;Before acquiring the text recognition result of the text recognition model, the method further includes: detecting that the text recognition service is started, and maintaining the thesaurus and the inverted index of the words in the thesaurus in the buffer memory;
    所述检测词库中是否存在与所述文本识别结果匹配的文本包括:检测所述缓冲存储器中否存在与所述文本识别结果匹配的文本。The detecting whether the text matching the text recognition result exists in the thesaurus includes: detecting whether the text matching the text recognition result exists in the buffer memory.
  13. 根据权利要求12中所述的方法,其中,在从所述文本集合中选择一个文本作为最终的文本识别结果之后,还包括:将最终的文本识别结果发送给客户端。The method according to claim 12, wherein after selecting a text from the text set as the final text recognition result, the method further comprises: sending the final text recognition result to the client.
  14. 根据权利要求13中所述的方法,其中,在将最终的文本识别结果发送给客户端之后,还包括:The method according to claim 13, wherein after sending the final text recognition result to the client, the method further comprises:
    接收所述客户端基于反馈的最终的文本识别结果发送的纠错请求,其中,所述纠错请求中携带有反馈的最终的文本识别结果对应的正确文本;receiving an error correction request sent by the client based on the feedback final text recognition result, wherein the error correction request carries the correct text corresponding to the feedback final text recognition result;
    将所述正确文本存储于所述缓冲存储器。The correct text is stored in the buffer memory.
  15. 根据权利要求12中所述的方法,其中,在将所述词库中的词语和所述词语对应的倒排索引维护到缓冲存储器中之前,还包括:The method according to claim 12, wherein before maintaining the words in the thesaurus and the inverted index corresponding to the words in the buffer memory, the method further comprises:
    获取词库;get thesaurus;
    对所述词库中所有文本进行切词;segmenting all texts in the thesaurus;
    获取切词后的每个词语的倒排索引信息。Obtain the inverted index information of each word after word segmentation.
  16. 根据权利要求9至15中任一项所述的方法,其中,所述方法还包括:The method of any one of claims 9 to 15, wherein the method further comprises:
    在检测到获取的文本识别结果匹配到对应的文本的情况下,将所述文本识别结果对应的文本反馈给客户端。When it is detected that the acquired text recognition result matches the corresponding text, the text corresponding to the text recognition result is fed back to the client.
  17. 一种文本识别结果处理装置,其中,所述装置包括:A text recognition result processing device, wherein the device comprises:
    存储单元,用于存储词库和所述词库中的词语的倒排索引;a storage unit for storing a thesaurus and an inverted index of the words in the thesaurus;
    补偿处理单元,用于获取文本识别模型的文本识别结果,并检测所述词库中是否存在与所述文本识别结果匹配的文本;当不存在匹配的文本的情况下,对所述文本识别结果进行切词得到词语集合;根据所述词语集合中每个词语在所述词库的倒排索引中的倒排索引信息,获取与所述文本识别结果匹配的文本集合;从所述文本集合中选择一个文本作为最终的文本识别结果。a compensation processing unit, configured to obtain the text recognition result of the text recognition model, and detect whether there is text matching the text recognition result in the thesaurus; when there is no matching text, the text recognition result Perform word segmentation to obtain a word set; according to the inverted index information of each word in the word set in the inverted index of the thesaurus, obtain a text set that matches the text recognition result; from the text set Choose a text as the final text recognition result.
  18. 一种存储指令的计算机可读存储介质,其中,当所述指令被至少一个计算装置运行时,促使所述至少一个计算装置执行如权利要求9至16中的任一权利要求所述的文本识别结果处理方法。A computer-readable storage medium storing instructions, wherein the instructions, when executed by at least one computing device, cause the at least one computing device to perform the text recognition of any one of claims 9-16 Result processing method.
  19. 一种电子设备,包括:An electronic device comprising:
    处理器;processor;
    用于存储所述处理器可执行指令的存储器;memory for storing instructions executable by the processor;
    其中,所述处理器被配置为执行所述指令,以实现如权利要求9至16中的任一权利要求所述的文本识别结果处理方法。Wherein, the processor is configured to execute the instructions to implement the text recognition result processing method according to any one of claims 9 to 16.
PCT/CN2021/135047 2020-12-16 2021-12-02 Text recognition result processing system, method and device WO2022127610A1 (en)

Applications Claiming Priority (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
CN202011487618.7 2020-12-16

Publications (1)

Publication Number Publication Date
WO2022127610A1 true WO2022127610A1 (en) 2022-06-23

Family

ID=81944944

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/135047 WO2022127610A1 (en) 2020-12-16 2021-12-02 Text recognition result processing system, method and device

Country Status (2)

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

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080126335A1 (en) * 2006-11-29 2008-05-29 Oracle International Corporation Efficient computation of document similarity
CN101206672A (en) * 2007-12-25 2008-06-25 北京科文书业信息技术有限公司 Commercial articles searching non result intelligent processing system and method
CN104462085A (en) * 2013-09-12 2015-03-25 腾讯科技(深圳)有限公司 Method and device for correcting search keywords
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

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080126335A1 (en) * 2006-11-29 2008-05-29 Oracle International Corporation Efficient computation of document similarity
CN101206672A (en) * 2007-12-25 2008-06-25 北京科文书业信息技术有限公司 Commercial articles searching non result intelligent processing system and method
CN104462085A (en) * 2013-09-12 2015-03-25 腾讯科技(深圳)有限公司 Method and device for correcting search keywords
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
CN114637816A (en) 2022-06-17

Similar Documents

Publication Publication Date Title
US10565273B2 (en) Tenantization of search result ranking
US20200081899A1 (en) Automated database schema matching
WO2019091026A1 (en) Knowledge base document rapid search method, application server, and computer readable storage medium
US10169305B2 (en) Marking comparison for similar documents
US20210011926A1 (en) Efficient transformation program generation
US10706066B2 (en) Extensible data transformations
US11809223B2 (en) Collecting and annotating transformation tools for use in generating transformation programs
TW202020691A (en) Feature word determination method and device and server
US10621195B2 (en) Facilitating data transformations
US8880440B2 (en) Automatic combination and mapping of text-mining services
US11182354B1 (en) Data analysis and processing engine
US20180089335A1 (en) Indication of search result
CN112686053A (en) Data enhancement method and device, computer equipment and storage medium
CN112650858A (en) Method and device for acquiring emergency assistance information, computer equipment and medium
CN111651552A (en) Structured information determination method and device and electronic equipment
CN111339784A (en) Automatic new topic mining method and system
CN113408660A (en) Book clustering method, device, equipment and storage medium
CN113722600A (en) Data query method, device, equipment and product applied to big data
WO2022127610A1 (en) Text recognition result processing system, method and device
CN116150376A (en) Sample data distribution optimization method, device and storage medium
Bartoli et al. Semisupervised wrapper choice and generation for print-oriented documents
CN111581950B (en) Method for determining synonym names and method for establishing knowledge base of synonym names
JP5790820B2 (en) Inconsistency detection apparatus, program and method, correction support apparatus, program and method
CN110083817B (en) Naming disambiguation method, device and computer readable storage medium
CN111309865B (en) Similar defect report recommendation method, system, computer device and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21905539

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21905539

Country of ref document: EP

Kind code of ref document: A1