Offline handwritten text processing method and device based on human-in-loop
By introducing the method of human-machine hybrid intelligence into offline handwritten text processing, and using the human-in-the-loop system to supervise and correct the data processing process, the error problem of machine intelligence in processing offline handwritten text is solved, and work accuracy and efficiency are improved. Data resources have been accumulated to support the development of artificial intelligence.
Patent Information
- Application Number
- CN202410745753.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-11
- Publication Date
- 2024-10-01
AI Technical Summary
Existing technology cannot effectively process offline handwritten text data, resulting in machine intelligence errors during processing, low work efficiency, and a lack of effective correction and learning reference methods.
Using a method based on human-computer hybrid intelligence, the human-in-the-loop system supervises and corrects multiple processes of offline handwritten text processing, including data collection, preprocessing, feature extraction and text recognition, establishing corresponding relationships and forming multiple databases To improve the accuracy and efficiency of machine intelligence.
It improves the accuracy and efficiency of machine intelligence in every work link, enables machine intelligence to learn and correct errors, reduces manual intervention, and accumulates data resources to support subsequent research and development of new artificial intelligence.
Smart Images

Figure CN118736596A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to an offline handwritten text processing method and device based on human-in-the-loop. Background Art
[0002] With the rapid development of artificial intelligence, artificial intelligence is becoming more and more intelligent, but it still cannot completely replace human intelligence. Sometimes, if we rely solely on the intelligence of machines to handle some things, there will be more errors. If there is no reference to the correct processing method, it is difficult for the machine to correct its own mistakes, or if there is no correct learning reference, the machine will work inefficiently. At this time, human intervention is needed to help the machine correct errors or let the machine learn human processing methods to improve the intelligence of the machine. Therefore, it is necessary to improve the intelligence of the machine based on human-machine hybrid intelligence to better help humans. The same is true for handwritten text processing. In our daily life, we often write something by hand, such as: teachers write on the blackboard when giving lectures; students write on paper with pens when completing homework; write on paper to record content, etc. There are many scenarios in reality where important things need to be recorded on paper or other media. For these recorded offline image information, when we process and use them through computers, due to the imperfection of machine intelligence, errors will also occur during processing.
[0003] To address the above problems, no effective solution has been proposed yet. Summary of the invention
[0004] Based on this, it is necessary to provide a method and device for offline handwritten text processing based on human in the loop in order to solve the above technical problems. The processing method proposed in the present invention involves human intervention in multiple processes of offline handwritten text processing, and creates a human in the loop system, which ultimately helps machine intelligence to learn and further improves the intelligence of the machine, so that the machine intelligence has better work accuracy and work efficiency without human help.
[0005] According to a first aspect of the present invention, there is provided a method for offline handwritten text processing based on human-in-the-loop, comprising:
[0006] A data collection step is to collect offline handwritten text data and store it in a data collection database;
[0007] A data preprocessing step, preprocessing the collected offline handwritten text data, obtaining preprocessed data and storing it in a preprocessing database;
[0008] A feature extraction step is to extract features from the preprocessed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database;
[0009] The text recognition step performs text recognition on the offline handwritten text data after feature extraction, obtains the recognition results and stores them in the recognition result database.
[0010] In some embodiments, the preprocessing includes preprocessing offline handwritten text data through machine intelligence, and humans supervising and correcting the preprocessing process to improve the machine intelligence processing effect.
[0011] In some embodiments, the feature extraction includes extracting features through machine intelligence, and humans supervising and correcting the feature extraction process to improve the machine intelligence processing effect.
[0012] In some embodiments, the text recognition includes performing text recognition through machine intelligence, and humans supervising and correcting the text recognition process to improve the machine intelligence processing effect.
[0013] In some embodiments, it also includes a relationship matching step, establishing a corresponding relationship between the data in the data acquisition database, the preprocessing database, the feature extraction database, and the recognition result database, obtaining relationship matching data and storing it in the relationship matching database.
[0014] In some embodiments, establishing the corresponding relationship includes establishing the corresponding relationship through machine intelligence, and having a human supervise and correct the result of establishing the corresponding relationship to improve the effect of machine intelligence processing.
[0015] According to a second aspect of the present invention, there is provided an offline handwritten text processing device based on human-in-the-loop, comprising:
[0016] A data collection module is used to collect offline handwritten text data and store it in a data collection database;
[0017] A data preprocessing module is used to preprocess the collected offline handwritten text data, obtain preprocessed data and store it in a preprocessing database;
[0018] A feature extraction module is used to extract features from pre-processed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database;
[0019] The text recognition module is used to perform text recognition on the offline handwritten text data after feature extraction, obtain the recognition results and store them in the recognition result database.
[0020] In some embodiments, it also includes a relationship matching module, which is used to establish a corresponding relationship between the data in the data acquisition database, the preprocessing database, the feature extraction database, and the recognition result database, obtain relationship matching data and store it in the relationship matching database.
[0021] According to a third aspect of the present invention, there is provided a computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any of the above-mentioned method embodiments when executing the computer program.
[0022] According to a fourth aspect of the present invention, there is provided a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the method of any of the above embodiments are implemented.
[0023] Based on the above technical solution, the present invention has at least the following beneficial effects:
[0024] 1. Based on the idea of human-machine hybrid intelligence, humans are introduced in the loop. Humans are in the loop throughout the entire machine operation process. When errors occur in machine intelligence processing problems, they are resolved through human intervention, thereby improving the accuracy and efficiency of machine intelligence in each working link.
[0025] 2. Each time a machine intelligence error is corrected, the machine will record the location of the error so that it can be easily solved the next time it occurs. In addition, machine intelligence will learn the human operation process, so that when faced with the same problem, machine intelligence can solve the problem based on human operation, thereby improving the intelligence level of machine intelligence.
[0026] 3. By supervising the workflow of machine intelligence, we can accumulate the problems existing in the practical application of machine intelligence. When problems occur in the work of machine intelligence, people can better supervise and accumulate the reasons that lead to problems in machine intelligence, so as to accumulate experience for the development of new artificial intelligence.
[0027] 4. The various databases created provide a large amount of data resources for offline handwritten text related work, which is helpful for later related research and learning. With the increase in use, the data resources will become richer. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] Figure 1 is a flow chart of some embodiments of the method for offline handwritten text processing based on human-in-the-loop of the present invention;
[0029] Figure 2 is a schematic diagram of an offline handwritten text background removal process of the present invention;
[0030] Figure 3 is a schematic diagram of offline handwritten text horizontal correction of the present invention;
[0031] Figure 4 It is a schematic diagram of the offline handwritten text normalization processing of the present invention;
[0032] Figure 5It is a schematic diagram of the structure of some embodiments of the human-in-the-loop-based offline handwritten text processing device of the present invention;
[0033] Figure 6 It is a diagram of the internal structure of a computer device used to implement some embodiments of the present invention. DETAILED DESCRIPTION
[0034] Embodiments of the present invention will be described more fully below with reference to the accompanying drawings, in which embodiments of the present invention are shown. However, the present invention can be embodied in many different forms and should not be construed as limited to the embodiments set forth herein.
[0035] The terms used herein are used only for the purpose of describing specific embodiments and are not intended to limit the present disclosure. As used herein, the singular forms "a", "an", "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that when used herein, the term "comprising" specifies the presence of the claimed features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof.
[0036] Unless otherwise defined, the terms (including technical and scientific terms) used herein have the same meanings as commonly understood by those of ordinary skill in the art to which the present disclosure belongs. The terms used herein should be interpreted as having the meanings consistent with their meanings in the context of this specification and in the relevant field, and should not be interpreted in an idealized or overly formal sense, unless specifically defined as such herein.
[0037] Before describing the specific details of the present application, the meanings of the terms used in the present application will be briefly explained.
[0038] Machine intelligence: Machine intelligence is an extension of the new generation of automation, which is used to assist humans, change the nature of work, and make work more efficient.
[0039] Figure 1 Flowcharts showing some embodiments of the method for offline handwritten text processing based on human-in-the-loop of the present invention. Figure 1 As shown, the method includes:
[0040] The data collection step collects offline handwritten text data and stores it in a data collection database. Specifically, the data collection step includes:
[0041] The offline handwritten text data is collected, which is generally the image information of the handwritten text data. The image information of the handwritten text is obtained by photographing or scanning the handwritten information written on paper or other carrier surfaces, that is, the offline handwritten text information. As the collection of offline handwritten text information increases, an offline handwritten text information database is established, such as the data collection database shown in the figure, which not only contains the collected offline handwritten text data, but also stores the collected data related to it.
[0042] The data preprocessing step preprocesses the collected offline handwritten text data to obtain preprocessed data and stores it in a preprocessing database. Specifically, the data preprocessing step includes:
[0043] Preprocess the collected offline handwritten text data. Since all data that can be converted into handwritten text images can be used as offline handwritten text data, the collected offline handwritten text data needs to be preprocessed. In this step, the offline handwritten text data first needs to be background-removed. Most offline handwritten text data images contain messy background patterns or colors and other interference information. To remove the background, you can select a related background removal algorithm to perform binarization on the offline handwritten text image. Figure 2 A schematic diagram showing the process of offline handwritten text background removal is shown. Figure 2 .b is Figure 2 .a Image after background removal. After background removal, it is necessary to deal with the skewness of the offline handwritten text data image caused by irregular writing or collection. The offline handwritten text image can be rotated to a horizontal state through relevant algorithms. Figure 3 A schematic diagram showing the horizontal correction of offline handwritten text is shown. Figure 3 .b is Figure 3 .a The result after horizontal correction of offline handwritten text. Since the position and size of different offline handwritten text data are different, it is also necessary to unify their size and position. Figure 4 FIG. 4 shows a schematic diagram of the offline handwritten text normalization process of the present invention. Figure 4 .b is Figure 4 .a is obtained after normalization. The preprocessing of offline handwritten text data is not limited to the method mentioned in this article. The preprocessing of the collected offline handwritten text can be used as the work of this stage.
[0044] In some embodiments, the Otsu algorithm may be used for the binarization operation of the image, and the background mask and the foreground mask may be calculated by the algorithm, and the formula is as follows:
[0045] BM=Otsu(P)
[0046] FM=1-BM
[0047] Where BM is the background mask, FM is the foreground mask, and P is the input image.
[0048] For grayscale normalization, the mean variance normalization method can be used as follows:
[0049]
[0050] Among them, L(i,j) is the grayscale value before normalization, M and V are the mean and variance of the grayscale value, and N(i,j) is the grayscale value after normalization.
[0051] The work on the collected offline handwritten texts was initially done manually. As the number of collected offline handwritten texts increases, repetitive work can be done by machines. In the initial stage, the collected offline handwritten texts are preprocessed by machine intelligence, which may result in image data with processing errors. Humans can supervise and correct the process of machine intelligence processing. Once errors are found, they are corrected. Gradually, machine intelligence can learn to correctly process all types of collected offline handwritten text data. The machine learns the human processing process, and continuously improves the machine's own processing method under human supervision and guidance during the processing of machine intelligence, gradually approaching the point where no preprocessing errors occur. By preprocessing offline handwritten text data, a large amount of offline handwritten text preprocessing data can be obtained. The method proposed in this paper will continuously collect offline handwritten text preprocessing data and store and generate a preprocessing database for the convenience of subsequent work.
[0052] The feature extraction step is to extract features from the preprocessed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database; specifically, the feature extraction step includes:
[0053] Perform feature extraction on pre-processed offline handwritten text data. The specific method is: use a method based on convolutional neural network to extract features from pre-processed offline handwritten text data. Similarly, machine intelligence is used in feature extraction to improve extraction efficiency. Since errors may occur in the process of machine intelligence extracting features, human intervention is required. While people help the machine to correctly extract features, machine intelligence is also recording and learning the correct methods, and constantly improving the ability of machine intelligence to independently extract features. After the feature extraction is completed, the feature extraction data will be automatically stored to form a feature extraction database for subsequent use.
[0054] The text recognition step is to perform text recognition on the offline handwritten text data after feature extraction, obtain the recognition results and store them in the recognition result database; specifically, the text recognition step includes:
[0055] Offline handwritten text data can be recognized by convolutional neural networks and other methods. Since there may be certain errors in the recognition of offline handwritten text data by machine intelligence, human intervention is also required at this time. The correct choice is given to the recognition results that the machine intelligence cannot fully determine, and the offline handwritten text data that the machine intelligence recognizes incorrectly is corrected. Through continuous correction, the machine intelligence continues to learn, and the ability of machine intelligence to recognize offline handwritten text data will become stronger and stronger, and gradually reduce its dependence on humans. After the recognition is completed, the correct recognition results are saved in the recognition result database.
[0056] The relationship matching step is to establish a corresponding relationship between the data in the data acquisition database, the preprocessing database, the feature extraction database, and the recognition result database, obtain the relationship matching data and store it in the relationship matching database; specifically, the relationship matching step includes:
[0057] For the data collection database, preprocessing database, feature extraction database, and recognition result database, a one-to-one correspondence is formed according to the offline handwritten text data processing process, so that a given similar offline handwritten text data can correspond to the content of each database. This process also requires human intervention. When providing the recognition results of offline handwritten text data or the contents of each database corresponding to a certain offline handwritten text data, errors may still occur, and humans are required to supervise the correctness of the output results to see whether they meet the requirements.
[0058] The offline handwritten text processing method based on human in the loop of the present invention mainly includes: data collection, offline data preprocessing, feature extraction, text recognition, and output results. During the entire processing process, people are always in the complete loop and can intervene in each work process. A large amount of data information will be generated in each process of offline handwritten text processing. A corresponding database is established using the large amount of collected data. As the amount of processed data increases, the database will become more and more perfect. The present invention improves the accuracy of machine intelligence work through human participation, and as the accuracy increases, human participation gradually decreases, and finally almost no human intervention is required. People only need to supervise the entire process of machine intelligence. Through intervention and supervision of the entire workflow, people can discover and collect problems existing in machine intelligence in the process, providing a favorable reference for the next step of machine intelligence improvement.
[0059] Figure 5 The schematic diagrams of the structures of some embodiments of the human-in-the-loop-based offline handwritten text processing device of the present invention are shown.
[0060] like Figure 5 As shown, the human-in-the-loop offline handwritten text processing device in the embodiment includes:
[0061] The data collection module 100 is used to collect offline handwritten text data and store it in a data collection database;
[0062] The data preprocessing module 200 is used to preprocess the collected offline handwritten text data, obtain preprocessed data and store it in a preprocessing database;
[0063] The feature extraction module 300 is used to extract features from the pre-processed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database;
[0064] The text recognition module 400 is used to perform text recognition on the offline handwritten text data after feature extraction, obtain recognition results and store them in a recognition result database.
[0065] For the specific definition of an offline handwritten text processing device based on a person in the loop, please refer to the definition of an offline handwritten text processing method based on a person in the loop above, which will not be repeated here. Each module in the above-mentioned offline handwritten text processing device based on a person in the loop can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0066] The present invention also provides a computer device, which may be a terminal, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, the above-mentioned offline handwritten text processing method based on human in the loop is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad provided on the housing of the computer device, or an external keyboard, touchpad or mouse, etc. Those skilled in the art can understand that Figure 6The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present invention, and does not constitute a limitation on the computer device to which the solution of the present invention is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0067] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the above-mentioned offline handwritten text processing method based on human-in-the-loop is implemented.
[0068] Those skilled in the art can understand that all or part of the processes in the above method embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus), direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0069] So far, the embodiments of the present invention have been described in detail. In order to avoid obscuring the concept of the present invention, some details known in the art are not described. Based on the above description, those skilled in the art can fully understand how to implement the technical solutions disclosed herein.
[0070] Although some specific embodiments of the present invention have been described in detail by way of examples, it should be understood by those skilled in the art that the above examples are for illustration only and are not intended to limit the scope of the present invention. It should be understood by those skilled in the art that the above embodiments may be modified or some technical features may be replaced by equivalents without departing from the scope and spirit of the present invention. The scope of the present invention is defined by the appended claims.
Claims
1. A method for processing handwritten text offline based on human-in-the-loop, characterized in that: include: A data collection step is to collect offline handwritten text data and store it in a data collection database; A data preprocessing step, preprocessing the collected offline handwritten text data, obtaining preprocessed data and storing it in a preprocessing database; A feature extraction step is to extract features from the preprocessed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database; The text recognition step performs text recognition on the offline handwritten text data after feature extraction, obtains the recognition results and stores them in the recognition result database.
2. The method for offline handwritten text processing based on human-in-the-loop according to claim 1, characterized in that: The preprocessing includes preprocessing offline handwritten text data through machine intelligence, and human supervision and correction of the preprocessing process to improve the machine intelligence processing effect.
3. The method for offline handwritten text processing based on human-in-the-loop according to claim 1, characterized in that: The feature extraction includes extracting features through machine intelligence, and humans supervising and correcting the feature extraction process to improve the machine intelligence processing effect.
4. The method for offline handwritten text processing based on human-in-the-loop according to claim 1, characterized in that: The text recognition includes performing text recognition through machine intelligence, and humans supervising and correcting the text recognition process to improve the machine intelligence processing effect.
5. The method for offline handwritten text processing based on human-in-the-loop according to claim 1, characterized in that: It also includes a relationship matching step, establishing a corresponding relationship between the data in the data acquisition database, the preprocessing database, the feature extraction database, and the recognition result database, obtaining relationship matching data and storing it in the relationship matching database.
6. The method for offline handwritten text processing based on human-in-the-loop according to claim 5, characterized in that: The establishing of the corresponding relationship includes establishing the corresponding relationship through machine intelligence, and having a human supervise and correct the result of establishing the corresponding relationship to improve the machine intelligence processing effect.
7. An offline handwritten text processing device based on human-in-the-loop, characterized in that: include: A data collection module is used to collect offline handwritten text data and store it in a data collection database; A data preprocessing module is used to preprocess the collected offline handwritten text data, obtain preprocessed data and store it in a preprocessing database; A feature extraction module is used to extract features from pre-processed offline handwritten text data, obtain feature extraction data and store it in a feature extraction database; The text recognition module is used to perform text recognition on the offline handwritten text data after feature extraction, obtain the recognition results and store them in the recognition result database.
8. The human-in-the-loop offline handwritten text processing device according to claim 7, characterized in that: Also includes, The relationship matching module is used to establish a corresponding relationship between the data in the data acquisition database, the preprocessing database, the feature extraction database, and the recognition result database, obtain relationship matching data, and store it in the relationship matching database.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
