Unstructured document query optimization method based on large model driving

By building a two-level index structure and dynamic query optimization, the problem of high inference cost in the existing LLM-driven system is solved, efficient and accurate unstructured text analysis is achieved, and the inference cost and redundant data processing of LLM are reduced.

CN120632085APending Publication Date: 2025-09-12BEIJING INST OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510761177.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

Existing unstructured text analysis systems based on large language models (LLMs) have significant deficiencies in inference latency and cost, especially the lack of fine-grainedness in query plan optimization and index structure design, resulting in high inference costs.

Method used

A two-level index structure is constructed, including text-level and text block-level indexes. Combined with dynamic plan generation and join operation conversion, it optimizes query plans and reduces LLM execution costs by filtering irrelevant text and accurately locating text paragraphs.

Benefits of technology

It significantly reduces the inference cost and call frequency of LLM, improves the accuracy and efficiency of queries, reduces redundant data processing, and reduces the overall analysis cost.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120632085A_ABST
    Figure CN120632085A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of text processing, in particular to an unstructured document query optimization method based on large model driving, which comprises the following steps: performing text semantic abstracting through a text-level index, screening out a text related to user query, then dividing the text into a plurality of text blocks based on a semantic partitioning mechanism, and establishing a text block-level index; according to the method, query embedding generated by using the name and description of a target attribute is combined with a text block of which an attribute value is successfully extracted actually to serve as an additional evidence to improve the retrieval quality, and a filtering operation sequence is dynamically adjusted according to the cost of filtering condition judgment and the selection probability of filtering conditions. The expression variant attribute can be accurately extracted without extra prompt of a user, the manual intervention burden is reduced, and the user experience is improved; and meanwhile, the LLM input length is further compressed, the processing cost is reduced, the candidate space is quickly reduced by dynamically adjusting the operation sequence, the overall query efficiency is improved, and the calling frequency and the total reasoning cost of the LLM are remarkably reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of large-model driven unstructured text processing, and in particular to an unstructured document query optimization method based on large-model driven. Background Art

[0002] According to a research report by International Data Corporation (IDC), unstructured data (such as web pages and text archives) now accounts for 80% to 90% of the world's total data. Due to the lack of a unified structural definition, the fragmented data content, and the diverse representations of unstructured text, traditional information retrieval and analysis technologies struggle to efficiently and accurately extract valuable information. Therefore, how to efficiently extract and organize useful information from unstructured text has become a major concern in academia and industry in recent years.

[0003] To extract useful data from unstructured text, the industry is widely exploring the application of large language models (LLMs) in data analysis systems. Due to LLMs' powerful natural language understanding and information extraction capabilities, researchers have proposed a variety of LLM-driven text analysis systems, such as Lotus and Palimpzest. These systems typically allow users to select a batch of text and specify attributes of interest. The system then automatically extracts attribute values ​​using the LLM and supports further database-like operations such as filtering, aggregation, and joins, enabling users to conduct in-depth data analysis and make decisions based on the extracted results.

[0004] Palimpzest is a declarative system for semantic analysis applications, designed to optimize the extraction of large-scale information. The system allows users to use a declarative language to call AI to analyze unstructured data and can balance query plans based on user needs. However, it also has some shortcomings: Palimpzest lacks a fine-grained index structure, and lengthy context can easily lead to reduced output accuracy. Palimpzest also lacks dynamic optimization operations during logic optimization and does not consider the impact that early filtering operations may have on the selectivity and cost of subsequent operations.

[0005] ZenDB is a text analysis system that can answer query plans about text collections based on semantic structure information. The system uses clustering algorithms and LLM to obtain document titles, builds SHT based on document titles, and maps the tables and attributes of the user query plan to the SHT. It searches the SHT root node with a low-cost and low-selectivity strategy that prioritizes access. By calling LLM to extract attribute values, the results of the user query plan are obtained. ZenDB relies too much on data templates and is not ideal for processing unstructured text.

[0006] LOTUS is a query engine based on semantic operators. It combines the semantic reasoning capabilities of LLM with traditional relational data processing through semantic operators. It supports various data analysis tasks for multimodal data, allowing users to complete analysis operations on multimodal data through natural language. However, LOTUS relies on LLM to complete almost all operations and lacks optimization for all operations in the entire query plan. Optimization strategies for different operations must be manually selected.

[0007] In summary, while the aforementioned methods leverage LLM's powerful semantic understanding and reasoning capabilities, effectively performing data extraction and preliminary analysis, they still have significant drawbacks. Compared to traditional database operations, LLM-based reasoning processes often suffer from high latency and high cost. Whether invoking commercial LLM services or running open-source LLM on a dedicated high-performance GPU cluster, system costs increase significantly. Therefore, effectively reducing overall analysis costs while ensuring data analysis quality remains a pressing technical challenge. Summary of the Invention

[0008] In view of this, the present invention proposes an unstructured document query optimization method based on large model driving. It pre-filters out texts irrelevant to the topic through two-level indexing, retrieves relevant information in the article by sentence segments, reduces costs and makes detection more accurate; uses dynamic plan generation technology to generate the optimal query plan for each text, minimizes the execution cost of LLM; finally, through the conversion of connection operations, avoids LLM from extracting a lot of unnecessary intermediate data, and reduces the cost of using LLM.

[0009] To achieve the above objectives, the present invention proposes a large-model-driven unstructured document query optimization method, which is characterized by comprising:

[0010] Constructing a text-level index and a text block-level index, and generating a text vector index for the unstructured text set based on the text-level index; performing text screening based on the text vector index to obtain screened text;

[0011] Dividing the screened text into a number of semantically coherent text blocks based on the text block-level index, generating a paragraph vector index for each text block, and obtaining a related text block set based on the paragraph vector index;

[0012] Using a large language model to extract a set of evidence text blocks from the screened text;

[0013] Adjusting and setting the screening thresholds of the text-level index and the text-block-level index according to the evidence text block set;

[0014] Using a clustering algorithm to enhance the evidence index of the evidence text block set to obtain representative evidence; using the representative evidence and the paragraph vector index as the final retrieval vector of the text block level index;

[0015] For multiple filter conditions in the query plan, a dynamic programming strategy based on selection probability and attribute extraction cost is used to obtain the optimal execution order;

[0016] Optimize query conditions based on connection conversion strategies, dynamic connection sorting, and lazy extraction strategies to obtain query results.

[0017] Furthermore, the text-level index generates a topic summary for each text in the unstructured text collection, and uses E5Model to embed the topic summary to generate the text vector index.

[0018] Furthermore, the text block-level index divides the screened text into multiple semantically coherent text blocks using a semantic segmentation technique based on embedding similarity, and performs E5Model embedding encoding on each text block again to obtain the paragraph vector index.

[0019] Furthermore, the method for adjusting the screening threshold of the text-level index is as follows:

[0020]

[0021] Among them, τ represents the screening threshold of text-level index, e(d i ) represents the text topic in the unstructured text collection, e(Q) represents the text vector index, Represents the text collection retrieved by the query;

[0022] The method for setting the filtering threshold of the text block level index is as follows:

[0023]

[0024] Among them, γ i represents the filtering threshold of the text block level index, ε i Represents a collection of evidence text blocks.

[0025] Furthermore, the process of enhancing the evidence index of the evidence text block set using a clustering algorithm includes:

[0026] A clustering algorithm is used to cluster the evidence text block set, and the center of each cluster is used as the representative evidence.

[0027] Furthermore, the process of obtaining the optimal execution order using a dynamic programming strategy based on selection probability and attribute extraction cost includes:

[0028] Set the expected total cost for different filtering conditions respectively;

[0029] For the filter conditions connected by “AND”, the filter conditions with lower LLM extraction cost and lower selection probability are executed first according to the expected total cost;

[0030] For the filter conditions connected by "OR", the filter conditions with higher success rate and lower cost are executed first according to the expected total cost.

[0031] Furthermore, the expected total cost of the filter conditions connected by "AND" is set as follows:

[0032]

[0033] in, represents the expected total cost of the filter conditions connected by "AND", Indicates the execution order of all possible filter conditions. Indicates a set of filter conditions to be sorted, C * (o[i]) represents the corresponding attribute extraction cost when executing the filter condition o[i], It represents the probability that the first i-1 filter conditions have passed before the i-th filter condition is executed, p o[j] Indicates the probability that the j-th filter condition o[j] is true.

[0034] Furthermore, the expected total cost of the filter conditions connected by "OR" is set as follows:

[0035]

[0036] in, represents the expected total cost of the filter conditions connected by "OR", Indicates the execution order of all possible filter conditions. Indicates a set of filter conditions to be sorted, C * (o[i]) represents the corresponding attribute extraction cost when executing the filter condition o[i], It represents the probability that the first i-1 filter conditions have passed before the i-th filter condition is executed, p o[j] Indicates the probability that the j-th filter condition o[j] is true.

[0037] Furthermore, the connection conversion strategy includes: preferentially extracting connection key attributes from a table with a lower cost, and converting the extracted connection key attributes into an "IN" filter condition on another table;

[0038] The dynamic connection sorting includes: extracting part of the table data, dynamically evaluating the connection cost and selectivity according to the actual sampling situation, and selecting the connection with the lowest cost as the next connection each time.

[0039] Furthermore, the lazy extraction strategy includes calling the large language model for extraction only when it is determined that the attribute value is needed, and terminating the extraction when the query condition cannot be met.

[0040] Compared with the prior art, the present invention has the following beneficial effects:

[0041] The existing attribute extraction step directly performs full-text retrieval and reasoning on all texts, resulting in a large number of redundant tokens being processed, significantly increasing the reasoning cost. The present invention constructs a two-level index structure. First, a topic-level index is constructed at the text level to filter out irrelevant text. Then, a text block-level index is constructed in the filtered text to accurately locate the text paragraphs containing the target attribute. This effectively narrows the search space and only provides the LLM with paragraph inputs that are highly relevant to the query attribute, thereby significantly reducing LLM token consumption and call frequency, and greatly reducing the overall reasoning cost.

[0042] Existing retrieval methods directly perform retrieval based on attribute descriptions, resulting in the inability to recall expression variants and thus missed extraction. The present invention proposes an evidence-enhanced retrieval mechanism, which extracts attributes from sampled texts and collects successfully extracted evidence fragments to generate representative embeddings to assist in matching in the formal retrieval stage. This effectively bridges the semantic gap between query descriptions and text expressions, allowing the system to accurately extract expression variant attributes without additional prompts from the user, reducing the burden of manual intervention and improving user experience. At the same time, it further compresses the LLM input length and reduces processing costs.

[0043] Join operations in traditional queries often require extracting join-related attributes from multiple tables simultaneously, resulting in an increase in the total amount of attribute extraction and, in turn, a higher LLM inference cost. This paper proposes a join operation conversion method that prioritizes extracting join key attributes from a lower-cost table and converts the join operation into an IN filter condition on another table. This method converts the high-cost dual-table attribute extraction operation into a process that extracts join key attributes from one table and converts the join operation into an IN filter condition on another table. This effectively reduces redundant data extraction and lowers the total cost in multi-table query scenarios.

[0044] Existing systems do not optimize query execution and have a fixed execution order, resulting in unnecessary LLM inference overhead and performance bottlenecks. The present invention designs a filter condition priority sorting strategy based on a joint cost and selectivity indicator, which supports dynamic adjustment of the operation order during query execution, prioritizes low-cost and highly selective filter conditions, quickly narrows the candidate space, improves overall query efficiency, and significantly reduces the LLM call frequency and total inference cost. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below. The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present invention. In the accompanying drawings:

[0046] Figure 1 This is a schematic diagram of the overall process of the optimization method proposed in the present invention;

[0047] Figure 2 1 is a graph of the F1 scores of the test results of the method in the embodiment of the present invention and other existing methods on legal case reports (LCR), Wikipedia data (WikiTest), and web pages related to movies and universities (SWDE);

[0048] Figure 3 1 is a comparison chart of the inference costs of the method in the embodiment of the present invention and other existing methods for legal case reports (LCR), Wikipedia data (WikiTest), and web pages related to movies and universities (SWDE). DETAILED DESCRIPTION

[0049] The exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the present disclosure to those skilled in the art. It should be noted that, unless there is a conflict, the embodiments of the present disclosure and the features described in the embodiments can be combined with each other. The present invention will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0050] This embodiment proposes a large model-driven unstructured document query optimization method. Figure 1 Shown, including:

[0051] Part 1: Two-level index construction

[0052] First, we establish text-level and block-level indexes for the input unstructured text collection. Specifically, the text index generates a compact embedding vector for each text by semantically summarizing the text content, facilitating rapid retrieval of relevant text. The block-level index divides the text into several semantically coherent blocks through semantic segmentation and generates an embedding for each block, enabling efficient retrieval of attribute-related blocks. This two-level indexing system effectively narrows the search space for attribute retrieval and reduces the cost of subsequent LLM reasoning.

[0053] Furthermore, the document-level index first uses the NLTK toolkit to generate a topic summary for each text, and uses the E5Model to embed the summary. The text collection is denoted as text The subject representation is denoted as e(d i ).

[0054] When querying, the attribute name and its description are embedded and averaged to generate the query embedding e(Q).

[0055] Retrieve text whose Euclidean distance to e(Q) is less than a threshold τ:

[0056]

[0057] It can be understood that this embodiment constructs a text-level index, performs semantic summarization on each text and generates a text-level embedded index to filter out texts that are not related to the target attribute; it prioritizes relevant texts in the retrieval stage, significantly reduces the subsequent reasoning burden, and ensures the efficiency of the query and the quality of the initial relevance screening.

[0058] Furthermore, the Segment-Level Index uses semantic segmentation technology based on embedding similarity to divide the filtered text into multiple semantically coherent text blocks. j Perform E5Model embedding encoding again to construct the paragraph vector index.

[0059] After filtering the text In the example, we can further retrieve the related text block collection through the text block level index Ensure that the input amount of each LLM reasoning is as small as possible to reduce the reasoning cost.

[0060] It can be understood that this embodiment divides the text into coherent text blocks based on semantic segmentation and generates an embedded representation for each text block; through text block-level indexing, it accurately locates the fragments containing the target attributes in the retained text, further reducing the retrieval granularity and improving the recall rate and retrieval efficiency.

[0061] Part II: Evidence-enhanced Text Block Retrieval

[0062] In order to alleviate the problem of decreased recall rate caused by the inconsistency between attribute description and actual text expression, the present invention proposes an evidence-enhanced retrieval technology. After accepting the user's query plan, the text-level index is first used to filter out the text collection related to the target attribute, and sampling is performed on these texts. By applying LLM to the sampled text blocks for analysis, the system can extract a set of additional "evidence text blocks" that represent the diverse expressions of the query attributes in the actual data. Subsequently, in the text block-level index, the system combines the original attribute description embedding with the evidence text block embedding for retrieval to improve the recall rate and retrieval accuracy, ensuring that the target attribute information can be accurately extracted even if there is a diversity of text expressions.

[0063] Specifically, the evidence-enhanced text block retrieval proposed in this embodiment includes the following steps:

[0064] Sampling and evidence collection:

[0065] From the initial screening of text A small portion of text (about 5%) is randomly sampled from the dataset and LLM is used to extract the attribute values ​​and their source text blocks from the sampled text. The extracted text blocks are converted into embedded representations as a set of evidence text blocks.

[0066] Threshold adaptive adjustment:

[0067] The text retrieval distance threshold τ is adaptively adjusted according to the actual successful extraction results in the sampled text:

[0068]

[0069] Text block retrieval distance threshold γ i , adjusted according to the maximum similarity between pairs of evidence text blocks. Specifically, let the set of evidence text blocks successfully extracted from the sampled text be ε i , where each text block has a corresponding embedding vector. The initial setting of the text block retrieval threshold γ i According to ε i The inner maximum distance is determined to cover as much real expression as possible:

[0070] However, directly using all evidence embeddings as retrieval evidence can easily introduce redundancy, resulting in too many candidate text blocks and reducing retrieval efficiency.

[0071] Therefore, the present invention further proposes an evidence clustering optimization strategy:

[0072] For ε iThe embedding vectors in are clustered using the k-means algorithm with a smaller k (e.g., k=3) to extract representative evidence.

[0073] The center of each cluster is used as the final retrieval evidence for the subsequent text block retrieval process.

[0074] The j-th evidence cluster center corresponding to the i-th attribute is Each attribute ultimately saves k evidence embeddings: During the formal retrieval phase, text block-level retrieval no longer uses all original evidence. Instead, it only uses the aforementioned cluster center embedding and query attribute description embedding as retrieval vectors, thereby balancing retrieval coverage and accuracy, effectively controlling the number of candidate segments, and improving the overall efficiency of the system.

[0075] It can be understood that this embodiment collects evidence from the attribute fragments extracted from the sampled text, uses a clustering method to extract representative evidence features, and participates in subsequent text block retrieval, effectively alleviating the retrieval bias caused by the difference between the attribute description and the text expression, and improving the overall extraction accuracy.

[0076] Part III: Query Optimization

[0077] During the attribute extraction and database operation process, this embodiment optimizes the execution order of the filtering conditions and the connection operations according to the actual extraction cost and selection probability.

[0078] For the filter conditions connected by "AND" (conjunction), the filter conditions with lower LLM extraction cost and lower selection probability are executed first to filter out the data that does not meet the conditions as early as possible and reduce the burden of subsequent extraction;

[0079] For filter conditions connected by "OR" (disjunction), filter conditions with higher success rate (selection probability) and lower cost are executed first to satisfy the query conditions as soon as possible.

[0080] In addition, the system proposes a join transformation strategy for join operations: it prioritizes extracting join key attributes from a table with lower cost, and converts the join conditions into "IN" filter conditions on another table, thereby reducing the redundant extraction overhead caused by the join.

[0081] Overall, this embodiment adopts a lazy extraction strategy, calling LLM for extraction only when it is determined that the attribute value is needed, and terminating invalid extraction as soon as possible when the query conditions cannot be met, further reducing the overall reasoning cost.

[0082] Specifically, the query optimization method proposed in this embodiment includes the following steps:

[0083] Filter Reordering:

[0084] In this paper, for multiple filters appearing in a query plan, regardless of whether they are connected by AND (conjunction) or OR (disjunction) logic, a dynamic programming strategy based on selection probability and attribute extraction cost is used to determine the optimal filter execution order. The optimization goal is to minimize the total expected cost of the filtering stage.

[0085] For a conjunction (AND) logical relationship consisting of multiple filter conditions, the expected total cost is defined as follows:

[0086]

[0087] For a disjunctive (OR) logical relationship consisting of multiple filter conditions, the expected total cost is defined as follows:

[0088]

[0089] The symbols in the above formula are explained in Table 1:

[0090] Table 1

[0091]

[0092] It can be understood that this embodiment optimizes the design of filter condition sorting. When the query is executed, the filter priority is calculated based on the LLM cost of each attribute extraction and the selection probability of the filter condition; for the conjunction (AND) relationship, the filter condition with a high screening rate and low cost is executed first; for the disjunction (OR) relationship, the filter condition with a high success rate and low cost is executed first to meet the query conditions as soon as possible.

[0093] Join Transformation:

[0094] Convert the original join operation to an IN filter. For example, the original join of T1.a = T2.b is converted to applying the following filter to T2 after extracting the value set of T1.a:

[0095] T2.b∈{a1,a2,...,a k}

[0096] Dynamic Join Ordering:

[0097] The connection order is determined gradually during execution, and the next connection with the lowest cost is selected each time.

[0098] The specific method is: first extract part of the table data, and then dynamically evaluate the connection cost and selectivity based on the actual sampling situation, thereby forming a left-deep connection tree to maximize execution efficiency.

[0099] It can be understood that this embodiment converts traditional multi-table join operations into IN-based filter operations and implements unified sorting optimization through join operation conversion and dynamic sorting design. During the join process, the join direction is dynamically selected and flexibly adjusted based on the actual extraction cost. It is theoretically proven that the converted execution plan is superior to the traditional predicate pushdown strategy in terms of LLM cost, especially in multi-table join scenarios.

[0100] To further validate the advantages of the QUEST method proposed in this example, other techniques were used for comparative testing against QUEST. The benchmark included three datasets, totaling 3,800 texts from various fields and 200 different query types. The three datasets were Legal Case Reports (LCR), Wikipedia data (WikiTest), and Web Pages Related to Movies and Universities (SWDE). These datasets cover a wide range of text formats and are representative. A separate researcher verified the accuracy of the groundtruth datasets.

[0101] The groundtruth of the dataset contains a series of correctly extracted results. For a given query plan Q, only when the result T(Q) extracted using the technology is completely consistent with a correct result GT(Q), is GT(Q) considered to be correctly extracted by the technology. Therefore, this embodiment uses precision (the ratio of correctly extracted results to the total number of extracted results), recall (the ratio of correctly extracted results to the total number of true values), and F1-score (the harmonic mean of precision and recall) to measure the accuracy of the technology and evaluate the cost of using the technology.

[0102] The results are compared in the following figure: Figure 2 、 Figure 3 As shown by Figure 2It can be seen that the QUEST method of the present invention has achieved an F1-score similar to or even better than LOTUS in the C1 (single filter condition) and C2 (2-3 filter conditions) query scenarios, and is significantly better than Palimpzest, ZenDB and other systems. This is due to the two-level index structure and evidence-enhanced retrieval mechanism designed by QUEST, which can accurately identify text blocks related to the query and only input necessary content into the LLM, avoiding the error diffusion and accuracy loss caused by full-text processing in other methods. In the complex query scenario of C3 (multiple filter conditions), QUEST's extraction accuracy still maintains a leading advantage, significantly higher than all other compared methods, verifying the robustness of the present invention under complex queries.

[0103] Depend on Figure 3 It can be seen that in terms of inference cost, QUEST achieves the lowest LLM character consumption under all query complexity settings. In contrast, although LOTUS performs well in F1-score, the inference cost is extremely high because the complete text is input into LLM each time. Especially on the legal long text dataset, the cost of LOTUS is more than 6 times that of QUEST. Although Palimpzest and ZenDB have introduced some filter condition sorting, the inference cost is still much higher than QUEST due to the lack of refined fragment positioning and dynamic execution optimization. In other words, the present invention effectively controls the LLM inference overhead through the two-level index to accurately locate paragraphs and text-level filtering sorting and connection conversion optimization, and further reduces unnecessary extraction operations through lazy extraction and early termination mechanism during execution.

[0104] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit it. Although the present invention has been described in detail with reference to the above embodiments, ordinary technicians in the field should understand that the specific implementation methods of the present invention can still be modified or replaced by equivalents. Any modification or equivalent replacement that does not depart from the spirit and scope of the present invention should be covered by the scope of protection of the claims of the present invention.

Claims

1. A large model-driven unstructured document query optimization method, characterized in that: include: Constructing a text-level index and a text-block-level index, and generating a text vector index for the unstructured text set based on the text-level index; Perform text filtering according to the text vector index to obtain filtered text; Dividing the screened text into a number of semantically coherent text blocks based on the text block-level index, generating a paragraph vector index for each text block, and obtaining a related text block set based on the paragraph vector index; Using a large language model to extract a set of evidence text blocks from the screened text; Adjusting and setting the screening thresholds of the text-level index and the text-block-level index according to the evidence text block set; Using a clustering algorithm to enhance the evidence index of the evidence text block set to obtain representative evidence; using the representative evidence and the paragraph vector index as the final retrieval vector of the text block level index; For multiple filter conditions in the query plan, a dynamic programming strategy based on selection probability and attribute extraction cost is used to obtain the optimal execution order; Optimize query conditions based on connection conversion strategies, dynamic connection sorting, and lazy extraction strategies to obtain query results.

2. The optimization method according to claim 1, characterized in that The text-level index generates a topic summary for each text in the unstructured text collection, and uses the E5Model to embed the topic summary to generate the text vector index.

3. The optimization method according to claim 1, characterized in that The text block-level index uses a semantic segmentation technique based on embedding similarity to divide the screened text into multiple semantically coherent text blocks, and performs E5Model embedding encoding on each text block again to obtain the paragraph vector index.

4. The optimization method according to claim 1, characterized in that The method for adjusting the filtering threshold of the text-level index is as follows: Among them, τ represents the screening threshold of text-level index, e(d i ) represents the text topic in the unstructured text collection, e(Q) represents the text vector index, Represents the text collection retrieved by the query; The method for setting the filtering threshold of the text block level index is as follows: Among them, γ i represents the filtering threshold of the text block level index, ε i Represents a collection of evidence text blocks.

5. The optimization method according to claim 1, characterized in that The process of enhancing the evidence index of the evidence text block set using a clustering algorithm includes: A clustering algorithm is used to cluster the evidence text block set, and the center of each cluster is used as the representative evidence.

6. The optimization method according to claim 1, characterized in that: The process of obtaining the optimal execution order using a dynamic programming strategy based on selection probability and attribute extraction cost includes: Set the expected total cost for different filtering conditions respectively; For the filter conditions connected by "AND", the filter conditions with lower LLM extraction cost and lower selection probability are executed first according to the expected total cost; For the filter conditions connected by "OR", the filter conditions with higher success rate and lower cost are executed first according to the expected total cost.

7. The optimization method according to claim 6, characterized in that: The expected total cost of the filter conditions connected by "AND" is set as follows: in, Represents the expected total cost of the filter conditions connected by "AND", Indicates the execution order of all possible filter conditions. Indicates a set of filter conditions to be sorted, C * (o[i]) represents the corresponding attribute extraction cost when executing the filter condition o[i], It represents the probability that the first i-1 filter conditions have passed before the i-th filter condition is executed, p o[j] Indicates the probability that the j-th filter condition o[j] is true.

8. The optimization method according to claim 6, characterized in that: The expected total cost of the filter conditions connected by "OR" is set as follows: in, Indicates the expected total cost of the filter conditions connected by "OR", Indicates the execution order of all possible filter conditions. Indicates a set of filter conditions to be sorted, C * (o[i]) represents the corresponding attribute extraction cost when executing the filter condition o[i], It represents the probability that the first i-1 filter conditions have passed before the i-th filter condition is executed, p o[j] Indicates the probability that the j-th filter condition o[j] is true.

9. The optimization method according to claim 1, characterized in that: The connection conversion strategy includes: preferentially extracting connection key attributes from a table with a lower cost, and converting the extracted connection key attributes into an "IN" filter condition on another table; The dynamic connection sorting includes: extracting part of the table data, dynamically evaluating the connection cost and selectivity according to the actual sampling situation, and selecting the connection with the lowest cost as the next connection each time.

10. The optimization method according to claim 1, characterized in that: The lazy extraction strategy includes calling the large language model for extraction only when it is determined that the attribute value is needed, and terminating the extraction when the query condition cannot be met.