Key information extraction method, system and terminal

By segmenting documents by chapter and using a pre-trained UIE model to extract key information, this method solves the problem of traditional methods relying on expert experience, achieving efficient and low-cost key information extraction, and is applicable to multiple professional fields.

CN121501976APending Publication Date: 2026-02-10CHINESE PEOPLES LIBERATION ARMY 92493 UNIT INFORMATION TECH CENT
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511514130.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-22
Publication Date
2026-02-10

AI Technical Summary

Technical Problem

Traditional information extraction methods rely on expert experience and high-quality labeled data, resulting in high costs, low coverage of complex scenarios, low recognition rate, and slow recognition of massive documents.

Method used

Documents are segmented by chapter, keywords are configured for full-text search, and a pre-trained and fine-tuned UIE model is used to extract key information, including document segmentation, inverted index, and the application of the UIE model.

Benefits of technology

It enables efficient, low-cost, and high-quality extraction of key information from massive documents and is applicable to multiple professional fields.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121501976A_ABST
    Figure CN121501976A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of information extraction, and relates to a key information extraction method, system and terminal. The key information extraction method comprises the following steps: firstly, segmenting a document according to chapters, and extracting pictures and table elements in each sub-document; the sub-documents are stored in a relational database in a table association form, and four-level association of the sub-documents, titles, contents and elements is achieved; then, key words are configured, the key words are used as retrieval elements, and all sub-documents containing the key words are retrieved and positioned in the relational database; and finally, configuring a pre-trained and fine-tuned UIE model, traversing all the sub-documents containing the keywords by adopting the UIE model, and identifying entity values corresponding to the defined entity types from the sub-documents so as to complete extraction of key information. The method has high recognition efficiency, is suitable for mass document recognition, does not need to depend on expert experience and a large amount of high-quality annotation data, is low in information extraction cost and high in operability, and can be widely applied to a data resource construction system in a special field.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of information extraction, and in particular to a key information extraction method, system and terminal. BACKGROUND

[0002] Data resource construction is a data resource management method that comprehensively utilizes frontier technologies such as big data, machine learning and deep learning, aiming to improve the availability, integrity and compliance of data resources through multi-source heterogeneous data aggregation, standardized data governance and intelligent data mining, release data value and drive business upgrade. Among them, information extraction is an important link of data resource construction, and its main purpose is to automatically identify and extract specific types of information from unstructured and semi-structured data into structured data.

[0003] Traditional information extraction methods include rule-based and template-based, statistical machine learning model-based, etc., but these methods rely heavily on expert experience to construct rules and high-quality annotated data, resulting in high information extraction cost, low coverage in complex scenarios, low recognition rate in special scenarios, and slow recognition of massive documents.

[0004] Therefore, there is an urgent need for a high-quality, efficient and low-cost information extraction method. SUMMARY

[0005] The purpose of the present application is to provide a key information extraction method, system and terminal to address the shortcomings of the prior art. First, the document is divided by chapter and the elements are extracted, then the full-text is searched according to the keywords to narrow down the information extraction range, and finally the key information is extracted using an information extraction model algorithm to achieve high-quality and efficient extraction of key information from massive documents.

[0006] To achieve the above purpose, the present application adopts the following technical solutions: In a first aspect, the present application provides a key information extraction method, comprising the following steps: S10. Divide the document by chapter to obtain a plurality of sub-documents, and extract the picture and table elements in each sub-document; store the sub-documents in a relational database in the form of table association to realize four-level association of sub-documents, titles, contents and elements; S20. Configure keywords, and use the keywords as search elements to search and locate all sub-documents containing the keywords in the relational database; S30. Configure a pre-trained and fine-tuned UIE model, and use the UIE model to traverse all sub-documents containing the keywords to identify entity values corresponding to defined entity types, thereby completing the extraction of key information.

[0007] As a possible implementation manner, the OOXML parsing method is adopted to divide the document according to chapters to obtain a plurality of sub-documents.

[0008] As a possible implementation manner, when all sub-documents containing the keyword are retrieved in the relational database, the inverted index is adopted.

[0009] As a possible implementation manner, the inverted index is established by the following method: All sub-documents are assigned with docIDs by using a document identifier assignment algorithm. Each sub-document is read in the order of docIDs, and when reading, if the word has appeared before, only the frequency information and the position information of the posting corresponding to the word are updated, otherwise, the word is added to the word table and the position information corresponding to the word is added, and after the traversal of all sub-documents, the inverted index is constructed, and the position list corresponding to all words is generated.

[0010] As a possible implementation manner, the pre-trained UIE model is fine-tuned by the following method: Text data is collected and preprocessed, and the preprocessing includes text data cleaning and definition of entity types. The cleaned text data is labeled by using a data labeling tool with the entity types as the standard. The pre-trained UIE model is fine-tuned by using the labeled text data, and the fine-tuned UIE model is saved as an application model.

[0011] As a possible implementation manner, the UIE model is adopted to traverse all sub-documents containing the keyword to identify the entity values corresponding to the defined entity types to complete the extraction of key information, and the specific steps include the following steps: S300. An entity extraction structure pattern guide is configured, and token encoding, position encoding, mask, and token type encoding of the entity extraction structure pattern guide and the sub-document are generated. S301. An encoder and a decoder are configured. S302. The token encoding, position encoding, mask, and token type encoding are input into the encoder to obtain a context representation matrix. S303. The decoder receives the context representation matrix, predicts the start and end positions of different entity types, and decodes the entity values corresponding to the entity types to complete the extraction of key information.

[0012] As a possible implementation manner, the encoder is one of a pre-trained ERNIE3 model, a UNILM model or a T5 model; the number of the decoders is two, and each decoder comprises sequentially connected full connection layers and activation functions.

[0013] In a second aspect, the present application provides a key information extraction system, comprising: A document segmentation module segments a document according to chapters to obtain a plurality of sub-documents, extracts picture and table elements in each sub-document, and stores the sub-documents in a table association form into a relational database to realize four-level association of the sub-documents, titles, contents and elements. A sub-document retrieval module configures a keyword, takes the keyword as a retrieval element, retrieves and locates all sub-documents containing the keyword in the relational database. A key information extraction module configures a pre-trained and fine-tuned UIE model, uses the UIE model to traverse all sub-documents containing the keyword, identifies entity values corresponding to defined entity types from the sub-documents, and completes extraction of key information.

[0014] As a possible implementation manner, the pre-trained and fine-tuned UIE model comprises: A structural pattern director for describing different information extraction tasks and constructing a unified encoding form; An information extraction model for information extraction in an encoding-decoding mode; And a structured extraction language for generating a structured language sequence from the result of information extraction.

[0015] In a third aspect, the present application provides a terminal comprising a processor and a communication interface coupled with the processor, the processor being configured to run a computer program or instructions to implement the key information extraction method provided in the first aspect.

[0016] Compared with the prior art, the present application has the following beneficial effects: 1. The present application segments a document according to chapters and extracts elements, then performs full-text retrieval according to a keyword, narrows down the information extraction range, has high recognition efficiency, and is suitable for mass document recognition.

[0017] 2. The present application uses an information extraction model algorithm to extract key information, does not need to rely on expert experience and a large amount of high-quality labeled data, has low information extraction cost, and is highly operable.

[0018] 3. The UIE model used in the present application can be fine-tuned according to different scenarios, and can be widely applied to special field data resource construction systems, such as medical field, education field, communication field, manufacturing field, etc. BRIEF DESCRIPTION OF DRAWINGS

[0019] The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiments of the application and together with the description serve to explain the application. In the drawings: Figure 1 A flowchart of a key information extraction method provided for an embodiment of the application is shown in FIG. 2; Figure 2 An exemplary diagram for fine-tuning a trained UIE model in an embodiment of the application is shown in FIG. 3; Figure 3 A flowchart of a key information extraction method using a UIE model in an embodiment of the application is shown in FIG. 4; Figure 4 An exemplary diagram for four-level association of a segmented document in an embodiment of the application is shown in FIG. 5. DETAILED DESCRIPTION

[0020] In order to clearly describe the technical solutions of the embodiments of the application, in the embodiments of the application, the terms of “first”, “second”, etc. are used to distinguish the same or similar items with basically the same functions and effects. For example, the first threshold and the second threshold are only used to distinguish different thresholds, and do not limit the order. Those skilled in the art can understand that the terms of “first”, “second”, etc. do not limit the number and execution order, and the terms of “first”, “second”, etc. also do not necessarily mean different.

[0021] It should be noted that in the present application, the words “exemplary” or “for example” are used to mean serving as an example, instance, or illustration. Any embodiment or design described as “exemplary” or “for example” in the present application should not be construed as being more preferred or advantageous than other embodiments or designs. Rather, the use of the words “exemplary” or “for example” is intended to present concepts in a concrete manner.

[0022] In the present application, “at least one” means one or more, and “multiple” means two or more. The “and / or” describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character “ / ” generally represents an “or” relationship between the associated objects. The following at least one (or similar expressions) means any combination of these items, including any combination of single (or multiple) items. For example, at least one of a, b or c can represent: a, b, c, a and b, a and c, b and c, or a, b and c, where a, b, and c can be singular or plural.

[0023] Embodiments of the present application aim to provide a key information extraction method, system and terminal. In order to overcome the limitations of the traditional information extraction method, the present application first divides the document by chapters and extracts elements, then performs full-text retrieval according to keywords to narrow the information extraction range, and finally extracts key information using an information extraction model algorithm to realize high-quality and efficient extraction of key information from massive documents.

[0024] In a first aspect, embodiments of the present application provide a key information extraction method, as shown in Figure 1 , comprising the following sub-steps: S10. Divide the document by chapters to obtain a plurality of sub-documents, extract pictures and table elements in each sub-document, store the sub-documents in a table association form in a relational database, and realize four-level association of sub-documents, titles, contents and elements; As a possible implementation, the OOXML parsing method is used to divide the document by chapters to obtain a plurality of sub-documents.

[0025] As an example, a word document is essentially a standard format based on Office Open XML, which is a compressed XML file set. document.xml stores the text format, style.xml defines the style, and relationships.xml records the file association. XML data can be operated through an Element Tree data structure, which can traverse, search and modify the elements and attributes of XML. XML tags describe the document structure in a word document, including titles, paragraphs, tables, etc., express the logical level of the document, including the title level, and are the underlying technical basis of the docx document. By parsing the rule word document, the chapter information, chapter content, table information and picture information of the document can be identified, and the document can be divided by chapters. Common document format parsing rules are shown in Table 1: Table 1 XML format parsing rules S20. Configure keywords, use the keywords as retrieval elements, search and locate all sub-documents containing the keywords in the relational database; As a possible implementation, when searching for all sub-documents containing the keywords in the relational database, an inverted index is used.

[0026] As a possible implementation, the inverted index is established in the following way: Assigning docID to all sub-documents by using document identifier assignment algorithm; reading each sub-document in order of docID, when reading, if the word has appeared before, only update the frequency information and location information of the posting corresponding to the word, otherwise, add the word to the word table and add the location information corresponding to the word, after traversing all sub-documents, the inverted index construction is completed, and the location list corresponding to all words is generated.

[0027] As an example, the inverted index is an index structure taking keyword as index key and linked list access entry, used to store the mapping of the storage location of a keyword in a document or a group of documents under full-text retrieval, for quickly retrieving documents in a document set. In the full-text retrieval scenario, all documents containing a specific keyword can be quickly located.

[0028] Suppose the docIDs corresponding to all sub-documents of the document set are 1, 2, and 3 respectively, and the document contents are: 1: The location of the summer camp is Wuhan.

[0029] 2: The head of the summer camp is Mr. Zhang.

[0030] 3: The activity range of the summer camp is Wuhan University Gymnasium.

[0031] Then the inverted index of the document is constructed according to the document content as shown in Table 2: Table 2: Inverted index example of document S30. Configure the pre-trained and fine-tuned UIE model, and use the UIE model to traverse all sub-documents containing keywords to identify entity values corresponding to defined entity types, to complete the extraction of key information.

[0032] The pre-trained UIE model has been pre-trained through general text corpus and can be directly applied to downstream tasks of natural language processing, but the model lacks professional knowledge for professional fields. In order to make the pre-trained model applicable to vertical professional fields, professional field annotated data needs to be fine-tuned.

[0033] As a possible implementation, see Figure 2 The pre-trained UIE model is fine-tuned by the following method: Text data collection and preprocessing, preprocessing includes text data cleaning, defining entity types; Using data annotation tools, annotating the cleaned text data according to entity types; The pre-trained UIE model is fine-tuned using labeled text data, and the fine-tuned UIE model is saved as the application model.

[0034] As one possible implementation, the UIE model is used to traverse all sub-documents containing keywords, and the entity values ​​corresponding to the defined entity types are identified to complete the extraction of key information. Specifically, this includes the following steps: S300. Configure the entity extraction structure pattern guide, and generate the entity extraction structure pattern guide and the token encoding, position encoding, mask and token type encoding of the sub-document; S301. Configure the encoder and decoder; As one possible implementation, the encoder is a pre-trained ERNIE3 model, UNILM model, or T5 model; there are two decoders, each of which includes a fully connected layer and an activation function connected sequentially.

[0035] S302. Input the token encoding, position encoding, mask, and token type encoding into the encoder to obtain the context representation matrix; S303. The decoder receives the context representation matrix, predicts the start and end positions of different entity types, and decodes the entity values ​​corresponding to the entity types to complete the extraction of key information.

[0036] As an example, the UIE framework is a general text-to-structure generation framework that can be used to uniformly model different information extraction tasks, adaptively generate target structures, and continuously learn general information extraction capabilities from different knowledge sources. The UIE framework mainly consists of three parts: a Structural Schema Instructor (SSI), an Information Extraction (IE) model, and a Structured Extraction Language (SEL).

[0037] SSI is a schema-based suggestion mechanism used to describe different information extraction tasks and construct a unified encoding format. It is used as input to the UIE model along with the text sequence, and the calculation formula is as follows: Entity Extraction Structure Pattern Guide Different professional entity prompts, labels, and special identification symbols and composition, Located at the beginning of each input sequence, Prompt text for each professional entity type After processing the specialized text sequence, the current task type is segmented using annotations. Entity extraction structure pattern guide. It contains all entity types.

[0038] See Figure 3 The UIE framework employs an encoder-decoder model for information extraction and generates SEL sequences from the results. It uses pre-trained models as encoders, such as ERNIE3, UNILM, and T5 models. The encoder's input includes... The token code, position code, mask, and token type code used to distinguish the prompt information from the text sequence are encoded by the encoder to generate a context representation matrix of the input sequence. ,in, This is a vector of length 768. There are two decoders, each consisting of a fully connected layer and an activation function connected sequentially, receiving the context representation matrix generated by the encoder. It predicts the start and end positions of different entity types and returns their conditional probabilities.

[0039] Secondly, the present invention provides a key information extraction system, comprising: The document segmentation module splits the document by chapter to obtain multiple sub-documents, extracts images and table elements from each sub-document, and stores the sub-documents in a relational database in a table-based manner, realizing a four-level association between sub-documents, titles, content, and elements. The sub-document retrieval module allows you to configure keywords and use those keywords as search elements to retrieve and locate all sub-documents containing those keywords in a relational database. The key information extraction module is configured with a pre-trained and fine-tuned UIE model. The UIE model is used to traverse all sub-documents containing keywords and identify the entity values ​​corresponding to the defined entity types to complete the extraction of key information.

[0040] As one possible implementation, pre-trained and fine-tuned UIE models include: A structural pattern guide is used to describe different information extraction tasks and construct a unified encoding form; The information extraction model uses an encoding-decoding mode for information extraction. And structured extraction languages, used to generate structured language sequences from the results of information extraction.

[0041] As an example, the workflow of this system is as follows: 1) Use the OOXML parsing method to segment the document by chapter and extract the image and table elements from the document; 2) See Figure 4The segmented content is stored in a relational database in the form of table associations to achieve a four-level association of "document-title-content-element"; 3) Using keywords as search elements for full-text retrieval can narrow the scope of retrieval of massive document fragments, thereby supporting the improvement of the speed of subsequent key information extraction; 4) Collect texts in the relevant professional field, clean the text content, and define entity categories based on business needs and domain experts; 5) Use data annotation tools to annotate the cleaned text data based on entity type; 6) Fine-tune the pre-trained UIE model using labeled text data, and save the fine-tuned UIE model as the application model; 7) Apply the fine-tuned UIE model to traverse the retrieved document fragments and identify the entity values ​​corresponding to the defined entity types; 8) Highlight the recognition results, manually confirm and modify the entity type and entity value, and temporarily save the confirmation results; 9) Confirm all temporary results again. Once the results are correct, store them in the database as annotation data. 10) Use the confirmed data saved in the database to fine-tune the UIE model again to continuously improve its performance.

[0042] Thirdly, the present invention provides a terminal including a processor and a communication interface coupled to the processor, the processor being used to run computer programs or instructions to implement the key information extraction method provided in the first aspect.

[0043] Although the invention has been described herein in conjunction with various embodiments, those skilled in the art will understand and implement other variations of the disclosed embodiments by reviewing the accompanying drawings, disclosure, and other materials. In this specification, the word "comprising" does not exclude other components or steps, and "a" or "an" does not exclude multiple components. A single processor or other unit can implement several functions listed in the specification. While certain measures are described in different embodiments, this does not mean that these measures cannot be combined to produce good results.

[0044] Although the invention has been described in conjunction with specific features and embodiments, it is obvious that various modifications and combinations can be made therein without departing from the spirit and scope of the invention. Accordingly, this specification and drawings are merely illustrative of the invention and are considered to cover any and all modifications, variations, combinations, or equivalents within the scope of the invention. Clearly, those skilled in the art can make various alterations and modifications to the invention without departing from its spirit and scope. Thus, if such modifications and modifications fall within the scope of the invention and its equivalents, the invention is also intended to include such modifications and modifications.

Claims

1. A method for extracting key information, characterized in that, Includes the following steps: S10. Divide the document into chapters to obtain multiple sub-documents, and extract the images and table elements from each sub-document; store the sub-documents in a relational database in a table-based association format to achieve a four-level association between sub-documents, titles, content, and elements; S20. Configure keywords, use keywords as search elements, and retrieve and locate all sub-documents containing the keywords in the relational database; S30. Configure a pre-trained and fine-tuned UIE model, use the UIE model to traverse all sub-documents containing keywords, and identify the entity values ​​corresponding to the defined entity types to complete the extraction of key information.

2. The key information extraction method according to claim 1, characterized in that, The OOXML parsing method is used to split the document by chapter to obtain multiple sub-documents.

3. The key information extraction method according to claim 1, characterized in that, When retrieving all sub-documents containing keywords in a relational database, an inverted index is used.

4. The key information extraction method according to claim 3, characterized in that, Create an inverted index as follows: Assign a docID to all child documents; Each sub-document is read in docID order. During reading, if the word has already appeared, only the frequency and position information in the posting of the corresponding docID are updated. Otherwise, the word is added to the word list and its corresponding position information is added. After all sub-documents are traversed, the inverted index is constructed, and a list of the corresponding positions of all words is generated.

5. The key information extraction method according to claim 1, characterized in that, Fine-tuning the pre-trained UIE model using the following method: Text data acquisition and preprocessing, including text data cleaning and defining entity types; Data annotation tools were used to annotate the cleaned text data based on entity type. The pre-trained UIE model is fine-tuned using labeled text data, and the fine-tuned UIE model is saved as the application model.

6. The key information extraction method according to claim 1, characterized in that, The UIE model is used to traverse all sub-documents containing keywords, and the entity values ​​corresponding to the defined entity types are identified to complete the extraction of key information. The specific steps include the following: S300. Configure the entity extraction structure pattern guide, and generate the entity extraction structure pattern guide and the token encoding, position encoding, mask and token type encoding of the sub-document; S301. Configure the encoder and decoder; S302. Input the token encoding, position encoding, mask, and token type encoding into the encoder to obtain the context representation matrix; S303. The decoder receives the context representation matrix, predicts the start and end positions of different entity types, and decodes the entity values ​​corresponding to the entity types to complete the extraction of key information.

7. The key information extraction method according to claim 6, characterized in that, The encoder is one of the pre-trained ERNIE3 model, UNILM model, or T5 model; there are two decoders, each of which includes a fully connected layer and an activation function connected in sequence.

8. A key information extraction system, characterized in that, include: The document segmentation module splits the document by chapter to obtain multiple sub-documents and extracts images and table elements from each sub-document. Sub-documents are stored in a relational database in a table-based manner, achieving a four-level association between sub-documents, titles, content, and elements; The sub-document retrieval module allows you to configure keywords and use those keywords as search elements to retrieve and locate all sub-documents containing those keywords in a relational database. The key information extraction module is configured with a pre-trained and fine-tuned UIE model. The UIE model is used to traverse all sub-documents containing keywords and identify the entity values ​​corresponding to the defined entity types to complete the extraction of key information.

9. The key information extraction system according to claim 8, characterized in that, The pre-trained and fine-tuned UIE models include: A structural pattern guide is used to describe different information extraction tasks and construct a unified encoding form; The information extraction model uses an encoding-decoding mode for information extraction. And structured extraction languages, used to generate structured language sequences from the results of information extraction.

10. A terminal comprising a processor and a communication interface coupled to the processor, the processor being configured to run a computer program or instructions to implement the key information extraction method of any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information extraction method and device, electronic equipment and computer readable storage medium

    CN116151238A

  • Method, device and equipment for jointly extracting chapter level information and storage medium

    CN118839694A

  • Information extraction method and device, electronic equipment and computer readable storage medium

    CN119005191A

  • Self-supervised pretraining of document information extraction models with informative word masking

    US20250111266A1