Information extraction method, device and equipment for multi-source heterogeneous data

By analyzing the semantic and structural features of text units and combining graph clustering and multi-model collaborative information extraction, the problem of inaccurate text block segmentation is solved, and the completeness and accuracy of information extraction are improved.

CN121745084AActive Publication Date: 2026-03-27JINGBAN BEIJING EDUCATION CULTURE MEDIA CORP LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-24
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing text block segmentation methods lack collaborative perception of text structure features when processing documents with complex structural features, resulting in insufficient completeness and accuracy of information extraction.

Method used

By acquiring documents from multiple heterogeneous sources, the semantic and structural features of text units are parsed and calculated. Using graph clustering algorithms and comprehensive similarity correction, the texts are divided into multiple text blocks. Multi-model collaborative information extraction technology, including primary models and large language models, is then employed to extract information.

Benefits of technology

It significantly improves the accuracy of text block segmentation in documents with complex structural features, providing high-quality input for downstream information extraction tasks and enhancing the completeness and accuracy of information extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121745084A_ABST
    Figure CN121745084A_ABST
Patent Text Reader

Abstract

The invention provides an information extraction method, device and equipment for multi-source heterogeneous data, and the method comprises the steps: obtaining a to-be-processed document collected by multiple sources, analyzing the to-be-processed document, and obtaining the text data of the to-be-processed document; dividing the text data into a plurality of text units and calculating semantic features and structural features of each text unit; dividing each text unit into a plurality of text blocks based on the semantic vector and the structural feature of each text unit; and performing multi-model collaborative information extraction on each text block to obtain an information extraction result of the to-be-processed document. According to the method and the device, the semantic features and the structural features of the text units are simultaneously utilized to divide the text blocks, so that the accuracy of dividing the text blocks in the document with the complex structural features can be effectively improved, and high-quality input is provided for a downstream information extraction task.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of information extraction technology, and in particular to a method, apparatus and device for extracting information from multi-source heterogeneous data. Background Technology

[0002] Information extraction refers to the technology of automatically identifying and extracting specific types of information from unstructured or semi-structured text and transforming it into structured data. As one of the core tasks of natural language processing, information extraction is of vital importance for building knowledge graphs and realizing intelligent retrieval, and is a key link for enterprises and institutions to unlock the value of text data and improve the level of operational intelligence.

[0003] In the information extraction process, the document to be processed is typically first divided into multiple text units, then text blocks are formed based on the semantic similarity between adjacent text units, and finally, information extraction is performed on each text block. In this process, since text blocks are the direct carriers that define the semantic context, the accuracy of their segmentation directly determines the completeness and accuracy of subsequent information extraction. However, existing text block segmentation methods usually rely solely on the semantic similarity between adjacent text units, lacking a collaborative awareness of text structural features. This leads to errors in segmentation when processing documents with complex structural features, including cross-page content and table content, which seriously affects the completeness and accuracy of subsequent information extraction.

[0004] Therefore, how to effectively improve the accuracy of text block segmentation in documents with complex structural features, so as to provide high-quality input for downstream information extraction tasks, has become a key technical problem that needs to be solved by those skilled in the art. Summary of the Invention

[0005] In view of this, this disclosure proposes a method, apparatus and device for information extraction from multi-source heterogeneous data, which can effectively improve the accuracy of text block segmentation in documents with complex structural features, thereby providing high-quality input for downstream information extraction tasks.

[0006] According to a first aspect of this disclosure, a method for extracting information from multi-source heterogeneous data is provided, comprising: Acquire documents to be processed from multiple sources and parse the documents to be processed to obtain the main text data of the documents to be processed; The main text data is divided into multiple text units, and the semantic and structural features of each text unit are calculated. Based on the semantic vectors and structural features of each text unit, each text unit is divided into multiple text blocks; Multi-model collaborative information extraction is performed on each of the text blocks to obtain the information extraction results of the document to be processed.

[0007] In one possible implementation, the structural features of each text unit include at least one of the following: page information, table information, text format information, and basic language features.

[0008] In one possible implementation, when dividing each text unit into multiple text blocks based on the semantic vector and structural features of each text unit, the following is included: Based on the semantic vectors of each text unit, a semantic graph is constructed; The semantic graph is processed by a graph clustering algorithm to obtain multiple clusters, and the boundaries between the clusters are used as candidate block boundaries. The candidate block boundaries are corrected based on the semantic vectors and structural features of each text unit to obtain the final block boundaries; Based on the final block boundaries, each text unit is divided into multiple text blocks.

[0009] In one possible implementation, when correcting the candidate block boundaries based on the semantic vectors and structural features of each text unit to obtain the final block boundaries, the following steps are included: Traverse the boundaries of each candidate block; For the current candidate block boundary encountered during traversal, the text units located on both sides of the current candidate block boundary are obtained as the first text unit and the second text unit. Based on the semantic vectors and structural features of the first text unit and the second text unit, the semantic similarity and structural similarity of the first text unit and the second text unit are calculated. Based on the semantic similarity and structural similarity of the first text unit and the second text unit, the comprehensive similarity of the first text unit and the second text unit is calculated. Based on the comprehensive similarity and a preset segmentation threshold, it is determined whether the current candidate block boundary should be retained. After the traversal is complete, all candidate block boundaries that are retained will be used as the final block boundaries.

[0010] In one possible implementation, when performing multi-model collaborative information extraction on each of the text blocks to obtain the information extraction result of the document to be processed, the following steps are included: Calculate the topic type of each text block, and filter out multiple target text blocks based on the topic type of each text block; Calculate the complexity of each target text block, and schedule each target text block to a primary information extraction model or an LLM model for information extraction based on the complexity of each target text block, to obtain the information extraction result of each target text block; The information extraction results of each target text block are used as the information extraction results of the document to be processed.

[0011] In one possible implementation, after obtaining the information extraction results of each target text block, the method further includes: Obtain the topic type of each target text block, and obtain the validation rules that match the topic type; The information extraction results of each target text block are verified based on the verification rules that match the topic type to determine whether there are any abnormalities in the information extraction results of each target text block. If the information extraction results of each target text block are found to be abnormal, an abnormality report for each target text block is generated. Based on the anomaly reports of each target text block, the LLM model is driven to perform multiple rounds of interactive extraction to revise the information extraction results of each target text block.

[0012] In one possible implementation, after driving the LLM model to perform multiple rounds of interactive extraction based on anomaly reports of each target text block, the method further includes: Obtain anomaly repair information during multi-round interactive extraction; The anomaly repair information is added to the anomaly report of each target text block to obtain the information extraction report of each target text block; Based on the information extraction reports of each target text block, the semantic feature calculation algorithm, text block segmentation algorithm, and multi-model collaborative information extraction algorithm are optimized.

[0013] In one possible implementation, after obtaining the information extraction result of the document to be processed, the method further includes: A vector database and / or knowledge graph are constructed based on the information extraction results of the documents to be processed.

[0014] According to a second aspect of this disclosure, an information extraction apparatus for multi-source heterogeneous data is provided, comprising: The document parsing module is used to acquire documents collected from multiple sources and parse the documents to obtain the main text data of the documents to be processed. The feature extraction module is used to divide the main text data into multiple text units and calculate the semantic and structural features of each text unit; The text block segmentation module is used to divide each text unit into multiple text blocks based on the semantic vector and structural features of each text unit; The information extraction module is used to perform multi-model collaborative information extraction on each of the text blocks to obtain the information extraction result of the document to be processed.

[0015] According to a third aspect of this disclosure, an information extraction device for multi-source heterogeneous data is provided, comprising: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to execute the method described in the first aspect of this disclosure.

[0016] This disclosure provides a method, apparatus, device, and storage medium for information extraction from multi-source heterogeneous data. The method includes: acquiring documents to be processed collected from multiple sources and parsing the documents to obtain the main text data of the documents; dividing the main text data into multiple text units and calculating the semantic and structural features of each text unit; dividing each text unit into multiple text blocks based on the semantic vectors and structural features of each text unit; and performing multi-model collaborative information extraction on each text block to obtain the information extraction result of the document to be processed. In this disclosure, by simultaneously utilizing the semantic and structural features of text units for text block segmentation, the accuracy of text block segmentation in documents with complex structural features can be effectively improved, thereby providing high-quality input for downstream information extraction tasks.

[0017] Other features and aspects of this disclosure will become clear from the following detailed description of exemplary embodiments with reference to the accompanying drawings. Attached Figure Description

[0018] The accompanying drawings, which are included in and form part of this specification, illustrate exemplary embodiments, features, and aspects of this disclosure together with the specification and serve to explain the principles of this disclosure.

[0019] Figure 1 A flowchart illustrating an information extraction method for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Figure 2 A schematic block diagram of an information extraction apparatus for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Figure 3 A schematic block diagram of an information extraction device for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Detailed Implementation

[0020] Various exemplary embodiments, features, and aspects of this disclosure will now be described in detail with reference to the accompanying drawings. The same reference numerals in the drawings denote elements that have the same or similar functions. Although various aspects of the embodiments are shown in the drawings, they are not necessarily drawn to scale unless specifically indicated otherwise.

[0021] The term “exemplary” as used herein means “serving as an example, embodiment, or illustration.” Any embodiment illustrated herein as “exemplary” is not necessarily to be construed as superior to or better than other embodiments.

[0022] Furthermore, to better illustrate this disclosure, numerous specific details are set forth in the following detailed description. Those skilled in the art will understand that this disclosure can be practiced without certain specific details. In some instances, methods, means, components, and circuits well known to those skilled in the art have not been described in detail in order to highlight the main points of this disclosure.

[0023] <Method Implementation> Figure 1 A flowchart illustrating an information extraction method for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Figure 1 As shown, the method includes steps S1100-S1400.

[0024] S1100: Acquire the documents to be processed from multiple sources and parse them to obtain the main text data of the documents to be processed. The documents to be processed can be user-uploaded documents (e.g., PDF, Word, Excel documents) or documents obtained through web crawling; no specific limitation is made here.

[0025] When retrieving documents to be processed, new documents or pages can be automatically discovered by monitoring a specified folder or URL list, thereby automatically retrieving new documents to be processed.

[0026] After obtaining the document to be processed, it is parsed to obtain the document's main text data. This main text data includes the text, tables, and other content within the document. During parsing, an algorithm matching the document's format is used. For example, if the document is an image, an OCR algorithm (such as PaddleOCR or Tesseract) is used; if it's a PDF, Word, or Excel file, the corresponding document structure parsing algorithm is used; and if it's webpage content, a DOM algorithm is used.

[0027] After parsing the document to be processed and obtaining its main text data, the process also includes preprocessing operations such as unified encoding and data cleaning. Specifically, the parsed main text data can first be unified into UTF-8 encoding, and then preprocessing operations such as removing noise characters, duplicate characters, spaces, and newline characters from the UTF-8 format main text data can be performed to obtain high-quality main text data.

[0028] After parsing the main text data of the document to be processed, step S1200 can be executed to divide the main text data into multiple text units and calculate the semantic and structural features of each text unit. It should be noted here that for the text in the main text data, the text units will be divided according to sentences or short sentence groups; while for the tables in the main text data, the text units will be divided according to the table rows.

[0029] After dividing the main text data into multiple text units, the semantic and structural features of each text unit will be calculated. The following text unit will be used as an example to explain in detail the process of calculating its semantic and structural features.

[0030] When calculating the semantic features of text units, a pre-trained language model is used. Specifically, the pre-trained language model is used to encode the text units using embeddings, which yields fixed-dimensional embedding vectors. These embedding vectors represent the semantic features of the text units. The pre-trained language model can be BERT, RoBERTa, or a lightweight variant thereof; no specific limitation is made here.

[0031] When calculating the structural features of a text unit, the following steps are taken: obtaining at least one structural information from the page information, table information, text format information, and basic language features of the text unit, and using all of the above structural information as the structural features of the text unit.

[0032] The page information includes at least one of the following: the page number of the page containing the text unit and a region identifier within that page. The region identifier can be a header, footer, or body text. Determining the region identifier of the text unit within the page involves: obtaining the absolute coordinates of the text unit within the page (bounding box: minimum x_min, minimum y_min, maximum x_max, maximum y_max) and the total page size (including page height); extracting the minimum y_min from the absolute coordinates and extracting the page height from the total page size; calculating the ratio between the minimum y_min and the page height; determining the region identifier of the text unit as a header when the ratio falls within a first proportional height range from the top of the page; determining the region identifier of the text unit as a footer when the ratio falls within a second proportional height range from the top of the page; and determining the region identifier of the text unit as body text in other cases. The first and second proportional ratios can be set according to the actual positions of the header and footer on the page and are not specifically limited here. In a specific example, a text cell is located on page 3, with y_min = 50pt and page_height = 792pt (A4 standard). The ratio of y_min to page_height is 50 / 792 ≈ 6.3%, which falls within the top 10% height range of the page. Therefore, the page number of this text cell is 3 in the page information, and the area is identified as the header.

[0033] The table information includes at least one of the following: whether it is within a table (`in_table`: bool), the table number (`table_id`: str), the row and column indices (`row_idx`, `col_idx`: int), and whether the top, bottom, left, and right borders exist (`cell_borders`: dict). In a specific example, the table information for a text cell is `in_table=True, table_id=TBL-001, row_idx=2, col_idx=0`.

[0034] The text formatting information includes at least one of the following: font name (`font_name`, such as "SimSun", "Arial", etc.), font size (`font_size`, inpt), whether it is bold / italic (`is_bold` / `is_italic`), indentation (`indentation`, relative to the left margin, inpt), and bullet points or numbering (`list_marker`, such as "●", "1.", "a)", etc.). In a specific example, the text formatting information of a certain text cell is: font_size=10, is_bold=False, indentation=72pt, ist_marker="●".

[0035] The basic language features include at least one of the following: word count, average sentence length, lexical richness (e.g., Type-Token Ratio, TTR), part-of-speech distribution vector (pos_distribution, i.e., the ratio of nouns, verbs, and adjectives), and readability score (Flesch Reading Ease). In a specific example, the basic language features of a text unit are lexical_richness=TTR, lexical_richness= ,in, = [0.4, 0.3, 0.2] indicates that nouns account for 40%, verbs account for 30%, and adjectives account for 20% of the text unit.

[0036] After calculating the semantic and structural features of each text unit, step S1300 can be executed to divide each text unit into multiple text blocks based on its semantic vector and structural features. Specifically, this may include the following steps: S1310, Construct a semantic graph based on the semantic vectors of each text unit. Specifically, calculate the similarity between two adjacent text units based on their semantic vectors; construct a weighted undirected graph G=(V,E) using the semantic vectors of each text unit as nodes and the similarity between two adjacent text units as edge weights, where V represents the set of semantic vectors of all text units and E represents the semantic connection relationship between all adjacent text units; use this weighted undirected graph as the constructed semantic graph.

[0037] S1320 employs a graph clustering algorithm to process the semantic graph, resulting in multiple clusters (each cluster consists of multiple semantically highly related text units), and uses the boundaries between clusters as candidate block boundaries. The graph clustering algorithm used can be spectral clustering, label propagation, or the Louvain community detection algorithm; no specific limitation is made here.

[0038] S1330, Based on the semantic vectors and structural features of each text unit, the candidate block boundaries are corrected to obtain the final block boundaries. Specifically, this may include the following steps: S1331, traverse the boundaries of each candidate block.

[0039] S1332, for the current candidate block boundary that has been traversed, obtain the text units located on both sides of the current candidate block boundary as the first text unit and the second text unit; based on the semantic vectors and structural features of the first text unit and the second text unit, calculate the semantic similarity and structural similarity of the first text unit and the second text unit; based on the semantic similarity and structural similarity of the first text unit and the second text unit, calculate the comprehensive similarity of the first text unit and the second text unit; based on the comprehensive similarity and the preset segmentation threshold, determine whether the current candidate block boundary should be retained.

[0040] In one possible implementation, calculating the semantic similarity between the first text unit and the second text unit includes: obtaining the semantic vectors of the first text unit and the second text unit; calculating the similarity between the semantic vectors of the first text unit and the second text unit; and using the calculated similarity as the semantic similarity between the first text unit and the second text unit.

[0041] In one possible implementation, calculating the structural similarity between the first text unit and the second text unit includes: obtaining structural features of the first text unit and the second text unit; extracting page information of the first text unit and the second text unit from the obtained structural features, and calculating a first structural difference score between the two page information; extracting table information of the first text unit and the second text unit from the obtained structural features, and calculating a second structural difference score between the two table information; extracting text format information of the first text unit and the second text unit from the obtained structural features, and calculating a third structural difference score between the two text format information; extracting basic language features of the first text unit and the second text unit from the obtained structural features, and calculating a fourth structural difference between the two basic language features; and performing a weighted summation of the first structural difference score, the second structural difference score, the third structural difference score, and the fourth structural difference score, and using the weighted summation result as the structural similarity between the first text unit and the second text unit.

[0042] In an embodiment where the page information includes the page number of the page containing the text unit and the region identifier within that page, calculating the first structural difference score between the page information of the first text unit and the second text unit may include the following steps: Specifically, page numbers and region identifiers are extracted from the page information of the first and second text units, respectively. A page number change score is calculated: if the absolute value of the difference between two page numbers is less than or equal to 1 (i.e., the page numbers are the same or consecutive), the page number change score Δp = 0; otherwise, Δp = 1. A region identifier change score is calculated: if two region identifiers are the same, the region identifier change score Δz = 0; otherwise, Δz = 1. Then, the page number change score and the region identifier change score are weighted and summed to obtain the first structural difference score. The formula for calculating the first structural difference score is as follows: In the formula, Score the first structural difference. Score based on page number changes. Score for changes in regional identifiers. Assign weight to page number changes in the score. Weighting of regional identifier changes in the score. and The settings can be customized according to the specific application scenario. In one specific embodiment, it can be... Set to 0.4, Set it to 0.6.

[0043] In embodiments where the table information includes whether the text is within a table, the table number, and the row and column index, calculating the second structural difference score between the table information of the first text unit and the second text unit may include the following steps: Specifically, the table status, table number, and row / column index are extracted from the table information of the first and second text units, respectively. A score for changes in the table status is calculated: if one is in the table and the other is not, the score Δtable = 1; if both are in the table or neither is, then Δtable = 0. A score for changes in the table number is also calculated: if neither is in the table, or both are in the table but have the same table number, then the score Δnum = 0; if one is in the table and the other is not, or both are in the table but have different table numbers, then Δnum = 1. Calculate the row and column index change scores. If neither is within the table, the row and column index change score Δindex = 0; if one is within the table and the other is not, Δindex = 1; if both are within the table and belong to the same table number, further determine the continuity of the row and column indices: if the row indices are the same and the column indices are continuous (e.g., the absolute value of the difference in column indices is 1), or if the column indices are the same and the row indices are continuous (e.g., the absolute value of the difference in row indices is 1), then Δindex = 0; otherwise (i.e., both row and column indices are different or not continuous), Δindex = 1. Then, the table status change score, table number change score, and row and column index change score are weighted and summed to obtain the second structural difference score. The formula for calculating the second structural difference score is as follows: In the formula, Score the second structural difference. Score the status changes within the table. Scoring is given based on changes in table numbering. Score based on changes in row and column indices. The weighting of the scores for state changes within the table. Weighting of scores based on changes in table numbering. The weights for the score based on changes in row and column indices. , as well as The settings can be customized according to the specific application scenario. In one specific embodiment, it can be... Set to 0.3, Set to 0.4, Set it to 0.3.

[0044] In embodiments where text formatting information includes font size, bolding, indentation, and bullet points or numbering, the calculation of a third structural difference score between the text formatting information of the first and second text units includes: First, the font size is extracted from the text format information of the first and second text units, and the font size change rate between the two font sizes is calculated. The formula for calculating the font size change rate is as follows: In the formula, The font size change rate, The font size of the first text unit. The font size of the second text unit, It is the average of the font size of the first text unit and the font size of the second text unit.

[0045] Second, the text formatting information of the first and second text units is used to extract whether the text is bolded and to calculate the bolding state change score. Specifically, when the bolding states of the two text units are the same, the bolding state change score is calculated. When the bolding states of the two are inconsistent, the score for the change in bolding state is determined. 0.

[0046] Third, the indentation amount is extracted from the text formatting information of the first and second text units, and the indentation change rate between the two indentation amounts is calculated. The formula for calculating the indentation change rate is as follows: In the formula, The rate of change of indentation. This is the indentation amount for the first text unit. This is the indentation amount for the second text unit. It is the maximum value between the indentation of the first text unit and the indentation of the second text unit.

[0047] Fourth, extract bullet points or numbering from the text format information of the first and second text units respectively, and calculate the bullet point or numbering variation score. Specifically, if one unit has bullet points and the other does not, or if both units have bullet points but the bullet points are inconsistent, then the bullet point or numbering variation rate is calculated. If both have bullets and the bullets are identical, then the bullet or numbering conversion rate is... When one item has a project number and the other does not, or when both have project numbers but the project numbers are not consecutive (e.g., "1." → "3."), then the bullet or numbering conversion rate... When both have item numbers and the item numbers are consecutive, the bullet point or numbering conversion rate is... .

[0048] Fifth, by weighting and summing the scores for font size change rate, bolding status change, indentation change rate, and bullet point or numbering change, the third structural difference score between the text formatting information of the first and second text units can be obtained. The formula for calculating the third structural difference score is as follows: In the formula, Score the third structural difference. The font size change rate, To bold the score for state changes, The rate of change of indentation. For bullet point or numbering conversion rate, Weighting based on font size change rate. To bold the score weights for state changes, Weights for the rate of change of indentation. This refers to the weighting of the bullet point or numbering transformation rate. , , as well as The settings can be customized according to the specific application scenario. In one specific embodiment, it can be... Set to 0.1, Set to 0.2, Set to 0.15, Set it to 0.25.

[0049] In embodiments where basic language features include lexical richness (such as Type-Token Ratio, or TTR) and part-of-speech distribution vectors, the fourth structural difference score between the basic language features of the first and second text units is calculated based on the following formula: In the formula, For the fourth structural difference score, This is the part-of-speech distribution vector of the first text unit. This is the part-of-speech distribution vector of the second text unit. For the vocabulary richness of the first text unit, For the lexical richness of the second text unit, and The preset weighting coefficients can be set according to specific needs. In a specific embodiment, the weighting coefficients can be... Set to 0.3, Set it to 0.2.

[0050] After calculating the first structural difference score, the second structural difference score, the third structural difference score, and the fourth structural difference score, a weighted sum is taken to obtain the structural similarity between the first text unit and the second text unit.

[0051] After calculating the semantic and structural similarities of the first and second text units, a weighted sum of these similarities is performed to obtain the comprehensive similarity between the first and second text units. The formula for calculating the comprehensive similarity is as follows: In the formula, The semantic similarity between the first and second text units. The structural similarity between the first and second text units. and It is an adjustable weighting coefficient, with the initial value set according to the statistics of the target domain, and supports subsequent dynamic optimization.

[0052] After calculating the comprehensive similarity between the first text unit and the second text unit, based on the calculated comprehensive similarity and a preset segmentation threshold, it is determined whether to retain the current candidate block boundary. Specifically, if the comprehensive similarity is less than the segmentation threshold, the current candidate block boundary is retained; if the comprehensive similarity is greater than or equal to the segmentation threshold, the current candidate block boundary is canceled, i.e., the segmentation is canceled, and the clusters containing the first and second text units are merged.

[0053] In another possible implementation, when determining whether to retain the current candidate block boundary, in addition to considering the comprehensive similarity between the first text unit and the second text unit and the preset segmentation threshold, it is also necessary to consider the preset mandatory segmentation rules, which include mandatory retention and mandatory cancellation.

[0054] Specifically, when the overall similarity is less than the segmentation threshold, the process continues to determine whether the forced cancellation rule is met: if the forced cancellation rule is not met, the current candidate segment boundary is retained; if the forced cancellation rule is met, the current candidate segment boundary is forcibly cancelled, and the clusters containing the first and second text units are merged. The forced cancellation rule may include: 1) Cross-page interruption correction rule: the current candidate segment boundary is located at a page break point, and the semantic similarity between the first and second text units is higher than a preset threshold. When a semantic break is determined to be caused by physical pagination, the current candidate block boundary should be forcibly canceled, and the clusters containing the first and second text units should be merged. 2) Table structure consistency rule: If the first and second text units on both sides of the current candidate block boundary belong to the same table structure, even if the semantic similarity is low, the integrity of the table rows should be maintained first to avoid cross-row erroneous cutting. By introducing the forced cancellation rule, unnecessary breaks of semantic units caused by the physical layout or inherent structural features of the document can be effectively avoided. This ensures that content with inherent logical connections (such as consecutive paragraphs across pages or data rows within the same table) can still be retained in the same text block even under local semantic fluctuations, thereby significantly improving the structural and semantic integrity of the text block. This provides input units with more complete context and more coherent logic for downstream information extraction tasks, ultimately improving the accuracy and recall of key information extraction.

[0055] When the overall similarity is greater than or equal to the segmentation threshold, the mandatory retention rule is further determined: if the mandatory retention rule is not met, the current candidate block boundary is canceled, and the clusters containing the first and second text units are merged; if the mandatory retention rule is met, the current candidate block boundary is forcibly retained. The mandatory retention rules include: 1) Format abrupt change reinforcement rule: if the first and second text units on both sides of the current candidate block boundary exhibit format jumps such as bold / italic font changes, abrupt paragraph indentation changes, or bullet point starts, and the semantic similarity is lower than the threshold... 1) Enhance the segmentation confidence of the current candidate boundary and force it to be retained as a valid block boundary; 2) Title proximity priority rule: If a text unit is immediately followed by a paragraph identified as a "title" and its semantics are significantly different from the preceding text, it is regarded as the starting point of a new logical block and the segmentation is retained first to conform to human reading habits; 3) Column layout spanning rule: For multi-column formatted documents, if the first text unit and the second text unit are located in different columns but have highly similar semantics, they are regarded as a continuation of the same semantic unit, the segmentation is canceled, and logical misjudgment is prevented due to visual separation. By introducing the aforementioned mandatory retention rules, we can effectively identify and retain potential semantic boundaries implied by document layout, logical structure, or human reading habits. Even if adjacent text units are semantically similar, we can enforce segmentation based on strong structural signals such as format changes, heading guidance, or column layout. This ensures that different logical blocks (such as chapter transitions, topic switching, and multi-column content continuation) are correctly separated during text segmentation, avoiding the incorrect merging of semantically similar but logically independent texts. This further improves the structural rationality and semantic accuracy of text block division, providing clearer input units that better conform to the actual organizational logic of the document for downstream information extraction tasks.

[0056] S1333, the traversal ends, and all candidate block boundaries that are determined and retained are used as the final block boundaries.

[0057] S1340, based on the final block boundaries, divides each text unit into multiple text blocks.

[0058] After dividing the text into multiple blocks, step S1400 can be executed to perform multi-model collaborative information extraction on each text block, thereby obtaining the information extraction results of the document to be processed. The multi-model in this disclosure includes a primary model and a large language model.

[0059] This primary model is a dedicated model for structured extraction (such as a lightweight model based on CRF, Span Extraction, or SequenceLabeling). This primary model is responsible for extracting information from low-complexity text blocks, and its output information extraction result is a set of structured fields, specifically including the output items shown in Table 1.

[0060] Table 1 The output of the above items from the basic model is in the form of a structured JSON array. In a specific example, the information extraction result of a certain text block output by this basic model is shown below: [{ "field_type": "contract_amount", "value": "¥1,500,000.00", "position": {"page": 2, "x": 100, "y": 320}, "context": "The total contract amount is RMB 1,500,000". "confidence": 0.92, "entity_type": "MONEY", "in_table": false }] This large language model (LLM model) is responsible for extracting information from highly complex text blocks. Leveraging its deep semantic understanding and multi-turn interactive reasoning capabilities for complex scenarios, the LLM model can accurately extract information from highly complex text blocks. The information extraction results output by this large language model include the output items shown in Table 2.

[0061] Table 2 The above output items of the large language model are output in the form of text. After output, they need to be converted into a structured JSON array with the same format as the primary model output by a post-processing module (such as JSON Schema constraints and regular expression extraction) so that they can be aligned with the information extraction results output by the primary model.

[0062] In one possible implementation, the process of extracting multi-model collaborative information from each text block may include the following steps: S1410: Calculate the topic type of each text block and select multiple target text blocks based on their topic types. Specifically, first, a pre-trained language model is used to embedding and encode each text block to obtain its feature vector. Then, the feature vectors of each text block are analyzed using an LDA topic model or a FastText classifier to obtain its topic type. The topic type includes at least one of legal documents, financial documents, and medical diagnostic documents. Finally, text blocks whose topic type matches the topic type of the information to be extracted (hereinafter referred to as the current topic type) are selected as target text blocks for the next information extraction.

[0063] S1420: Calculate the complexity of each target text block, and schedule each target text block to the primary information extraction model or the LLM model for information extraction based on the complexity of each target text block, so as to obtain the information extraction result of each target text block.

[0064] In one possible implementation, the complexity of the target text block can include at least one of semantic complexity and keyword density. Semantic complexity measures the complexity of the semantic content of the target text block, i.e., the overall difficulty of the target text block in terms of sentence structure, lexical richness, and information density. Keyword density reflects the presence of frequently occurring keywords related to the current topic type (such as terms, indicators, and target fields) in the target text block, and is an important reference for judging the value of information extraction.

[0065] Taking a target text block as an example, calculating the semantic complexity of the target text block can include the following steps: First, calculate the average sentence length, lexical richness, entity density, and other indicators of the target text block; then, perform a weighted sum of the average sentence length, lexical richness, entity density, and other indicators to obtain the semantic complexity of the target text block. .

[0066] Taking a target text block as an example, calculating the keyword density of the target text block can include the following steps: First, segment the target text block into words; then, obtain a keyword library built for the current topic type, which records all keywords related to the current topic type; next, match the segmentation results of the target text block with the keywords in the keyword library to obtain the keywords included in the target text block; finally, use the TF-IDF algorithm to perform weighted statistics on the keywords in the target text block to obtain the keyword density of the target text block, and normalize the calculated keyword density to... The formula for calculating keyword density is shown below: In the formula, Keyword density, Let be the weight of the i-th keyword in the target text block. Let be the frequency of the i-th keyword in the target text block.

[0067] After calculating the complexity of each target text block, it can be scheduled to either a primary information extraction model or an LLM model for information extraction based on its complexity, thus obtaining the information extraction results for each target text block. Specifically, first, a complexity threshold corresponding to the current topic type is obtained; then, for each target text block, it is determined whether the complexity of the target text block is less than the complexity threshold: if it is less than the complexity threshold, the target text block is scheduled to the primary information extraction model for information extraction; if it is greater than or equal to the complexity threshold, the target text block is scheduled to the LLM model for information extraction.

[0068] The complexity of the target text block includes semantic complexity. and keyword density In the embodiments, the complexity threshold corresponding to the current topic type includes a semantic complexity threshold. and keyword density threshold In terms of semantic complexity of the target text block Less than the semantic complexity threshold And keyword density Less than the keyword density threshold If the target text block is relatively simple, it can be directly assigned to the primary information extraction model for information extraction. This relates to the semantic complexity of the target text block. Greater than or equal to the semantic complexity threshold and / or keyword density Greater than or equal to the keyword density threshold In this case, the target text block will be directly scheduled to the LLM model for information extraction.

[0069] S1430, the information extraction results of each target text block are used as the information extraction results of the document to be processed.

[0070] The multi-model collaborative information extraction process described above can significantly improve the efficiency and accuracy of information extraction, enabling intelligent optimization of computing resource allocation. Specific beneficial effects include: First, by evaluating both semantic complexity and keyword density, the system can accurately distinguish between simple and complex text blocks. For content with simple semantics and low keyword density, a lightweight, primary model is prioritized for processing, avoiding the high computational costs and time overhead of calling large models for all content. This achieves efficient allocation of computing resources and significantly improves the overall system throughput.

[0071] Second, for text blocks with complex semantics or rich in key information, the system automatically schedules them to the more powerful LLM for deep extraction. With its powerful semantic understanding and reasoning capabilities, LLM can more accurately handle complex sentence structures, technical terms, and implicit logic, thereby significantly improving the accuracy and recall of key information extraction and effectively avoiding the omission or false extraction of important information.

[0072] Third, by setting an adaptive complexity threshold related to the topic type, the system can adjust the scheduling strategy according to the characteristics of different topic type documents (such as legal contracts with many long sentences and financial reports with dense indicators), making model selection more targeted and enhancing the robustness and adaptability of the system in different application scenarios.

[0073] In one possible implementation, to improve the accuracy of information extraction from each target text block, a verification operation will be performed on the information extraction results, regardless of whether the information extraction results are extracted by the primary model or by the LLM model. Specifically, this includes the following steps: First, the topic type of each target text block is obtained, along with the corresponding validation rules. Specifically, the topic type of each target text block needs to be obtained first (the method for obtaining this type is described above and will not be repeated here). To improve validation accuracy, the system has pre-configured specific validation rules for documents with different topic types. Therefore, after determining the topic type of the target text block, the system can call the matching validation rules for validation. These validation rules include at least one of the following: format consistency rules, field integrity rules, logical constraint rules, and semantic consistency rules, all set for a specific topic type. The rule definitions, examples, and technical implementation paths for each rule type are shown in Table 3.

[0074] Table 3 Second, the information extraction results of each target text block are validated based on validation rules matching the topic type to determine if any anomalies exist. If no anomalies are found, the current information extraction result of each target text block can be directly output as the final information extraction result. If anomalies are found, an anomaly report is generated for each target text block. The anomaly report includes at least one of the following: anomaly type, anomaly fields, anomaly description, anomaly location information, and remedial suggestions.

[0075] The following example, using the information extraction results from a procurement contract, further illustrates the process of verifying the information extraction results and generating anomaly reports. In this example, the information extraction results from the procurement contract are shown below: { "doc_type": "purchase_contract", "fields": { "party_A": "A certain technology company", "party_B": "Zhang San", "subject_matter": "server device", "total_price": "¥1,500,000.00", "sign_date": "January 1, 2024", "payment_method": "installment" } } The verification process for the extracted information is shown in Table 4: Table 4 The final anomaly report output after the above four anomaly checks is shown below: Final output exception report: { "status": "abnormal", "errors": [ {"type": "missing_field", "field": "payment_stages"}, {"type": "semantic_incomplete", "detail": "payment_method='stage'but no stage info"} ], "suggestion": "Please re-extract paragraph 4 regarding the payment arrangements." } In one possible implementation, the remediation suggestions in the anomaly report are generated based on at least one of the following: anomaly type, detection rules, anomaly fields, anomaly description, location information, and a remediation suggestion template matching the anomaly type. Specifically, a remediation suggestion template matching each anomaly type is pre-defined. After parsing the anomaly report, the matching remediation suggestion template is first obtained based on the anomaly type. Then, the matching remediation suggestion template is populated based on the detection rules, anomaly fields, anomaly description, and location information to obtain the corresponding remediation suggestion.

[0076] In one possible implementation, the remediation suggestion templates built for each exception type and examples of filling in each remediation suggestion template are shown below: 1. Missing field exception: Template: "Please extract the missing [abnormal field name] from [location information]". Example: If the anomaly report indicates that the "Payment Period" field is missing in "Paragraph 4", the generated remedial suggestion is "Please extract the missing payment period from Paragraph 4". 2. Format error exception (format_error): Template: "[Field Name]'[Current Value]' format does not conform to the specification ([Specification Description]), please extract and correct it to the correct format according to the [Location Information]". Example: If the anomaly report indicates that the value "1 million yuan" in the "Amount" field is missing a currency symbol, while the specification requires "currency symbol", the generated remedial suggestion is "The format of the amount '1 million yuan' does not conform to the specification (currency symbol is required). Please extract and correct it to the correct format according to paragraph 3". 3. Logical contradiction exception (logic_conflict): Template: "A logical contradiction was detected between [Field A]'[Value A]' and [Field B]'[Value B]' ([Contradiction Description]). Please reconfirm the values ​​of both based on the [Location Information]." Example: If an anomaly report indicates a time discrepancy between the "Effective Date" of "January 1, 2024" and the "Termination Date" of "December 31, 2023", the generated remedial suggestion is: "A logical contradiction was detected between the Effective Date 'January 1, 2024' and the Termination Date 'December 31, 2023' (the Termination Date must not be earlier than the Effective Date). Please reconfirm the values ​​of both dates in conjunction with paragraph 2." 4. Semantic inconsistency exception (semantic_drift): Template: "The extracted result [field name]'[current value]' has an inconsistent semantics with the original text. Please re-parse the context and correct it based on the [location information]". Example: If the anomaly report indicates that the value of the "Party A" field is "Zhang San", but "Zhang San" appears in the "Party B Representative" paragraph in the original text, the generated remedial suggestion is "The extracted result of Party A 'Zhang San' is inconsistent with the semantics of the original text. Please re-parse the context according to paragraph 1 and correct it." Fourth, based on the anomaly reports of each target text block, the LLM model is driven to perform multiple rounds of interactive extraction to revise the information extraction results of each target text block.

[0077] Specifically, to achieve efficient context inheritance and problem focus, the system constructs a serialized Prompt recursive structure based on remedial suggestions. This structure organizes multi-round interactions into an ordered, task-driven iterative process. Its core lies in sequentially processing each remedial suggestion in the exception report and initiating an independent, state-aware sub-interaction process for each suggestion, until the exception corresponding to that suggestion is completely eliminated or the termination condition is met. The specific implementation steps are as follows: First, the anomaly report of the target text block is parsed, and the multiple remedial suggestions are sorted according to priority or logical dependency to form an ordered queue to be processed.

[0078] Secondly, iterate through each remedial suggestion in the queue. For the current remedial suggestion, initiate an independent multi-round interactive sub-process. This sub-process, based on the output and verification results of the previous round, dynamically generates a targeted prompt based on the current remedial suggestion. It iterates until any of the termination conditions specified in Table 5 is met, at which point the iteration of the current sub-process terminates, and the process continues to traverse the next remedial suggestion, initiating a new multi-round interactive sub-process based on the same mechanism. This continues until the processing results of all remedial suggestions meet the termination conditions, at which point the multi-round interaction stops.

[0079] Table 5 Through the aforementioned serial recursive mechanism, the system achieves step-by-step decomposition and precise repair of complex anomaly reports, ensuring that each remedial suggestion receives full and controlled interactive processing, thereby systematically improving the integrity and reliability of information revision.

[0080] The above-mentioned serial recursive mechanism can significantly improve the accuracy of information extraction in the following scenarios: 1) Long text cross-paragraph reference (e.g., "the above-mentioned company" requires tracing back to the previous text); 2) Nested clause structure (e.g., "If A occurs, then B applies; but if C exists at the same time, then D takes precedence"); 3) Clarification of ambiguous statements (e.g., "the relevant expenses shall be determined by the negotiation between the two parties" → the negotiation result needs to be inquired).

[0081] The following example will further illustrate the multi-turn interaction process. The specific multi-turn interaction flow is shown in Table 6.

[0082] Table 6 To avoid context bloat and information loss, the following mechanisms are introduced into the above serialized recursive mechanism: 1) Context compression: The summary model is used to compress the previous dialogue history (i.e., the output and verification results of the previous round), retaining key decision-making basis and correction path, and reducing redundant information input; 2) Focus guidance: Each round of Prompt clearly marks "only XX question needs to be answered this time", limiting the LLM output range and preventing model divergence; 3) Error backtracking: If a field is corrected in a subsequent round, the system marks its "correction path" and feeds it back to the scheduling strategy module to optimize the subsequent model call threshold.

[0083] In one possible implementation, besides initiating a multi-round interaction process of the LLM model when the target text block verification fails, the following situations will also trigger the multi-round interaction process of the LLM model: 1) When the confidence level of the primary model's extraction of the key field is less than the preset confidence threshold, it indicates that the primary model's extraction result of the key field has high uncertainty, and the LLM needs to intervene to clarify; 2) When the length of the target text block exceeds the preset length, multi-round interaction needs to be initiated to ensure extraction accuracy; 3) When the user marks that there are high-frequency missing fields in the current topic type document, the multi-round interaction mode will be automatically activated for the current topic type document to actively fill in the common missing information in the current topic type document.

[0084] In one possible implementation, after driving the LLM model to perform multiple rounds of interactive extraction based on anomaly reports of each target text block, the following steps may also be included: First, obtain anomaly repair information during multi-round interactive extraction. It should be noted that during the multi-round interactive extraction process, LLM will perform anomaly repair based on remedial suggestions and record anomaly repair information. This anomaly repair information includes at least one of the following: whether the anomaly was repaired, the repair content, and the repair path.

[0085] Second, the anomaly repair information is added to the anomaly report of each target text block to obtain an information extraction report for each target text block. This information extraction includes at least one of the following: anomaly type, anomaly fields, anomaly description, anomaly location information, remedial suggestions, whether the anomaly has been repaired, repair content, and repair path.

[0086] Third, based on the information extraction reports of each target text block, the semantic feature calculation algorithm, text block segmentation algorithm, and multi-model collaborative information extraction algorithm are optimized. Specifically, this includes the following steps: First, the information extraction reports of each target text block are summarized to construct the information extraction report of the document to be processed.

[0087] Secondly, the information extraction report of the document to be processed is sent to the scheduling center and pushed to the user for review and revision. Review and revision information is recorded and stored in the fine-tuning database according to the anomaly type. Specifically, after the information extraction report of the document to be processed is sent to the scheduling center, it is pushed and displayed to the user. The user can view the information extraction report of the document to be processed and review the repair content of each abnormal field in the information extraction report. During the review process, for abnormal fields with incorrect repair content or abnormal fields not repaired by the LLM model, the user can manually modify the field value and / or format of the abnormal field using the editable label set for that abnormal field. Here, "format" refers to the modification made by the user to the representation of the field value itself, that is, the adjustment of its standardized expression method without changing the semantics. It does not involve document layout or style, but rather ensures that the extraction results meet the requirements of structured and standardized output. After the modifications are completed, for each corrected anomaly field, the model's revision information for each anomaly field is recorded. This revision information includes the model's initial output for that anomaly field (see the information extraction results of the initial model and LLM model), the field value and / or format manually modified by the user for that anomaly field, and the modification timestamp and user ID (for subsequent auditing and quality assessment). The revision information for each anomaly field is stored in a fine-tuning database according to anomaly type. This fine-tuning database stores various revision information generated during the information extraction process, categorized by anomaly type.

[0088] Next, to avoid the waste of resources and the risk of model drift caused by frequent fine-tuning, it is first determined whether each anomaly type meets the preset fine-tuning conditions. Under the condition of judging the preset fine-tuning conditions, the semantic feature calculation algorithm, text block segmentation algorithm and multi-model collaborative information extraction algorithm are optimized based on the revision information corresponding to the anomaly types stored in the fine-tuning database.

[0089] In one possible implementation, the preset fine-tuning conditions are as follows: (1) Single correction threshold rule (single sample): If the original confidence level of the correction field is lower than (e.g., 0.6) and the difference before and after correction is significant (e.g., the numerical change exceeds 10%, or the semantic type changes), it is marked as a high-priority sample. If the correction field belongs to a key business field (e.g., "penalty", "effective date", "responsible person"), it is automatically included in the fine-tuning candidate pool.

[0090] (2) Batch cumulative triggering rules (multi-sample aggregation): When a certain type of error sample accumulates to a set number (e.g., N ≥ 10) within a certain time window (e.g., 24 hours), a lightweight online fine-tuning task is triggered; at the same time, it supports weighted statistics by document type and user permission level, and prioritizes responding to feedback from high-frequency errors or expert users.

[0091] (3) Model stability detection: Before online fine-tuning, the system will check the stability indicators of the current model version (such as the average sampling accuracy in the past 7 days, drift coefficient, etc.); if the current model is in a stable period and there are enough corrected samples, the update is allowed; otherwise, it will be suspended and manual review will be prompted.

[0092] In one possible implementation, when optimizing the semantic feature calculation algorithm, text block segmentation algorithm, and multi-model collaborative information extraction algorithm based on the revision information corresponding to the anomaly types stored in the fine-tuning database, the following steps are included: First, identify the types of anomalies that meet the fine-tuning criteria.

[0093] Secondly, the root causes of errors corresponding to the exception types are determined. Specifically, based on the revision information corresponding to the exception types stored in the fine-tuning database, the root causes of errors corresponding to each type of exception are determined. The exception types, root causes of errors, and their calculation processes for each type of rule are as follows: 1. Format consistency rules Anomaly type: The field format does not match the preset target specification. For example, the date field is required to be in the format "YYYY-MM-DD", but the model output is "MM / DD / YYYY".

[0094] Root cause of the error: The root cause of this anomaly is that the semantic feature calculation algorithm does not capture the semantic and pattern features of a specific domain or format accurately enough, and fails to effectively associate the correct format pattern with the corresponding contextual semantic features.

[0095] Calculation process: The root cause of the error is calculated based on the revision information for this exception type, which is a coherent data processing flow. Extracting revision differences: First, extract the standard format (denoted as F_std) after manual correction by the user and the non-standard format (denoted as F_model) of the initial output of the model from the revision information.

[0096] Calculate pattern bias: Next, perform pattern parsing on F_model and F_std (such as using regular expression matching, analyzing delimiters, etc.) and calculate the quantization difference between the two in terms of structural patterns (denoted as D_format).

[0097] Associating semantic features: Then, backtrack the original text paragraph corresponding to F_model and its semantic feature vector. Analyze the negative correlation between D_format and the embedding confidence of relevant pattern keywords in the paragraph. If the calculation shows a significant correlation, the root cause of the error is ultimately determined to be a deficiency in the feature representation level of the semantic feature calculation algorithm.

[0098] 2. Field Integrity Rules Anomaly type: The information extraction report shows missing key fields, such as the "total amount" field that should be present in the contract, which was not extracted.

[0099] Root cause of the error: This anomaly is mainly due to the text block segmentation algorithm potentially inappropriately cutting text that should belong to the same semantic unit into different blocks, or the segmentation granularity being too coarse / too fine, causing key information to be isolated or omitted in non-key blocks.

[0100] Calculation process: Based on the revision information, trace the root cause of the missing fields by following these steps: Locating missing fields: Identify missing fields from the revision information of user-added content, and accurately locate the text position of the correct value of the field in the original document (denoted as Pos_correct).

[0101] Analyze the segmentation results: Retrieve the text block segmentation results from the original document processing, and check the content and boundaries of the text block (denoted as Block_correct) where the Pos_correct position is located and its adjacent blocks.

[0102] Determining Segmentation Errors: Analyze whether the semantic topic of `Block_correct` explicitly covers the missing field. If the analysis reveals that the contextual information of this field is fragmented across multiple blocks, or if the topic of `Block_correct` does not contain this information, calculate the key information isolation index (denoted as `I_isolate`) caused by improper segmentation. When `I_isolate` exceeds a preset threshold, the root cause of the error is determined to be an improper strategy in the text block segmentation algorithm.

[0103] 3. Logical constraint rules Exception type: There is a contradiction in business logic between multiple extracted field values, such as "contract termination date" being earlier than "contract effective date".

[0104] Root cause of the error: The root cause of this anomaly is that the multi-model collaborative information extraction algorithm failed to effectively apply or strictly verify the preset business logic constraints when coordinating the extraction results of relevant fields by different models (such as the initial rule model and the large language model), resulting in logically inconsistent results being adopted.

[0105] Calculation process: Logical conflicts are analyzed through revised information; the specific steps are as follows: Identify logical conflict pairs: Filter out field pairs (denoted as (Field_A, Field_B)) from the revision information where the user has corrected at least one of the values ​​and there is a predefined logical relationship (such as time sequence or numerical size).

[0106] Track model output: Extract the initial model output values ​​(V_A_model, V_B_model) and the large language model output values ​​(V_A_llm, V_B_llm) for this field pair recorded in the revision information.

[0107] Analyze collaborative failures: Check whether the values ​​of (V_A_model, V_B_model) and (V_A_llm, V_B_llm) satisfy the logical constraints. If either set violates the constraints, but the multi-model collaborative algorithm still adopts the result, calculate the severity of the logical violation (denoted as S_violation). When S_violation is high, the root cause of the error is determined to be a failure of the logic verification module of the multi-model collaborative algorithm or an unreasonable weight allocation of the model results.

[0108] 4. Semantic Consistency Rules Anomaly type: refers to different expressions of the same entity or concept that are extracted as inconsistent values ​​in the document. For example, the name of Party A is expressed consistently throughout the document, but is identified as two different variants.

[0109] Error root cause: This anomaly may be caused by two reasons: First, the vector representation generated by the semantic feature calculation algorithm fails to distinguish different surface representations of the same entity accurately enough, resulting in similarity calculation deviation; Second, the text block segmentation algorithm splits the text representing the same entity into different blocks, resulting in incomplete contextual information and affecting the model's semantic disambiguation ability.

[0110] Calculation process: To determine the root cause of consistency errors, the following coherent analysis needs to be performed: Clustering inconsistent representations: First, from the revision information, all different original model output values ​​that have been corrected by users to the same standard value are classified into a sample group with "same semantics, multiple representations".

[0111] Calculate semantic dispersion: For the sample group, calculate the semantic feature vector of the text corresponding to each original output value, and then calculate the average distance or dispersion of these vectors in the feature space (denoted as D_semantic).

[0112] Perform attribution analysis: Simultaneously, examine whether these different original expressions originate from text blocks that have been segmented into different or fragmented contexts. If the analysis shows a large D_semantic and significant contextual differences between text blocks, the root cause may be a combination of insufficient discriminative power of the semantic feature calculation algorithm and contextual gaps caused by the text block segmentation algorithm. If D_semantic is large but the text blocks have highly similar contexts, the primary root cause can be identified as the semantic feature calculation algorithm.

[0113] Next, we determine which algorithm module from the semantic feature calculation algorithm, text block segmentation algorithm, and multi-model collaborative information extraction algorithm corresponds to the root cause of the error. Specifically, based on the analysis of the root causes of the above-mentioned anomalies, we can further map the root cause of the error to the specific algorithm module that needs parameter optimization. The correspondence is as follows: First, if the root cause of the error is determined to be that the semantic feature calculation algorithm is not accurate enough in capturing and identifying specific formats, patterns, or entity semantics, then the corresponding optimization target is the semantic feature calculation algorithm module, and the specific parameters that need to be adjusted are the model parameters of the language model (i.e., the Embedding model) used to calculate semantic feature vectors.

[0114] Secondly, if the root cause of the error is determined to be an improper segmentation strategy of the text block segmentation algorithm, resulting in the fragmentation of semantic units, information omission, or incomplete context, then the corresponding optimization target is the text block segmentation algorithm module. The specific parameters that need to be adjusted are the key parameters of the graph clustering algorithm, mainly including: the semantic similarity segmentation threshold τ, the resolution parameter γ of the community detection algorithm, and the context window size w.

[0115] Finally, if the root cause of the error is determined to be the failure of the multi-model collaborative information extraction algorithm in the coordination, selection, or logic verification stages, then the corresponding optimization target is the multi-model collaborative information extraction algorithm module, and the specific parameters that need to be adjusted are the complexity threshold and keyword density threshold of the control model collaboration strategy.

[0116] Finally, based on the revision information of the anomaly types that meet the fine-tuning conditions, the parameters of the corresponding algorithm modules are adjusted.

[0117] For the semantic feature calculation algorithm module, the parameters that need to be adjusted are the model parameters of the language model (i.e., the embedding model) that performs semantic feature vector calculation. The specific adjustment method is as follows: A lightweight online fine-tuning approach is adopted, freezing the parameters of the first N-1 layers of the pre-trained language model, and only unfreezing the last fully connected layer or pooling layer. Based on the revision information of anomaly types, positive example (semantically coherent segments that should be merged) and negative example (segments with significant semantic differences) sample pairs are constructed. Mini-batch gradient updates are performed by contrastively learning a loss function (such as Triplet Loss) to enhance the model's accuracy in determining semantic boundaries within the domain.

[0118] For the text block segmentation algorithm, the parameters that need to be adjusted are those of the graph clustering algorithm mentioned above, including: the semantic similarity segmentation threshold τ, the resolution parameter γ of the community detection algorithm, and the context window size w. When adjusting these parameters based on revision information for anomaly types that meet the fine-tuning conditions, the specific adjustment process is as follows: When users frequently merge two or more adjacent text blocks manually to correct incomplete field information or semantic breaks caused by excessive text segmentation, it indicates that the current segmentation granularity is too fine. The semantic similarity segmentation threshold τ should be lowered to relax the algorithm's requirements for semantic similarity between blocks, thereby reducing unnecessary segmentation, improving the granularity of block segmentation, and promoting the retention of semantically coherent text within the same block. In revisions where user feedback indicates that texts belonging to different topics or entities are incorrectly clustered into the same large text block, leading to information confusion, this suggests that the current clustering results are too coarse-grained. The resolution parameter γ of the community detection algorithm should be increased. This would require a higher degree of tightness in the connections within communities, thus promoting the splitting of larger, looser communities into more numerous and tightly connected smaller communities, achieving finer-grained and more accurate clustering. When users adjust text block boundaries to incorporate key contextual information (such as modifiers and related clauses) into the same text block to eliminate ambiguity and ensure local semantic coherence, it indicates that the current algorithm does not adequately consider the scope of context when judging local semantic coherence. The context window size *w* should be increased to allow the algorithm to consider a wider range of neighboring text information when calculating text unit similarity or making segmentation decisions. This would enhance the algorithm's ability to judge local semantic coherence and avoid erroneous segmentation due to an excessively small window.

[0119] For multi-model collaborative information extraction algorithms, the parameters that need to be adjusted are the complexity threshold and keyword density threshold mentioned above. When adjusting the complexity threshold and keyword density threshold based on revision information of anomaly types that meet the fine-tuning conditions, a systematic analysis and adjustment process is included, with the specific steps as follows: First, data extraction and issue aggregation. From the abnormal revision information that triggered fine-tuning conditions, revision records related to "logical constraint rules" and "field integrity rules" were separated. For "logical constraint rules" records, logically contradictory field pairs, the initial output values ​​of each model, and the user's final corrected values ​​were extracted. For "field integrity rules" records, the correct location of missing fields in the original text and their context were identified.

[0120] Secondly, parameter orientation analysis and threshold adjustment. Based on the data collected above, orientation analysis and adjustments were performed on the two thresholds respectively: 1. Adjustment of the complexity threshold: Analyze all abnormal records of "logical constraint rules" and count the proportion of documents or text blocks initially judged as "low complexity" by the algorithm. If this proportion is significantly higher than the preset confidence interval, it indicates that the current threshold setting is too high, causing a large number of texts with implicitly complex logic to be misjudged as simple text, thus circumventing the more stringent collaborative verification process. Therefore, the complexity threshold should be systematically reduced so that the algorithm can identify more potentially complex texts and guide them to a multi-model deep collaboration and logic verification process, thereby fundamentally reducing logical contradiction errors.

[0121] 2. Adjustment of Keyword Density Threshold: Analyze all abnormal records in the "Field Integrity Rule" and check the correct context for each missing field. Calculate the density of core keywords relevant to the business domain within that context using a keyword extraction algorithm. If the analysis reveals that the keyword density of a large number of missing fields is near or slightly below the current threshold, it indicates that the current threshold may be too strict, causing some important but less keyword-dense areas to be ignored. Therefore, the keyword density threshold should be appropriately lowered to expand the algorithm's sensitivity to key information areas. Conversely, if the analysis reveals that the algorithm's currently marked "high-density areas" contain a large amount of irrelevant information or redundant content, the threshold needs to be increased to improve the accuracy and efficiency of information extraction.

[0122] Through the data-driven analysis process described above, the decision parameters of the multi-model collaborative information extraction algorithm can be precisely calibrated based on actual error feedback, thereby optimizing the model collaboration strategy and improving the overall accuracy and robustness of information extraction.

[0123] In one possible implementation, after obtaining the information extraction results from the document to be processed, the method further includes: constructing a vector database and / or a knowledge graph based on the information extraction results from the document to be processed. Specifically, this may include the following steps: First, the text content in the information extraction results is vectorized. A pre-trained semantic model is used to embedding the text content of each text block or key field, generating corresponding semantic vector representations. These vectors, along with their corresponding original text and field metadata, are stored in a vector database to form a vectorized index that supports similarity retrieval.

[0124] Secondly, a knowledge graph is constructed based on the entity and relationship information extracted from the information extraction results. The system identifies entity objects and their attributes from the structured extraction results, and extracts the relationships between entities according to the semantic relationships between fields or the preset domain relationship template, transforming this information into standard triples. Subsequently, the system performs consistency checks on the triples to eliminate ambiguity in entity referencing, and imports them into the graph database to complete the construction or updating of the knowledge graph.

[0125] Then, a joint retrieval mechanism combining the vector database and the knowledge graph is implemented. The system designs and implements a hybrid query interface, supporting simultaneous semantic similarity retrieval of the vector database and structured relational queries of the knowledge graph. It also performs relevance fusion and ranking of the results from both retrieval paths, providing users with unified retrieval results that combine semantic flexibility and relational accuracy. Specifically, 1) Vector similarity score. Calculation: 1) Convert the user query statement into an embedding vector, and then calculate the cosine similarity between this vector and the embedding vectors of each text block in the vector database; 2) Graph relation matching score Calculation: After the user inputs a natural language query, the system parses it into a potential graph path (e.g., "find all contracts signed by Zhang San" → `(person: Zhang San)-[:signed]->(contract)`); it then uses a graph database (e.g., Neo4j, JanusGraph) to execute a SPARQL or Cypher query, returning relevant entities and their paths; based on factors such as path length, entity coverage, and semantic matching, a comprehensive score is awarded. 3) The multimodal composite score is calculated using a weighted fusion method. The specific calculation formula is as follows: = +(1- ) In the formula, ∈0,1 are weight parameters that can be dynamically adjusted according to the query type (semantic-based / structure-based). 4) Based on multimodal comprehensive score The search results are sorted and fed back.

[0126] Finally, a closed loop for data updates and optimization is established. When a new document is processed or a user corrects the extraction results, the system automatically triggers an incremental update process for the vector index and knowledge graph, ensuring that the stored data remains consistent with the latest information extraction results. Furthermore, by collecting user feedback on the search results, the semantic model and retrieval ranking algorithm are continuously optimized. Specifically, this includes the following steps: 1) Query intent recognition: Using an intent classifier to determine whether the current query is biased towards semantic understanding (e.g., "What are the clauses regarding breach of contract liability?") or structural relationships (e.g., "List the projects Li Si participated in?"); automatically adjusting... 1) Weighting values ​​to make the ranking more aligned with user intent. 2) Contextual feedback mechanism: If a user clicks on a result, the system records their action and re-evaluates the result's original score; if a high ranking but low click-through rate indicates an unreasonable ranking, the system will adjust the weighting coefficients. The intent classifier is retrained; if the user modifies or labels certain results, the system includes them in the feedback sample pool for subsequent graph updates and ranking optimization. 3) Multi-source result fusion and ranking: Results from the vector database and the graph database are ranked separately; the Learning to Rank (L2R) algorithm is used to fuse and rank the two sets of results, with the goal of minimizing the ranking error; the ranking model can be trained in Pointwise or Pairwise mode, using user behavior logs as supervision signals.

[0127] This disclosure provides a method for information extraction from multi-source heterogeneous data, including: acquiring documents to be processed collected from multiple sources and parsing the documents to obtain the main text data of the documents; dividing the main text data into multiple text units and calculating the semantic and structural features of each text unit; dividing each text unit into multiple text blocks based on the semantic vectors and structural features of each text unit; and performing multi-model collaborative information extraction on each text block to obtain the information extraction result of the document to be processed. In this disclosure, by simultaneously utilizing the semantic and structural features of text units for text block segmentation, the accuracy of text block segmentation in documents with complex structural features can be effectively improved, thereby providing high-quality input for downstream information extraction tasks.

[0128] <Device Embodiment> Figure 2 A schematic block diagram of an information extraction apparatus for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Figure 2 As shown, the device 100 includes: The document parsing module 110 is used to acquire documents collected from multiple sources and parse them to obtain the main text data of the documents to be processed. The feature extraction module 120 is used to divide the main text data into multiple text units and calculate the semantic and structural features of each text unit; The text block segmentation module 130 is used to divide each text unit into multiple text blocks based on the semantic vector and structural features of each text unit; The information extraction module 140 is used to perform multi-model collaborative information extraction on each text block to obtain the information extraction results of the document to be processed.

[0129] <Equipment Example> Figure 3 A schematic block diagram of an information extraction apparatus for multi-source heterogeneous data according to an embodiment of the present disclosure is shown. Figure 3 As shown, the information extraction device 200 for multi-source heterogeneous data includes a processor 210 and a memory 220 for storing executable instructions of the processor 210. The processor 210 is configured to implement any of the aforementioned information extraction methods for multi-source heterogeneous data when executing the executable instructions.

[0130] It should be noted here that the number of processors 210 can be one or more. Furthermore, the information extraction device 200 for multi-source heterogeneous data in this embodiment may also include an input device 230 and an output device 240. The processors 210, memory 220, input device 230, and output device 240 can be connected via a bus or other means, without specific limitations here.

[0131] The memory 220, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and various modules, such as the program or module corresponding to the information extraction method for multi-source heterogeneous data in this embodiment of the present disclosure. The processor 210 executes various functional applications and data processing of the information extraction device 200 for multi-source heterogeneous data by running the software program or module stored in the memory 220.

[0132] Input device 230 can be used to receive input digital numbers or signals. These signals may include key signals related to user settings and function control of the device / terminal / server. Output device 240 may include a display device such as a screen.

[0133] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, and are not limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical applications, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A method for extracting information from multi-source heterogeneous data, characterized in that, include: Acquire documents to be processed from multiple sources and parse the documents to be processed to obtain the main text data of the documents to be processed; The main text data is divided into multiple text units, and the semantic and structural features of each text unit are calculated. Based on the semantic vectors and structural features of each text unit, each text unit is divided into multiple text blocks; Multi-model collaborative information extraction is performed on each of the text blocks to obtain the information extraction results of the document to be processed.

2. The method according to claim 1, characterized in that, The structural features of each text unit include at least one of the following: page information, table information, text format information, and basic language features.

3. The method according to claim 1, characterized in that, When dividing each text unit into multiple text blocks based on its semantic vector and structural features, the process includes: Based on the semantic vectors of each text unit, a semantic graph is constructed; The semantic graph is processed by a graph clustering algorithm to obtain multiple clusters, and the boundaries between the clusters are used as candidate block boundaries. The candidate block boundaries are corrected based on the semantic vectors and structural features of each text unit to obtain the final block boundaries; Based on the final block boundaries, each text unit is divided into multiple text blocks.

4. The method according to claim 3, characterized in that, When correcting the candidate block boundaries based on the semantic vectors and structural features of each text unit to obtain the final block boundaries, the process includes: Traverse the boundaries of each candidate block; For the current candidate block boundary encountered during traversal, the text units located on both sides of the current candidate block boundary are obtained as the first text unit and the second text unit. Based on the semantic vectors and structural features of the first text unit and the second text unit, the semantic similarity and structural similarity of the first text unit and the second text unit are calculated. Based on the semantic similarity and structural similarity of the first text unit and the second text unit, the comprehensive similarity of the first text unit and the second text unit is calculated. Based on the comprehensive similarity and a preset segmentation threshold, it is determined whether the current candidate block boundary should be retained. After the traversal is complete, all candidate block boundaries that are retained will be used as the final block boundaries.

5. The method according to claim 1, characterized in that, When performing multi-model collaborative information extraction on each of the text blocks to obtain the information extraction result of the document to be processed, the following steps are included: Calculate the topic type of each text block, and filter out multiple target text blocks based on the topic type of each text block; Calculate the complexity of each target text block, and schedule each target text block to a primary information extraction model or an LLM model for information extraction based on the complexity of each target text block, to obtain the information extraction result of each target text block; The information extraction results of each target text block are used as the information extraction results of the document to be processed.

6. The method according to claim 5, characterized in that, After obtaining the information extraction results for each of the target text blocks, the process also includes: Obtain the topic type of each target text block, and obtain the validation rules that match the topic type; The information extraction results of each target text block are verified based on the verification rules that match the topic type to determine whether there are any abnormalities in the information extraction results of each target text block. If the information extraction results of each target text block are found to be abnormal, an abnormality report for each target text block is generated. Based on the anomaly reports of each target text block, the LLM model is driven to perform multiple rounds of interactive extraction to revise the information extraction results of each target text block.

7. The method according to claim 6, characterized in that, After driving the LLM model to perform multiple rounds of interactive extraction based on the anomaly reports of each target text block, the method further includes: Obtain anomaly repair information during multi-round interactive extraction; The anomaly repair information is added to the anomaly report of each target text block to obtain the information extraction report of each target text block; Based on the information extraction reports of each target text block, the semantic feature calculation algorithm, text block segmentation algorithm, and multi-model collaborative information extraction algorithm are optimized.

8. The method according to claim 1, characterized in that, After obtaining the information extraction results of the document to be processed, the process also includes: A vector database and / or knowledge graph are constructed based on the information extraction results of the documents to be processed.

9. An information extraction device for multi-source heterogeneous data, characterized in that, include: The document parsing module is used to acquire documents collected from multiple sources and parse the documents to obtain the main text data of the documents to be processed. The feature extraction module is used to divide the main text data into multiple text units and calculate the semantic and structural features of each text unit; The text block segmentation module is used to divide each text unit into multiple text blocks based on the semantic vector and structural features of each text unit; The information extraction module is used to perform multi-model collaborative information extraction on each of the text blocks to obtain the information extraction result of the document to be processed.

10. An information extraction device for multi-source heterogeneous data, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to implement the method of any one of claims 1 to 8 when executing the executable instructions.

Citation Information

Patent Citations

  • Abnormal event attribution method and system based on LLM deep semantic feature extraction

    CN121117855A

  • Systems and methods for semantic search scoping

    US20250061139A1

  • Systems and methods for enhancing search using semantic search results

    US20250061140A1