Document key information extraction method and device, equipment and storage medium
By dividing the document into tables and text areas, generating unique extraction prompts, and using a document key information extraction model for automated extraction, the problem of high cost and long cycle in traditional methods is solved, achieving high-precision and low-maintenance information extraction.
Patent Information
- Application Number
- CN202511702600.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-19
- Publication Date
- 2026-02-27
AI Technical Summary
Traditional manual verification of complex documents is costly, time-consuming, and prone to errors, failing to meet the needs of real-time risk control and compliance reporting. This is especially true in scenarios such as finance and insurance, where it is difficult to automatically extract table structures and paragraph semantics from complex documents with high accuracy.
By acquiring the document to be extracted and dividing it into target table areas and target text areas, key information extraction prompts are generated. The document key information extraction model is used for extraction, and the accuracy and comprehensiveness of the extraction results are ensured through integrity verification.
It achieves high-precision, low-maintenance automated information extraction, avoids information confusion and semantic fragmentation, ensures the comprehensiveness and accuracy of key information, and adapts to the needs of complex document structures.
Smart Images

Figure CN121580976A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of information extraction, and in particular to a document key information extraction method, device, equipment and storage medium. BACKGROUND
[0002] In the financial, insurance, asset management and other scenarios, a large number of complex documents carry key business information: product elements, risk clauses, and payment indicators, which are often scattered in tables, long paragraphs, and even cross-page areas. The traditional manual verification method is high in cost, long in cycle, and prone to errors, and cannot meet the real-time risk control and compliance reporting needs.
[0003] Therefore, there is an urgent need for a new solution that can consider the integrity of table structure and the coherence of paragraph semantics in complex documents with disordered layout and different standards, so as to realize high-precision and low-maintenance automatic information extraction. SUMMARY
[0004] The main purpose of the present application is to provide a document key information extraction method, device, equipment and storage medium, which aims to realize high-precision and low-maintenance automatic information extraction.
[0005] To achieve the above purpose, the present application provides a document key information extraction method, which comprises: obtaining a document to be extracted and a key information field to be extracted, and dividing the document to be extracted into a target table region and a target text region; According to the target table region and the target text region, a plurality of key information extraction prompt words corresponding to the key information field to be extracted are generated; Based on each key information extraction prompt word, the target table region and the target text region are input into a document key information extraction model to obtain a document key information extraction result output by the document key information extraction model; Verify the integrity of the document key information extraction result to determine the target key information corresponding to the key information field to be extracted.
[0006] In one possible implementation, the dividing the document to be extracted into a target table region and a target text region comprises: inputting the document to be extracted into a layout analysis model, analyzing the visual features of the document to be extracted through the layout analysis model, and determining and marking the coordinate range of the candidate table region; extracting the cell boundary of the candidate table region through a table parsing algorithm, and combining with the row-column connectivity verification to determine the pending table region; According to the coordinate range of the pending table region, the remaining region in the document to be extracted is dynamically sliced into a pending text region. Cross-checking the pending table region and the pending text region, if there is region overlap or omission, correcting the boundary based on the context semantics of the document to be extracted, determining the target table region and the target text region.
[0007] In a possible implementation, the generating of the several key information extraction prompt words corresponding to the key information field to be extracted according to the target table region and the target text region comprises: Constructing a field expression mapping library of the domain, and determining the expression paradigm corresponding to the document to be extracted by analyzing the source attribute of the document to be extracted; From the field expression mapping library of the domain, calling the field expression variants matching the expression paradigm to form the exclusive expression list corresponding to the key information field to be extracted; According to the structural features of the target table region and the semantic features of the target text region, classifying and associating the key information field to be extracted and the exclusive expression list to the target table region and / or the target text region; Based on the preset prompt word framework, generating the adaptive key information extraction prompt words for the target table region and the target text region respectively, wherein the key information extraction prompt words comprise table region prompt words and text region prompt words, the table region prompt words emphasize cell position association, and the text region prompt words emphasize context semantic association.
[0008] In a possible implementation, the constructing of the field expression mapping library of the domain comprises: Collecting several groups of complex document samples across industries and institutions, and analyzing the key information field and the field expression mode in each of the complex document samples by natural language processing technology to establish several groups of preliminary mapping relationships; Verifying and supplementing each of the preliminary mapping relationships by a domain expert knowledge graph, correcting the mapping relationship pairs with inconsistent semantics in each of the preliminary mapping relationships, and adding rare expression variants to obtain several groups of target mapping relationships; Indexing the industry and institution types in each of the target mapping relationships to construct the field expression mapping library of the domain.
[0009] In a possible implementation, the key information extraction prompt words comprise table region prompt words and text region prompt words; The inputting of the target table region and the target text region into the document key information extraction model based on the several key information extraction prompt words to obtain the document key information extraction result output by the document key information extraction model comprises: input the target table region and the table region prompt word to the document key information extraction model to locate a cell corresponding to the key information field to be extracted in the target table region and extract a specific value to generate a table extraction result; According to the key information field to be extracted, a related text slice corresponding to the target text region is retrieved from a preset vector database, and the related text slice and the text region prompt word are input to the document key information extraction model to locate a text corresponding to the key information field to be extracted in the target text region and extract a specific value based on semantic understanding to generate a text extraction result; The table extraction result and the text extraction result are integrated to generate the document key information extraction result.
[0010] In a possible implementation, before the step of retrieving the related text slice corresponding to the target text region from the preset vector database according to the key information field to be extracted, the method further includes: Invalid information in the target text region is removed, and after the removal of the invalid information, the target text region is subjected to structure recognition based on a dynamic paragraph slice strategy of a layout analysis model to determine a plurality of title and body paragraph structures in the target text region; Any of the title and body paragraph structures is taken as an integral slice unit to generate a plurality of initial text slices, and an embedding algorithm is called to vectorize each of the initial text slices to generate a plurality of related text slices; Each of the related text slices and original document position information corresponding to each of the related text slices are stored in the preset vector database in a preset format.
[0011] In a possible implementation, the step of verifying the integrity of the document key information extraction result to determine the target key information corresponding to the key information field to be extracted includes: The document key information extraction result and the key information field to be extracted are compared one by one to mark covered fields that have extracted specific values and uncovered fields that have not extracted specific values; If there is no uncovered field, it is determined that the extraction result is complete, and the document key information extraction result is taken as the target key information; If there is an uncovered field, a supplementary extraction prompt word is generated for the uncovered field, the target table region, the target text region, and the supplementary extraction prompt word are input to the document key information extraction model for supplementary extraction to obtain a supplementary extraction result; The supplementary extraction result and the document key information extraction result are cross-verified to determine the target key information.
[0012] In addition, to achieve the above object, the present application also provides a document key information extraction device, which comprises: a region acquisition module, configured to acquire a document to be extracted and a key information field to be extracted, and divide the document to be extracted into a target table region and a target text region; a prompt word generation module, configured to generate a plurality of key information extraction prompt words corresponding to the key information field to be extracted according to the target table region and the target text region; a model output module, configured to input the target table region and the target text region into a document key information extraction model based on each key information extraction prompt word, and obtain a document key information extraction result output by the document key information extraction model; a completeness verification module, configured to verify the completeness of the document key information extraction result, and determine target key information corresponding to the key information field to be extracted.
[0013] In addition, to achieve the above object, the present application also provides a document key information extraction device, which comprises:
[0014] In addition, to achieve the above object, the present application also provides a storage medium, which is a computer readable storage medium, and a computer program is stored on the storage medium, and the computer program is executed by a processor to implement the steps of the document key information extraction method.
[0015] In addition, to achieve the above object, the present application also provides a computer program product, which comprises a computer program, and the computer program is executed by a processor to implement the steps of the document key information extraction method.
[0016] The application provides a document key information extraction method, device and equipment and a storage medium. The document key information extraction method obtains a to-be-extracted document and a to-be-extracted key information field, divides the to-be-extracted document into a target table region and a target text region, generates a plurality of key information extraction prompt words corresponding to the to-be-extracted key information field according to the target table region and the target text region, inputs the target table region and the target text region into a document key information extraction model based on the key information extraction prompt words, obtains a document key information extraction result output by the document key information extraction model, verifies the integrity of the document key information extraction result, determines target key information corresponding to the to-be-extracted key information field, and clearly divides the to-be-extracted document into the target table region and the target text region, thereby avoiding structure loss or semantic fragmentation caused by mixed processing of the two types of information, accurately dividing the processing boundary, generating exclusive key information extraction prompt words based on the characteristics of the two types of regions, avoiding the ambiguity of general prompt words, making the document key information extraction model more accurately locate the target field, improving the extraction accuracy and precision, and supplementing the to-be-extracted key information field that is not covered in time by verifying the integrity of the extraction result, avoiding information omission, ensuring the comprehensiveness of the final target key information, considering the extraction requirements of the two types of information for the complex document structure in which tables and texts coexist, solving the problem that the traditional single extraction mode is difficult to adapt to complex documents, and realizing high-precision and low-maintenance automatic information extraction. BRIEF DESCRIPTION OF DRAWINGS
[0017] The accompanying drawings, which are incorporated into and form a part of the specification, illustrate preferred embodiments of the present application and, together with the description, serve to explain the principles of the application.
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the accompanying drawings needed to be used in the embodiments or prior art description will be briefly introduced. Obviously, for those skilled in the art, other drawings can also be obtained based on these drawings without creative labor.
[0019] Figure 1 A flowchart is provided for the document key information extraction method embodiment one of the present application; Figure 2 A brief flowchart is provided for the document key information extraction method of the present application; Figure 3 A flowchart related to layout analysis is provided for the document key information extraction method of the present application; Figure 4 A device structure diagram of a hardware running environment related to the document key information extraction method of the present application embodiment.
[0020] The objectives, functional features and advantages of the present application will be further illustrated in conjunction with the embodiments, with reference to the accompanying drawings. DETAILED DESCRIPTION
[0021] It should be understood that the specific embodiments described herein are merely intended to explain the technical solutions of the present application, and are not intended to limit the present application.
[0022] In order to better understand the technical solutions of the present application, the following will be described in detail in conjunction with the accompanying drawings and specific embodiments.
[0023] It should be noted that the execution subject of the present embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device, a big data service platform, a document key information extraction system, etc. capable of realizing the above functions. The present embodiment and the following embodiments will be described below taking the document key information extraction system as an example.
[0024] Based on this, the present embodiment provides a document key information extraction method, which will be described in detail with reference to Figure 1 , Figure 1 The flowchart provided by the first embodiment of the document key information extraction method of the present application is shown in the figure.
[0025] In the present embodiment, the document key information extraction method comprises steps S11-S14: Step S11, obtaining a document to be extracted and a key information field to be extracted, and dividing the document to be extracted into a target table region and a target text region; It should be noted that the document to be extracted refers to an unstructured or semi-structured document containing target key information, including product brochures, insurance payment reports, etc. in the financial field, and the format can cover PDF, Doc, Excel, etc. The key information field to be extracted refers to specific information items that users need to obtain from the document to be extracted based on business needs (such as compliance audit, data entry), which can specifically include product code, product establishment date, performance comparison benchmark, and collection deadline, etc. in the financial field. The target table region refers to a specific region in the document to be extracted that carries information in the form of a table, and the information in this region usually has a structured row-column relationship. The target text region refers to a region in the document to be extracted that carries information in the form of a paragraph, and the information in this region is mostly unstructured natural language description.
[0026] The core purpose of this step is to determine the input object and processing boundary of document processing, and to lay the foundation for the subsequent "divide and conquer" information extraction strategy by dividing the target table area and the target text area, avoiding the loss of structural information or semantic fragmentation caused by mixed processing of tables and text, while ensuring that the extraction process can adapt to the information carrying characteristics of the two types of areas, improving the accuracy and efficiency of subsequent key information extraction. In one possible implementation, the acquisition of the document to be extracted can be realized through the document upload interface of the system, supporting batch upload and single document upload modes; the key information field to be extracted can be manually input by the user through the visual interface, or selected from the preset industry field template (such as a financial product key information template, an insurance report key information template), reducing user operation cost.
[0027] In addition, it should be noted that the process of dividing the document to be extracted into the target table area and the target text area needs to rely on technical means with complex document structure recognition capability to ensure that the division result can accurately reflect the actual information distribution of the document, avoiding missing or misjudgment caused by incorrect area division. At the same time, the division process needs to support adaptation to different formats of documents, for example, for PDF format documents, OCR analysis needs to be performed first to obtain recognizable text and table outline; for Doc format documents, the built-in structure markers (such as table labels, paragraph labels) of the document can be directly read to assist division.
[0028] Specifically, first, the system receives the user-uploaded document to be extracted through the document upload interface, verifies the document format (such as confirming whether it is in a supported PDF, Doc, etc.), and if the format is not supported, prompts the user to convert and upload again; second, the system obtains the user-input key information field to be extracted through the interactive interface, or loads the industry field template selected by the user, generates a list of key information fields to be extracted and displays it to the user for confirmation.
[0029] Further, the process of dividing the document to be extracted into the target table area and the target text area can refer to steps S21-S24 and Figure 2 Here, no further description is given.
[0030] Step S12, generating a plurality of key information extraction prompt words corresponding to the key information field to be extracted according to the target table area and the target text area; It should be noted that the key information extraction prompt word refers to an instruction text for guiding the document key information extraction model to accurately locate and extract target information, and its content needs to be generated in combination with the characteristics of the key information field to be extracted and the corresponding area. The purpose of this step is to generate a key information extraction prompt word with area adaptability and field adaptability, solve the problem that the traditional static Prompt template cannot adapt to the differences in expression of different institutions and the characteristics of information in different areas, guide the document key information extraction model to focus on the target information through precise instructions, avoid extraction deviation caused by ambiguous prompt words, and improve the accuracy of key information extraction. In one possible implementation, the pre-set prompt word framework can include a fixed instruction part (such as “extract the specific values corresponding to the following fields from the following areas:”) and a dynamic injection part (such as the key information field to be extracted, the exclusive expression list, and the area characteristic prompt). The framework supports dynamic adjustment of instruction expression according to industry type, for example, the prompt word framework for the financial scenario includes industry-specific terms such as “financial product field” and “compliance information”, and the insurance scenario includes terms such as “insurance amount” and “payout conditions”.
[0031] Specifically, reference can be made to steps S31-S34 and Figure 2 , which will not be repeated here.
[0032] Step S13, based on each of the key information extraction prompt words, inputting the target table area and the target text area to a document key information extraction model to obtain a document key information extraction result output by the document key information extraction model; It should be noted that the document key information extraction model refers to a model constructed based on a large language model, which has the capabilities of structured table analysis and unstructured text semantic understanding. The model can locate and extract key information from the target area according to the instructions of the key information extraction prompt word. The text extraction result refers to the set of key information extracted by the document key information extraction model from the relevant text slice, which includes the key information field to be extracted, the corresponding specific value, and the position of the value in the text slice. The document key information extraction result refers to the complete set of key information formed by integrating the table extraction result and the text extraction result. This set includes the preliminary extraction values corresponding to all key information fields to be extracted.
[0033] The purpose of this step is to rely on the semantic understanding capability of the document key information extraction model and combine the adapted key information extraction prompt word to extract key information from the target table area and the target text area respectively. Through the logic of “table first, text supplement”, the comprehensiveness of key information extraction is ensured, and at the same time, the retrieval capability of the vector database is used to quickly locate the associated information in the target text area, avoiding low extraction efficiency caused by complex content in the text area. Finally, a preliminary extraction result covering all key information fields to be extracted is formed.
[0034] In an embodiment, the document key information extraction model can adopt a large language model based on a Transformer architecture (such as the GPT series, the LLaMA series), and be fine-tuned through industry-specific datasets (such as a financial document extraction dataset, an insurance report extraction dataset) to improve the model's understanding of industry terminology and expression paradigms.
[0035] Specifically, reference can be made to steps S51-S53 and Figure 2 Details are not repeated here.
[0036] Step S14, verifying the integrity of the document key information extraction result, determining the target key information corresponding to the key information field to be extracted.
[0037] It should be noted that the target key information refers to the final accurate information set covering all key information fields to be extracted after integrity verification and cross-checking. The core purpose of this step is to ensure that the final output key information is complete and error-free, to discover uncovered fields in time and perform supplementary extraction through integrity verification, to solve conflicts between different extraction results through cross-checking, to avoid business risks (such as missing key fields in compliance audit, data entry errors) caused by preliminary extraction omissions or biases, and finally to provide accurate and complete key information for users to meet business application needs.
[0038] In a possible embodiment, the result of integrity verification can be displayed to the user through a visual interface, marking the covered fields as "green", the uncovered fields as "red", and the fields to be checked as "yellow"; when a conflict occurs in cross-validation, the system can automatically backtrack to the source text of the conflict field in the corresponding area of the original document and highlight it to assist the user in quickly confirming the accurate value.
[0039] Specifically, reference can be made to steps S71-S74 and Figure 2 Details are not repeated here, where the generation of supplementary extraction prompt words needs to be more targeted than the preliminary extraction prompt words, and needs to combine the characteristics of the uncovered fields and the information distribution law of the document. For example, if the uncovered field is "fee rate" and the "fee description" paragraph in the document is not initially retrieved, the supplementary extraction prompt word needs to clearly guide the model to focus on this paragraph. At the same time, cross-validation not only needs to check the consistency of the supplementary extraction result and the preliminary result, but also needs to check the consistency of the extracted value and the original document information to ensure the accuracy of the final target key information.
[0040] The embodiment avoids structure loss or semantic fragmentation caused by mixed processing of the two types of information by explicitly dividing the to-be-extracted document into a target table region and a target text region, accurately divides the processing boundary, generates exclusive key information extraction prompt words combined with the characteristics of the two types of regions, avoids the ambiguity of general prompt words, makes the document key information extraction model more accurately locate the target field, improves the extraction accuracy and precision, and verifies the integrity of the extraction result, which can timely complete the uncovered key information field to be extracted, avoid information omission, and ensure the comprehensiveness of the final target key information. For the complex document structure of coexistence of tables and texts, the extraction requirements of the two types of information are considered, the problem that the traditional single extraction method is difficult to adapt to complex documents is solved, and high-precision and low-maintenance automatic information extraction is realized.
[0041] In a feasible implementation manner, the dividing the to-be-extracted document into the target table region and the target text region comprises: In step S21, the to-be-extracted document is input into a layout analysis model, the visual features of the to-be-extracted document are analyzed by the layout analysis model, and the coordinate range of a candidate table region is determined and marked; It should be noted that the layout analysis model refers to a deep learning model pre-trained by a large number of complex document samples (including tables, texts, and mixed content of texts and images), which has the ability of document structure recognition and region classification; the visual features refer to the visual attributes in the to-be-extracted document that can reflect the region type, specifically including cell border lines, row and column alignment methods, text density differences, and space separation features of tables and texts; the candidate table region refers to a document region preliminarily determined as a table structure by the layout analysis model, which needs to be further verified to confirm whether it is a real table; the coordinate range refers to a numerical range used to define the position of the candidate table region in the to-be-extracted document, usually taking the top-left corner of the document page as the origin, and represented by “top-left corner coordinates (x1, y1) - right-bottom corner coordinates (x2, y2)”.
[0042] In an embodiment, the layout analysis model can adopt a LayoutLM series model based on a Transformer architecture, which can simultaneously fuse the visual features and text semantic features of the document, and improve the candidate region recognition accuracy of complex documents (such as inclined tables and frameless tables).
[0043] Specifically, first, the system pre-processes the obtained document to be extracted. If the document is in image format such as a scanned PDF, it is first converted into a recognizable text image through OCR technology. If it is in editable format (such as Doc), the page layout data of the document is directly extracted. Second, the system loads the pre-trained layout analysis model and inputs the pre-processed document page by page into the model. Third, the model analyzes the visual features of each page: identifies the line elements in the page (judges whether it is a table border), analyzes the arrangement of text blocks (judges whether it is a structured row-column distribution), and calculates the text density of different regions (the text density in table regions is usually more uniform and in grid distribution). Fourth, the model marks the regions that meet the table structure features according to the visual feature analysis results and generates the coordinate range (in pixels) of each candidate table region. Finally, the system stores the document page data with the marked candidate table region coordinates into a temporary database, which can be referred to as Figure 3 .
[0044] Step S22, extract the cell boundaries of the candidate table region through the table analysis algorithm and combine the row-column connectivity verification to determine the pending table region. It should be noted that the table analysis algorithm refers to a computer vision algorithm for extracting the contour of an object in an image (here, the contour of the table cell border), including the Canny edge detection algorithm, the Sobel operator edge detection algorithm, etc. The cell boundary refers to the four border lines (top, bottom, left, and right) that constitute the table cell, which is a key feature for distinguishing different cells. The row-column connectivity verification refers to a verification process that verifies whether there are complete row lines and column lines in the candidate table region by judging the connectivity of the lines in the region, and then confirms whether the region is a real table. The pending table region refers to a region that has been confirmed to have a complete table structure after cell boundary extraction and row-column connectivity verification. This region still needs to be cross-verified with the text region to finally determine the target table region.
[0045] The purpose of this step is to perform secondary verification on the candidate table region to eliminate non-table regions (such as regions with densely arranged text blocks) that are misjudged due to similar visual features, ensuring that the table region for subsequent processing has a real and complete cell structure, and avoiding deviations in subsequent key information extraction caused by false table regions. In an embodiment, the table analysis algorithm can use a combination of "Canny edge detection + Hough transform". First, the Canny algorithm is used to extract the edge pixels of the candidate region, and then the Hough transform is used to fit the edge pixels into complete border lines, improving the completeness of cell boundary extraction. The row-column connectivity verification can set a connectivity threshold (such as row line connectivity rate ≥ 90%, column line connectivity rate ≥ 90%), and the candidate regions that do not meet the threshold are directly determined as non-table regions.
[0046] Specifically, the system retrieves candidate table region image data from the temporary database; secondly, the table parsing algorithm is called to perform edge extraction on the candidate table region image: first, the Canny algorithm is used to identify the edge pixels in the image (highlighting the cell border), and then the Hough transform is used to fit the discrete edge pixels into continuous horizontal lines and vertical lines, forming the preliminary outline of the cell boundary.
[0047] Then, the system performs row-column connectivity verification on the extracted cell boundary: the number of horizontal lines and the length of each horizontal line are counted, the horizontal line connectivity rate (the proportion of the width of the continuous horizontal line covered area) is calculated, and the vertical line connectivity rate is calculated in the same way; if both the horizontal line connectivity rate and the vertical line connectivity rate reach a preset threshold (such as 90%), and the lines intersect to form a closed cell structure, it is determined that the candidate table region has a complete table structure. Finally, the system marks the verified region as a pending table region, stores its cell boundary information and coordinate range, and eliminates the candidate regions that do not pass the verification (such as regions with insufficient line connectivity).
[0048] Step S23, according to the coordinate range of the pending table region, performing dynamic text slicing on the remaining region in the document to be extracted to determine a pending text region; It should be noted that the coordinate range refers to the position range of the pending table region in the document to be extracted; the remaining region in the document to be extracted refers to all regions in the document to be extracted except the pending table region, which mainly carries unstructured text information in the form of paragraphs; dynamic text slicing refers to a processing method of dividing text according to the semantic structure of the document content (such as the association relationship between the title and the body paragraph) rather than a fixed length, which can ensure the semantic integrity of each slice; the pending text region refers to the region carrying information in the form of paragraphs obtained by dynamic text slicing, which needs to be cross-verified with the pending table region to finally determine the target text region.
[0049] The purpose of this step is to accurately divide the text region in the document based on the clear table region boundary, to avoid the semantic fragmentation problem caused by traditional fixed-length slicing through dynamic text slicing, to ensure the semantic coherence of the text region, and to provide a semantically complete text unit for subsequent extraction of key information from the text, and to clearly define the processing boundary between the table and the text by dividing the remaining region, to avoid confusion between the two types of region information.
[0050] Specifically, reference can be made to Figure 3Firstly, the system retrieves the coordinate range of the pending table region and the complete page data of the document to be extracted from the temporary database; secondly, for each page, the remaining region of the page is obtained by excluding the pending table region according to the coordinate range of the pending table region, and if there are multiple pending table regions in the same page, all the table regions are excluded at the same time; then, the system calls the layout analysis model to perform semantic structure recognition on the remaining region to distinguish the semantic types in the region, such as title, text paragraph, header, footer, etc., wherein the header and footer are invalid information and are directly excluded; next, a dynamic text slicing strategy is used to divide the remaining valid region (including the title and the text paragraph): each title and the text paragraph directly associated with it are taken as a complete slicing unit (for example, the title "two, investment scope" and the corresponding three text paragraphs form a slice), to ensure the semantic coherence of the text in each slice; finally, the system integrates all the slicing units and marks them as the pending text region of the page, and if the document contains multiple pages, the pending text region of each page is processed respectively, and then the pending text regions of all the pages are integrated, and the slicing information and the coordinate range are stored, which can be referred to steps S61-S63.
[0051] In step S24, the pending table region and the pending text region are cross-verified, and if there is region overlap or omission, the boundaries are corrected based on the context semantics of the document to be extracted, to determine the target table region and the target text region.
[0052] It should be noted that cross-verification refers to consistency checking of the boundaries and content of the two types of regions, and the core verification dimensions include whether the regions overlap (the same document location belongs to both types of regions) and whether the regions are omitted (a part of the document is not divided into any region). Region overlap refers to the intersection of the coordinate ranges of the pending table region and the pending text region, which may cause the same information to be repeatedly processed in subsequent extraction. Region omission refers to the existence of a blank region in the document to be extracted that is not divided into the pending table region or the pending text region, which may cause key information extraction to be omitted. Context semantics refers to the text content before and after the overlapping / omitted region in the document to be extracted, which can be used to determine the true information type (table or text) of the region.
[0053] The purpose of this step is to eliminate the deviation in the division of the pending region, to find and correct the overlap or omission problem through cross-verification, to ensure the accuracy of the region type determination in combination with the context semantics, and to ultimately determine the accurate target table and text region, to avoid extraction omission or repeated extraction caused by region division errors.
[0054] Specifically, first, the system calls the coordinate range data of the pending table region and the pending text region, and compares the coordinate intersection of the two types of regions page by page. If a coordinate point belongs to both types of regions, it is determined that the regions overlap. If there is a coordinate range on the page that is not covered by both types of regions, it is determined that the regions are missing. Second, for the region overlap problem, the system extracts the content data of the overlapping region and determines its true type based on the context semantics. If the overlapping region contains a cell border, structured text in rows and columns (such as "product code" and "numeric value" arranged in correspondence), it is determined to be a table region, and the boundary of the pending text region is corrected to exclude the overlapping part. If the overlapping region is a paragraph of natural language description (such as "Note: the above table data is up to May 2025"), it is determined to be a text region, and the boundary of the pending table region is corrected to exclude the overlapping part. Then, for the region missing problem, the system extracts the content data of the missing region and determines the type based on the context. If the missing region has table structure characteristics, it is supplemented to the pending table region. If it is a paragraph of text, it is supplemented to the pending text region. Finally, the system marks the corrected pending table region as the target table region, marks the corrected pending text region as the target text region, stores the final coordinate range and content data of the two types of regions, and completes the whole process of region division.
[0055] The embodiment analyzes the candidate table region through the layout analysis model, combines contour detection and row-column connectivity verification, reduces misjudgment of non-table regions, ensures the accuracy of the pending table region, and then dynamically slices the remaining region based on the table region coordinates to avoid semantic fragmentation caused by fixed division and ensure the semantic integrity of the pending text region. Thus, the pending table and text regions are cross-verified, overlapping or missing problems are corrected based on the context semantics, and the region division deviation is eliminated. The final target region boundary is more accurate, and both visual features (such as table borders) and semantic features (such as context association) are considered, which can handle complex documents with interleaved tables and texts and have a wider range of applications.
[0056] In a feasible implementation, the generating a plurality of key information extraction prompt words corresponding to the key information field to be extracted according to the target table region and the target text region comprises: Step S31, constructing a field expression mapping library, and determining the expression paradigm corresponding to the document to be extracted by analyzing the source attribute of the document to be extracted; It should be noted that the field expression mapping library refers to a database storing common expression variants and mapping relationships of the same key information field by different institutions in a specific industry (such as finance, insurance), for example, the mapping of "product code" and "sales code" and "product number" in the financial field, and the mapping of "establishment date" and "establishment date" and "establishment date" are included; the source attribute of the document to be extracted refers to information used to identify the institution, business scenario or document type to which the document to be extracted belongs, which can specifically include the institution name of the document header (such as "XX financial subsidiary"), the business subject of the seal, and the institution-specific terms mentioned in the document content; the expression paradigm refers to the unified expression rule and habit of the key information field in a specific institution or business scenario, which is the core basis for distinguishing the naming differences of different institutional document fields, for example, "product code" in A bank document is uniformly expressed as "sales code", which is the expression paradigm of A bank.
[0057] The purpose of this step is to establish a basic database covering the expression differences of multiple institutions, while accurately positioning the expression habit of the document to be extracted, solving the problem that traditional static templates cannot cope with the naming differences of multiple institutions, ensuring that the subsequent key information extraction can match the actual expression rules of the document, and improving the adaptability and accuracy of extraction.
[0058] Specifically, the field expression mapping library is constructed, and then the system retrieves the field expression rules corresponding to the institution from the field expression mapping library by analyzing the source attribute of the document to be extracted, such as a certain institution, to determine the expression paradigm of the document to be extracted, for example, if the document belongs to "XX financial subsidiary", the expression paradigm of "product code = sales code" of the company is retrieved.
[0059] Step S32, from the field expression mapping library, retrieve the field expression variants matching the expression paradigm to form the exclusive expression list corresponding to the key information field to be extracted; It should be noted that the field expression variant refers to the different names corresponding to the key information field to be extracted in the expression paradigm, for example, the key information field to be extracted is "product code", and the corresponding variant in the expression paradigm is "sales code"; the exclusive expression list refers to a list containing the field name and all adaptive variants formed by retrieving the corresponding variants according to the expression paradigm for the key information field to be extracted.
[0060] The purpose of this step is to match the actual expression name used in the document to the field name to be extracted, ensuring that the model can identify the field expression in the document in the subsequent extraction process, avoiding missing extraction due to mismatched field names, and integrating the name and variants in the form of a list to provide clear field association basis for subsequent generation of accurate prompt words. In one possible implementation, the exclusive expression list can be generated in the format of "field name to be extracted: [expression variant 1, expression variant 2,...]" and displayed to the user for confirmation. If the user finds that there are missing variants, they can manually supplement them to improve the completeness of the list.
[0061] Specifically, first, the system obtains the list of key information fields to be extracted specified by the user (such as product code, establishment date, and fundraising deadline); second, the system retrieves the expression variants corresponding to each key information field to be extracted from the field expression mapping library according to the expression paradigm determined in step S31 - for example, for "product code", the corresponding "sales code" in the expression paradigm is retrieved; for "fundraising deadline", the corresponding "subscription deadline" is retrieved; for "establishment date", if there is no special variant in the expression paradigm, only the field name is retained; then, the system integrates the field name and the retrieved expression variants for each key information field to be extracted to form a field-variant correspondence (such as product code: sales code, fundraising deadline: subscription deadline, and establishment date: establishment date); finally, the system arranges all field-variant correspondences in a unified format to generate an exclusive expression list corresponding to the key information fields to be extracted, stores it in a temporary database, and synchronously displays it to the user for checking and confirmation.
[0062] Step S33, according to the structure characteristics of the target table area and the semantic characteristics of the target text area, the key information fields to be extracted and the exclusive expression list are classified and associated to the target table area and / or the target text area; It should be noted that the structure characteristics of the target table area refer to the row and column distribution, field name position (such as the first row, the first column), cell association relationship, etc. in the target table area, which determine the type of fields that the table area is suitable for carrying (such as structured "product code" and "establishment date" usually located in the field name of the first row of the table); the semantic characteristics of the target text area refer to the paragraph theme (such as "subscription rules" and "risk tips"), keyword density, sentence logical relationship, etc. in the target text area, which determine the type of fields that the text area is suitable for carrying (such as "fundraising deadline" often appears in the "subscription rules" paragraph, and "risk disclosure" often appears in the "risk disclosure" paragraph); the classification and association refer to the matching degree of field characteristics and area characteristics, and the key information fields to be extracted and the corresponding variants are assigned to the target area (table area, text area, or both) where the field is most likely to exist.
[0063] The purpose of this step is to identify the possible regions where each field to be extracted may exist, so as to avoid invalid searches in irrelevant regions during subsequent extraction, improve extraction efficiency, and at the same time ensure that the extraction task of each region focuses on the field types that the region is good at supporting, reducing extraction deviations caused by region and field mismatch.
[0064] Specifically, firstly, the system analyzes the structural characteristics of the target table area: identifying the field name text in the first row of the table (such as "Sales Code", "Establishment Date", "Performance Benchmark"), and determining whether it contains the key information field to be extracted or its variations; if it does, the field is marked as strongly associated with the table area. Secondly, the system analyzes the semantic characteristics of the target text area: determining the theme of each paragraph (such as "Subscription Rules" and "Fee Description") through keyword extraction technology, and determining whether the paragraph theme is related to the key information field to be extracted (such as "Subscription Rules" being related to "Fundraising Deadline"); if related, the field is marked as strongly associated with the text area. Next, the system classifies each key information field to be extracted and its specific description list according to the strength of association: fields strongly associated only with the table area are associated with the target table area; fields strongly associated only with the text area are associated with the target text area; fields strongly associated with both (such as "Product Yield" which may appear in both the table and text descriptions) are associated with both areas. Finally, the system records the associated areas of each field, forming a "Field-Area" association table.
[0065] Step S34: Based on the preset prompt word framework, generate suitable key information extraction prompt words for the target table area and the target text area respectively. The key information extraction prompt words include table area prompt words and text area prompt words. The table area prompt words emphasize cell position association, and the text area prompt words emphasize contextual semantic association.
[0066] It should be noted that the preset prompt word framework refers to a pre-defined prompt word template containing a fixed instruction structure and dynamically filled positions. The fixed instruction structure is used to clarify the extraction task requirements (such as "extract the specific values corresponding to the following fields"), and the dynamically filled positions are used to inject personalized content such as key information fields to be extracted, expression variations, and regional characteristics. Table area prompt words that emphasize cell position associations refer to prompt words that contain descriptions of the positional features of the table area (such as "locate the cell corresponding to the field" and "mark the row and column numbers where the value is located"), guiding the model to focus on the structured row and column relationships of the table. Text area prompt words that emphasize contextual semantic associations refer to prompt words that contain descriptions of the semantic features of the text area (such as "combining the context of the 'subscription rules' paragraph" and "locating the complete sentence related to the field"), guiding the model to understand the semantic logic of the text.
[0067] The purpose of this step is to generate extraction instructions that are highly adapted to the characteristics of the region, so that the model can adjust the extraction logic according to the information carrying characteristics of different regions—locating information based on structural position in table regions and based on semantic understanding in text regions, avoiding extraction deviations caused by the ambiguity of general prompt words, and ensuring the standardization and effectiveness of prompt words through framework generation, thereby improving the accuracy and efficiency of the model in extracting key information.
[0068] Specifically, first, the system retrieves preset prompt word frames, which are divided into table area prompt word frames (such as "Extract the specific values corresponding to the following fields from the target table area: {field list}, where {field 1} is expressed as {variant 1}, {field 2} is expressed as {variant 2}, locate the cell corresponding to each field, and mark the row and column numbers where the extracted values are located") and text area prompt word frames (such as "Extract the specific values corresponding to the following fields from the target text area: {paragraph topic}"). The system extracts the specific values corresponding to the following fields from the paragraph: {Field List}, where the expression variant of {Field 3} is {Variation 3}. It then locates the complete field description based on the contextual semantics and extracts the specific numerical value or date. Next, the system retrieves the key information fields to be extracted and their specific expressions corresponding to the target table area from the "Field-Area" association table. It then fills the field names and expression variants into the dynamic positions of the table area prompt word frame, generating table area prompt words, such as "Extract the specific values corresponding to the following fields from the target table area: Product Code (expression variant: Sales Code), Establishment Date (expression variant: Establishment Date), locate..." "For each field, the cell corresponding to the extracted value is labeled with the row and column number." Next, the fields and variations corresponding to the target text area are retrieved, and combined with the paragraph theme of the text area (such as "subscription rules"), they are filled into the text area prompt word frame to generate text area prompt words. For example, "Extract the specific values corresponding to the following fields from the 'subscription rules' paragraph of the target text area: subscription deadline (expression variation: subscription deadline), combine the context semantics to locate the complete field description, and extract the specific date." Finally, the system associates the generated table area prompt words and text area prompt words with the corresponding target areas and stores them in the prompt word database.
[0069] This embodiment accurately retrieves field representation variations by matching the domain field representation mapping library with representation paradigms, resolving the issue of naming differences for the same field among different organizations. This avoids extraction omissions caused by different representations and enhances the adaptability of prompt words to regions, guiding the model to accurately locate target information and reducing extraction bias. Furthermore, it eliminates the need for manual maintenance of multiple prompt word templates for different organizations and regions, automatically generating suitable prompt words based on the mapping library and framework, reducing manual intervention and improving processing efficiency. Through the classification association between fields and regions and the guidance of dedicated prompt words, it ensures that key information in tables and text areas can be accurately extracted, avoiding information loss due to insufficient adaptation to regional characteristics.
[0070] In an implementable embodiment, the construction field field expression mapping library comprises: In step S41, a plurality of sets of cross-industry and cross-institutional complex document samples are collected, and the key information fields and field expression manners in each of the complex document samples are parsed through natural language processing technology to establish a plurality of sets of preliminary mapping relationships. It should be noted that the cross-industry and cross-institutional complex document samples refer to a set of unstructured or semi-structured documents covering multiple industries (such as finance, insurance, enterprise services, etc.) and multiple institutions (different companies or departments within the same industry); the natural language processing technology refers to a set of technologies for parsing text semantics and extracting key information, specifically including keyword extraction technology (such as TF-IDF, TextRank), entity recognition technology (such as BERT entity recognition model), semantic matching technology (such as cosine similarity calculation), etc.; the key information field refers to a specific item in the document that carries core business information, such as “product code” and “establishment date” in financial documents, “insurance amount” and “payout period” in insurance documents; the field expression manner refers to the naming form of the same key information field by different institutions, such as “product code” can be expressed as “sales code” and “product number”; the preliminary mapping relationship refers to the association between “key information field” and “corresponding expression manner” established by natural language processing technology, which has not been verified by artificial and may have semantic inconsistencies or omissions.
[0071] Specifically, the system starts the sample collection process, connects to the industry public document platform and the manual upload channel, and obtains complex document samples covering the finance, insurance, enterprise service and other industries, as well as different institutions within each industry. The number of samples needs to meet the statistical significance requirement (such as at least 50 institutions in each industry with 1000 documents); secondly, the system preprocesses the collected document samples: for scanned format documents, OCR technology is used to convert them into editable text, and for PDF and Doc format documents, the text content is directly extracted, while invalid documents without key information (such as blank documents and pure image documents) are removed; then, the system calls natural language processing technology to parse the preprocessed documents: high-frequency field candidate words in the document are extracted through keyword extraction technology, the field type of the candidate words is labeled through entity recognition technology (such as “product code” belongs to “identification type field”), and the semantic similarity of different candidate words is calculated through semantic matching technology. The candidate words with a semantic similarity higher than a preset threshold (such as 0.85) are determined as different expression manners of the same key information field; then, the system establishes a preliminary mapping relationship based on the parsing result, in the format of “key information field: [expression manner 1, expression manner 2, …]”, for example, “product code: [sales code, product number, product code]”.
[0072] Step S42, checking and supplementing each of the preliminary mapping relationships by the domain expert knowledge graph, correcting the mapping relationship pairs with inconsistent semantics in each of the preliminary mapping relationships, and adding rare expression variants to obtain a plurality of groups of target mapping relationships; It should be noted that the domain expert knowledge graph refers to a semantic network constructed by integrating the experience and professional knowledge of experts in a specific industry (such as finance, insurance), which contains knowledge such as standard definitions of key information fields in the industry, common expressions, semantic association rules, etc. For example, in the financial domain expert knowledge graph, the core semantics of “product code” is “an encoding that uniquely identifies a financial product”, “sales code” is a common expression, and “product yield” has no semantic association with “product code”. The mapping relationship pair with inconsistent semantics refers to the association combination in the preliminary mapping relationship, where the expression method is inconsistent with the core semantics of the key information field. For example, “product code: product yield” is a mapping pair with inconsistent semantics. The rare expression variant refers to a field expression method that is not covered in the preliminary mapping relationship but actually exists in a small number of institutional documents, such as a small number of finance companies expressing “product code” as “product code ID”. The target mapping relationship refers to the “key information field-expression method” association relationship that is accurate in semantics and comprehensive after being checked, corrected, and supplemented by the domain expert knowledge graph.
[0073] The purpose of this step is to solve the possible errors in the automatic analysis of natural language processing technology, correct the mapping pairs with inconsistent semantics through the professional knowledge of the domain expert knowledge graph, supplement the rare expression variants, and ensure the accuracy and completeness of the mapping relationship. In one possible implementation, the domain expert knowledge graph can be stored in a graph database such as Neo4j, which supports fast querying of the standard semantics and associated expressions of the field. The verification process can use a “machine pre-screening + expert final review” mode: first, automatically compare the preliminary mapping relationships by the knowledge graph, mark suspected mapping pairs with inconsistent semantics, and then confirm the marked results and supplement the rare variants by the domain expert to improve the verification efficiency.
[0074] Specifically, first, the system imports the preliminary mapping relationship established in step S41 into the field expert knowledge graph query interface according to the industry; second, the knowledge graph automatically checks the preliminary mapping relationship according to the standard semantics of the field: for each “key information field-expression mode” combination, the core semantics of the field and the associated expression library in the knowledge graph are queried, if the semantics of the expression mode is inconsistent with the core semantics of the field (such as “product yield” and “product code” core semantics have no intersection), it is marked as “semantic inconsistent mapping pair”; if the expression mode does not exist in the associated expression library, but the semantics is consistent with the core semantics of the field, it is marked as “to be confirmed expression”; then, the system feeds back the marking result to the field expert, the expert audits the “semantic inconsistent mapping pair”, and confirms that the expression mode is deleted (such as deleting “product yield” in the “product code” mapping relationship); the “to be confirmed expression” is judged, if it belongs to a real existing rare expression variant (such as “product coding ID”), it is supplemented to the expression mode list of the corresponding field; at the same time, the expert supplements the rare expression variants not included in the knowledge graph (such as the field expression of a certain regional bank); then, the system corrects the error items in the preliminary mapping relationship according to the expert audit result, supplements the rare expression variants, and forms the corrected mapping relationship; finally, the system performs secondary semantic checking on the corrected mapping relationship to ensure that there is no missed semantic inconsistent item, and finally obtains a plurality of target mapping relationships.
[0075] Step S43, based on the industry and the type of institution in each of the target mapping relationships, an index is established, and the field expression mapping library of the field is constructed.
[0076] It should be noted that the index refers to a structured query identification established to improve the retrieval efficiency of the mapping library, specifically including industry index, institution type index, field name index, etc. Through the index, the target mapping relationship corresponding to a specific industry and a specific institution can be quickly located. The purpose of this step is to integrate the scattered target mapping relationship into a structured and efficiently retrievable database. By establishing multi-dimensional indexes, it is ensured that the field expression mapping relationship of a specific industry and a specific institution can be quickly retrieved during subsequent use, avoiding the low retrieval efficiency caused by global traversal. At the same time, it provides clear structural support for the subsequent maintenance of the mapping library (such as adding new industry mapping and updating institution expression), ensuring that the mapping library can adapt to the long-term document extraction needs of multiple scenarios; the database supports a regular update mechanism, automatically importing new target mapping relationships every month to ensure the timeliness of the mapping library.
[0077] Specifically, first, the system designs a database structure of the field-expression mapping library, such as adopting a hierarchical table structure; second, the system performs data conversion on the target mapping relationship obtained in step S42 according to the database structure: for example, assigning a corresponding industry ID and an organization type ID to each target mapping relationship, and splitting the "key information field-expression combination" into a plurality of records of the field mapping table; then, the system batch-imports the converted data into the database, and completes the basic data storage; then, the system establishes a multi-dimensional index for the database: establishing a joint index of "industry ID + organization type ID + key information field" on the field mapping table, to ensure that the corresponding expression can be quickly queried by industry, organization type, and field name; meanwhile, a separate index of "expression" is established to support reverse query of the corresponding key information field by expression; finally, the system performs a function test on the database: simulating retrieval requirements in different scenarios, verifying the index retrieval efficiency and data accuracy; after the test, the field-expression mapping library is officially put online, and a query interface is opened for calling by subsequent steps.
[0078] The embodiment collects complex document samples across industries and organizations, analyzes fields and expressions by combining natural language processing technology, and generates preliminary mapping relationships that can cover field expression differences in multiple scenarios, avoiding the incomplete coverage problem caused by single source samples. Then, through the verification, supplement, and correction of the semantic inconsistent mapping pairs by the domain expert knowledge graph, and the addition of rare variants, the error of machine analysis is reduced, the semantic consistency and integrity of the target mapping relationship are ensured, the accuracy of the mapping is improved, and indexes are established for the target mapping relationship by industry and organization type, so that subsequent retrieval of field expressions of specific organizations does not need global retrieval, can quickly locate and match the content, and improves the efficiency of the mapping library.
[0079] In a feasible implementation, the key information extraction prompt words include table region prompt words and text region prompt words; and the target table region and the target text region are input into a document key information extraction model based on each key information extraction prompt word to obtain a document key information extraction result output by the document key information extraction model, including: In step S51, the target table region and the table region prompt words are associated and input into the document key information extraction model to locate a cell corresponding to the to-be-extracted key information field in the target table region, and to generate a table extraction result. It should be noted that the cell extracts the specific value, that is, the text content in the cell matched with the key information field to be extracted in the target table region (such as the cell value "A20240501" corresponding to the "product code"); the table extraction result refers to the structured data set integrating the "key information field to be extracted-cell value-cell position". The purpose of this step is to rely on the accurate instruction of the table region prompt word, guide the model to focus on the structured features of the table, quickly locate the cell corresponding to the target field, avoid extraction deviation caused by complex table structure (such as merged cells, multi-row and column distribution), and at the same time, through the reservation of cell position information, ensure the accuracy and traceability of the key information extraction of the table region.
[0080] In an embodiment, the MarkDown format conversion of the target table region can be realized by Cycle-Net, LORE and other table parsing algorithms, ensuring the integrity of the cell row and column relationship; the document key information extraction model can use the GPT-4 fine-tuning version to improve the understanding accuracy of the table structure and extraction instruction.
[0081] Specifically, first, the system retrieves the target table region data converted into MarkDown format and the corresponding table region prompt word from the database, ensuring the accuracy of the association between the two types of data (such as matching a certain exclusive prompt word for a certain target table region); second, the system performs format checking on the target table region in MarkDown format, confirming that the cell row and column markers and text content are correct, and if there is a format exception, it is converted again; third, the system combines the target table region in MarkDown format and the table region prompt word in the order of "prompt word + table data" to form the model input text, avoiding model understanding deviation caused by improper input order; fourth, the system imports the input text into the document key information extraction model, and the model identifies the key information field to be extracted and its expression variants according to the prompt word instruction, then traverses the row and column structure of the table to locate the cells containing these fields or variants (such as the cells below the first row field name "sales code"), and extracts the specific values in the cells; finally, the model outputs the table extraction result containing "key information field to be extracted, extraction value, cell row and column position".
[0082] In step S52, according to the key information field to be extracted, the relevant text slice corresponding to the target text region in the preset vector database is retrieved, and the relevant text slice and the text region prompt word are associated and input into the document key information extraction model to locate the text extraction specific value corresponding to the key information field to be extracted in the target text region based on semantic understanding, and generate a text extraction result; It should be noted that the preset vector database refers to a database that pre-stores text slice vector data corresponding to the target text region, supporting retrieval based on semantic similarity; the relevant text slice refers to the text unit retrieved from the preset vector database that has a semantic correlation with the key information field to be extracted that is higher than a preset threshold, and each slice is a complete semantic set of "title + corresponding body paragraph"; the specific value of text extraction refers to the specific content corresponding to the text description that matches the key information field to be extracted in the relevant text slice (such as "2025-06-17" corresponding to "submission deadline"); the text extraction result refers to a structured data set that integrates "key information field to be extracted - extraction value - text slice position".
[0083] The purpose of this step is to leverage the semantic retrieval capabilities of the vector database to quickly locate text slices within the target text region that are related to the field to be extracted. This avoids the inefficiency caused by the model processing the entire text region. Simultaneously, by relying on contextual guidance from text region prompts, it ensures that the model can accurately extract key information from unstructured text, supplementing field values not covered by the table region and improving the overall comprehensiveness of the extraction. In one possible implementation, the preset vector database can be a Milvus database, supporting horizontal scaling to adapt to the storage needs of massive document slices.
[0084] Specifically, first, the system retrieves a list of key information fields to be extracted from a temporary database, filtering out fields not covered in the table extraction results (such as "subscription deadline") as the focus of this step. Second, the system vectorizes the filtered key information fields using the same embedding algorithm (such as Sentence-BERT) as text slicing. Next, the system inputs the field vectors into a preset vector database, performs semantic similarity retrieval, and filters out text slices with a relevance higher than a preset threshold (such as 0.8). These slices typically contain paragraph topics related to the fields (such as "subscription deadline" corresponding to "subscription rules"). The system first retrieves text region prompts that match these relevant text slices, and then combines them in the order of "prompt + text slice" to form the model input text. The prompts explicitly require the extraction of field values in conjunction with the contextual semantics. After that, the system imports the input text into the document key information extraction model. The model parses the contextual logic of the text slices according to the prompt instructions, locates sentences containing the fields to be extracted or their variations (such as "the subscription deadline is June 17, 2025"), extracts the specific values, and associates them with the corresponding fields. Finally, the model outputs the text extraction results containing "the key information fields to be extracted, the extracted values, and the text slice positions (such as document page numbers and slice numbers)".
[0085] Step S53: Integrate the table extraction results and the text extraction results to generate the document key information extraction results.
[0086] Specifically, first, the system retrieves the table extraction result and the text extraction result from the temporary database, and establishes a unified comparison dimension according to the field name of the key information to be extracted; second, the system compares the results of each field of the key information to be extracted: if the field only has a value in the table extraction result, the value, the table source and the location information are included in the integrated result; if the field only has a value in the text extraction result, the value, the text source and the location information are included in the integrated result; if the field has a value in both types of results and the values are consistent, the value is retained and marked as "source: table + text", and the location information of the two types of results is recorded; if the values are inconsistent, it is marked as "result conflict", and the value of the table extraction result is used as the default (the table data is more accurate), and the location information of the two types of results is associated for subsequent verification; then, the system checks the integrity of the integrated result to confirm that all fields of the key information to be extracted have been included, and if there are uncovered fields (such as values not extracted by both types of results), it is marked as "not extracted"; then, the system processes the integrated result to standardize the format according to the unified format of "field name, final extraction value, extraction source, location information", to ensure clear data structure; finally, the system marks the standardized integrated result as the document key information extraction result.
[0087] In this embodiment, by associating the target table area with the table area prompt word input model, the prompt word emphasizes the cell position association, helps the model to accurately locate the cell corresponding to the field to be extracted, and reduces the extraction deviation of the table information; by first searching the vector database to obtain the relevant text slices of the target text area, and then combining the text area prompt word input model that emphasizes the context semantics, the model focuses on the associated text, improves the text information extraction accuracy, so as to adapt to different regional information bearing characteristics through the "regional extraction + associated prompt word" method, and ensure the key information extraction effect of complex documents.
[0088] In a feasible implementation, before the step of searching the relevant text slices corresponding to the target text area in the preset vector database according to the field of the key information to be extracted, the method further includes: Step S61: removing invalid information in the target text area, and performing structure recognition on the target text area after removing the invalid information based on a dynamic paragraph slicing strategy of a layout analysis model, to determine a plurality of title and text paragraph structures in the target text area; It should be noted that the invalid information refers to the content in the target text area that does not carry key business information, specifically including a header (such as a document fixed title "product manual"), a footer (such as a page number "page 3"), a decorative symbol (such as a separator line, a blank placeholder), and redundant text (such as an advertising slogan, an irrelevant statement) irrelevant to the key information to be extracted; the dynamic paragraph slicing strategy of the layout analysis model refers to a strategy of slicing according to the structural features (such as title level, paragraph separation) of the text rather than fixed length, relying on the semantic recognition ability of the layout analysis model, and the core is to ensure the semantic integrity of the slice; structure recognition refers to the process of distinguishing the title from the body paragraph by analyzing the layout and semantics of the text area; the title refers to the text in the text area used to summarize the theme of the paragraph; the body paragraph structure refers to a set of natural language paragraphs directly associated with the title and used to elaborate the theme of the title.
[0089] Specifically, first, the system retrieves the complete text data of the target text area from the database, and loads the preset invalid information feature library; second, the system traverses the text content of the target text area, and according to the features in the invalid information feature library (such as "header: product manual", "footer: page X", "decorative symbol: ---"), identifies and removes the header, footer, decorative symbol and redundant text, to obtain text data containing only valid content; then, the system loads the pre-trained layout analysis model, and inputs the text data after removing the invalid information into the model; the model performs structure recognition on the text data: by analyzing the visual features such as font style and paragraph spacing of the text, and combining the text semantics (such as theme words "subscription rules", "investment range", etc.), the title level (primary title, secondary title, etc.) in the text is distinguished; then, the model associates each title with its directly subsequent body paragraph that is not truncated by the next title according to the appearance order of the title and the paragraph association, to determine the corresponding relationship of "title-body paragraph"; finally, the system outputs all the titles and corresponding body paragraph structures in the target text area, forming a "title list + body paragraph list" of the title and body paragraph structure.
[0090] Step S62, any of the title and body paragraph structure is taken as a whole slicing unit, a plurality of initial text slices are generated, and an embedding algorithm is called to perform vectorization processing on each of the initial text slices to generate a plurality of related text slices; It should be noted that the overall slicing unit refers to regarding the "title + corresponding text paragraph" as an indivisible text unit to ensure semantic coherence within the slice; the initial text slice refers to the text segment formed after splitting by the overall slicing unit, which contains complete "title-text" semantics; the embedding algorithm refers to an algorithm for converting a text segment into a high-dimensional vector, which can represent the semantic features of the text, including Sentence-BERT, Doc2Vec, etc.; the vectorization process refers to the process of converting the natural language content of the initial text slice into a numerical vector through the embedding algorithm; the relevant text slice refers to the text slice that has semantic searchable characteristics after vectorization, which contains the original content and corresponding vector data of the initial text slice. In a possible implementation, the embedding algorithm can use the pre-trained model of Sentence-BERT, which can output a low-dimensional vector (such as 384 dimensions) while ensuring the accuracy of semantic representation, reducing the storage pressure of the vector database.
[0091] Specifically, the system determines all "title-text paragraph structures" and combines each "title + corresponding text paragraph" as an overall slicing unit, which is split in order according to the title occurrence to generate several initial text slices, each of which contains title text and corresponding text paragraph text, such as "title: I, product subscription rules + text: subscription time is …, subscription conditions are …"; Then, the system performs format normalization processing on each initial text slice, unifies the text encoding (such as UTF-8), removes unnecessary spaces and line breaks, and ensures that the text content is neat; then, the system loads the pre-set embedding algorithm and inputs the normalized initial text slice into the algorithm one by one; the algorithm converts each initial text slice into a fixed-dimensional vector (such as a 384-dimensional floating-point vector) through semantic encoding, which can reflect the semantic features of the slice; finally, the system associates the original content of each initial text slice with its corresponding vector data and marks it as a relevant text slice to form a list of relevant text slices, each of which contains a slice ID, original text content, semantic vector, and title identifier.
[0092] Step S63, store each of the relevant text slices and the corresponding original document location information in a pre-set format in the pre-set vector database.
[0093] It should be noted that the original document location information refers to the specific location data of the relevant text slice in the original document to be extracted, including the document page number, the starting line number and the ending line number of the slice in the page; the pre-set format refers to a pre-defined data format that adapts to the storage requirements of the pre-set vector database.
[0094] Specifically, first, the system retrieves all relevant text slices and the corresponding original document location information of each relevant text slice from the temporary database; second, the system converts the data according to the preset format: the "slice ID, original text content, title identifier, original document location information (page number, starting line number, ending line number)" is sorted into the JSON format data of the "slice basic information table", and the "slice ID, semantic vector (stored in the form of a floating-point array)" is sorted into the JSON format data of the "semantic vector table"; then, the system establishes a connection with the preset vector database, verifies the database service state and authority; then, the system first writes the "slice basic information table" data in batches to the relational storage module of the database (such as the MySQL metadata storage of Milvus), and then writes the "semantic vector table" data in batches to the vector storage module of the database, and ensures that the data of the two tables are associated one by one through the slice ID; during the writing process, the system monitors the data integrity in real time, and if a writing failure (such as network interruption) occurs, a retry mechanism is triggered to ensure that all relevant text slice data are successfully stored; finally, the system tests the data in the database, queries the corresponding original text content, semantic vector and original document location information through the slice ID, and verifies the storage accuracy; after the test is passed, the storage of the relevant text slices is completed.
[0095] The embodiment avoids invalid content from occupying computing resources and interfering with subsequent slicing and extraction by eliminating invalid information (such as page headers and footers) in the target text region, thereby improving processing efficiency. Meanwhile, based on the dynamic paragraph slicing strategy, the "title + corresponding text paragraph" is taken as a whole slicing unit to avoid semantic fragmentation caused by fixed slicing, thereby ensuring that each initial text slice is logically coherent.
[0096] In a possible implementation, the verifying the completeness of the document key information extraction result and determining the target key information corresponding to the to-be-extracted key information field includes: In step S71, the document key information extraction result and the to-be-extracted key information field are compared one by one, and the covered field that has extracted a specific value and the uncovered field that has not extracted a specific value are marked. It should be noted that the covered field refers to the to-be-extracted key information field that has extracted a specific and valid numerical value or text (non-empty value, non-invalid character) in the document key information extraction result; and the uncovered field refers to the to-be-extracted key information field that has not extracted a value (the extracted value is empty) or the extracted value is invalid (such as containing only punctuation marks or meaningless characters) in the document key information extraction result.
[0097] The purpose of this step is to accurately identify the information gap in the preliminary extraction result, avoid field omission caused by batch processing by one-by-one comparison, and determine the field range of completed extraction and incomplete extraction to ensure that the key information in the final output is not missed and meets the user's complete business needs.
[0098] Specifically, first, the system retrieves the document key information extraction result from the result database and the key information field list to be extracted from the task configuration database, ensuring that the field name formats of the two types of data are unified (such as using "product code" instead of "product code" and "sales code" variants); Second, the system initializes two empty lists to store covered fields and uncovered fields, and initializes a comparison log to record the comparison process of each field; Next, the system reads the field name in order according to the key information field list to be extracted, and retrieves the extraction value corresponding to the field in the document key information extraction result; Then, the retrieved extraction value is checked for validity: if the extraction value is not empty and does not belong to the preset invalid value set, the field is determined to be a covered field, and the field name and corresponding extraction value are stored in the covered field list; If the extraction value corresponding to the field is not retrieved, or the extraction value is empty or belongs to the invalid value set, the field is determined to be an uncovered field, and the field name is stored in the uncovered field list; Finally, the system counts the number of covered fields and uncovered fields, generates a field coverage report, and stores the report and the two types of field lists to a temporary database.
[0099] Step S72, if there is no uncovered field, it is determined that the extraction result is complete, and the document key information extraction result is taken as the target key information; Specifically, the system retrieves the uncovered field list generated in step S71 and checks if the list is empty; Second, if the uncovered field list is empty, the system determines that the document key information extraction result is complete, and takes the document key information extraction result as the target key information.
[0100] Step S73, if there is an uncovered field, a supplementary extraction prompt word is generated for the uncovered field, the target table area, the target text area and the supplementary extraction prompt word are input into the document key information extraction model for supplementary extraction, and the supplementary extraction result is obtained; It should be noted that the supplementary extraction prompt refers to the exclusive instruction text generated for the uncovered field to guide the document key information extraction model to accurately locate the field, and the content needs to be more targeted than the initial prompt, including the expression variants of the uncovered field, the possible area prompts (such as "preferentially extract from the 'fee explanation' paragraph in the target text area") and the extraction accuracy requirements (such as "need to extract specific numerical values and units"); the supplementary extraction result refers to the structured data set containing the effective extraction value of the uncovered field obtained by the model based on the supplementary extraction prompt from the target table area or the target text area.
[0101] In a possible implementation, the generation of the supplementary extraction prompt can combine the industry characteristics of the uncovered field and the document structure features to clearly guide the focus area of the model retrieval and reduce invalid retrieval.
[0102] Specifically, the system calls the list of uncovered fields and the corresponding exclusive expression list; secondly, the system analyzes the characteristics of each uncovered field and the document structure: if the field usually exists in the table area (such as "performance comparison benchmark"), emphasize "preferentially retrieve the cells in the target table area, especially the cell corresponding to the field name containing the 'performance' and 'benchmark' keywords" in the prompt; if the field usually exists in the text area (such as "risk warning explanation"), emphasize "retrieve the text slices in the target text area with the theme of 'risk disclosure' and 'cautionary matters'"; then, the system injects the uncovered field name, expression variant and focus area information based on the preset supplementary prompt framework (such as "for the uncovered field {field name} (expression variant: {variant list}), extract the specific value from {focus area}, which needs to contain the numerical value and unit, and mark the extraction position"), to generate the corresponding supplementary extraction prompt for each uncovered field; then, the system combines the target table area (MarkDown format), the target text area (text slice set) and the supplementary extraction prompt in the order of "prompt + table data + text slice" to form the model input text; after that, the system imports the input text into the document key information extraction model, and the model focuses on the uncovered field according to the prompt instruction, retrieves the cells in the target table area and the text slices in the target text area, and extracts the effective specific value; finally, the model outputs the supplementary extraction result containing "uncovered field name, supplementary extraction value, extraction source (table / text), extraction position".
[0103] In step S74, the supplementary extraction result and the document key information extraction result are cross-verified to determine the target key information.
[0104] Specifically, the system retrieves the supplementary extraction result and the document key information extraction result, and establishes an association according to the field name; secondly, the system performs validity checking on the supplementary extraction result: for each supplementary extracted field, the system traces back to the corresponding position of the original document to confirm that the supplementary extraction value is consistent with the original document information, and if it is inconsistent, it is marked as "value conflict" and needs to be further processed; then, the system replaces the valid extraction value in the supplementary extraction result with the null value or invalid value of the corresponding uncovered field in the document key information extraction result to form a temporary integrated result set; then, the system checks the temporary result set for conflicts: if the same field has a valid value in both the supplementary extraction result and the document key information extraction result (such as the original result "fee rate" extraction value is "none", and the supplementary result is "0.3% / year", which belongs to replacement rather than conflict; if the original result "establishment date" has been extracted to "2025-06-10", and the supplementary result appears "2025-06-11", it is a conflict), for the conflicting value, the system traces back to the corresponding position of the original document, and gives priority to the information explicitly recorded in the original document, and if the original document is ambiguous, it is marked as "to be manually confirmed"; then, the system checks the temporary result set to ensure that there are no new uncovered fields; finally, the system performs format standardization processing on the temporary result set without conflicts and full coverage to generate the final target key information and push it to the user interaction interface.
[0105] The embodiment directly confirms the result when there is no uncovered field, and initiates supplementary extraction when there is an uncovered field, to ensure that the final target key information covers all the fields to be extracted, avoid missing key information affecting business use, and at the same time, generate a dedicated supplementary extraction prompt word for the uncovered field instead of repeatedly using the initial prompt word, guide the model to focus on the gap information, and improve the accuracy and efficiency of supplementary extraction.
[0106] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the application.
[0107] The application also provides a document key information extraction device, which comprises: The region acquisition module is configured to acquire a document to be extracted and a key information field to be extracted, and divide the document to be extracted into a target table region and a target text region; The prompt word generation module is configured to generate a plurality of key information extraction prompt words corresponding to the key information field to be extracted according to the target table region and the target text region; The model output module inputs the target table area and the target text area into a document key information extraction model based on the prompt words of the key information extraction prompts, and obtains a document key information extraction result output by the document key information extraction model. The integrity verification module verifies the integrity of the document key information extraction result, and determines the target key information corresponding to the key information field to be extracted.
[0108] The document key information extraction device provided in the present application adopts the document key information extraction method in the above embodiments, and can solve the technical problems in the background art. Compared with the prior art, the document key information extraction device provided in the present application has the same beneficial effects as the document key information extraction method provided in the above embodiments, and other technical features in the document key information extraction device are the same as the features disclosed in the above embodiments, which will not be repeated here.
[0109] The present application provides a document key information extraction device, which comprises at least one processor and a memory connected with the at least one processor, wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the document key information extraction method in Embodiment I.
[0110] Reference will be made to the following Figure 4 which shows a structural schematic diagram of a document key information extraction device suitable for implementing the embodiments of the present application. The document key information extraction device in the embodiments of the present application can include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant), PADs (Portable Application Description), PMPs (Portable Media Player), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. Figure 4 The document key information extraction device shown is only an example, and should not bring any limitation to the functions and use range of the embodiments of the present application.
[0111] As Figure 4As shown, the document key information extraction device can include a processing apparatus 1001 (e.g., a central processing unit, a graphics processing unit, etc.) that can perform various appropriate actions and processes according to programs stored in a read-only memory 1002 or loaded from a storage apparatus 1003 into a random access memory 1004. Various programs and data required for the operation of the document key information extraction device are also stored in the random access memory 1004. The processing apparatus 1001, the read-only memory 1002, and the random access memory 1004 are connected to each other by a bus 1005. An input / output interface 1006 is also connected to the bus. Generally, the following systems can be connected to the input / output interface 1006: input apparatuses 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output apparatuses 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; the storage apparatus 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication apparatus 1009. The communication apparatus 1009 can allow the document key information extraction device to communicate with other devices wirelessly or by wire to exchange data. Although the document key information extraction device having various systems is shown in the figure, it should be understood that all the shown systems are not required to be implemented or possessed. More or less systems can be alternatively implemented or possessed.
[0112] In particular, according to embodiments of the present disclosure, the processes described above with reference to the flowcharts can be implemented as a computer software program. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a computer readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network by a communication apparatus, or installed from the storage apparatus 1003, or installed from the read-only memory 1002. When the computer program is executed by the processing apparatus 1001, the above-mentioned functions defined in the methods of the embodiments of the present disclosure are performed.
[0113] In yet another aspect, the present disclosure also provides a non-transitory computer readable storage medium having stored thereon a computer program, which, when executed by a processor, implements the document key information extraction method provided by each of the above methods.
[0114] The system embodiments described above are merely illustrative, wherein the units described as separate components can or can not be physically separated, and the components displayed as units can or can not be physical units, i.e., can be located in one place, or can be distributed to multiple network units. Part or all of the modules can be selected to achieve the purposes of the embodiments according to actual needs. Those skilled in the art can understand and implement without creative labor.
[0115] Through the description of the above embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary general hardware platforms, and of course can also be realized by hardware. Based on such understanding, the above technical solutions, essentially or in other words, the part that contributes to the prior art, can be embodied in the form of a software product. The computer software product can be stored in a computer readable storage medium, such as a ROM / RAM, a magnetic disk, an optical disk, etc., and includes a plurality of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.
[0116] The above is only some embodiments of the present application, and does not limit the patent scope of the present application, and any equivalent structural transformation made by using the contents of the present application specification and drawings, or direct / indirect application in other related technical fields is included in the patent protection scope of the present application.
Claims
1. A method for extracting key information from a document, characterized in that, include: Obtain the document to be extracted and the key information fields to be extracted, and divide the document to be extracted into a target table area and a target text area; Based on the target table area and the target text area, generate several key information extraction prompts corresponding to the key information fields to be extracted; Based on the key information extraction prompts, the target table area and the target text area are input into the document key information extraction model to obtain the document key information extraction result output by the document key information extraction model. Verify the completeness of the document key information extraction results and determine the target key information corresponding to the key information field to be extracted.
2. The document key information extraction method as described in claim 1, characterized in that, The step of dividing the document to be extracted into target table regions and target text regions includes: The document to be extracted is input into the layout analysis model, and the visual features of the document to be extracted are analyzed by the layout analysis model to determine and mark the coordinate range of the candidate table area; The cell boundaries of the candidate table region are extracted using a table parsing algorithm, and the undetermined table region is determined by combining the row and column connectivity verification. Based on the coordinate range of the undetermined table area, the remaining area in the document to be extracted is dynamically sliced to determine the undetermined text area; Cross-validation is performed on the undetermined table region and the undetermined text region. If there is region overlap or omission, the target table region and the target text region are determined based on the contextual semantic correction boundary of the document to be extracted.
3. The document key information extraction method as described in claim 1, characterized in that, The step of generating several key information extraction prompts corresponding to the key information fields to be extracted, based on the target table area and the target text area, includes: Construct a domain field representation mapping library, and determine the representation paradigm corresponding to the document to be extracted by parsing the source attributes of the document to be extracted; From the domain field representation mapping library, retrieve the field representation variants that match the representation paradigm to form a unique representation list corresponding to the key information field to be extracted; Based on the structural features of the target table region and the semantic features of the target text region, the key information fields to be extracted are classified and associated with the specific expression list to the target table region and / or the target text region. Based on a preset prompt word framework, appropriate key information extraction prompt words are generated for the target table area and the target text area, respectively. The key information extraction prompt words include table area prompt words and text area prompt words. The table area prompt words emphasize cell position association, and the text area prompt words emphasize contextual semantic association.
4. The document key information extraction method as described in claim 3, characterized in that, The constructed domain field representation mapping library includes: Several sets of complex document samples from different industries and organizations were collected, and key information fields and their descriptions were analyzed using natural language processing technology to establish several preliminary mapping relationships. The preliminary mapping relationships are verified and supplemented by a domain expert knowledge graph, the semantically inconsistent mapping relationship pairs in the preliminary mapping relationships are corrected, and rare expression variants are added to obtain several sets of target mapping relationships. An index is established based on the industry and organization types in each of the target mapping relationships, and a domain field description mapping library is constructed.
5. The document key information extraction method as described in claim 1, characterized in that, The key information extraction prompts include prompts for table areas and prompts for text areas; The step of extracting prompts based on the key information, inputting the target table region and the target text region into the document key information extraction model, and obtaining the document key information extraction result output by the document key information extraction model includes: The target table area and the prompt words in the table area are associated and input into the document key information extraction model to locate the cell corresponding to the key information field to be extracted in the target table area, extract the specific value, and generate the table extraction result; Based on the key information field to be extracted, relevant text slices corresponding to the target text region in the preset vector database are retrieved, and the relevant text slices are associated with the text region prompt words and input into the document key information extraction model to locate the specific text extraction value corresponding to the key information field to be extracted in the target text region based on semantic understanding, and generate text extraction results; The table extraction results and the text extraction results are combined to generate the document key information extraction results.
6. The document key information extraction method as described in claim 5, characterized in that, Before retrieving the relevant text slices corresponding to the target text region in the preset vector database based on the key information fields to be extracted, the method further includes: Invalid information in the target text area is removed, and based on the dynamic paragraph slicing strategy of the layout analysis model, the structure of the target text area after removing invalid information is identified to determine the structure of several headings and body paragraphs in the target text area. Take any of the titles and body paragraph structures as a whole slice unit, generate several initial text slices, and call the embedding algorithm to vectorize each of the initial text slices to generate several related text slices; Each of the related text slices and the original document location information corresponding to each of the related text slices are associated and stored in the preset vector database according to a preset format.
7. The document key information extraction method as described in claim 1, characterized in that, The step of verifying the completeness of the document key information extraction results and determining the target key information corresponding to the key information field to be extracted includes: The document key information extraction results are compared one by one with the key information fields to be extracted, and the covered fields with extracted specific values and the uncovered fields with no extracted specific values are marked. If no uncovered fields exist, the extraction result is considered complete, and the extracted document key information is used as the target key information. If there are uncovered fields, supplementary extraction prompts are generated for the uncovered fields. The target table area, the target text area, and the supplementary extraction prompts are then input into the document key information extraction model for supplementary extraction to obtain supplementary extraction results. The supplementary extraction results are cross-validated with the document key information extraction results to determine the target key information.
8. A document key information extraction device, characterized in that, include: The region acquisition module is used to acquire the document to be extracted and the key information fields to be extracted, and to divide the document to be extracted into the target table region and the target text region. The prompt word generation module is used to generate several key information extraction prompt words corresponding to the key information fields to be extracted, based on the target table area and the target text area. The model output module is used to extract prompt words based on each of the key information, input the target table area and the target text area into the document key information extraction model, and obtain the document key information extraction result output by the document key information extraction model; The integrity verification module is used to verify the integrity of the document key information extraction results and determine the target key information corresponding to the key information field to be extracted.
9. A document key information extraction device, characterized in that, The document key information extraction device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the document key information extraction method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that, The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, it implements the steps of the document key information extraction method as described in any one of claims 1 to 7.