A query state-aware retrieval augmentation generation method for knowledge base text table mixed documents

CN122903439APending Publication Date: 2026-10-13QILU UNIVERSITY OF TECHNOLOGY (SHANDONG ACADEMY OF SCIENCES) +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611406265.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-11
Publication Date
2026-10-13

AI Technical Summary

Technical Problem

[0008]针对现有知识库文本表格混合文档检索增强生成方法主要面向纯文本内容设计,难以准确保持表格字段、数值、单位及行列位置之间的结构化对应关系,导致语义相关但字段数值匹配不准确的问题;同时,现有方法通常采用固定检索路径或多通道固定并发方式,难以根据用户查询中的语义解释需求、结构定位需求和数值运算需求动态选择检索通道,容易造成检索策略错配、无效通道调用和关键证据遗漏;此外,整表输入或固定范围截取方式难以兼顾表格证据的结构完整性与输入规模控制,容易出现无关内容过多或必要表头、行头、单位字段及关联数值缺失的问题,本发明提供了一种面向知识库文本表格混合文档的查询状态感知检索增强生成方法

Benefits of technology

本发明通过分别构建语义内容索引、结构约束索引和数值定位索引,使知识库文本表格混合文档中的文本语义、表格结构和数值位置能够被分别建模和协同检索,避免单纯文本切块和语义相似度检索导致的字段错位、时间错位、单位错用和数值误召回问题,提高表格字段与数值匹配的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122903439A_ABST
    Figure CN122903439A_ABST
Patent Text Reader

Abstract

The application relates to a query state-aware retrieval enhancement generation method for a knowledge base text table mixed document, and belongs to the technical fields of artificial intelligence, natural language processing, information retrieval, structured data processing and retrieval enhancement generation. The application can make the text semantics, table structure and numerical position in the knowledge base text table mixed document be respectively modeled and cooperatively retrieved by constructing a semantic content index, a structure constraint index and a numerical positioning index; meanwhile, the application constructs a closed-loop retrieval process of "query state modeling-gate scheduling-candidate recall-quality detection-backup remedy-feedback update"; in addition, the application can reduce irrelevant row and column inputs while retaining multi-level table headers, row header entities, time fields, unit fields and associated operation cell by seed numerical cell determination, structure path recovery, local table evidence adaptive expansion and reverse clipping, so that the structural integrity and input size control of the table evidence can be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of artificial intelligence, natural language processing, information retrieval, structured data processing, and retrieval enhancement generation technology. Specifically, it relates to a method for achieving traceable question answering for mixed text and table documents in a knowledge base through query state modeling, multi-retrieval channel scheduling, and local table evidence generation. Background Technology

[0002] With the development of large language models, knowledge base question answering systems, and retrieval enhancement generation technologies, the ability to efficiently retrieve and reliably generate enterprise business documents, financial statements, research reports, policy documents, and industry data has become a crucial foundational capability for intelligent knowledge service systems. Existing retrieval enhancement generation methods typically retrieve evidence content relevant to the user's query from external knowledge bases and input this evidence content into a large language model to generate an answer, thereby improving the accuracy and traceability of the generated results. In engineering practice, existing knowledge base retrieval systems primarily process unstructured text, typically employing word segmentation, paragraph segmentation, or fixed-length block processing to handle documents, and calculating the semantic similarity between the query and candidate text blocks using text embedding models.

[0003] However, in real-world knowledge base scenarios, many documents simultaneously contain unstructured text, structured tables, and semi-structured tables. Text primarily relies on words, sentences, and paragraph context to express continuous semantics, while tables rely on header hierarchy, row header entities, cell coordinates, field-to-value correspondences, time fields, unit fields, and row-column topological relationships to express structured information. If these mixed text and table documents are still uniformly segmented and vectorized using the same plain text approach, it's easy to break headers, row headers, unit fields, and value cells into different text blocks, disrupting the original field-to-value binding relationships within the table.

[0004] Existing technologies often process table content by converting the entire table to text, splitting it by row and column, splitting cells, or truncating to a fixed range. While these methods are usable in simple table scenarios, they struggle with multi-level headers, merged cells, cross-row / column layouts, irregular formats, and long tables. Although plain text semantic models can determine if the query and candidate content are semantically similar, they cannot determine whether candidate values ​​simultaneously satisfy structural constraints such as entity, indicator, time, unit, and row / column position. For example, when a user queries a company's annual revenue, the system might recall content containing similar words such as company name, year, and revenue. However, this value may not be located in the row containing the target company, the column containing the target indicator, or the field corresponding to the target year, easily leading to semantically related but structurally mismatched results.

[0005] Meanwhile, different queries have different requirements for retrieval methods. Text interpretation queries mainly rely on semantic retrieval, while table numerical queries mainly rely on structural constraints and numerical positioning. Complex queries such as comparisons, growth rates, proportions, or sorting require the participation of multiple related numerical values. Existing systems typically use fixed retrieval paths or fixed concurrency across all channels, lacking a unified gating and scheduling mechanism based on query status. This can easily lead to retrieval strategy mismatches, invalid channel calls, duplicate candidate results, and increased overall retrieval latency.

[0006] Furthermore, existing methods for extracting tabular evidence struggle to balance structural integrity with input size control. Inputting the entire table introduces a large amount of irrelevant rows and columns, increasing model input length and inference overhead. While fixed-range truncation can reduce input size, it's difficult to adaptively determine the local tabular evidence range based on the entities, metrics, time, units, and computational relationships required by the query. This can easily lead to omissions of necessary table headers, row headers, unit fields, or related values, resulting in structural misunderstandings, misuse of values, or incomplete computational input during subsequent generation.

[0007] Therefore, in the scenario of enhanced generation of mixed text and table documents in knowledge bases, existing technologies still have problems such as the difficulty in ensuring correct matching of table fields and values ​​in pure text semantic retrieval, the difficulty in adapting fixed retrieval paths to different query states, and the difficulty in balancing structural integrity and input scale control in the extraction of local table evidence. There is an urgent need for a query state-aware enhanced retrieval generation method and system for mixed text and table documents in knowledge bases, so as to realize dynamic scheduling of multiple retrieval channels, collaborative retrieval of structural constraints and numerical positioning, and adaptive extraction of query-related local table evidence, thereby improving the retrieval accuracy, operating efficiency and generation credibility of mixed document question answering. Summary of the Invention

[0008] To address the issue that existing methods for enhancing the generation of mixed text and table documents in knowledge bases are primarily designed for plain text content, making it difficult to accurately maintain the structured correspondence between table fields, values, units, and row and column positions, resulting in semantically relevant but inaccurate field value matching; furthermore, existing methods typically employ fixed search paths or multi-channel fixed concurrency, making it difficult to dynamically select search channels based on the user's semantic interpretation, structural positioning, and numerical calculation needs, easily leading to search strategy mismatch, invalid channel calls, and omission of key evidence; in addition, whole-table input or fixed-range truncation methods struggle to balance the structural integrity of table evidence with input size control, easily resulting in excessive irrelevant content or missing necessary table headers, row headers, unit fields, and associated values. This invention provides a query-state-aware enhancement method for generating mixed text and table documents in knowledge bases.

[0009] The present invention adopts the following technical solution: A query-state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents includes: Step S1: Perform unified parsing on the text-table mixed documents in the knowledge base, identify unstructured text content, table structure information, numerical cells and their row and column coordinate relationships, and establish the source association relationship between text content and table content; Step S2: Based on the parsing results of the text-table hybrid document, construct the semantic content index, structural constraint index, and numerical location index respectively; Step S3: Receive the natural language query input by the user, perform semantic parsing and query requirement identification on the query content, and obtain a query feature set; the query feature set includes semantic requirement features, structural constraint features, numerical positioning features, and query complexity features; calculate the semantic retrieval requirement score, structural constraint retrieval requirement score, and numerical positioning retrieval requirement score based on the query feature set, and generate a query state vector according to each retrieval requirement score; Step S4: Based on the query state vector and the historical retrieval quality, expected execution latency, task load, candidate redundancy rate and query constraint coverage of each retrieval channel, perform gating scheduling on the semantic retrieval channel, structural constraint retrieval channel and numerical positioning retrieval channel, determine the immediate activation state, delayed trigger state or closed state of each retrieval channel, and dynamically allocate candidate recall budget. Step S5: Drive the retrieval channel in the immediately activated state to perform candidate recall, obtain candidate text fragments, candidate structure matching results and candidate numerical cells; when the candidate recall results do not meet the preset retrieval quality conditions, reduce the retrieval quality evaluation of the corresponding retrieval channel, trigger the retrieval channel in the delayed trigger state or the backup retrieval strategy, and reallocate the remaining candidate recall budget. Step S6: Based on the degree of matching between the candidate numerical cells and the entities, indicators, time, units and operation relationships in the user query, determine one or more seed numerical cells to form a seed set. Starting from the seed set, restore the multi-level column headers, row header entities, time fields, unit fields and related operation cells corresponding to various sub-numerical cells, and construct the candidate structure association path between the seed set and the structure fields. Step S7: Calculate the local table evidence expansion score based on the impact of candidate expansion content on structural integrity, query constraint coverage, operation relationship completion, topological continuity, and input size control, and form candidate local table evidence based on the dynamic expansion threshold; perform field integrity, operation integrity, table header integrity, and row header integrity checks on the candidate local table evidence; stop expansion when the candidate local table evidence meets the integrity requirements and the marginal benefit of continued expansion is lower than the preset threshold. Step S8: Perform reverse pruning on the candidate local table evidence after stopping expansion. While maintaining the integrity of query constraints and local table evidence, delete redundant cells, redundant rows, redundant columns or low-relevance structural areas to generate minimum sufficient local table evidence. Step S9: Convert candidate text fragments, candidate structure matching results, and minimum sufficient local table evidence into a unified evidence object, and perform conflict verification, complementary evaluation, redundancy suppression, and fusion rearrangement. Step S10: Input the optimized evidence set after fusion and rearrangement into the large language model to generate a traceable answer corresponding to the user query.

[0010] According to a preferred embodiment of the present invention, in step S1, when performing structural parsing on the table area, each cell is represented as a cell object, and the cell object is used to describe the content attributes, position attributes, and structural association attributes of the table area; The table structure information is used to describe the hierarchical relationship, positional relationship and semantic relationship between cells in the table. The table structure information includes table title information, table header hierarchy information, row header entity information, indicator field information, cell content information, cell type information, cell two-dimensional coordinate information, merged cell relationship information, time field information, unit field information and relationship information between cells. The cell object includes raw content, normalized content, row coordinates, column coordinates, rowspan, colspan, cell type, table identifier (table_id), and source location (source_pos). Here, `raw` represents the actual text or numerical content of the cell in the original document; `norm` represents the information obtained after formatting, text cleaning, numerical standardization, or unit conversion of the original content; `row` and `col` represent the two-dimensional position of the current cell in its table; `rowspan` and `colspan` represent the merged area covered by the current cell; `type` represents the category of the current cell in the table structure, including header cells, column header cells, row header cells, time field cells, unit field cells, numerical cells, text description cells, and blank cells; `table_id` distinguishes different table objects; and `source_pos` records the source information of the current cell in the original document, including document number, page number, table number, and region position.

[0011] In a further preferred embodiment, in step S1, the numerical cell refers to the data cell in the table used to represent specific numerical information; the two-dimensional positional relationship is determined according to the row coordinates row and column coordinates col corresponding to the numerical cell, and the structural association relationship between the numerical cell and the entity, indicator, time and unit is established by combining the indicator field corresponding to the column, the entity information corresponding to the row, and the associated time field and unit field.

[0012] In a further preferred embodiment, in step S1, the source association between the text content and the table content is established through document location mapping and semantic association; when parsing the text area and the table area, the source location source_pos of the text paragraph and the table object is recorded at the same time, and the association is established based on the table reference description in the text content, the table title information, and the positional relationship between the text and the table in the document.

[0013] According to a preferred embodiment of the present invention, in step S2, the semantic content index... Semantic features used to describe text content and table descriptions include text paragraph vectors, table title vectors, table summary vectors, field description vectors, and text-table association vectors. Text paragraph vectors are vector representations obtained by semantically encoding ordinary text paragraphs in a document, used to support semantic matching of text content. Table title vectors are vector representations obtained by encoding table names or topic descriptions, used to locate tables related to the query topic. Table summary vectors are table-level semantic representations generated based on the overall table content, field information, and data range. Field description vectors are vector representations obtained by encoding indicator descriptions, field explanations, or annotations in the table. Text-table association vectors are vector representations obtained by encoding information in the text area that references, explains, or describes the table content. The structural constraint index Used to describe the entities, fields, and structural relationships within a table, including entity indexes, metric indexes, time indexes, unit indexes, header-level indexes, row header entity indexes, and row and column coordinate association indexes; Entity indexes are used to record the names of objects in a table and establish the association between entities and their corresponding data ranges; indicator indexes are used to record statistical indicator fields in a table; time indexes are used to record year, month, or time range fields; unit indexes are used to record the units of measurement corresponding to numerical values; header hierarchy indexes are used to record the hierarchical relationships between multi-level headers; row header entity indexes are used to record the entity objects corresponding to each data row; and row and column coordinate association indexes are used to record the positional relationship between a cell and its row and column structure. The numerical positioning index This section describes the location of numerical cells in a table and their associated semantic information, including normalized values, value type, unit, absolute row and column coordinates, table identifier, associated row header entity, associated column header indicator, associated time field, and adjacent cell topology. Normalized values ​​refer to the numerical representation after standardizing the format of the original values. Value type indicates whether the value belongs to an integer, decimal, percentage, amount, proportion, or date / time type. Unit records the unit of measurement corresponding to the value. Absolute row and column coordinates record the specific location of the numerical cell in the original table. Table identifier identifies the table object to which the value belongs. Associated row header entity represents the data object corresponding to the value. Associated column header indicator represents the statistical field corresponding to the value. Associated time field indicates the time range to which the value belongs. Adjacent cell topology describes the positional relationship between the numerical cell and surrounding table headers, row headers, and associated data cells.

[0014] According to a preferred embodiment of the present invention, in step S3, the natural language query input by the user is represented as a query feature set. : ;in, This represents semantic demand features, used to describe the degree of user demand for text explanation, concept understanding, and background information acquisition in a query. This represents structural constraint features, used to describe the degree of constraint on entities, indicator fields, time information, unit information, and table structure relationships in user queries; This indicates numerical positioning features, used to describe the degree of user demand for locating numerical cells, comparing numerical values, performing calculations and analyses, and linking data across rows and columns in a query. This indicates query complexity characteristics, used to describe the number of constraints, the number of relationships, and the overall processing complexity of the query. Natural language processing methods are used to segment user input queries, identify entities, extract keywords, and perform semantic analysis. First, entity objects, indicator fields, time ranges, and unit information in the query statement are identified. Then, numerical conditions in the query are obtained through numerical expression identification, and comparison relationships, calculation requirements, and entity association relationships in the query are determined based on comparison words, operation words, and related words. The query features are each normalized to form a query feature set. .

[0015] More preferably, in step S3, based on the query feature set Determine the semantic retrieval requirement score Structural constraint retrieval requirement score and numerical location retrieval requirement score ; in, It indicates the degree to which the current query requires semantic retrieval information, and is used to measure the degree to which a user query relies on understanding text content, conceptual explanations, and obtaining background information; This indicates the degree to which the current query requires structural constraint information, and is used to measure the degree to which the user query depends on entities, indicator fields, time information, unit information, and table structure relationships; This indicates the degree to which the current query requires numerical location information, and is used to measure the degree to which a user's query relies on numerical cell location, numerical comparison, calculation analysis, and table relationships. Among them, semantic retrieval demand score Structural constraint retrieval requirement score and numerical location retrieval requirement score All are determined based on the corresponding query features; specifically, this includes: a set of query features. Semantic demand features in Structural constraint characteristics Sum of numerical location features Normalization has been performed, and the value range is [value range missing]. Therefore, they are respectively used as scores for the corresponding search requirements: ; ; ; in, , and These represent the basic requirements of the semantic retrieval channel, the structural constraint retrieval channel, and the numerical positioning retrieval channel, respectively.

[0016] Further preferred embodiments include introducing joint constraint relationships between query features to correct the semantic retrieval requirement score, structural constraint retrieval requirement score, and numerical positioning retrieval requirement score; including: Among them, the joint constraint between entity and indicator fields is used to represent the relationship between the query object and the target indicator; the joint constraint between indicator fields and time information is used to represent the relationship between indicator data and time range; the joint constraint between numerical operation and time field is used to represent the relationship between calculation requirements and time conditions; comparison relationship and cross-row and cross-column relationship are used to represent the structural relationship requirements in complex table queries; The joint constraint relationship is determined based on the co-occurrence of query elements and semantic dependencies; when entities and indicators, indicators and time, and computational requirements and time conditions appear simultaneously and have a clear relationship, the corresponding joint constraint is determined; when the comparison relationship involves multiple row and column fields, cross-row and cross-column joint constraints are determined; when joint constraints exist, the corresponding retrieval requirement score is improved; otherwise, no correction is made.

[0017] Further preferred, in step S3, the semantic retrieval requirement score is... Structural constraint retrieval requirement score and numerical location retrieval requirement score After normalization, the query status weights corresponding to each retrieval channel are obtained: ; ; ; in, The query status weight of the semantic retrieval channel indicates the degree of demand for the semantic retrieval channel in the current query. The query status weight of the structural constraint retrieval channel indicates the degree of demand for the structural constraint retrieval channel in the current query. The query status weight of the numerical positioning retrieval channel indicates the degree of demand for the numerical positioning retrieval channel in the current query; among which, , and The values ​​of are all in the range [0,1], and satisfy: ; Construct a query state vector based on the query state weight. : ; in, This represents the query complexity correction factor, used to characterize the impact of comparison relationships, numerical computation requirements, cross-row and cross-column association requirements, and overall complexity in user queries on retrieval channel scheduling, candidate recall budget allocation, and the scope of local table evidence expansion; query complexity factor The value range is [0,1].

[0018] According to a preferred embodiment of the present invention, in step S4, the first Overall performance score of each retrieval channel for: ; in, Indicates the first The query status weight of each retrieval channel Indicates the first Historical search quality of each search channel Indicates the query constraint coverage capability. Indicates the expected execution delay. Indicates the current task load. Indicates the candidate redundancy rate; When using the semantic retrieval channel, This refers to the query status weight. When searching for structural constraints, This refers to the query status weight. When using numerical positioning for retrieval, This refers to the query status weight. ; Indicates the first Historical search quality of each search channel; Indicates the first The query constraint coverage capability of each retrieval channel; Indicates the first The estimated execution latency for each retrieval channel; Indicates the first The current task load of each retrieval channel; Indicates the first The candidate redundancy rate of each retrieval channel; among which... , , , , , These represent the corresponding adjustment coefficients, used to adjust the influence of query status weight, historical retrieval quality, query constraint coverage, expected execution latency, task load, and candidate redundancy rate on the overall performance score; The retrieval channel refers to the first... The semantic retrieval channel, the first The first structural constraint retrieval channel or the first Numerical location retrieval channels; when At that time, the first The first search channel is set to "Activate Immediately" to immediately start the second search. One search channel; when and At that time, the first Each retrieval channel is set to delayed trigger state; when and At that time, the first The first search channel is set to off, and the second search channel is closed. There are several search channels; among them... Indicates the activation threshold. Indicates the delayed trigger threshold. and The values ​​of are all in the range [0,1], and satisfy . ; No. Activation status of each retrieval channel Represented as: , indicating an immediately activated state; This indicates a delayed trigger state; , indicates the closed state; wherein, the retrieval channel in the delayed trigger state does not perform candidate recall before being triggered, and only when the candidate recall results of the activated retrieval channel do not meet the preset retrieval quality conditions, wherein the preset retrieval quality conditions are used to determine whether the candidate results returned by the activated retrieval channel meet the current user's query requirements, including one or more of the following: the degree of semantic matching between the candidate results and the user's query, the degree of satisfaction of query constraints, the number of valid candidates, and the completeness of evidence.

[0019] According to a preferred embodiment of the present invention, in step S5, the retrieval channel in an immediately activated state is driven to perform candidate recall, obtaining candidate text fragments, candidate structure matching results, and candidate numerical cells; including: The semantic retrieval channel, which is in an immediately activated state, performs similarity matching in the semantic content index based on the semantic features of the user's query text, retrieves text paragraphs, table titles, field descriptions, and text table association descriptions that are semantically related to the user's query, and forms candidate text fragments. The structure constraint retrieval channel, which is in an immediately active state, matches the entities, indicators, time, units, table header level, row header entities, and row and column coordinate relationships in the user query in the structure constraint index to determine the entities, fields, time information, unit information, and corresponding table structure relationships that meet the query constraints, and forms candidate structure matching results. The numerical positioning retrieval channel, which is in an immediately activated state, locates numerical cells that meet the conditions in the numerical positioning index based on the numerical conditions, comparison relationships, calculation requirements, and association relationships in the user's query. It then combines the corresponding row header entity, column header indicator, time field, unit field, and adjacent cell relationships to form candidate numerical cells. Among them, candidate text fragments are used to provide semantic explanation information related to the query; candidate structure matching results are used to provide information on table fields, entity relationships and structural constraints; and candidate numerical cells are used to provide precise numerical evidence and its associated contextual information.

[0020] In a further preferred embodiment, in step S5, after the retrieval is executed, the real-time retrieval quality is calculated based on the average relevance, actual constraint coverage, proportion of newly added information, candidate duplication rate, and actual execution latency. : ; Updated historical quality for: ; in, Represents average correlation, and represents actual constraint coverage. Indicates the proportion of newly added information. Indicates the candidate duplication rate. Indicates the actual execution delay. Indicates the historical smoothing coefficient; Indicates the first The historical search quality of each search channel in the previous round of query process; When any activated retrieval channel returns no candidate recall results, the average relevance is lower than the relevance threshold, the constraint coverage is lower than the constraint coverage threshold, the candidate duplication rate is higher than the candidate duplication rate threshold, or the execution latency threshold, the historical retrieval quality of that activated retrieval channel is reduced. This triggers the search channel or backup search strategy that is in a delayed trigger state, and reallocates the unused candidate recall budget to other available search channels; Candidate recall results refer to the candidate text fragments, structural information, and numerical cell information returned by each retrieval channel based on the user's query; The relevance threshold, constraint coverage threshold, candidate repetition rate threshold, and execution latency threshold all have values ​​in the range of [0,1]. Among them, historical retrieval quality evaluation value Used to indicate the first The overall retrieval performance of each retrieval channel during the historical query process.

[0021] According to a preferred embodiment of the present invention, in step S6, candidate numerical cells Seed rating for: ; in, Indicates the entity matching score. Indicates the indicator matching score. Indicates the time matching score. Indicates the unit matching score. Indicates the numerical matching score. The calculation supports a score; to The weight coefficients represent the different matching factors, which are used to adjust the influence of entity matching, indicator matching, time matching, unit matching, numerical matching, and operational relationship matching in the seed selection process.

[0022] Preferably, in step S7, the local tabular evidence expansion score of candidate expanded content v is... for: in, Indicates the benefit of structural completion. This indicates that the query constraint covers the benefits. This indicates the benefit of completing the operational relationship. Represents the topological continuity gain. Indicates the cost of expansion. to Indicates the adjustment coefficient; The structural completion benefit characterizes the completion effect of candidate extended content on table headers, row headers, time fields, and unit fields; the query constraint coverage benefit characterizes the new coverage effect of candidate extended content on entity, indicator, time, and unit constraints; the operation relationship completion benefit characterizes the completion effect of candidate extended content on the numerical values ​​required for comparison, difference, growth rate, ratio, summation, and sorting; the topological continuity benefit characterizes the path or structural relationship between candidate extended content and current local table evidence in the same row, same column, adjacent, same header, or same structure; the extension cost is determined based on the degree of irrelevance of candidate extended content to the user query, the degree to which it crosses blank rows or columns or the boundaries of unrelated merged cells, the topological distance between it and current local table evidence, the degree of content redundancy, and the cost of increased input size.

[0023] Preferably, a dynamically expanded threshold is used. : in, Indicates the current size of the local table evidence. This indicates the current local table evidence redundancy rate. This represents the query complexity correction factor. Indicates the percentage of missing essential information; This represents the dynamic expansion threshold adjustment coefficient, which is used to adjust the impact of the current local table evidence size, evidence redundancy rate, query complexity, and the proportion of missing necessary information on the expansion threshold. Preferably, in step S7, the overall completeness of the candidate partial table evidence is... for: in, Indicates the completeness of the field. Indicates the completeness of the operation. Indicates the completeness of the table header. Indicates the completeness of the outfit. This indicates the current local table evidence redundancy rate; to These represent adjustment coefficients in the completeness evaluation model, used to adjust the degree of influence of field completeness, computational completeness, table header completeness, row header completeness, and evidence redundancy rate on the overall completeness evaluation result.

[0024] Continued expansion of marginal revenue for: ; when Reaching the preset integrity threshold and Stop expanding the local tabular evidence when the value falls below the marginal benefit threshold.

[0025] Preferably, in step S8, after stopping the expansion, a reverse pruning is performed, and the pruning benefit is... for: in, Indicates the content to be deleted. Indicates deletion The resulting reduction in input size Indicates deletion The resulting reduction in redundancy Indicates deletion The resulting loss of integrity; , , These represent the adjustment coefficients for the reduction in input size, the reduction in redundancy, and the loss of integrity in the reverse pruning benefit function, respectively, which are used to adjust the degree of influence of different evaluation factors on the pruning decision results. when The value exceeds the preset cropping threshold and is deleted. The deletion results will be retained even if necessary fields, units, table headers, row headers, or calculation inputs are missing.

[0026] Preferably, in step S9, the object of evidence is unified. This includes evidence type, document identifier, source location, source table identifier, source row and column coordinates, original content, semantic similarity score, structural matching score, numerical location score, contextual completeness score, degree of evidence conflict, and degree of evidence redundancy. Degree of conflict of evidence for: ; in, Indicates the degree of entity conflict. Indicates the degree of conflict among indicators. Indicates the degree of time conflict. Indicates the degree of conflict between units. Indicates the degree of conflict in numerical relationships. Indicates the degree of conflict in the text table relationships; to These represent the adjustment weights corresponding to entity conflicts, indicator field conflicts, time conflicts, unit conflicts, numerical relationship conflicts, and text table relationship conflicts, respectively, and are used to adjust the impact of different types of conflicts on the final degree of evidence conflict.

[0027] Preferably, in step S9, the final evidence fusion score is... for: in, Indicates semantic similarity score, Indicates the structure matching score. This indicates the numerical positioning score. Indicates contextual completeness. Indicates the degree of complementarity of evidence. Indicates the overall completeness of evidence presented in a partial table. Indicates the degree of conflict of evidence. Indicates the degree of redundancy in evidence; , , These represent the weight coefficients corresponding to the semantic similarity score, structural matching score, and numerical localization score, respectively. to These represent adjustment coefficients corresponding to contextual completeness, degree of evidence complementarity, completeness of local table evidence, degree of evidence conflict, and degree of evidence redundancy, respectively.

[0028] Preferably, in step S10, the preferred evidence set after fusion and rearrangement is organized into a structured context that can be recognized by the large language model according to a preset evidence input template; the structured context includes user query, candidate text evidence, minimum sufficient local table evidence, source document identifier, source table identifier, source row and column coordinates, evidence fusion score and evidence conflict prompt information.

[0029] The beneficial effects of this invention are as follows: This invention enables the separate modeling and collaborative retrieval of text semantics, table structure, and numerical position in a knowledge base text-table hybrid document by constructing semantic content index, structural constraint index, and numerical position index respectively. This avoids problems such as field misalignment, time misalignment, unit misuse, and numerical false recall caused by simple text segmentation and semantic similarity retrieval, and improves the accuracy of matching table fields with numerical values.

[0030] Meanwhile, this invention constructs a closed-loop retrieval process of "query state modeling - gating scheduling - candidate recall - quality detection - rollback and remediation - feedback update": The system generates a query state vector based on the user's query requirements, entity indicator constraints, time unit constraints, numerical comparison relationships, computational requirements, and cross-row and cross-column association requirements. Based on this, the system dynamically determines the activation status, execution priority, and candidate recall budget of each retrieval channel in combination with the channel's historical quality, expected latency, task load, candidate redundancy rate, and constraint coverage capability. When the recall results of an activated channel do not meet the preset retrieval quality conditions, the system triggers a retrieval channel in a delayed triggering state or a backup retrieval strategy, reducing strategy mismatch, invalid calls, candidate duplication, and omission of key evidence caused by fixed retrieval paths.

[0031] Furthermore, this invention, through seed numerical cell determination, structural path restoration, adaptive expansion of local tabular evidence, and reverse pruning, reduces the input of irrelevant rows and columns while retaining multi-level table headers, row header entities, time fields, unit fields, and related operation cells, thus balancing the structural integrity of tabular evidence with input size control. Moreover, by unifying evidence objects, conflict verification, complementary evaluation, and fusion rearrangement, textual evidence, structural evidence, and numerical evidence can collaboratively support the generation of large language models, reducing the risks of structural comprehension errors, numerical misuse, and generation illusions, and improving the accuracy, operational efficiency, and interpretability of knowledge base text-table hybrid document question answering. Attached Figure Description

[0032] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an undue limitation of this application.

[0033] Figure 1 This is a schematic diagram of the overall architecture of the query status-aware retrieval enhancement system for knowledge base text tables and hybrid documents according to the present invention. Figure 2 This is a flowchart of the query state-aware retrieval enhancement generation method for knowledge base text table hybrid documents according to the present invention. Figure 3 This is a flowchart illustrating the query status-aware retrieval channel gating scheduling, candidate recall budget allocation, and feedback update process of the present invention. Detailed Implementation

[0034] The present invention will be further defined below with reference to the accompanying drawings and embodiments, but is not limited thereto.

[0035] Terminology Explanation: 1. Hybrid document: refers to a data object that contains unstructured text, structured tables, or semi-structured tables simultaneously in the same knowledge base, the same file, or multiple related files.

[0036] 2. Semantic Content Index: This refers to an index used to support semantic matching between user queries and text paragraphs, headings, table summaries, field descriptions, and related text in tables.

[0037] 3. Structural constraint index: refers to an index used to store and retrieve row header entities, column header indicators, time fields, unit fields, table header levels and their row and column coordinate relationships.

[0038] 4. Numerical location index: refers to an index used to store normalized numerical values, numerical types, units of measurement, row and column coordinates, field binding relationships, and source information.

[0039] 5. Query State Vector: This refers to the proportion of user queries in terms of semantic retrieval, structural constraint retrieval, and numerical location retrieval, as well as the query complexity.

[0040] 6. Seed numerical cell: refers to the numerical cell retrieved by the numerical positioning retrieval channel and used as the starting point for the restoration and expansion of the local table evidence structure.

[0041] 7. Seed set: refers to a set of seed value cells that support query operations for comparison, difference, growth rate, ratio, summation, sorting, or cross-entity and cross-time queries.

[0042] 8. Benefits of structural completion: This refers to the degree of improvement in the completeness of multi-level headers, row header entities, time fields, and unit fields after the addition of candidate extended content.

[0043] 9. Benefits of Completing Operational Relationships: This refers to the degree to which adding candidate extensions improves necessary operational inputs, comparison relationships, numerical operational relationships, and numerical comparability.

[0044] 10. Minimal Sufficient Local Table Evidence: This refers to local table evidence that fully covers the necessary entities, metrics, time, units, and computational inputs in the user query, while minimizing irrelevant cells, rows, columns, and low-relevance structural areas. "Sufficient" means that the local table evidence meets preset requirements for field completeness, computational completeness, header completeness, and row header completeness; "Minimum" means that deleting any candidate cell, row, column, or structural area would result in decreased query constraint coverage, missing necessary fields, missing units, missing headers, missing row headers, or missing computational inputs.

[0045] 11. Unified Evidence Object: This refers to the evidence representation after converting text fragments, structure matching results, and partial table evidence returned from different retrieval channels into a unified field structure.

[0046] Example 1 A query-state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents, such as Figure 1 and Figure 2 As shown, it includes: Step S1: Perform unified parsing on the text-table mixed documents in the knowledge base, identify unstructured text content, table structure information, numerical cells and their row and column coordinate relationships, and establish the source association relationship between text content and table content; Step S2: Based on the parsing results of the text-table hybrid document, construct the semantic content index, structural constraint index, and numerical location index respectively; Step S3: Receive the natural language query input by the user, perform semantic parsing and query requirement identification on the query content, and obtain a query feature set; the query feature set includes semantic requirement features, structural constraint features, numerical positioning features, and query complexity features; calculate the semantic retrieval requirement score, structural constraint retrieval requirement score, and numerical positioning retrieval requirement score based on the query feature set, and generate a query state vector according to each retrieval requirement score; Step S4: Based on the query state vector and the historical retrieval quality, expected execution latency, task load, candidate redundancy rate and query constraint coverage of each retrieval channel, perform gating scheduling on the semantic retrieval channel, structural constraint retrieval channel and numerical positioning retrieval channel, determine the immediate activation state, delayed trigger state or closed state of each retrieval channel, and dynamically allocate candidate recall budget. Step S5: Drive the retrieval channel in the immediately activated state to perform candidate recall, obtain candidate text fragments, candidate structure matching results and candidate numerical cells; when the candidate recall results do not meet the preset retrieval quality conditions, reduce the retrieval quality evaluation of the corresponding retrieval channel, trigger the retrieval channel in the delayed trigger state or the backup retrieval strategy, and reallocate the remaining candidate recall budget. Step S6: Based on the degree of matching between the candidate numerical cells and the entities, indicators, time, units and operation relationships in the user query, determine one or more seed numerical cells to form a seed set. Starting from the seed set, restore the multi-level column headers, row header entities, time fields, unit fields and related operation cells corresponding to various sub-numerical cells, and construct the candidate structure association path between the seed set and the structure fields. Step S7: Calculate the local table evidence expansion score based on the impact of candidate expansion content on structural integrity, query constraint coverage, operation relationship completion, topological continuity, and input size control, and form candidate local table evidence based on the dynamic expansion threshold; perform field integrity, operation integrity, table header integrity, and row header integrity checks on the candidate local table evidence; stop expansion when the candidate local table evidence meets the integrity requirements and the marginal benefit of continued expansion is lower than the preset threshold. Step S8: Perform reverse pruning on the candidate local table evidence after stopping expansion. While maintaining the integrity of query constraints and local table evidence, delete redundant cells, redundant rows, redundant columns or low-relevance structural areas to generate minimum sufficient local table evidence. Step S9: Convert candidate text fragments, candidate structure matching results, and minimum sufficient local table evidence into a unified evidence object, and perform conflict verification, complementary evaluation, redundancy suppression, and fusion rearrangement. Step S10: Input the optimized evidence set after fusion and rearrangement into the large language model to generate a traceable answer corresponding to the user query.

[0047] Example 2 The difference between the query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents described in Example 1 and the method described in Example 1 is as follows: In step S1, when performing structure parsing on the table area, each cell is represented as a cell object, which is used to describe the content attributes, position attributes, and structural association attributes of the table area. The table structure information is used to describe the hierarchical relationship, positional relationship and semantic relationship between cells in the table. The table structure information includes table title information, table header hierarchy information, row header entity information, indicator field information, cell content information, cell type information, cell two-dimensional coordinate information, merged cell relationship information, time field information, unit field information and relationship information between cells. The cell object includes raw content, normalized content, row coordinates, column coordinates, rowspan, colspan, cell type, table identifier (table_id), and source location (source_pos). Here, `raw` represents the actual text or numerical content of the cell in the original document; `norm` represents the information obtained after formatting, text cleaning, numerical standardization, or unit conversion of the original content; `row` and `col` represent the two-dimensional position of the current cell in its table; `rowspan` and `colspan` represent the merged area covered by the current cell; `type` represents the category of the current cell in the table structure, including header cells, column header cells, row header cells, time field cells, unit field cells, numerical cells, text description cells, and blank cells; `table_id` distinguishes different table objects; and `source_pos` records the source information of the current cell in the original document, including document number, page number, table number, and region position.

[0048] In step S1, a numerical cell refers to a data cell in a table used to represent specific numerical information. The two-dimensional positional relationship is determined based on the row coordinates (row) and column coordinates (col) of the numerical cell. The structural relationship between the numerical cell and the entity, indicator, time, and unit is established by combining the indicator field corresponding to the column, the entity information corresponding to the row, and the associated time and unit fields.

[0049] For example, in a regional sales statistics table, the first column contains regional information, the second column contains sales revenue in 2024, and the third column contains sales revenue in 2025. When the coordinates of the numerical cell "1 million yuan" are (row=2,col=2), the system determines that the corresponding indicator is sales revenue and the time is 2024 based on the column coordinates, determines that the corresponding entity is East China based on the row coordinates, and establishes a relationship of "East China - 2024 - Sales Revenue - 1 million yuan" by combining the unit field of 10,000 yuan.

[0050] In step S1, the source association between text content and table content is established through document location mapping and semantic association. When parsing text area and table area, the source location source_pos of text paragraph and table object is recorded at the same time, and the association is established based on the table reference description in text content, table title information and the positional relationship between text and table in document.

[0051] For example, when the text paragraph "Specific sales details are shown in the table below" is located before the sales statistics table, the system establishes a source association between the text paragraph and the corresponding table identifier table_id based on the text description and the corresponding table title information, so that the text description and the table data can serve as evidence sources in the subsequent retrieval process.

[0052] In step S2, the semantic content index Semantic features used to describe text content and table descriptions include text paragraph vectors, table title vectors, table summary vectors, field description vectors, and text-table association vectors. A text paragraph vector is a vector representation obtained by semantically encoding ordinary text paragraphs in a document, used to support semantic matching of text content. A table title vector is a vector representation obtained by encoding the table name or topic description, used to locate tables related to the query topic. A table summary vector is a table-level semantic representation generated based on the overall table content, field information, and data range. A field description vector is a vector representation obtained by encoding the indicator descriptions, field explanations, or annotations in the table. A text-table association vector is a vector representation obtained by encoding information in the text area that references, explains, or describes the table content. For example, for the text "Sales in various regions in 2024 are shown in the table below" in a document, and the corresponding sales statistics table, the system generates the text paragraph vector and the vector representation of the table title "Regional Sales Statistics Table," and establishes a semantic association between the text description and the corresponding table.

[0053] The structural constraint index Used to describe the entities, fields, and structural relationships within a table, including entity indexes, metric indexes, time indexes, unit indexes, header-level indexes, row header entity indexes, and row and column coordinate association indexes; Entity indexes are used to record the names of objects in a table, such as region names, company names, or product names, and to establish the association between entities and their corresponding data regions. Indicator indexes are used to record statistical indicator fields in a table, such as sales revenue, growth rate, or quantity. Time indexes are used to record year, month, or time range fields. Unit indexes are used to record the unit of measurement corresponding to the values, such as ten thousand yuan, tons, or percentages. Header hierarchy indexes are used to record the hierarchical relationships between multiple levels of headers. Row header entity indexes are used to record the entity objects corresponding to each data row. Row and column coordinate association indexes are used to record the positional relationship between a cell and its row and column structure. For example, for a "Regional Sales Statistics Table," the system establishes an entity index for "East China Region," an indicator index for "Sales Revenue," a time index for "2024," and a unit index for "Ten Thousand Yuan," and records the position of the corresponding numerical cells for each field through row and column coordinate association.

[0054] The numerical positioning index This section describes the location of numerical cells in a table and their associated semantic information, including normalized values, value type, unit, absolute row and column coordinates, table identifier, associated row header entity, associated column header indicator, associated time field, and adjacent cell topology. Normalized values ​​refer to the formatted representation of the original value, such as converting "10 million yuan" to the uniform format "1000". Value type indicates whether the value belongs to an integer, decimal, percentage, amount, proportion, or date / time type. Unit records the unit of measurement for the value. Absolute row and column coordinates record the specific location of the numerical cell in the original table. Table identifier identifies the table object to which the value belongs. Associated row header entity represents the data object corresponding to the value. Associated column header indicator represents the statistical field corresponding to the value. Associated time field indicates the time range to which the value belongs. Adjacent cell topology describes the positional relationship between the numerical cell and surrounding table headers, row headers, and associated data cells. For example, in the sales statistics table, the numerical cell "1 million yuan" is located at (row=2,col=3). The system uses numerical positioning index to record that its table is "sales statistics table", the associated entity is "East China region", the associated indicator is "2024 sales amount", and the unit is "ten thousand yuan", thus forming complete numerical positioning information.

[0055] In step S3, the natural language query input by the user is represented as a query feature set. : ;in, This represents semantic demand features, used to describe the degree of user demand for text explanation, concept understanding, and background information acquisition in a query. This represents structural constraint features, used to describe the degree of constraint on entities, indicator fields, time information, unit information, and table structure relationships in user queries; This indicates numerical positioning features, used to describe the degree of user demand for locating numerical cells, comparing numerical values, performing calculations and analyses, and linking data across rows and columns in a query. This indicates query complexity characteristics, used to describe the number of constraints, the number of relationships, and the overall processing complexity of the query. Natural language processing methods are used to segment user input queries, identify entities, extract keywords, and perform semantic analysis. First, entity objects, indicator fields, time ranges, and unit information in the query statement are identified. Then, numerical conditions in the query are obtained through numerical expression identification. Comparison relationships, calculation requirements, and entity relationships in the query are determined based on comparison terms, operational terms, and related terms. For example, for the query "Query the sales revenue of East China in 2024 and calculate the growth rate compared to 2023," the entity information "East China" is obtained through segmentation and entity recognition, the indicator information "sales revenue" is obtained through indicator identification, the time information "2024" and "2023" are obtained through time expression identification, and the requirement "growth rate calculation" is obtained through operational relationships, thus forming the corresponding query features.

[0056] in, Determined based on the conceptual explanations, textual descriptions, and semantic understanding requirements in the query; Determined based on the entity, indicator field, time constraint, unit constraint, and field relationships in the query; Determine based on the numerical conditions, comparison relationships, calculation requirements, and cross-row / cross-column association requirements in the query; The number of constraints, associated objects, and computational complexity in the query are all considered together.

[0057] The query features are each normalized to form a query feature set. Used for subsequent query requirement scoring and query status vector generation.

[0058] In step S3, based on the query feature set Determine the semantic retrieval requirement score Structural constraint retrieval requirement score and numerical location retrieval requirement score ; in, It indicates the degree to which the current query requires semantic retrieval information, and is used to measure the degree to which a user query relies on understanding text content, conceptual explanations, and obtaining background information; This indicates the degree to which the current query requires structural constraint information, and is used to measure the degree to which the user query depends on entities, indicator fields, time information, unit information, and table structure relationships; This indicates the degree to which the current query requires numerical location information, and is used to measure the degree to which a user's query relies on numerical cell location, numerical comparison, calculation analysis, and table relationships. Among them, semantic retrieval demand score Structural constraint retrieval requirement score and numerical location retrieval requirement score All are determined based on the corresponding query features; specifically, this includes: a set of query features. Semantic demand features in Structural constraint characteristics Sum of numerical location features Normalization has been performed, and the value range is [value range missing]. Therefore, they are respectively used as scores for the corresponding search requirements: ; ; ; in, , and These represent the basic requirements of the semantic retrieval channel, the structural constraint retrieval channel, and the numerical positioning retrieval channel, respectively.

[0059] To improve the accuracy of demand identification in complex query scenarios, joint constraint relationships between query features are introduced to correct the semantic retrieval demand score, structural constraint retrieval demand score, and numerical localization retrieval demand score; including: Among them, the joint constraint between entity and indicator fields is used to represent the relationship between the query object and the target indicator; the joint constraint between indicator fields and time information is used to represent the relationship between indicator data and time range; the joint constraint between numerical operation and time field is used to represent the relationship between calculation requirements and time conditions; comparison relationship and cross-row and cross-column relationship are used to represent the structural relationship requirements in complex table queries; The joint constraint relationship is determined based on the co-occurrence of query elements and semantic dependencies; when entities and indicators, indicators and time, and computational requirements and time conditions appear simultaneously and have a clear relationship, the corresponding joint constraint is determined; when the comparison relationship involves multiple row and column fields, cross-row and cross-column joint constraints are determined; when joint constraints exist, the corresponding retrieval requirement score is improved; otherwise, no correction is made.

[0060] In step S3, the semantic retrieval requirement is scored. Structural constraint retrieval requirement score and numerical location retrieval requirement score After normalization, the query status weights corresponding to each retrieval channel are obtained: ; ; ; in, The query status weight of the semantic retrieval channel indicates the degree of demand for the semantic retrieval channel in the current query. The query status weight of the structural constraint retrieval channel indicates the degree of demand for the structural constraint retrieval channel in the current query. The query status weight of the numerical positioning retrieval channel indicates the degree of demand for the numerical positioning retrieval channel in the current query; among which, , and The values ​​of are all in the range [0,1], and satisfy: ; Construct a query state vector based on the query state weight. : ; in, This represents the query complexity correction factor, used to characterize the impact of comparison relationships, numerical computation requirements, cross-row and cross-column association requirements, and overall complexity in user queries on retrieval channel scheduling, candidate recall budget allocation, and the scope of local table evidence expansion; query complexity factor The query complexity coefficient is determined by comprehensively considering the number of constraints, the number of related objects, the computational requirements, and the structural association requirements in the query. The value range is [0,1]. Increase the query complexity coefficient when the query contains many entity constraints, field associations, numerical calculations, or cross-row / cross-column relationships; decrease the query complexity coefficient when the query only contains simple text semantic requirements. Query State Vector It is used to indicate the current user query's demand status for different search channels, and serves as the basis for subsequent dynamic scheduling of search channels, adjustment of candidate recall strategies, and determination of the scope of local table evidence expansion.

[0061] In step S4, such as Figure 3 As shown, the first Overall performance score of each retrieval channel for: ; in, Indicates the first The query status weight of each retrieval channel Indicates the first Historical search quality of each search channel Indicates the query constraint coverage capability. Indicates the expected execution delay. Indicates the current task load. Indicates the candidate redundancy rate; The query state vector generated in step S3 Determine the appropriate values ​​for different retrieval channels based on the current query's demand. Specifically, for the semantic retrieval channel... This refers to the query status weight. When searching for structural constraints, This refers to the query status weight. When using numerical positioning for retrieval, This refers to the query status weight. ; Indicates the first The historical retrieval quality of each retrieval channel is obtained by statistically analyzing the retrieval results of that channel in historical query tasks. Specifically, it is calculated comprehensively based on the relevance of historical retrieval results to user queries, the satisfaction of query constraints, and the correctness evaluation results based on the final generated answer, and is used to reflect the effectiveness of that retrieval channel in historical tasks. Indicates the first The query constraint coverage capability of each retrieval channel is determined by analyzing whether the candidate results returned by the current retrieval channel cover the constraints such as entities, indicators, time, units, and values ​​in the user's query. Specifically, it is determined based on the ratio of the number of satisfied query constraints to the total number of constraints included in the current query. Indicates the first The estimated execution latency of each retrieval channel is obtained by statistically analyzing the time consumed by the candidate recall tasks in the past for that retrieval channel, and by combining the current system operating status to predict the execution time of the current query. Indicates the first The current task load of each retrieval channel is obtained by statistically analyzing the number of tasks currently being processed by the retrieval channel, the system's computing resource usage, and the number of concurrent requests, and is used to reflect the current resource pressure of the retrieval channel. Indicates the first The candidate redundancy rate of each retrieval channel is obtained by analyzing the degree of duplication and the proportion of invalid information among the candidate results returned by that retrieval channel. Specifically, it is determined based on the content similarity between candidate results, the number of duplicate candidates, and the proportion of low-relevance candidates. , , , , , These represent the corresponding adjustment coefficients, used to adjust the influence of query status weight, historical retrieval quality, query constraint coverage, expected execution latency, task load, and candidate redundancy rate on the overall performance score. The adjustment coefficients are used to adjust the contribution of different evaluation indicators to the overall performance score, and their parameters are dynamically adjusted based on historical retrieval logs or empirical parameters. The retrieval channel refers to the first... The semantic retrieval channel, the first The first structural constraint retrieval channel or the first Numerical location retrieval channels;

[0062] when At that time, the first The first search channel is set to "Activate Immediately" to immediately start the second search. One search channel; when and At that time, the first Each retrieval channel is set to delayed trigger state; when and At that time, the first The first search channel is set to off, and the second search channel is closed. There are several search channels; among them... Indicates the activation threshold. Indicates the delayed trigger threshold. and The values ​​of are all in the range [0,1], and satisfy . ;in, Indicates the first The activation threshold for each retrieval channel. Indicates the first The delay trigger threshold for each retrieval channel, both of which are normalized parameters, taking values ​​in the range [0,1], and satisfying the following conditions: . Specifically, and It can be preset or dynamically adjusted according to the importance of different search channels, historical query results, and system operation requirements.

[0063] Among them, the activation threshold Delayed trigger threshold Global candidate recall budget and the minimum guaranteed budget for each search channel. The system can be pre-set based on system operating resources, knowledge base size, average query complexity, and target response latency, or it can be dynamically adjusted based on historical retrieval logs. For application scenarios with high real-time requirements, the system increases the activation threshold and reduces the global candidate recall budget; for application scenarios with high accuracy requirements or high query complexity, the system reduces the activation threshold and increases the minimum guaranteed budget for the structural constraint retrieval channel and the numerical positioning retrieval channel.

[0064] No. Activation status of each retrieval channel Represented as: , indicating an immediately activated state; This indicates a delayed trigger state; The symbol indicates a closed state. Search channels in a delayed-trigger state do not perform candidate recall until triggered. Recall only occurs when the candidate recall results of the activated search channels do not meet preset search quality conditions. These preset quality conditions determine whether the candidate results returned by the activated search channels meet the current user's query requirements, including one or more of the following: semantic matching degree between the candidate results and the user query, query constraint satisfaction degree, number of valid candidates, and evidence completeness. Specifically, the system determines whether the candidate results returned by the activated search channels cover entities, indicators, time, units, numerical relationships, and other constraints in the user query. When a candidate result does not meet the preset search quality conditions, the search channels in the delayed-trigger state are triggered to participate in candidate recall.

[0065] In step S5, the retrieval channel, which is in an immediately active state, performs candidate recall to obtain candidate text fragments, candidate structure matching results, and candidate numerical cells; including: The semantic retrieval channel, which is in an immediately activated state, performs similarity matching in the semantic content index based on the semantic features of the user's query text, retrieves text paragraphs, table titles, field descriptions, and text table association descriptions that are semantically related to the user's query, and forms candidate text fragments. The structure constraint retrieval channel, which is in an immediately active state, matches the entities, indicators, time, units, table header level, row header entities, and row and column coordinate relationships in the user query in the structure constraint index to determine the entities, fields, time information, unit information, and corresponding table structure relationships that meet the query constraints, and forms candidate structure matching results. The numerical positioning retrieval channel, which is in an immediately activated state, locates numerical cells that meet the conditions in the numerical positioning index based on the numerical conditions, comparison relationships, calculation requirements, and association relationships in the user's query. It then combines the corresponding row header entity, column header indicator, time field, unit field, and adjacent cell relationships to form candidate numerical cells. The candidate text fragments provide semantic explanations related to the query; the candidate structure matching results provide information on table fields, entity relationships, and structural constraints; and the candidate numerical cells provide precise numerical evidence and their associated contextual information. For example, when a user queries "the sales revenue of East China in 2024 and the reasons for its changes," the semantic retrieval channel retrieves text paragraphs related to the sales situation and reasons for changes in East China from the semantic content index, forming candidate text fragments; the structure constraint retrieval channel matches the entity "East China," the indicator "sales revenue," and the time "2024" to determine the corresponding table, row headers, column headers, and unit information, forming candidate structure matching results; and the numerical positioning retrieval channel locates the corresponding numerical cells based on the above structural constraints and records their row and column coordinates, units, and relationships with adjacent cells, forming candidate numerical cells.

[0066] In step S5, after the retrieval is executed, the real-time retrieval quality is calculated based on the average relevance, actual constraint coverage, proportion of newly added information, candidate duplication rate, and actual execution latency. : ; Updated historical quality for: ; in, Represents average correlation, and represents actual constraint coverage. Indicates the proportion of newly added information. Indicates the candidate duplication rate. Indicates the actual execution delay. Indicates the historical smoothing coefficient; Indicates the first The historical search quality of each search channel in the previous round of queries; among them... Indicates the first The average relevance of the candidate results returned by each retrieval channel is used to measure the degree of matching between the candidate results and the user's query semantic needs. It can be calculated based on the similarity between the candidate results and the query vector. Indicates the first Each retrieval channel returns candidate results that actually cover the user's query constraints. This measure assesses how well the candidate results satisfy query constraints such as entities, indicators, time, units, and numerical relationships. The actual coverage rate is determined by the ratio of the number of satisfied constraints to the total number of query constraints. The average relevance evaluates the semantic similarity between the candidate results and the query content, while the actual constraint coverage rate evaluates the degree to which the candidate results satisfy the query structure and numerical constraints. Both assess retrieval quality from the perspectives of semantic matching and constraint satisfaction, respectively.

[0067] Indicates the first The proportion of newly added valid information in the candidate results returned by each retrieval channel is used to measure the degree of new information provided by the current retrieval results relative to the existing candidate results. It can be determined based on the ratio of the number of valid evidence in the current candidate results that is not covered by the existing candidate results to the total number of current candidate results. The candidate duplication rate represents the proportion of duplicate content in the currently returned candidate results, and can be calculated based on the similarity between candidate results. Indicates the first The actual execution latency of each retrieval channel is used to represent the time consumed by that retrieval channel to complete one candidate recall operation; This represents the historical quality smoothing coefficient, used to adjust the influence ratio between historical search quality and current search quality. A larger value indicates greater emphasis on historical search results. The smaller the value, the more importance is placed on the current query result; Indicates the first The historical retrieval quality of each retrieval channel in the previous query process is used to record the historical performance of that retrieval channel. The historical retrieval quality evaluation value is obtained by comprehensively calculating the average relevance of the historical results returned by that retrieval channel, the degree of satisfaction of query constraints, the number of valid candidates, and the correctness of the final answer, and is continuously updated through the historical query process.

[0068] When any activated retrieval channel returns no candidate recall results, the average relevance is lower than the relevance threshold, the constraint coverage is lower than the constraint coverage threshold, the candidate duplication rate is higher than the candidate duplication rate threshold, or the execution latency threshold, the historical retrieval quality of that activated retrieval channel is reduced. This triggers the search channel or backup search strategy that is in a delayed trigger state, and reallocates the unused candidate recall budget to other available search channels; Candidate recall results refer to the candidate text fragments, structural information, and numerical cell information returned by each retrieval channel based on the user's query; the system judges whether the current search results meet the query requirements based on the quality evaluation indicators of the candidate recall results.

[0069] The relevance threshold, constraint coverage threshold, candidate duplication rate threshold, and execution latency threshold all range from [0,1]. The relevance threshold is used to determine the degree of matching between the candidate recall results and the semantic content of the user query. The constraint coverage threshold is used to determine the degree to which the candidate recall results satisfy query constraints such as entities, indicators, time, units, and numerical conditions. The candidate duplication rate threshold is used to limit the proportion of duplicate information in the candidate results. The execution latency threshold is used to limit the response time of the retrieval process. Among them, the relevance threshold, constraint coverage threshold, and candidate duplication rate threshold are all normalized parameters, with a value range of [0,1]. The execution latency threshold is determined according to the system response requirements, the size of the knowledge base, and the actual operating environment.

[0070] It's important to note that average relevance and constraint coverage are not the same. Average relevance evaluates the semantic matching between candidate recall results and query content, reflecting whether the candidate content is relevant to the query topic. Constraint coverage evaluates the degree to which candidate recall results satisfy user-specified entity, metric, time, unit, and numerical conditions, reflecting whether the candidate content meets query constraints. Both evaluate retrieval quality from two dimensions: semantic matching and constraint satisfaction.

[0071] The preset threshold can be adjusted based on historical query samples, knowledge base size, query type, and system operation logs.

[0072] Among them, historical retrieval quality evaluation value Used to indicate the first The overall retrieval performance of each retrieval channel during historical queries is determined based on factors such as the relevance of historical results returned by that retrieval channel, the degree to which query constraints are satisfied, the number of valid candidates, candidate duplication, and execution latency. When the current retrieval result does not meet the preset retrieval quality conditions, the historical retrieval quality evaluation value of the corresponding retrieval channel is reduced. This reduces the scheduling priority of the corresponding search channel in subsequent queries, while triggering search channels in a delayed triggering state or backup search strategies to participate in candidate recall, and reallocating unused candidate recall budget to other available search channels.

[0073] In step S6, candidate value cells Seed rating for: ; in, Indicates the entity matching score. Indicates the indicator matching score. Indicates the time matching score. Indicates the unit matching score. Indicates the numerical matching score. The calculation supports a score; Specifically, the matching score is calculated based on the degree of consistency between the structural information associated with the candidate numerical cells and the user's query requirements. The degree of matching between the candidate numerical cell's corresponding row header entity and the entity information in the user's query is determined; The degree of matching between the indicator field corresponding to the column where the candidate value cell is located and the indicator information queried by the user is determined; The determination is based on the consistency between the time field associated with the candidate numerical cell and the user's query time condition; The unit field associated with the candidate numerical cell is determined based on the degree of consistency between it and the unit constraint in the user query. The determination is based on the degree of conformity between the numerical content in the candidate numerical cell and the numerical conditions in the user's query; The determination is based on whether the relationships between candidate numerical cells meet the calculation or operation requirements of the user's query.

[0074] All the matching scores above have been normalized, with a value range of [0,1]. The more consistent the structural information of the candidate numerical cell is with the query requirements, the higher the corresponding matching score.

[0075] to These represent the weighting coefficients of different matching factors, used to adjust the influence of entity matching, indicator matching, time matching, unit matching, numerical matching, and operational relationship matching in the seed selection process. Their values ​​can be preset or adjusted based on the knowledge base type, query task characteristics, and historical query results.

[0076] Starting with the numerical cells in the seed set, the structural information corresponding to the seed numerical cells is restored based on the row and column coordinate relationships, header hierarchy, and positional relationships between cells in the table area; including: For the column header information recovery process, the system searches upwards along the column direction for the corresponding header cell based on the positional relationship of the seed value cell in the column. When there is a multi-level header structure, multiple header cells are associated upwards level by level according to the header hierarchy, and the header information of multiple levels is combined to form a complete indicator description.

[0077] For the process of restoring the entity information of the row header, the system searches for the corresponding row header cell along the row direction according to the position relationship of the seed value cell. When the table has a multi-level row header structure, the system associates the corresponding entity information level by level according to the hierarchical relationship between the row headers to form the entity description corresponding to the value cell.

[0078] For the recovery process of time and unit fields, the system determines the corresponding time and unit constraint information based on the positional relationship between the time and unit field cells and the seed value cells, the header association relationship, and the relationship of the table structure. For example, when the time field is located in the parent header area of ​​the column containing the value cell, the time field is used as the time attribute of the corresponding value cell; when the unit field is located near the indicator field or in the table title area, the unit field is used as the unit attribute of the corresponding value cell.

[0079] For the process of restoring related calculation cells, the system determines the related calculation cells to participate in the calculation based on the row and column position relationship between multiple seed value cells, the index correlation relationship, and the value calculation requirements in the query, and establishes the calculation correlation relationship between multiple value cells.

[0080] Through the above structure restoration process, the system connects the seed value cell with the corresponding column header information, row header entity information, time field information, unit field information, and related operation cells to form a candidate structure association path.

[0081] Candidate structure association paths are used to describe the relationships between numerical cells and table structure information, including the relationships between numerical cells and indicator fields, numerical cells and entity fields, numerical cells and time fields, numerical cells and unit fields, and calculation relationships between multiple numerical cells.

[0082] By constructing the candidate structure association path, the retrieved discrete numerical information is restored into tabular evidence containing complete semantics and structural constraints, which is then used to generate answers using a large language model.

[0083] In step S7, the local tabular evidence expansion score of candidate expanded content v is calculated. for: in, Indicates the benefit of structural completion. This indicates that the query constraint covers the benefits. This indicates the benefit of completing the operational relationship. Represents the topological continuity gain. Indicates the cost of expansion. to Indicates the adjustment coefficient; Specifically, structural completion benefits Used to measure candidate extended content The system assesses the extent to which it supplements the structural information of the current local table evidence. First, it retrieves the missing structural information from the current local table evidence, including missing header fields, row header entities, time fields, and unit fields; then, it tallies the number of candidate expanded content to be added. The number of newly restored structural information is then determined, and the structural completion benefit is determined based on the ratio between the number of newly restored structural information and the total number of currently missing structural information.

[0084] Query constraint coverage benefits Used to measure candidate extended content The degree to which user query constraints are satisfied. The system first extracts entity constraints, indicator constraints, time constraints, unit constraints, and numerical constraints from the user query, and then counts candidate extended content. The number of newly satisfied query constraints is determined, and the query constraint coverage benefit is determined based on the ratio between the number of newly satisfied query constraints and the total number of currently unsatisfied query constraints.

[0085] Benefits of completing operational relationships Used to measure candidate extended content The degree to which the system supplements the numerical calculation relationships in the query. When a user query includes calculations such as comparison, difference, growth rate, ratio, summation, or sorting, the system will provide additional information based on the number of numerical cells required to complete the corresponding calculation and the available candidate extended content. The number of valid numerical cells provided is increased, and the calculation relationship is determined to complete the profit.

[0086] Topological continuity benefits Used to measure candidate extended content The degree of structural correlation between the evidence and the current local table. The system bases its decisions on candidate expansion content. The system determines whether there are any related relationships between the current local table evidence and the evidence in the same row, column, adjacent cell, multi-level header, or same table area, and determines the topological continuity benefit based on the number of structural relationships that are satisfied.

[0087] Expansion Cost Used to measure candidate extended content The cost of introducing additional information. The system considers candidate extensions. The cost of expansion is determined by comprehensively evaluating the number of newly added cells, the amount of information irrelevant to the user query, the amount of duplicate information, and the increased input length of the language model.

[0088] All of the above parameters are normalized so that their values ​​are between 0 and 1, and are used to calculate the local tabular evidence expansion score of the candidate expansion content.

[0089] in, to This represents the adjustment coefficient in the partial tabular evidence expansion score, used to adjust for structural completion benefits. Query constraint coverage benefits Benefits of completing operational relationships Topological continuity benefits and the cost of expansion The degree of influence on the final extended scoring results.

[0090] Specifically, Used to adjust the importance of candidate extended content in completing structural information such as missing table headers, row header entities, time fields, and unit fields; Used to adjust the importance of candidate extended content in terms of how well it satisfies the constraints of entities, metrics, time, units, and values ​​in the user query; Used to adjust the importance of candidate extensions in completing numerical operations such as comparison, difference, growth rate, ratio, summation, or sorting; Used to adjust the importance of the topological relationship between candidate expanded content and current local table evidence; It is used to adjust the impact of introducing irrelevant or redundant information and the increased cost of input size during the expansion process.

[0091] The aforementioned adjustment coefficients can be determined based on historical query samples, manual annotation results, or system operation logs. In practice, the system can adjust these adjustment coefficients according to the retrieval results of different types of query tasks, ensuring that the expanded local table evidence maintains structural integrity while minimizing the introduction of irrelevant information. All adjustment coefficients are non-negative parameters, and their specific values ​​can be preset based on the actual application scenario or obtained through parameter optimization methods.

[0092] The structural completion benefit characterizes the completion effect of candidate extended content on table headers, row headers, time fields, and unit fields; the query constraint coverage benefit characterizes the new coverage effect of candidate extended content on entity, indicator, time, and unit constraints; the operation relationship completion benefit characterizes the completion effect of candidate extended content on the numerical values ​​required for comparison, difference, growth rate, ratio, summation, or sorting; the topological continuity benefit characterizes the path or structural relationship between candidate extended content and the current local table evidence in the same row, same column, adjacent, same header, or same structure; the extension cost is determined based on the degree of irrelevance of candidate extended content to the user query, the degree to which it crosses blank rows or columns or the boundaries of unrelated merged cells, the topological distance between it and the current local table evidence, the degree of content redundancy, and the cost of increased input size.

[0093] Preferably, a dynamically expanded threshold is used. : in, Indicates the current size of the local table evidence. This indicates the current local table evidence redundancy rate. This represents the query complexity correction factor. Indicates the percentage of missing essential information; This represents the dynamic expansion threshold adjustment coefficient, which is used to adjust the impact of the current local table evidence size, evidence redundancy rate, query complexity, and the proportion of missing necessary information on the expansion threshold. Specifically, This parameter represents the current size of the local table evidence, reflecting the amount of information contained in the currently acquired evidence. The system obtains this parameter by counting the number of valid cells, fields, and structural information contained in the current local table evidence, and then normalizes it according to the preset maximum evidence size.

[0094] This represents the redundancy rate of the current local table evidence, reflecting the proportion of information in the current evidence that is irrelevant to the user's query or is duplicated. The system obtains this parameter by counting the number of cells irrelevant to the user's query, the number of duplicate fields, and the number of duplicate structural information in the current local table evidence, and calculating the ratio between these numbers and the total amount of information in the current evidence.

[0095] This represents the query complexity correction coefficient, used to reflect the impact of the complexity of a user's query on the scope of evidence expansion. The system comprehensively calculates this coefficient based on the number of entities, indicators, time conditions, unit constraints, comparison relationships, numerical calculation requirements, and cross-row / cross-column association requirements in the user's query. The more constraints and the more complex the relationships in the query, the higher the query complexity correction coefficient.

[0096] This parameter represents the percentage of missing necessary information, reflecting the extent to which the current local table evidence does not contain the information required by the user's query. The system first determines the required entity fields, indicator fields, time fields, unit fields, and calculated numerical information based on the user's query. Then, it counts the amount of missing information in the current local table evidence and calculates the ratio between the number of missing information and the total amount of information required by the query to obtain this parameter.

[0097] Specifically, Used to adjust the impact of evidence size on the expansion threshold Used to adjust the impact of evidence redundancy rate on the expansion threshold. Used to adjust the impact of query complexity on the expansion threshold. This is used to adjust the impact of the proportion of missing necessary information on the expansion threshold. The above adjustment coefficients can be determined based on historical query samples, manually labeled data, or system operation logs, or they can be adjusted through parameter optimization methods. The specific values ​​are determined according to the actual application scenario.

[0098] As the size and redundancy of the current local table evidence increase, the dynamic expansion threshold increases; as query complexity and the proportion of missing necessary information increase, the dynamic expansion threshold decreases.

[0099] Candidate local table evidence is generated based on a dynamically expanded threshold; this includes: Candidate local table evidence refers to a local table area that contains complete structural information and relevant numerical information, which is retrieved, expanded and restored from the original table area according to the user's query requirements.

[0100] Candidate partial table evidence consists of seed numerical cells, corresponding column header information, row header entity information, time field information, unit field information, and associated calculation cells, which are used to describe the relationship between numerical information and corresponding entities, indicators, time, units, and calculation relationships.

[0101] Starting from the seed value cell determined in step S6, the associated field information is recovered according to the candidate structure association path, and the associated table header, entity, time, unit and associated value information are gradually expanded in combination with the dynamic expansion threshold, so as to finally form candidate local table evidence that meets the query constraints.

[0102] In step S7, the overall completeness of candidate partial table evidence is assessed. for: in, Indicates the completeness of the field. Indicates the completeness of the operation. Indicates the completeness of the table header. Indicates the completeness of the outfit. This indicates the current local table evidence redundancy rate; to These represent adjustment coefficients in the completeness evaluation model, used to adjust the degree of influence of field completeness, computational completeness, table header completeness, row header completeness, and evidence redundancy rate on the overall completeness evaluation result.

[0103] Specifically, field completeness This is used to measure whether the current candidate partial table evidence contains the field information required by the user's query. The system first extracts the required entity field, indicator field, time field, and unit field based on the user's query, then counts the number of fields already contained in the current candidate partial table evidence, and calculates the field completeness based on the ratio between the number of contained fields and the total number of fields required by the query.

[0104] Operational completeness This is used to measure whether the current candidate partial table evidence contains the information needed to complete the query operation. When a user query involves calculations such as comparison, difference, growth rate, ratio, summation, or sorting, the system calculates the operation completeness based on the number of numerical inputs required to complete the corresponding operation and the number of valid numerical inputs already provided in the current candidate partial table evidence.

[0105] Table header integrity This is used to measure the degree of recovery of header information in the current candidate local table evidence. The system calculates the header completeness based on the ratio between the number of recovered first-level headers, multi-level headers, and indicator field information in the current evidence and the total number of header information required for the query.

[0106] Completeness of outfit This is used to measure the degree of entity information recovery in the current candidate partial table evidence. The system calculates the row header completeness based on the ratio between the number of recovered row header entity information in the current evidence and the total number of entity information involved in the query.

[0107] This represents the redundancy rate of the current local table evidence, used to measure the proportion of information in the current evidence that is irrelevant to the user's query. The system counts the number of cells in the current local table evidence that are irrelevant to the query and calculates the ratio between this number and the total number of cells in the current evidence to obtain the evidence redundancy rate.

[0108] All of the above indicators have been normalized so that their values ​​are between 0 and 1.

[0109] Specifically, Used to adjust the importance of field completeness. Used to adjust the importance of computational completeness. Used to adjust the importance of the integrity of the meter header. Used to adjust the importance of the completeness of the outfit. Used to adjust the negative impact of evidence redundancy rate on the completeness evaluation results.

[0110] The above adjustment coefficients can be determined based on historical query samples, manual annotation results, or system operation logs. They can also be configured using empirical parameters according to different application scenarios, and their specific values ​​can be adjusted according to actual application needs.

[0111] Continued expansion of marginal revenue for: ; when Reaching the preset integrity threshold and When the value falls below the marginal benefit threshold, the expansion of local table evidence is stopped. The preset completeness threshold ranges from 0 to 1, representing the degree to which candidate local table evidence satisfies the completeness of the query information. The marginal benefit threshold range is determined based on the marginal benefit calculation results and can be set according to the actual application scenario; it is used to determine whether continuing expansion has effective information gain.

[0112] The completeness requirement is used to determine whether candidate partial table evidence meets the current user's query needs, specifically including the completeness of field information, structural information, and computational information. The field information completeness is used to determine whether the candidate partial table evidence contains the necessary fields such as entities, indicators, time, and units for the query; the structural information completeness is used to determine whether the candidate partial table evidence contains the corresponding header level, row header entities, and cell relationships; and the computational information completeness is used to determine whether the candidate partial table evidence contains the numerical information required to perform query calculations such as comparison, difference, growth rate, ratio, summation, or sorting.

[0113] The preset completeness threshold is used to determine whether the above completeness requirements meet the query requirements. When the completeness of the field information, structural information, and computational information of the candidate partial table evidence reaches the preset completeness threshold, the current candidate partial table evidence is considered to meet the completeness requirements, and further expansion is stopped.

[0114] Local table evidence expansion refers to the process of incrementally supplementing relevant table areas based on the current lack of evidence when the current candidate local table evidence cannot cover the information required by the user's query. Specifically, the system uses the seed numerical cells and their associated structural information determined in step S6 as a basis to expand relevant cells along the row and column relationships, multi-level header relationships, time field relationships, unit field relationships, and numerical operation relationships in the table, to obtain supplementary information related to the current query and form more complete local table evidence.

[0115] In step S8, after stopping the expansion, reverse pruning is performed, and the pruning benefit is calculated. for: in, Indicates the content to be deleted. Indicates deletion The resulting reduction in input size Indicates deletion The resulting reduction in redundancy Indicates deletion The resulting loss of integrity; , , These represent the adjustment coefficients for the reduction in input size, the reduction in redundancy, and the loss of integrity in the reverse pruning benefit function, respectively, which are used to adjust the degree of influence of different evaluation factors on the pruning decision results. Specifically, Calculate and delete candidate content This information is obtained from changes in the size of the partial table evidence input before and after deletion. The system statistically analyzes the number of cells, text length, or number of input markers contained in the partial table evidence before deletion, and compares this with the deletion candidate content. The difference between the corresponding sizes is calculated and normalized according to the original evidence size to obtain the reduction in input size.

[0116] Calculate and delete candidate content The change in the redundancy of evidence before and after deletion is obtained. The system first calculates the redundancy ratio before and after deletion based on the number of cells irrelevant to the user's query, the number of duplicate fields, and the number of low-relevant information in the candidate partial table evidence, and then obtains the amount of redundancy reduction by the difference between the two.

[0117] Delete candidate content by comparison The system obtains the changes in the completeness of partial table evidence before and after deletion. It calculates the evaluation results of field completeness, calculation completeness, table header completeness, and row header completeness before and after deletion, and determines the loss of information integrity caused by deletion based on the degree of decrease in completeness.

[0118] Specifically, , , The parameters can be determined based on historical query samples, manual annotation results, or system operation logs. The system optimizes these adjustment coefficients by statistically analyzing changes in input size, reduction of redundant information, and changes in query answer completeness under different pruning strategies, using retrieval effectiveness, answer accuracy, and model input length as evaluation indicators. During the cold start phase, preset empirical parameters can be used; after accumulating operational data, dynamic adjustments can be made based on actual query results.

[0119] when The value exceeds the preset cropping threshold and is deleted. The deletion results will be retained even if necessary fields, units, table headers, row headers, or calculation inputs are missing.

[0120] The preset pruning threshold is used to determine whether candidate content has value for retention. When deleting candidate content can effectively reduce the input size and redundant information without significantly affecting the completeness of the evidence required for the query, the pruning benefit is considered to meet the requirements.

[0121] The preset pruning threshold is an adjustable parameter, and its value range is determined based on the pruning benefit normalization result, and can be set between 0 and 1. The specific value can be adjusted based on historical query samples, manual annotation results, and system operation logs.

[0122] Among them, minimal sufficient local tabular evidence refers to the minimum set of tabular information retained after reverse pruning while still meeting the user's query requirements.

[0123] Specifically, the system takes the candidate partial table evidence after expansion has stopped as input, and judges the importance of each component in the candidate partial table evidence based on the entities, indicators, time, units, and numerical calculation relationships in the user query. Redundant cells, redundant rows, redundant columns, and irrelevant areas that do not affect query constraint satisfaction, structural relationship preservation, and answer calculation are deleted; key numerical cells, corresponding row header entities, column header indicators, time fields, unit fields, and related calculation information required by the user query are retained.

[0124] Through the above trimming process, while ensuring the completeness and structural relevance of the evidence required for the query, the size of the table information input to the large language model is reduced, ultimately forming the minimum sufficient local table evidence.

[0125] Among them, in the partial tabular evidence expansion score to Dynamically expanded threshold In the overall completeness score to Marginal revenue penalty coefficient and the benefits of reverse pruning , , The preset pruning threshold can be pre-set or obtained through training based on the average table size, header hierarchy complexity, numerical field density, target input length limit, and historical question-answering accuracy. The system can also maintain parameter configurations separately for different knowledge base types. For example, for financial statement knowledge bases, the weighting of computational relationship completion benefits and unit completeness is increased; for policy text table knowledge bases, the weighting of field completeness and structural completion benefits is increased. This includes the scoring of local table evidence expansion. to Dynamically expanded threshold In the overall completeness score to Marginal revenue penalty coefficient and the benefits of reverse pruning , , Both the preset cropping threshold and the preset cropping threshold are adjustable parameters.

[0126] Specifically, to , to , , , This represents the weight coefficient corresponding to different evaluation factors, used to adjust the influence of factors such as structural completion benefits, query constraint coverage benefits, operational relation completion benefits, topological continuity benefits, completeness benefits, input size reduction benefits, redundancy reduction benefits, and integrity loss on the final scoring result. Its value ranges from 0 to 1.

[0127] in, The preset clipping threshold is a normalized threshold parameter used to determine whether to continue the expansion or clipping operation, and its value ranges from 0 to 1. This represents the marginal benefit penalty coefficient, used to control the cost impact of the expansion of the local table evidence size. Its value is an adjustable parameter with a range greater than 0.

[0128] The above parameters can be determined based on historical query samples, manual annotation results, knowledge base table structure characteristics, and system operation logs. During the system initialization phase, empirical parameter configurations can be used according to different types of knowledge bases; during system operation, dynamic optimization and adjustments can be made based on indicators such as query accuracy, evidence completeness, input scale, and response time.

[0129] In step S9, candidate text fragments, candidate structure matching results, and / or minimum sufficient local tabular evidence are converted into a unified evidence object, and conflict verification, complementarity evaluation, redundancy suppression, and fusion rearrangement are performed; including: Specifically, the system first unifies the representation of candidate text fragments, candidate structure matching results, and minimum sufficient local table evidence, and converts candidate evidence from different sources into a unified evidence object that includes evidence type, source location, content information, structural association information, and matching score.

[0130] Among them, the evidence type is used to distinguish between textual evidence, structural evidence, and tabular evidence; the source location is used to record the document location, table number, row and column coordinates, or cell location corresponding to the evidence; the content information is used to save the corresponding text content or numerical content; and the structural association information is used to describe the entities, indicators, time, units, and operational relationships between the evidence.

[0131] The system performs conflict verification on unified evidence objects. By comparing whether the entity information, indicator information, time information, unit information, and numerical results in different evidence objects are consistent, it determines whether there is a content conflict between candidate evidence. When a conflict is found, the system determines the evidence to be retained based on the reliability of the evidence source, the degree of query matching, and the degree of evidence completeness.

[0132] The system uses complementary evaluation to determine whether different evidence objects provide complementary information. When textual evidence provides semantic interpretation information, structural evidence provides field location information, and tabular evidence provides numerical calculation information, the complementary evaluation score of the corresponding evidence combination is improved.

[0133] The system reduces information redundancy in the input large language model by removing candidate evidence with duplicate content, duplicate structure, or low contribution to the query results through redundancy suppression.

[0134] Finally, the system reorders the candidate evidence objects based on the relevance of the evidence to the user query, the completeness of the evidence, and the evidence fusion score, and selects the preferred set of evidence after the reordering as the final evidence to be input into the large language model.

[0135] In step S9, the object of evidence is unified. This includes evidence type, document identifier, source location, source table identifier, source row and column coordinates, original content, semantic similarity score, structural matching score, numerical location score, contextual completeness score, degree of evidence conflict, and degree of evidence redundancy. Degree of conflict of evidence for: ; in, Indicates the degree of entity conflict. Indicates the degree of conflict among indicators. Indicates the degree of time conflict. Indicates the degree of conflict between units. Indicates the degree of conflict in numerical relationships. Indicates the degree of conflict in the text table relationships; to These represent the adjustment weights corresponding to entity conflicts, indicator field conflicts, time conflicts, unit conflicts, numerical relationship conflicts, and text table relationship conflicts, respectively, and are used to adjust the impact of different types of conflicts on the final degree of evidence conflict.

[0136] Specifically, the various conflict indicators in the degree of evidence conflict are obtained by comparing the consistency of corresponding information between evidence objects from different sources.

[0137] in, The value indicates the degree of entity conflict, determined by comparing whether the entity names, entity numbers, or entity relationships are consistent across different evidence objects; the value is lower when the entity information is completely consistent and higher when the entity information is contradictory.

[0138] The degree of conflict in indicator fields is determined by comparing the indicator names, field meanings, and field mapping relationships in different evidence objects.

[0139] The degree of time conflict is indicated by judging whether the time fields, time ranges, or time descriptions corresponding to different evidence objects are consistent.

[0140] The degree of unit conflict is indicated by comparing whether the numerical units, unit conversion relationships, and dimensional information in different evidence objects are consistent.

[0141] It indicates the degree of conflict in numerical relationships, obtained by comparing the consistency of numerical values, calculation results, and numerical change relationships in different evidence objects.

[0142] It indicates the degree of conflict between text and table relationships, which is determined by comparing whether there are contradictions between the text description information and the table structure information and table numerical information.

[0143] to The value ranges from 0 to 1. The specific value can be determined based on historical query samples, manual annotation results, and system operation logs, and can be dynamically adjusted according to different knowledge base types.

[0144] In step S9, the final evidence fusion score is calculated. for: in, Indicates semantic similarity score, Indicates the structure matching score. This indicates the numerical positioning score. Indicates contextual completeness. Indicates the degree of complementarity of evidence. Indicates the overall completeness of evidence presented in a partial table. Indicates the degree of conflict of evidence. Indicates the degree of redundancy in evidence; , , These represent the weight coefficients corresponding to the semantic similarity score, structural matching score, and numerical localization score, respectively. to These represent adjustment coefficients corresponding to contextual completeness, degree of evidence complementarity, completeness of local table evidence, degree of evidence conflict, and degree of evidence redundancy, respectively.

[0145] Specifically, semantic similarity score The semantic similarity between the user query and the candidate evidence content is calculated. The system uses a text encoding model to generate semantic vectors for the user query and candidate evidence respectively, and obtains the semantic matching result by calculating vector similarity.

[0146] Structure matching score The structure matching score is obtained by comparing the degree of matching between the entity, indicator, time, unit, and table structure information in the candidate evidence and the user's query constraints. The more consistent the structure information contained in the candidate evidence is with the query constraints, the higher the structure matching score.

[0147] Numerical positioning score This is obtained by judging the degree of matching between candidate numeric cells and the numeric conditions, calculation relationships, and related fields in the user's query.

[0148] Context completeness score This was obtained by statistically analyzing the proportion of necessary contextual information contained in candidate evidence, including relevant text descriptions, table header information, row header information, time information, and unit information.

[0149] complementarity of evidence The complementarity score is improved when textual evidence, structural evidence, and tabular evidence provide different types of complementary information. This is achieved by comparing the differences in information provided by different evidence objects.

[0150] Comprehensive completeness of partial table evidence It is obtained by comprehensively calculating the completeness of fields, operations, table headers, and row headers.

[0151] Degree of conflict of evidence The degree of evidence redundancy is determined by comparing the consistency of entities, fields, time, units, and numerical relationships among evidence from different sources. It is obtained by calculating the proportion of duplicate information, low-relevant information, and duplicate structural information in the candidate evidence.

[0152] in, , , These represent the weight coefficients corresponding to the semantic similarity score, structural matching score, and numerical localization score, respectively. to These represent adjustment coefficients corresponding to contextual completeness, degree of evidence complementarity, completeness of local table evidence, degree of evidence conflict, and degree of evidence redundancy, respectively.

[0153] The aforementioned weighting coefficients and adjustment coefficients are all adjustable parameters, with values ​​ranging from 0 to 1. Specifically, these parameters can be determined based on historical query samples, manual annotation results, and system operation logs, and dynamically optimized according to different knowledge base types and query task characteristics.

[0154] When the degree of conflict of evidence for a unified evidence object exceeds the preset conflict threshold, the final fusion score of that evidence object is reduced or it is removed from the preferred evidence set; when the evidence object is complementary to the selected evidence in terms of entity, indicator, time, unit or numerical relationship, its degree of evidence complementarity score is increased.

[0155] In step S10, the optimized evidence set after fusion and rearrangement is organized into a structured context that can be recognized by the large language model according to the preset evidence input template. The structured context includes user query, candidate text evidence, minimum sufficient local table evidence, source document identifier, source table identifier, source row and column coordinates, evidence fusion score and evidence conflict prompt information.

[0156] In one implementation, the system converts the unified evidence object into the following format and inputs it into the large language model: User query: {Query}; Textual evidence: [Text-01]; Document identifier: {doc_id}; Source location: {source_pos}; Evidence content: {text_content}; Tabular evidence: [Table-01]; Table identifier: {table_id}; Source location: {source_pos}; Local table evidence content: {local_table}; Coordinate mapping: {cell_value_1} ->[Table-01, Row-{row_id_1}, Col-{col_id_1}]; {cell_value_2} ->[Table-01, Row-{row_id_2}, Col-{col_id_2}]; Generate constraints: Answer user queries based solely on the aforementioned evidence; provide the calculation process when numerical calculations are involved; indicate the source when referencing key values, entities, indicators, times, or units; output missing fields or reasons for conflicts when evidence is insufficient or conflicting, and do not generate answers without supporting evidence.

[0157] For example, when a user queries "Compare the operating revenue of Company A in 2023 and 2024, and explain the reasons for the growth", the system will input the minimum sufficient local table evidence containing Company A, operating revenue, 2023, 2024, unit, and corresponding numerical coordinates into the large language model, and require the large language model to output the answer with source identification, such as "Company A's operating revenue in 2023 was 10 million yuan [Table-01, Row-8, Col-4], and its operating revenue in 2024 was 12 million yuan [Table-01, Row-8, Col-5], with an increase of 2 million yuan and a growth rate of 20%".

[0158] The core technical idea of ​​this invention is that the system no longer treats mixed text and table documents in the knowledge base as ordinary text blocks, but instead models the text semantics, table structure, and numerical positions separately during the parsing phase. The system supports semantic retrieval of text paragraphs, table titles, table summaries, and field descriptions through semantic content indexing; supports constraint matching of entities, indicators, time, units, table header levels, row header entities, and row-column relationships through structural constraint indexing; and supports precise positioning of normalized numerical values, numerical types, units, two-dimensional coordinates, and related structural fields through numerical positioning indexing.

[0159] Simultaneously, the system constructs a query state vector based on the user's semantic interpretation needs, structural location needs, numerical calculation needs, and cross-row / cross-column association needs in the query. This query state vector is then used to perform gating scheduling of the semantic retrieval channel, structural constraint retrieval channel, and numerical location retrieval channel. For text interpretation queries, the system prioritizes the semantic retrieval channel; for table field location and numerical location queries, the system prioritizes the structural constraint retrieval channel and the numerical location retrieval channel; for complex queries such as comparisons, growth rates, proportions, and sorting, the system maintains multiple channels for collaborative recall and allocates candidate recall budgets based on channel quality, latency, load, and candidate redundancy. When the recall results of an activated channel are empty, the average relevance is below a preset threshold, the query constraint coverage is below a preset threshold, the candidate duplication rate is above a preset threshold, or the execution latency exceeds a preset threshold, the system triggers a delayed-triggered retrieval channel or a backup retrieval strategy, achieving feedback rollback and budget reallocation in the retrieval process.

[0160] Furthermore, the system establishes a local table evidence generation mechanism for extracting tabular evidence, consisting of "seed determination—structure restoration—local expansion—completeness verification—reverse pruning." Using candidate numerical cells as seeds, the system restores their corresponding multi-level column headers, row header entities, time fields, unit fields, and related operation cells. It then determines whether to expand based on the contribution of the candidate expansion content to the current local table evidence's structural completion, query constraint coverage, operation relationship completion, and topological continuity. Once the required field completeness, operation completeness, table header completeness, and row header completeness for the current query are met, the system stops expanding and performs reverse pruning, thereby reducing irrelevant row and column inputs while preserving the necessary evidence structure.

Claims

1. A query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents, characterized in that, include: Step S1: Perform unified parsing on the text-table mixed documents in the knowledge base, identify unstructured text content, table structure information, numerical cells and their row and column coordinate relationships, and establish the source association relationship between text content and table content; Step S2: Based on the parsing results of the text-table hybrid document, construct the semantic content index, structural constraint index, and numerical location index respectively; Step S3: Receive the natural language query input by the user, perform semantic parsing and query requirement identification on the query content, and obtain a query feature set; the query feature set includes semantic requirement features, structural constraint features, numerical positioning features, and query complexity features; calculate the semantic retrieval requirement score, structural constraint retrieval requirement score, and numerical positioning retrieval requirement score based on the query feature set, and generate a query state vector according to each retrieval requirement score; Step S4: Based on the query state vector and the historical retrieval quality, expected execution latency, task load, candidate redundancy rate and query constraint coverage of each retrieval channel, perform gating scheduling on the semantic retrieval channel, structural constraint retrieval channel and numerical positioning retrieval channel, determine the immediate activation state, delayed trigger state or closed state of each retrieval channel, and dynamically allocate candidate recall budget. Step S5: Drive the retrieval channel in the immediately activated state to perform candidate recall, obtain candidate text fragments, candidate structure matching results and candidate numerical cells; when the candidate recall results do not meet the preset retrieval quality conditions, reduce the retrieval quality evaluation of the corresponding retrieval channel, trigger the retrieval channel in the delayed trigger state or the backup retrieval strategy, and reallocate the remaining candidate recall budget. Step S6: Based on the degree of matching between the candidate numerical cells and the entities, indicators, time, units and operation relationships in the user query, determine one or more seed numerical cells to form a seed set. Starting from the seed set, restore the multi-level column headers, row header entities, time fields, unit fields and related operation cells corresponding to various sub-numerical cells, and construct the candidate structure association path between the seed set and the structure fields. Step S7: Calculate the local table evidence expansion score based on the impact of candidate expansion content on structural integrity, query constraint coverage, operation relationship completion, topological continuity, and input size control, and form candidate local table evidence based on the dynamic expansion threshold; perform field integrity, operation integrity, table header integrity, and row header integrity checks on the candidate local table evidence; stop expansion when the candidate local table evidence meets the integrity requirements and the marginal benefit of continued expansion is lower than the preset threshold. Step S8: Perform reverse pruning on the candidate local table evidence after stopping expansion. While maintaining the integrity of query constraints and local table evidence, delete redundant cells, redundant rows, redundant columns or low-relevance structural areas to generate minimum sufficient local table evidence. Step S9: Convert candidate text fragments, candidate structure matching results, and minimum sufficient local table evidence into a unified evidence object, and perform conflict verification, complementary evaluation, redundancy suppression, and fusion rearrangement. Step S10: Input the optimized evidence set after fusion and rearrangement into the large language model to generate a traceable answer corresponding to the user query.

2. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S1, when performing structure parsing on the table area, each cell is represented as a cell object, which is used to describe the content attributes, position attributes, and structural association attributes of the table area. The table structure information is used to describe the hierarchical relationship, positional relationship and semantic relationship between cells in the table. The table structure information includes table title information, table header hierarchy information, row header entity information, indicator field information, cell content information, cell type information, cell two-dimensional coordinate information, merged cell relationship information, time field information, unit field information and relationship information between cells. The cell object includes raw content, normalized content, row coordinates, column coordinates, rowspan, colspan, cell type, table identifier (table_id), and source location (source_pos). Here, `raw` represents the actual text or numerical content of the cell in the original document; `norm` represents the information obtained after formatting, text cleaning, numerical standardization, or unit conversion of the original content; `row` and `col` represent the two-dimensional position of the current cell in its table; `rowspan` and `colspan` represent the merged area covered by the current cell; `type` represents the category of the current cell in the table structure, including header cells, column header cells, row header cells, time field cells, unit field cells, numerical cells, text description cells, and blank cells; `table_id` distinguishes different table objects; and `source_pos` records the source information of the current cell in the original document, including document number, page number, table number, and region position. In step S1, a numerical cell refers to a data cell in a table used to represent specific numerical information. The two-dimensional positional relationship is determined based on the row coordinates (row) and column coordinates (col) of the numerical cell. The structural relationship between the numerical cell and the entity, indicator, time, and unit is established by combining the indicator field corresponding to the column, the entity information corresponding to the row, and the associated time and unit fields. In step S1, the source association between text content and table content is established through document location mapping and semantic association. When parsing text area and table area, the source location source_pos of text paragraph and table object is recorded at the same time, and the association is established based on the table reference description in text content, table title information and the positional relationship between text and table in document.

3. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S2, the semantic content index Semantic features used to describe text content and table descriptions include text paragraph vectors, table title vectors, table summary vectors, field description vectors, and text-table association vectors. Text paragraph vectors are vector representations obtained by semantically encoding ordinary text paragraphs in a document, used to support semantic matching of text content. Table title vectors are vector representations obtained by encoding table names or topic descriptions, used to locate tables related to the query topic. Table summary vectors are table-level semantic representations generated based on the overall table content, field information, and data range. Field description vectors are vector representations obtained by encoding indicator descriptions, field explanations, or annotations in the table. Text-table association vectors are vector representations obtained by encoding information in the text area that references, explains, or describes the table content. The structural constraint index Used to describe the entities, fields, and structural relationships within a table, including entity indexes, metric indexes, time indexes, unit indexes, header-level indexes, row header entity indexes, and row and column coordinate association indexes; Entity indexes are used to record the names of objects in a table and establish the association between entities and their corresponding data ranges; The indicator index is used to record the statistical indicator fields in the table; the time index is used to record the year, month or time range fields; the unit index is used to record the unit of measurement corresponding to the value; the header hierarchy index is used to record the hierarchical relationship between multiple levels of headers; the row header entity index is used to record the entity object corresponding to each data row; and the row and column coordinate association index is used to record the positional relationship between the cell and its row and column structure. The numerical positioning index This section describes the location of numerical cells in a table and their associated semantic information, including normalized values, value type, unit, absolute row and column coordinates, table identifier, associated row header entity, associated column header indicator, associated time field, and adjacent cell topology. Normalized values ​​refer to the numerical representation after standardizing the format of the original values. Value type indicates whether the value belongs to an integer, decimal, percentage, amount, proportion, or date / time type. Unit records the unit of measurement corresponding to the value. Absolute row and column coordinates record the specific location of the numerical cell in the original table. Table identifier identifies the table object to which the value belongs. Associated row header entity represents the data object corresponding to the value. Associated column header indicator represents the statistical field corresponding to the value. Associated time field indicates the time range to which the value belongs. Adjacent cell topology describes the positional relationship between the numerical cell and surrounding table headers, row headers, and associated data cells.

4. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S3, the natural language query input by the user is represented as a query feature set. : ;in, This represents semantic demand features, used to describe the degree of user demand for text explanation, concept understanding, and background information acquisition in a query. This represents structural constraint features, used to describe the degree of constraint on entities, indicator fields, time information, unit information, and table structure relationships in user queries; This indicates numerical positioning features, used to describe the degree of user demand for locating numerical cells, comparing numerical values, performing calculations and analyses, and linking data across rows and columns in a query. This indicates query complexity characteristics, used to describe the number of constraints, the number of relationships, and the overall processing complexity of the query. Natural language processing methods are used to segment user input queries, identify entities, extract keywords, and perform semantic analysis. First, entity objects, indicator fields, time ranges, and unit information in the query statement are identified. Then, numerical conditions in the query are obtained through numerical expression identification, and comparison relationships, calculation requirements, and entity association relationships in the query are determined based on comparison words, operation words, and related words. The query features are each normalized to form a query feature set. ; In step S3, based on the query feature set Determine the semantic retrieval requirement score Structural constraint retrieval requirement score and numerical location retrieval requirement score ; in, It indicates the degree to which the current query requires semantic retrieval information, and is used to measure the degree to which a user query relies on understanding text content, conceptual explanations, and obtaining background information; This indicates the degree to which the current query requires structural constraint information, and is used to measure the degree to which the user query depends on entities, indicator fields, time information, unit information, and table structure relationships; This indicates the degree to which the current query requires numerical location information, and is used to measure the degree to which a user's query relies on numerical cell location, numerical comparison, calculation analysis, and table relationships. Among them, semantic retrieval demand score Structural constraint retrieval requirement score and numerical location retrieval requirement score All are determined based on the corresponding query features; specifically, this includes: a set of query features. Semantic demand features in Structural constraint characteristics Sum of numerical location features Normalized values ​​have been applied, and the range of values ​​is [value range missing]. Therefore, they are respectively used as scores for the corresponding search requirements: ; ; ; in, , and These represent the basic requirements for semantic retrieval, structural constraint retrieval, and numerical positioning retrieval channels, respectively. By introducing joint constraint relationships between query features, the scores for semantic retrieval requirements, structural constraint retrieval requirements, and numerical localization retrieval requirements are corrected; including: Among them, the joint constraint between entity and indicator fields is used to represent the relationship between the query object and the target indicator; the joint constraint between indicator fields and time information is used to represent the relationship between indicator data and time range; the joint constraint between numerical operation and time field is used to represent the relationship between calculation requirements and time conditions; comparison relationship and cross-row and cross-column relationship are used to represent the structural relationship requirements in complex table queries; The joint constraint relationship is determined based on the co-occurrence and semantic dependency of the query elements; when entities and indicators, indicators and time, and computational requirements and time conditions appear simultaneously and have a clear relationship, the corresponding joint constraint is determined; when the comparison relationship involves multiple row and column fields, cross-row and cross-column joint constraints are determined; when joint constraints exist, the corresponding retrieval requirement score is increased; otherwise, no correction is made. In step S3, the semantic retrieval requirement is scored. Structural constraint retrieval requirement score and numerical location retrieval requirement score After normalization, the query status weights corresponding to each retrieval channel are obtained: ; ; ; in, The query status weight of the semantic retrieval channel indicates the degree of demand for the semantic retrieval channel in the current query. The query status weight of the structural constraint retrieval channel indicates the degree of demand for the structural constraint retrieval channel in the current query. The query status weight of the numerical positioning retrieval channel indicates the degree of demand for the numerical positioning retrieval channel in the current query; among which, , and The values ​​of are all in the range [0,1], and satisfy: ; Construct a query state vector based on the query state weight. : ; in, This represents the query complexity correction factor, used to characterize the impact of comparison relationships, numerical computation requirements, cross-row and cross-column association requirements, and overall complexity in user queries on retrieval channel scheduling, candidate recall budget allocation, and the scope of local table evidence expansion; query complexity factor The value range is [0,1].

5. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S4, the first Overall performance score of each retrieval channel for: ; in, Indicates the first The query status weight of each retrieval channel Indicates the first Historical search quality of each search channel Indicates the query constraint coverage capability. Indicates the expected execution delay. Indicates the current task load. Indicates the candidate redundancy rate; When using the semantic retrieval channel, This refers to the query status weight. When searching for structural constraints, This refers to the query status weight. When using numerical positioning for retrieval, This refers to the query status weight. ; Indicates the first Historical search quality of each search channel; Indicates the first The query constraint coverage capability of each retrieval channel; Indicates the first The estimated execution latency for each retrieval channel; Indicates the first The current task load of each retrieval channel; Indicates the first The candidate redundancy rate of each retrieval channel; among which... , , , , , These represent the corresponding adjustment coefficients, used to adjust the influence of query status weight, historical retrieval quality, query constraint coverage, expected execution latency, task load, and candidate redundancy rate on the overall performance score; The retrieval channel refers to the first... The semantic retrieval channel, the first The first structural constraint retrieval channel or the first Numerical location retrieval channels; when At that time, the first The first search channel is set to "Activate Immediately" to immediately start the second search. One search channel; when and At that time, the first Each retrieval channel is set to delayed trigger state; when and At that time, the first The first search channel is set to off, and the second search channel is closed. There are several search channels; among them... Indicates the activation threshold. Indicates the delayed trigger threshold. and The values ​​of are all in the range [0,1], and satisfy . ; No. Activation status of each retrieval channel Represented as: , indicating an immediately activated state; This indicates a delayed trigger state; , indicating the closed state; wherein, the retrieval channel in the delayed trigger state does not perform candidate recall before being triggered, and only when the candidate recall results of the activated retrieval channel do not meet the preset retrieval quality conditions, wherein the preset retrieval quality conditions are used to determine whether the candidate results returned by the activated retrieval channel meet the current user's query requirements, including one or more of the following: the degree of semantic matching between the candidate results and the user's query, the degree of satisfaction of query constraints, the number of valid candidates, and the completeness of evidence.

6. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S5, the retrieval channel, which is in an immediately active state, performs candidate recall to obtain candidate text fragments, candidate structure matching results, and candidate numerical cells; including: The semantic retrieval channel, which is in an immediately activated state, performs similarity matching in the semantic content index based on the semantic features of the user's query text, retrieves text paragraphs, table titles, field descriptions, and text table association descriptions that are semantically related to the user's query, and forms candidate text fragments. The structure constraint retrieval channel, which is in an immediately active state, matches the entities, indicators, time, units, table header level, row header entities, and row and column coordinate relationships in the user query in the structure constraint index to determine the entities, fields, time information, unit information, and corresponding table structure relationships that meet the query constraints, and forms candidate structure matching results. The numerical positioning retrieval channel, which is in an immediately activated state, locates numerical cells that meet the conditions in the numerical positioning index based on the numerical conditions, comparison relationships, calculation requirements, and association relationships in the user's query. It then combines the corresponding row header entity, column header indicator, time field, unit field, and adjacent cell relationships to form candidate numerical cells. Among them, candidate text fragments are used to provide semantic interpretation information related to the query; candidate structure matching results are used to provide information on table fields, entity relationships and structural constraints; and candidate numerical cells are used to provide precise numerical evidence and its associated contextual information. In step S5, after the retrieval is executed, the real-time retrieval quality is calculated based on the average relevance, actual constraint coverage, proportion of newly added information, candidate duplication rate, and actual execution latency. : ; Updated historical quality for: ; in, Represents average correlation, and represents actual constraint coverage. Indicates the proportion of newly added information. Indicates the candidate duplication rate. Indicates the actual execution delay. Indicates the historical smoothing coefficient; Indicates the first The historical search quality of each search channel in the previous round of query process; When any activated retrieval channel returns no candidate recall results, the average relevance is lower than the relevance threshold, the constraint coverage is lower than the constraint coverage threshold, the candidate duplication rate is higher than the candidate duplication rate threshold, or the execution latency threshold, the historical retrieval quality of that activated retrieval channel is reduced. This triggers the search channel or backup search strategy that is in a delayed trigger state, and reallocates the unused candidate recall budget to other available search channels; Candidate recall results refer to the candidate text fragments, structural information, and numerical cell information returned by each retrieval channel based on the user's query; The relevance threshold, constraint coverage threshold, candidate repetition rate threshold, and execution latency threshold all have values ​​in the range of [0,1]. Among them, historical retrieval quality evaluation value Used to indicate the first The overall retrieval performance of each retrieval channel during the historical query process.

7. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S6, candidate value cells Seed rating for: ; in, Indicates the entity matching score. Indicates the indicator matching score. Indicates the time matching score. Indicates the unit matching score. Indicates the numerical matching score. The calculation supports a score; to The weight coefficients represent the different matching factors, which are used to adjust the influence of entity matching, indicator matching, time matching, unit matching, numerical matching, and operational relationship matching in the seed selection process.

8. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S7, the local tabular evidence expansion score of candidate expanded content v is calculated. for: in, Indicates the benefit of structural completion. This indicates that the query constraint covers the benefits. This indicates the benefit of completing the operation relationship. Represents the topological continuity benefit. Indicates the cost of expansion. to Indicates the adjustment coefficient; The structural completion benefit characterizes the completion effect of candidate extended content on table headers, row headers, time fields, and unit fields; the query constraint coverage benefit characterizes the new coverage effect of candidate extended content on entity, indicator, time, and unit constraints; the operation relationship completion benefit characterizes the completion effect of candidate extended content on the numerical values ​​required for comparison, difference, growth rate, ratio, summation, or sorting; the topological continuity benefit characterizes the path or structural relationship between candidate extended content and the current local table evidence in the same row, same column, adjacent, same header, or same structure; the extension cost is determined based on the degree of irrelevance of candidate extended content to the user query, the degree to which it crosses blank rows or columns or the boundaries of unrelated merged cells, the topological distance between it and the current local table evidence, the degree of content redundancy, and the cost of increased input size. Use dynamically expanded thresholds : in, Indicates the current size of the local table evidence. This indicates the current local table evidence redundancy rate. This represents the query complexity correction factor. Indicates the percentage of missing essential information; This represents the dynamic expansion threshold adjustment coefficient, which is used to adjust the impact of the current local table evidence size, evidence redundancy rate, query complexity, and the proportion of missing necessary information on the expansion threshold. In step S7, the overall completeness of candidate partial table evidence is assessed. for: in, Indicates the completeness of the field. Indicates the completeness of the operation. Indicates the completeness of the table header. Indicates the completeness of the outfit. This indicates the current local table evidence redundancy rate; to These represent the adjustment coefficients in the completeness evaluation model, which are used to adjust the degree of influence of field completeness, computational completeness, table header completeness, row header completeness, and evidence redundancy rate on the overall completeness evaluation result, respectively. Continued expansion of marginal revenue for: ; when Reaching the preset integrity threshold and Stop expanding the local tabular evidence when the value falls below the marginal benefit threshold; In step S8, after stopping the expansion, reverse pruning is performed, and the pruning benefit is calculated. for: in, Indicates the content to be deleted. Indicates deletion The resulting reduction in input size Indicates deletion The resulting reduction in redundancy Indicates deletion The resulting loss of integrity; , , These represent the adjustment coefficients for the reduction in input size, the reduction in redundancy, and the loss of integrity in the reverse pruning benefit function, respectively, which are used to adjust the degree of influence of different evaluation factors on the pruning decision results. when The value exceeds the preset cropping threshold and is deleted. The deletion results will be retained even if necessary fields, units, table headers, row headers, or calculation inputs are missing.

9. The query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to claim 1, characterized in that, In step S9, the object of evidence is unified. This includes evidence type, document identifier, source location, source table identifier, source row and column coordinates, original content, semantic similarity score, structural matching score, numerical location score, contextual completeness score, degree of evidence conflict, and degree of evidence redundancy. Degree of conflict of evidence for: ; in, Indicates the degree of entity conflict. Indicates the degree of conflict among indicators. Indicates the degree of time conflict. Indicates the degree of conflict between units. Indicates the degree of conflict in numerical relationships. Indicates the degree of conflict in the text table relationships; to These represent the adjustment weights corresponding to entity conflicts, indicator field conflicts, time conflicts, unit conflicts, numerical relationship conflicts, and text table relationship conflicts, respectively, which are used to adjust the impact of different types of conflicts on the final degree of evidence conflict. In step S9, the final evidence fusion score is calculated. for: in, Indicates semantic similarity score, Indicates the structure matching score. This indicates the numerical positioning score. Indicates contextual completeness. Indicates the degree of complementarity of evidence. Indicates the overall completeness of evidence presented in a partial table. Indicates the degree of conflict of evidence. Indicates the degree of redundancy in evidence; , , These represent the weight coefficients corresponding to the semantic similarity score, structural matching score, and numerical localization score, respectively. to These represent adjustment coefficients corresponding to contextual completeness, degree of evidence complementarity, completeness of local table evidence, degree of evidence conflict, and degree of evidence redundancy, respectively.

10. A query state-aware retrieval enhancement generation method for knowledge base text-table hybrid documents according to any one of claims 1-9, characterized in that, In step S10, the optimized evidence set after fusion and rearrangement is organized into a structured context that can be recognized by the large language model according to the preset evidence input template. The structured context includes user query, candidate text evidence, minimum sufficient local table evidence, source document identifier, source table identifier, source row and column coordinates, evidence fusion score and evidence conflict prompt information.