A document title recognition method and device

When the OCR-recognized document title line fails to match the preset title library, the correlation between the target text and the title line is used for error correction, which solves the problem of inaccurate document title recognition and improves the reliability of the cataloging process.

CN112668581BActive Publication Date: 2025-01-10SOUNDAI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011589624.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-29
Publication Date
2025-01-10
Estimated Expiration
2040-12-29

AI Technical Summary

Technical Problem

In existing technologies, the first page title line of document division units identified by OCR has the problem of inaccurate recognition, resulting in low reliability of the cataloging process.

Method used

By acquiring text information and dividing it into document units, and determining the title line, when a match fails, the relationship between the target title line and the target body text is used for error correction. The characters in the title line are corrected using a preset error correction model until a match with the preset title library is successful.

Benefits of technology

It improves the reliability of document title recognition, ensures the accuracy and reliability of the cataloging process, and reduces cataloging errors caused by incorrect title line recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112668581B_ABST
    Figure CN112668581B_ABST
Patent Text Reader

Abstract

The present invention provides a document title recognition method and device, wherein the document title recognition method includes: obtaining text information of a file to be processed; dividing the text information into document division units, and determining the title line corresponding to each document division unit; when a target title line in the title line fails to match a preset title library, error correction processing is performed on the target title line based on the association relationship between the target title line and the target text to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line; when the corrected target title line successfully matches the preset title library, the corrected target title line is output. The embodiment of the present application can correct the erroneous title line, thereby improving the reliability of the output title line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of graphics and text, and in particular to a document title recognition method and device. Background Art

[0002] With the improvement of information technology and the advancement of artificial intelligence technology, optical character recognition (OCR) is being applied in more and more scenarios, such as paperless office in the public security, procuratorial and judicial fields, and electronic medical records in the medical and health fields. In the paperless office process in the public security, procuratorial and judicial fields, file management is mainly completed through the electronic file management system, where the file includes digital materials such as text, images, audio, video, etc. that reflect the case handling process and case handling results. The structured storage and management of electronic files can improve the quality and efficiency of case handling.

[0003] Electronic file cataloging is an important part of the electronic file management process. The electronic file cataloging is divided into two steps: first, analyze the electronic file materials and divide the file into multiple document division units; then, extract the title line of the first page of the document division unit as the document title to complete the cataloging process based on the document title.

[0004] In the electronic file cataloging process, the recognition of the document title directly depends on the title line result of the first page of the document division unit. However, the title line in the paper document may have problems such as using different fonts, words covered by seals, etc., which may cause errors in the recognition result of the title line, thus causing serious errors in the cataloging process.

[0005] It can be seen that the process of cataloguing the title line of the first page of the document division unit based on OCR recognition in the related art has the problem of low reliability. Summary of the invention

[0006] The embodiment of the present invention provides a document title recognition method and device, which can correct the title line of the first page of the document division unit based on OCR recognition, thereby improving the reliability of the cataloging process.

[0007] To solve the above technical problems, the present invention is achieved as follows:

[0008] In a first aspect, an embodiment of the present invention provides a document title recognition method, comprising:

[0009] Get the text information of the files to be processed;

[0010] Divide the text information into document division units, and determine a title row corresponding to each document division unit;

[0011] In the case that the target title line in the title line fails to match the preset title library, the target title line is corrected based on the association relationship between the target title line and the target text to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line;

[0012] When the error-corrected target title line successfully matches the preset title library, the error-corrected target title line is output.

[0013] In a second aspect, an embodiment of the present invention provides a document title recognition device, comprising:

[0014] An acquisition module is used to acquire text information of the files to be processed;

[0015] A division module, used to divide the text information into document division units and determine a title row corresponding to each document division unit;

[0016] An error correction module is used for, when a target title line in the title line fails to match a preset title library, to perform error correction processing on the target title line based on the association relationship between the target title line and the target text, so as to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line;

[0017] The output module is used for outputting the target title line after error correction when the target title line after error correction successfully matches the preset title library.

[0018] In a third aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the document title recognition method as described in the first aspect are implemented.

[0019] In an embodiment of the present invention, the text information of the file to be processed is obtained; the text information is divided into document division units, and the title line corresponding to each document division unit is determined; in the case that the target title line in the title line fails to match the preset title library, the target title line is corrected based on the association between the target title line and the target text to obtain the corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line; in the case that the corrected target title line successfully matches the preset title library, the corrected target title line is output. In this way, after determining the title line corresponding to the document division unit, the title line can also be matched with the preset title library, so that in the case of unsuccessful matching, the title line can be corrected based on the text corresponding to the title line, and then in the case of an error in the identification of the title line of the file to be processed, the erroneous title line can be corrected, thereby improving the reliability of the output title line. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.

[0021] Figure 1 is a flow chart of a document title recognition method provided by an embodiment of the present invention;

[0022] Figure 2a It is one of the structural diagrams of the preset error correction model to which the document title recognition method provided by the embodiment of the present invention can be applied;

[0023] Figure 2b This is a second structural diagram of a preset error correction model to which the document title recognition method provided by the embodiment of the present invention can be applied;

[0024] Figure 3 is a flow chart of another document title recognition method provided by an embodiment of the present invention;

[0025] Figure 4 It is a structural diagram of a document title recognition device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0026] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0027] With the improvement of information technology, paper documents are gradually being replaced by electronic documents in our daily life. In order to facilitate the structured storage and management of electronic documents converted from paper documents, it is necessary to identify the text content in paper documents and catalog the text content, so that users can query and retrieve the content in electronic documents according to the catalog content.

[0028] In the related technology, firstly, the paper document image is subjected to OCR recognition to obtain the text analysis result of the image; then, the first and last pages of the document are detected and the document is divided based on the text information features and coordinate information features; then the title line of the divided first page is detected to obtain the final document cataloging result. This method can save time for manual cataloging and improve the quality and efficiency of image and text management.

[0029] The title line detection in this cataloging scheme completely relies on the OCR recognition results. However, in actual applications, there are often some situations where the title line cannot be accurately recognized. For example:

[0030] 1. The character spacing in the title line may affect the text box division results of OCR recognition, that is, the title characters in the same title line may be chopped or mistakenly merged with the context;

[0031] 2. The font of the title line is quite different from that of the body text, which affects the recognition results of some characters;

[0032] 3. There are mixed handwritten and printed characters in the title line, which affects the recognition results of the title characters;

[0033] 4. Part of the title line is covered by a signature or stain, which affects the recognition results of the characters in the title line;

[0034] 5. The text in the title line is tilted, which affects the recognition results of the characters in the title line;

[0035] 6. The quality of the scanning device itself or improper operation may affect the recognition results of the characters in the title line.

[0036] In the related art, the detection of the title line relies too much on the OCR recognition result, without considering the complexity of the image itself and the effect of the OCR solution itself during the title recognition process. In the case of OCR recognition errors or poor results, the loss of effect will be passed on to the downstream document unit division tasks and title line recognition tasks, thereby affecting the final cataloging effect.

[0037] In an embodiment of the present application, the identified title line is matched with a preset title library so that when the match is unsuccessful, error correction processing is performed on the title line to promptly correct incomplete character recognition or recognition errors in the title line, thereby improving the reliability of the finally confirmed title line.

[0038] See also Figure 1 , is a flow chart of a document title recognition method provided by an embodiment of the present invention, such as Figure 1 As shown, the method may include the following steps:

[0039] Step 101: Obtain text information of the file to be processed.

[0040] In a specific implementation, the above-mentioned files to be processed can be understood as paper file documents, and the above-mentioned acquisition of text information of the files to be processed can be to use image and text recognition technology (for example: OCR recognition technology) to scan the paper file documents to obtain the text information in the paper file documents. The text information can specifically include text line information (which can also be referred to as "text information features") and text line position information corresponding to each line of text (which can also be referred to as "coordinate information features").

[0041] Step 102: divide the text information into document division units, and determine the title row corresponding to each document division unit.

[0042] In this step, the first and last pages of the document are detected and the document is divided based on the text information features and coordinate information features obtained in step 101, so as to divide the text information of the file to be processed into multiple document division units. For example, the case files in the public security, procuratorial and judicial organs may include multiple documents such as case filing reports, civil complaints, case closing reports, etc. In this implementation, the electronic case files can still be divided into multiple document division units such as case filing reports, civil complaints, case closing reports, etc.

[0043] After dividing the document unit, each document division unit is subjected to title line recognition processing to determine the title line corresponding to each document division unit. Specifically: the first line of text located on the first page of each document division unit can be used as the title line of the document division unit, that is, the first line of text located on the first page of the document division unit is determined as its title characters.

[0044] Step 103, when the target title line in the title line fails to match the preset title library, the target title line is corrected based on the association relationship between the target title line and the target text to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line.

[0045] Step 104: When the error-corrected target title line successfully matches the preset title library, output the error-corrected target title line.

[0046] The above-mentioned target title row after error correction successfully matches the preset title library, which is contrary to the above-mentioned target title row unsuccessfully matching the preset title library. The successful matching of the target title row after error correction with the preset title library can indicate that the target title row after error correction matches the preset title row or the preset title naming rule in the preset title library, thereby determining that the semantics of the target title row after error correction are correct.

[0047] It should be noted that in implementation, there may be a situation where the target title line after error correction fails to match the preset title library. In this case, the content of the target text input in the error correction process can be updated. For example, after the target title line is corrected according to the first paragraph of the text of the document division unit corresponding to the target title line, if the correction effect is not ideal, the target title line can be corrected according to the second paragraph of the text of the document division unit corresponding to the target title line.

[0048] Of course, in the case that the target title line after error correction fails to match the preset title library, the target title line before error correction can also be output, and the corresponding prompt information can be output to prompt that the target title line does not match the preset title library, so as to facilitate the user to modify, adjust or confirm the title characters in the target title line based on the prompt information.

[0049] In the application, after determining the target title line after error correction, the files to be processed can be catalogued based on the target title line after error correction.

[0050] The above cataloging process is the same as the cataloging process in the prior art, and will not be described in detail here.

[0051] In implementation, the above-mentioned preset title library match can be a title library preset by the user, or a title library confirmed based on historical titles or annotation data preset by the user, wherein the annotation data can include a large number of document titles. In the process of confirming the title library according to the annotation data, the frequency of occurrence of each document title in the annotation data can be counted, so that the document titles with higher frequency are included in the preset title library, so that a large number of common document titles are stored in the preset title library. For example: when the document title recognition method provided in the embodiment of the present application is applied to the public security, procuratorial and judicial fields, common document titles may include: cause of action, case filing report, administrative complaint, civil complaint, administrative penalty decision, case closing report, etc. In application, the above-mentioned preset title library can be established according to the historical use of the title line in the technical field of application. Of course, in implementation, the user can also manually add or modify the title to the preset title library.

[0052] As an optional implementation, the method further includes: determining the preset title library according to the historical title line information, wherein the preset title library includes preset title lines with a frequency greater than a preset usage frequency;

[0053] In a case where the preset title library does not include a preset title row identical to the target title row, it is determined that the target title row is unsuccessfully matched with the preset title library.

[0054] In implementation, the above historical title line information may include: historical title information used in the device that executes the document title recognition method provided by the embodiment of the present application, for example: if a plurality of cataloged documents are stored in the computer that executes the document title recognition method, the above historical title line information may be the title line information in the cataloged documents. Of course, in a specific implementation, the above historical title line information may also include: common title line information in the usage scenario input by the user according to the usage scenario of the document title recognition method.

[0055] The above-mentioned preset title library does not include a preset title line that is the same as the target title line, which can also be understood as:

[0056] The preset title library does not include titles with the same title characters as those in the target title row.

[0057] Correspondingly, when the preset title library includes titles with the same characters as those in the target title row, it can be determined that the target title row successfully matches the preset title library.

[0058] Of course, in a specific implementation, the above-mentioned preset title library can also store common title row rules, etc., so that when the format of the title row, the relationship with the context, etc., meet the title row rules in the preset title library, it is determined that the title row matches the preset title library. The specific content of the preset title library is not specifically limited here.

[0059] In the implementation of this embodiment, when the target title line fails to match the preset title library, it can be understood that the target title line determined based on the first line of text of the document division unit may contain title characters that are not accurately recognized, so that it can be determined that the target title line needs to be error-corrected to correct the title characters that are not accurately recognized.

[0060] Accordingly, when a certain title line successfully matches the preset title library, it can be understood that the title characters in the title line are accurately recognized, so there is no need to perform error correction processing on it, and subsequent processing such as cataloging can be performed directly based on the title line.

[0061] As an optional implementation manner, the error correction processing of the target title line based on the association relationship between the target title line and the target text to obtain the target title line after error correction includes:

[0062] The target title line and the target text are input into a preset error correction model to obtain a target title line after error correction.

[0063] In implementation, the association relationship between the above-mentioned target title line and the target text can be understood as: determining that all or part of the text in the document division unit corresponding to the target title line is the target text associated with the target title line.

[0064] Preferably, the target text associated with the target title line can be, in particular, the first N characters in the document division unit corresponding to the target title line, where N can be any integer such as 100, 200, etc. Of course, when the number of characters in the document division unit corresponding to the target title line is less than N, the target text associated with the target title line can be all the characters in the document division unit corresponding to the target title line.

[0065] The preset error correction model is used to perform fusion error correction based on the text information in the target text and the text information in the target title line, so as to find and correct the title characters in the target title line.

[0066] Specifically, the preset error correction model may include: an encoding module and a decoding module;

[0067] The encoding module is at least one of the following:

[0068] Neural networks, convolutional neural networks, and translation models.

[0069] In this embodiment, the title characters of the title line can be corrected according to the semantic content in the main text. For example, when "Civil Complaint" is identified in the title line, "Civil Complaint" can be corrected to "Civil Complaint" based on the content "Plaintiff in the Civil Complaint..." recorded in the main text under the title line.

[0070] In an optional embodiment, the target title line and the target text are input into a preset error correction model, and the title text features of the target title line and the body text features of the target text are respectively used as two inputs of the preset error correction model, so that the preset error correction model corrects the title text features based on the body text features.

[0071] For example: Figure 2a As shown, the preset error correction model includes an encoding module 21 and a decoding module 22.

[0072] It should be noted that if Figure 2a As shown, in the implementation, the preset error correction model may also include a training encoding module 23, which is used to encode the training sample data (which may also be referred to as the annotated title text) during the training process of the preset error correction model, so as to input the encoded content into the decoding module 22, so that the output result of the decoding module 22 is the same as the annotated title text, thereby realizing the training effect on the decoding module 22.

[0073] For Figure 2a The preset error correction model shown can pre-extract features of the title text and the body text through a character embedding layer (Embedding) and a position embedding layer (Position Embedding) to preliminarily obtain vector representations of the title text and the body text, and then pass through the Transformer Encoder encoding layer in the encoding module 21 (which can be composed of multiple identical layers) to encode the vector representations of the title text and the body text into a tensor c of a specified length (for example: concatenating the feature vector of the title text with the feature vector of the body text through special symbols); the decoding module 22 decodes and outputs the corresponding output sequence (i.e., the title text after error correction) based on the tensor c.

[0074] In this implementation, the title text and the body text are combined into one input of the preset error correction model, which can simplify the structure of the preset error correction model.

[0075] As an optional implementation manner, the step of inputting the target title line and the target text into a preset error correction model to obtain a target title line after error correction includes:

[0076] Determining title text features and text features according to the target title line and the target text;

[0077] Determine an index tensor based on the title text feature and the body text feature;

[0078] The index tensor is input into a preset error correction model to obtain a target header row after error correction.

[0079] In implementation, the above determination of the title text features and the text features based on the target title line and the target text can be specifically understood as: extracting features from the target title line to obtain title text features, and extracting features from the target text to obtain text features, wherein the title text features and the text features are feature vectors. In addition, the above determination of the index tensor based on the title text features and the text features can be understood as: using at least one of vector concatenation, addition, and multiplication to fuse the title text features and the text features into an index tensor.

[0080] This embodiment can utilize Figure 2a The preset error correction model shown in the figure is implemented, and its principle and process can be specifically referred to as above. Figure 2a The principles and processes of the preset error correction model shown are not repeated here.

[0081] In another optional implementation, the target title line and the target text are input into the preset error correction model, and the target title line and the target text are fused to merge the title text features of the target title line and the text features of the target text, thereby forming an input of the preset error correction model. The fusion process may include at least one of concatenation, addition, and multiplication. In this way, the target title can also be fused and corrected based on the target text, which will not be described in detail here.

[0082] For example: Figure 2b As shown, the preset error correction model includes a first encoding module 24, a second encoding module 25 and a decoding module 26.

[0083] It should be noted that if Figure 2b As shown, in the implementation, the preset error correction model may also include a training encoding module 27, which is used to encode the training sample data (which may also be referred to as the annotated title text) during the training process of the preset error correction model, so as to input the encoded content into the decoding module 26, so that the output result of the decoding module 26 is the same as the annotated title text, thereby realizing the training effect on the decoding module 26.

[0084] like Figure 2b The embodiment shown is similar to Figure 2aThe embodiment shown differs in that Figure 2b There are two encoding modules in the illustrated embodiment, one for encoding the title text and the other for encoding the body text. Then, the title feature vector obtained after encoding the title text and the body feature vector obtained after encoding the body text can be subjected to tensor concatenation operation (which can also be vector addition, multiplication, etc.) to obtain the semantic vector representation of the title text and the body text, and then the decoding module 26 decodes and outputs the corresponding output sequence (i.e., the error-corrected title text) based on the semantic vector representation.

[0085] In this implementation, the title text and the body text are used as two different inputs of a preset error correction model, thereby eliminating the need to perform fusion processing on the title text and the body text in advance.

[0086] In an embodiment of the present invention, the text information of the file to be processed is obtained; the text information is divided into document division units, and the title line corresponding to each document division unit is determined; in the case that the target title line in the title line fails to match the preset title library, the target title line is corrected based on the association between the target title line and the target text to obtain the corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line; in the case that the corrected target title line successfully matches the preset title library, the corrected target title line is output. In this way, after determining the title line corresponding to the document division unit, the title line can also be matched with the preset title library, so that in the case of unsuccessful matching, the title line can be corrected based on the text corresponding to the title line, and then in the case of an error in the identification of the title line of the file to be processed, the erroneous title line can be corrected, thereby improving the reliability of the output title line.

[0087] See also Figure 3 , is a flow chart of another document title recognition method provided by an embodiment of the present invention. Figure 3 As shown, the method may include the following steps:

[0088] Step 301: Get and identify the title row.

[0089] In implementation, the above-mentioned acquisition of identification header row can be performed as follows Figure 1 The title row corresponding to the document division unit is obtained from steps 101 to 102 in the method embodiment shown.

[0090] Step 302: Determine whether the identified title row exists in the title library.

[0091] This step is the same as the process of determining whether the preset title library includes a title with the same title characters as those in the target title row in the method embodiment shown in the figure, and will not be repeated here.

[0092] If the judgment result of this step is "yes", the identified title row is determined as the final title row, that is, no error correction is performed on the identified title row; if the judgment result of this step is "no", step 303 is executed.

[0093] Step 303: perform title error correction on the identified title row.

[0094] In this step, the above title correction is similar to Figure 1 The process of performing error correction processing on the target header row in the illustrated method embodiment is the same and will not be described in detail here.

[0095] Step 304: Determine whether the corrected title row exists in the title library.

[0096] If the judgment result of this step is "yes", execute step 305; if the judgment result of this step is "no", end the document title recognition process.

[0097] Among them, after the document title recognition process is completed, the title row can be output as the final title row, and a prompt message can also be output synchronously to prompt that there is no document title corresponding to the title row in the title library. At this time, the user can check, modify, and perform other operations on the final title row according to the prompt message.

[0098] Step 305: Determine whether the error correction is effective.

[0099] In this step, when it is determined that the error correction is effective, the header row after the error correction can be determined as the final header row.

[0100] With Figure 1 Compared with the method embodiment shown, in the present embodiment, after the error correction processing, whether the corrected title row is effective is determined based on whether the corrected title row exists in the title library, and if the corrected title row is not effective, the title row before the error correction is output, which can avoid the error correction processing from erroneously changing the title row to a title row that does not match the actual title, thereby improving the reliability of the error correction processing.

[0101] See also Figure 4 , is a structural diagram of a document title recognition device provided by an embodiment of the present invention, such as Figure 4 As shown, the document title recognition device 400 includes:

[0102] The acquisition module 401 is used to acquire the text information of the file to be processed;

[0103] A division module 402, for dividing the text information into document division units, and determining a title row corresponding to each document division unit;

[0104] The error correction module 403 is used to perform error correction processing on the target title line based on the association relationship between the target title line and the target text to obtain a corrected target title line when the target title line in the title line fails to match the preset title library, wherein the target text is the text in the document division unit corresponding to the target title line;

[0105] The output module 404 is used to output the target title line after error correction if the target title line after error correction successfully matches the preset title library.

[0106] Optionally, the document title recognition device 400 further includes:

[0107] A cataloguing module is used to cataloguing the files to be processed based on the target title line after error correction.

[0108] Optionally, the error correction module 403 is specifically used for:

[0109] The target title line and the target text are input into a preset error correction model to obtain a target title line after error correction.

[0110] Optionally, the error correction module 403 includes:

[0111] A feature extraction unit, used to determine the title text feature and the text feature according to the target title line and the target text;

[0112] A determination unit, configured to determine an index tensor based on the title text feature and the body text feature;

[0113] The error correction unit is used to input the index tensor into a preset error correction model to obtain a target header row after error correction.

[0114] Optionally, the preset error correction model includes: an encoding module and a decoding module;

[0115] The encoding module is at least one of the following:

[0116] Neural networks, convolutional neural networks, and translation models.

[0117] Optionally, the document title recognition device 400 further includes:

[0118] A first determining module, configured to determine the preset title library according to the historical title line information, wherein the preset title library includes preset title lines with a frequency greater than a preset usage frequency;

[0119] The second determining module is configured to determine that the target title line fails to match the preset title library if the preset title library does not include a preset title line that is identical to the target title line.

[0120] The document title recognition device 400 provided in the embodiment of the present application can perform the following steps: Figure 1 or Figure 3 The various steps in the method embodiment shown can achieve the same beneficial effects, and will not be described again here to avoid repetition.

[0121] The embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, which implements the above-mentioned Figure 1 or Figure 3 The various processes of the document title recognition method embodiment shown can achieve the same technical effect, and will not be described again here to avoid repetition.

[0122] The computer-readable storage medium is, for example, a ROM, RAM, a magnetic disk or an optical disk.

[0123] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.

[0124] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present invention.

[0125] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.

Claims

1. A document title recognition method, characterized in that: include: Acquire text information of the file to be processed, the text information including text information features and coordinate information features, the text information features are used to indicate text line information, and the coordinate information features are used to indicate text line position information corresponding to each line of text; Based on the text information features and the coordinate information features, the first and last pages of the document are detected and the document is divided into sections, so as to divide the text information into document sections and determine the title line corresponding to each section; In the case that the target title line in the title line fails to match the preset title library, the target title line is corrected based on the association relationship between the target title line and the target text to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line; When the error-corrected target title line successfully matches the preset title library, the error-corrected target title line is output.

2. The method according to claim 1, characterized in that: The method further comprises: Based on the corrected target title row, the files to be processed are catalogued.

3. The method according to claim 1, characterized in that The error correction process is performed on the target title line based on the association relationship between the target title line and the target text to obtain the target title line after error correction, including: The target title line and the target text are input into a preset error correction model to obtain a target title line after error correction.

4. The method according to claim 3, characterized in that: The step of inputting the target title line and the target text into a preset error correction model to obtain a target title line after error correction includes: Determining title text features and text features according to the target title line and the target text; Determine an index tensor based on the title text feature and the body text feature; The index tensor is input into a preset error correction model to obtain a target header row after error correction.

5. The method according to claim 3, characterized in that: The preset error correction model includes: an encoding module and a decoding module; The encoding module is at least one of the following: Neural networks, convolutional neural networks, and translation models.

6. The method according to claim 1, characterized in that The method further comprises: Determining the preset title library according to the historical title line information, wherein the preset title library includes preset title lines with a frequency greater than a preset usage frequency; In a case where the preset title library does not include a preset title row identical to the target title row, it is determined that the target title row is unsuccessfully matched with the preset title library.

7. A document title recognition device, characterized in that: include: An acquisition module, used for acquiring text information of the file to be processed, wherein the text information includes text information features and coordinate information features, wherein the text information features are used for indicating text line information, and the coordinate information features are used for indicating text line position information corresponding to each line of text; A division module, used for performing document first and last page detection and document division processing based on the text information features and the coordinate information features, so as to divide the text information into document division units, and determine a title row corresponding to each document division unit; An error correction module is used for, when a target title line in the title line fails to match a preset title library, to perform error correction processing on the target title line based on the association relationship between the target title line and the target text, so as to obtain a corrected target title line, wherein the target text is the text in the document division unit corresponding to the target title line; The output module is used for outputting the target title line after error correction when the target title line after error correction successfully matches the preset title library.

8. The device according to claim 7, characterized in that Also includes: A cataloguing module is used to cataloguing the files to be processed based on the target title line after error correction.

9. The device according to claim 7, characterized in that The error correction module is specifically used for: The target title line and the target text are input into a preset error correction model to obtain a target title line after error correction.

10. The device according to claim 9, characterized in that The error correction module comprises: A feature extraction unit, used to determine the title text feature and the text feature according to the target title line and the target text; A determination unit, configured to determine an index tensor based on the title text feature and the body text feature; The error correction unit is used to input the index tensor into a preset error correction model to obtain a target header row after error correction.

11. The device according to claim 9, characterized in that The preset error correction model includes: an encoding module and a decoding module; The encoding module is at least one of the following: Neural networks, convolutional neural networks, and translation models.

12. The device according to claim 7, characterized in that Also includes: A first determining module, configured to determine the preset title library according to the historical title line information, wherein the preset title library includes preset title lines with a frequency greater than a preset usage frequency; The second determining module is configured to determine that the target title line fails to match the preset title library if the preset title library does not include a preset title line that is identical to the target title line.

13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the document title recognition method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • A method and a system for electronically recording and archiving paper files

    CN109598228A

  • Judgment document text error correction method and system based on deep learning

    CN111444706A