A document chunking multi-stage retrieval method based on a recursive topic tree and a computer device

The document chunking method using recursive topic trees and multi-level indexing mechanisms solves the problems of retrieval accuracy and sorting caused by uneven document chunk sizes during the chunking process. It achieves efficient and flexible document retrieval and topic coherence, and is suitable for information retrieval of complex and long documents.

CN123178651APending Publication Date: 2026-11-27FAW VOLKSWAGEN AUTOMOTIVE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510691047.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-27
Publication Date
2026-11-27

AI Technical Summary

Technical Problem

Existing technologies struggle to balance the effectiveness of block size and semantic integrity during document segmentation, leading to inefficiencies in retrieval accuracy and ranking algorithms, especially making fair comparisons difficult among documents on different topics.

Method used

A multi-level retrieval method based on recursive topic trees is adopted. By constructing recursive topic trees and sub-block and parent block vector indexes, and combining them with a large language model to generate topics, multi-level block division and indexing of documents are realized. Block information of different topics and granularities is integrated, and the retrieval results of sub-blocks and parent blocks are used for weighted fusion and sorting.

Benefits of technology

It improves the accuracy and flexibility of document retrieval, maintains the thematic coherence and semantic integrity of documents, and is suitable for efficient retrieval of complex and long documents, especially in providing information at different levels of abstraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123178651A_ABST
    Figure CN123178651A_ABST
Patent Text Reader

Abstract

The document blocking multi-level retrieval method based on the recursive topic tree and the computer device of the disclosure comprise: blocking the retrieval library document data according to a preset blocking rule and creating a recursive topic tree; constructing a sub-block vector index according to the leaf nodes of the recursive topic tree and constructing a parent block vector index according to the parent nodes of the recursive topic tree; after converting the input query text into a query vector, performing retrieval to obtain a retrieval result document block; determining a first ranking result of the retrieval result document block according to the similarity ranking of the sub-block index storage vector of the retrieval result document block and the query vector; determining a second ranking result of the retrieval result document block according to the similarity ranking of the parent block index storage vector of the retrieval result document block and the query vector; calculating the fusion ranking of the retrieval result document block according to the first ranking result and the second ranking result of the retrieval result document, and outputting the retrieval result document block according to the fusion ranking result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the technical field of retrieval methods based on recursive topic trees, and more specifically, to a document block multi-level retrieval method and computer device based on recursive topic trees. Background Technology

[0002] RAG (Retrieval Augmented Generation) is an AI framework that combines traditional information retrieval systems with the generation capabilities of large language models (LLMs). It enhances the output of LLMs by retrieving relevant information from external data sources, thereby improving the accuracy and relevance of the generated content. RAG has a wide range of applications; for example, applying RAG technology in in-vehicle voice scenarios can significantly improve the quality of vehicle-related question-and-answer sessions and the user experience. This not only improves driving safety but also enhances users' understanding and use of vehicle functions, thus improving the overall driving experience. The RAG workflow mainly consists of two stages: retrieval and generation. The retrieval stage retrieves relevant information from external knowledge bases based on the user query; the generation stage combines the retrieved information with the original query and uses the large language model to generate the final response. The retrieval stage plays a crucial role in RAG, providing the large language model with up-to-date, specialized, or domain-specific knowledge, compensating for the limitations of the model's training data. By providing accurate external information, the retrieval stage can significantly reduce the possibility of the large language model generating false or inaccurate information; high-quality retrieval results directly affect the accuracy and relevance of the final generated content.

[0003] The applicant argues that document chunking is a crucial step in the RAG retrieval phase, significantly impacting the overall system performance. Document chunking refers to the process of dividing large documents or text corpora into smaller, manageable segments or "chunks." Each chunk, as an independent unit of information, can be indexed and retrieved individually. Most language models have input length limitations, and chunking ensures that the input does not exceed these limits. Simultaneously, smaller text chunks can be indexed and retrieved more quickly and are easier for language models to process and understand. However, document chunking currently faces several challenges. Choosing the right chunk size requires balancing multiple factors: overly large chunks may contain too much irrelevant information, reducing retrieval accuracy, while overly small chunks may lose important context, affecting semantic integrity. For documents on different topics, to balance the effectiveness of document chunking and semantic integrity, chunks of varying sizes may be generated. Fair comparison of chunks of different sizes can lead to ranking algorithm failures, failing to accurately reflect the importance of the content. Summary of the Invention

[0004] To address at least one aspect of the aforementioned problems, this invention provides a multi-level document retrieval method based on a recursive topic tree, comprising: dividing document data in a retrieval database into blocks according to preset block division rules and creating a recursive topic tree, wherein the recursive topic tree includes a root node and child nodes, and each child node includes a block topic and text content; constructing a sub-block vector index based on the leaf nodes of the recursive topic tree, and constructing a parent block vector index based on the parent nodes of the recursive topic tree; converting the input query text into a query vector and performing retrieval to obtain retrieval result document blocks; determining the first ranking result of the retrieval result document blocks based on the similarity ranking between the sub-block index storage vectors of the retrieval result document blocks and the query vectors; determining the second ranking result of the retrieval result document blocks based on the similarity ranking between the parent block index storage vectors of the retrieval result document blocks and the query vectors; calculating the fusion ranking of the retrieval result document blocks based on the first and second ranking results of the retrieval result document blocks, and outputting the retrieval result document blocks based on the fusion ranking result.

[0005] Preferably, the step of calculating the fused ranking score(d) of the retrieval result document blocks based on the first and second ranking results of the retrieval result document blocks further includes: Where d represents the document block of the search results, and rank i (d) is the sorting result of the i-th item in document block d of the search results, where k is an adjustment constant and w i It is the weighting coefficient.

[0006] Preferably, the step of outputting the search result document blocks based on the fusion ranking results further includes: outputting the search result document blocks whose ranking in the fusion ranking is less than a preset rank threshold.

[0007] Preferably, the steps of dividing the retrieval library document data into blocks and constructing a recursive topic tree according to preset block division rules include: dividing the retrieval library document data into first-level document blocks based on the metadata information of the retrieval library document data; generating first-level topics based on the first-level document blocks using a large language model; using the retrieval library document data as the root node of the tree, and the first-level topics and the content of the first-level document blocks as child nodes; using all child nodes as input to the recursive topic tree; terminating the recursive process when the length of the first-level document block content of the input child node is less than or equal to the maximum block text length; and creating a new tree node based on the first-level document block content and the first-level topic of the current child node when the length of the first-level document block content of the input child node is greater than the maximum block text length.

[0008] Preferably, the step of constructing a sub-block vector index based on the leaf nodes of the recursive topic tree includes: constructing a sub-block vector index based on the recursive topic tree, where each sub-block corresponds to a leaf node in the recursive topic tree, and the text content of the sub-block includes the text content of the current leaf node, the topic name, and the topic names of all parent nodes of the leaf node; converting the text content of the sub-block into a vector through a vector embedding model to create a sub-block vector index.

[0009] Preferably, the step of constructing a parent block vector index based on the first-level child nodes of the recursive topic tree includes: constructing a vector index of the parent block based on the recursive topic tree, where each parent block corresponds to a first-level document block child node in the recursive topic tree, and the text content of the parent block includes the text content of the current node and the topic name. The text content of the parent block is converted into a vector through vector embedding to create a parent block vector index.

[0010] On the other hand, a computer device, including a memory and a processor, wherein the memory includes a computer program, the computer program being executed by the processor at runtime, provides a document chunking multilevel retrieval method based on a recursive topic tree as described above.

[0011] The document chunking multi-level retrieval method based on recursive topic trees in this invention has the following beneficial effects: This method effectively integrates chunks of different topics and granularities, achieving independence and semantic integrity of chunked information, significantly improving retrieval accuracy and effectiveness. It is particularly suitable for processing complex, long document collections and scenarios requiring information to be provided at different levels of abstraction. Compared to traditional document chunking and retrieval methods, it has the following advantages:

[0012] 1. Thematic Coherence: By using LLM (Large Language Model) to summarize the themes of generated document blocks and integrating thematic information into the document blocks, thematic coherence between blocks is maintained. Thus, even if a document is divided into multiple blocks, users can understand the overall structure of the document through the thematic tree.

[0013] 2. Recursive Blocking: The topic tree is constructed recursively, which can flexibly handle text blocks of different lengths, ensuring that each block does not exceed the maximum length limit while retaining as much contextual information as possible. This solves the information fragmentation problem that may be caused by traditional fixed-length blocking.

[0014] 3. Multi-level indexing mechanism: Not only are child block vector indexes created, but also parent block vector indexes. Child block vector indexes focus on fine-grained information retrieval, while parent block vector indexes focus on a macro-level document overview. This multi-level indexing mechanism enables the system to perform searches at different granularities, thereby improving the flexibility and accuracy of retrieval.

[0015] 4. Information Fusion: During the retrieval phase, the retrieval results of sub-blocks and parent blocks are merged and non-linearly transformed according to their respective weights to calculate the final score. This method can better balance the importance of blocks of different sizes and avoid the bias that may be caused by single-scale retrieval. Attached Figure Description

[0016] To better understand the above and other objects, features, advantages, and functions of the present invention, reference can be made to the embodiments shown in the accompanying drawings. The same reference numerals in the drawings refer to the same parts. Those skilled in the art should understand that the drawings are intended to schematically illustrate preferred embodiments of the invention and do not limit the scope of the invention in any way; the parts in the drawings are not drawn to scale.

[0017] Figure 1 A flowchart illustrating a multi-level document retrieval method based on a recursive topic tree according to an embodiment of the present invention is shown.

[0018] Figure 2 A schematic diagram of a first-level child node of a document chunking multi-level retrieval method based on a recursive topic tree according to an embodiment of the present invention is shown.

[0019] Figure 3 A schematic diagram of a second-level child node of a document chunking multi-level retrieval method based on a recursive topic tree according to an embodiment of the present invention is shown.

[0020] Figure 4 A schematic diagram of a three-level child node is shown in the document chunking multi-level retrieval method based on a recursive topic tree according to an embodiment of the present invention. Detailed Implementation

[0021] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding, and should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description.

[0022] The term "comprising" and its variations as used herein signify open inclusion, i.e., "including but not limited to". Unless otherwise stated, the term "or" means "and / or". The term "based on" means "at least partially based on". The terms "one example embodiment" and "one embodiment" mean "at least one example embodiment". The term "another embodiment" means "at least one additional embodiment". The terms "first", "second", etc., may refer to different or the same objects. Other explicit and implicit definitions may also be included below.

[0023] To at least partially address one or more of the aforementioned problems and other potential issues, embodiments of this disclosure propose a multi-level document chunking retrieval method based on a recursive topic tree, such as... Figure 1 As shown, it includes: Step S1, dividing the document data of the retrieval library into blocks according to the preset block division rules and creating a recursive topic tree. The recursive topic tree includes a root node and child nodes, and each child node includes a block topic and text content.

[0024] Specifically, the retrieval database document data can be any input document reflecting the retrieval needs, such as user manuals, instructions, reference books, or professional literature. In some embodiments, the step of dividing the retrieval database document data into blocks and constructing a recursive topic tree according to preset block division rules includes: dividing the retrieval database document data into first-level document blocks based on the metadata information; generating first-level topics based on the first-level document blocks using a large language model; using the retrieval database document data as the root node of the tree, and the first-level topics and first-level document block content as child nodes; using all child nodes as input to the recursive topic tree; terminating the recursive process when the length of the first-level document block content of the input child node is less than or equal to the maximum block text length; and creating a new tree node based on the first-level document block content and first-level topic of the current child node when the length of the first-level document block content of the input child node is greater than the maximum block text length.

[0025] like Figure 1 As shown, step S11 divides the document into blocks based on preset rules to establish the first-level topics of the topic tree. The block division rules can be based on a fixed length or on the document's own metadata, such as using chapters or paragraphs. A Large Language Model (LLM) is used to summarize and generate the topics for each document block. The document is used as the root node of the tree, and the first-level topics and content are used as child nodes to complete the topic tree initialization. The recursive topic tree initialization is completed, creating the root node and first-level child nodes. The root node consists of the document name and all the text of the document, and the first-level child nodes consist of the topics and text after being divided according to the rule-based block division strategy. All child nodes are input into the recursive topic tree construction process, and step S12 begins the construction of the topic tree.

[0026] like Figure 2The topic tree is initialized as shown. The document data retrieved from the library is the maintenance manual. Step S11 completes the segmentation of document blocks through the chapter information of the maintenance manual, and uses a large language model to generate first-level topics based on each document block, such as "engine oil" and "fuel system maintenance methods". The input to the large model is the text content of a document block: "Engine oil is crucial for the function and lifespan of the engine. During operation, engine oil is constantly in contact with combustion residues and fuel, thus accelerating the aging process of the oil. Therefore, the oil level must be checked regularly, preferably when adding fuel and before long-distance driving. Improper handling and disposal of engine oil can cause burns and injuries. Engine oil is a toxic substance and must be stored in a safe place, out of reach of children. Engine oil pollutes the environment; therefore, to avoid environmental pollution, spilled automotive fluids must be properly collected and disposed of. Always change the engine oil according to the schedule specified in the 'Maintenance Manual.' Because changing the oil and oil filter requires relevant professional knowledge and specialized tools, it is recommended that the oil and oil filter be changed by an authorized dealer of our company. The same applies to the disposal of waste oil; it is also recommended that it be disposed of by an authorized dealer of our company." The input prompt for the large model is: "Please give this text a theme and output it strictly according to the following format: {"theme":<theme of the text>}"

[0027] Step S12 initiates the recursive construction process of the topic tree. The input is one of the nodes in the topic tree, and each node consists of two parts: the chunk topic and the text content. When the length of the input text is less than or equal to max_chunk_size (the maximum chunk text length), it serves as the termination condition for the recursion, and the recursive process returns. If the text length is greater than max_chunk_size, proceed to step S13.

[0028] Step S13 inputs the block text and topic of the current node into the LLM, generates subtopics and corresponding text, and creates new tree nodes. Each node is used as input for step S12 to enter the next round of recursive iteration.

[0029] Steps S12 and S13 use `max_chunk_size` as the termination condition for recursion. If the text of the current child node is greater than `max_chunk_size`, the recursion continues until the text length is no greater than `max_chunk_size`. This ensures that all document blocks participating in the retrieval are within the same text length, guaranteeing fairness and accuracy in the ranking comparison. Figure 3 The second-level child nodes shown are Figure 4 The three-level child nodes are shown. Document chunks are also generated using LLM, requiring both the chunked topic and text content to be output simultaneously. For example, the text for "engine oil" can be generated by LLM using the following input suggestions.

[0030] Subject: Engine oil.

[0031] Content: Engine oil is crucial for the function and lifespan of an engine. During operation, engine oil is constantly in contact with combustion residue and fuel, accelerating its aging process. Therefore, the oil level must be checked regularly, ideally when adding fuel and before long-distance driving. Improper handling and disposal of engine oil can cause burns and injuries. Engine oil is toxic and must be stored in a safe place, out of reach of children. Engine oil pollutes the environment; therefore, spilled automotive fluids must be properly collected and disposed of to avoid environmental pollution. Always change the engine oil according to the schedule specified in the Maintenance Manual. Because changing the oil and oil filter requires specialized knowledge and tools, it is recommended that you have your oil and oil filter changed by an authorized dealer. The same applies to the disposal of waste engine oil; it is also recommended that you have it disposed of by an authorized dealer.

[0032] The instruction given to the LLM is: Break down the above content into multiple subtopics. Please output strictly according to the following format (<> represents variables, which need to be filled in with actual content): [<subtopic1|subtopic content1>, <subtopic2|subtopic content2>, ...].

[0033] Step S2: Construct child block vector indexes based on the leaf nodes of the recursive topic tree, and construct parent block vector indexes based on the parent nodes of the recursive topic tree.

[0034] Specifically, such as Figure 1 As shown, vector indexes are created by the leaf nodes (i.e. child blocks) of the recursive topic tree, and indexes are created by the nodes at higher levels (i.e. parent blocks), providing search support at different granular levels, which helps to reduce information loss while preserving details.

[0035] Step S21, the step of constructing a sub-block vector index based on the leaf nodes of the recursive topic tree, includes: constructing a sub-block vector index based on the recursive topic tree, where each sub-block corresponds to a leaf node in the recursive topic tree, and the text content of the sub-block includes the text content of the current leaf node, the topic name, and the topic names of all parent nodes of the leaf node. The text content of the sub-block is converted into a vector through a vector embedding model to create a sub-block vector index.

[0036] The text block content corresponding to the sub-block vector index includes the text of the leaf node and all previously related topics. Specifically, the topics involved in the concatenation include the topics of the current node and all its parent and child nodes. For example, the sub-block generated by the topic "engine oil":

[0037] Engine oil | Engine maintenance | Function of engine oil | Engine oil is important for engine function and lifespan;

[0038] Engine oil | Engine maintenance | Engine oil aging | Engine oil aging is accelerated by contact with combustion residues and fuel;

[0039] Engine oil | Engine maintenance | Engine oil check | Regularly check engine oil level;

[0040] Engine oil | Engine maintenance | When to check | Check engine oil when refueling;

[0041] Engine oil | Engine maintenance | When to check | Check engine oil before a long trip;

[0042] Engine oil | Safe operation | Avoid burns and injuries;

[0043] Engine oil | Handle safely | Store in a safe place;

[0044] Engine oil | Environmental protection | Proper collection and disposal of spilled oil;

[0045] Engine oil | Environmental protection | Avoiding environmental pollution;

[0046] Engine oil | Professional handling | It is recommended to have your engine oil changed by an authorized dealer;

[0047] Engine oil | Professional disposal | It is recommended to have waste engine oil disposed of by an authorized dealer.

[0048] The sub-block vector index is created by converting the text blocks corresponding to all leaf nodes in the recursive topic tree into vectors using a vector embedding model.

[0049] Step S22, the step of constructing the parent block vector index based on the first-level child nodes of the recursive topic tree, includes: constructing the vector index of the parent block based on the recursive topic tree, where each parent block corresponds to a first-level document block child node in the recursive topic tree, and the text content of the parent block includes the text content of the current node and the topic name. The text content of the parent block is converted into a vector through vector embedding to create the parent block vector index.

[0050] For example, the text block content of the parent block vector index is composed of the text of the first-level child nodes and the topic. For example, the block text for "engine oil" is as follows: "Engine oil | Engine oil is crucial for the function and lifespan of an engine. During operation, engine oil is constantly in contact with combustion residues and fuel, thus accelerating the aging process. Therefore, the oil level must be checked regularly, preferably when adding fuel and before long-distance driving. Improper handling and disposal of engine oil can cause burns and injuries. Engine oil is a toxic substance and must be stored in a safe place, out of reach of children. Engine oil pollutes the environment; therefore, to avoid environmental pollution, spilled automotive fluids must be properly collected and disposed of. Engine oil must be changed regularly according to the schedule specified in the Maintenance Manual. Because changing engine oil and oil filters requires specialized knowledge and tools, it is recommended that engine oil and oil filters be changed by our authorized dealers. The same applies to the disposal of waste engine oil; it is also recommended that it be disposed of by our authorized dealers."

[0051] By converting the text blocks of all first-level child nodes into vectors using a vector embedding model, the creation of the parent block vector index can be completed.

[0052] Step S3: Convert the input query text into a query vector and then perform the retrieval to obtain the retrieval result document block.

[0053] Specifically, in the retrieval stage, the user's query text is preprocessed and converted into a vector using the same embedding model.

[0054] Step S4: Determine the first ranking result of the search result document block based on the similarity between the sub-block index storage vector of the search result document block and the query vector.

[0055] Specifically, the document blocks of the first-level child nodes are retrieved and sorted based on the sub-block index. The similarity between the query vector and the storage vector of the sub-block index is calculated. The retrieved document blocks are sorted according to the similarity. The document blocks in the sorted results are mapped to the document blocks corresponding to the first-level child nodes of the recursive topic tree and deduplicated to obtain the document block sorting result rank1.

[0056] Step S5: Sort the similarity between the parent block index storage vector and the query vector of the retrieved document block to determine the second sorting result of the retrieved document block.

[0057] Specifically, the document blocks of the first-level child nodes are retrieved and sorted based on the parent block index. The similarity between the query vector and the storage vector of the parent block index is calculated. The retrieved document blocks are sorted according to the similarity score. Documents with a similarity score greater than a certain threshold, parent_chunk_min_score, are obtained, and the document block sorting result rank2 is obtained.

[0058] Step S6: Calculate the merged sort of the search result document blocks based on the first and second sorting results of the search result documents, and output the search result document blocks based on the merged sorting results.

[0059] Specifically, the ranking results of rank1 and rank2 are merged, and the final score is calculated by performing a non-linear transformation based on their respective rankings and weights to complete the merged ranking.

[0060] In some embodiments, the step of calculating the fused ranking score(d) of the retrieved document blocks based on the first ranking result and the second ranking result of the retrieved document blocks further includes:

[0061]

[0062] Where d represents the document block of the search results, and rank i (d) represents the ranking result of the i-th document block d in the search results, where k is an adjustment constant used to mitigate the impact of lower-ranked document blocks, and w i This is a weighting coefficient used to adjust the importance of different ranking sets. It should be noted that the weighting coefficient can be set according to the actual needs of the search database; for example, the weighting coefficient can be greater than zero, and the sum of the weighting coefficients can equal 1. `log(rank1(d)+1)` is the logarithm to base 10, and the specific value of `K` can also be set according to actual needs; for example, in some embodiments, `K` is greater than 10.

[0063] The calculation of the bottom-ranked score introduces a logarithmic function. Using logarithms can reduce the impact of lower-ranked documents on the final score, thus giving more emphasis to higher-ranked documents.

[0064] In some embodiments, the step of outputting the search result document block based on the fusion ranking result further includes: outputting the search result document block whose ranking in the fusion ranking is less than a preset rank threshold.

[0065] Specifically, for example, outputting the top based on the fusion sorting result. k The search result document blocks are used as the final search results.

[0066] On the other hand, a computer device, including a memory and a processor, wherein the memory includes a computer program, the computer program being executed by the processor at runtime, provides a document chunking multilevel retrieval method based on a recursive topic tree as described above.

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

Claims

1. A document chunking multi-level retrieval method based on recursive topic trees, characterized in that, include: The document data in the retrieval library is divided into blocks according to the preset block division rules, and a recursive topic tree is created. The recursive topic tree includes a root node and child nodes. Each child node includes a block topic and text content. Construct child block vector indexes based on leaf nodes of the recursive topic tree, and construct parent block vector indexes based on parent nodes of the recursive topic tree; The input query text is converted into a query vector and then used for retrieval to obtain the document blocks of the retrieval results; The first ranking result of the document block in the search results is determined by the similarity between the sub-block index storage vector of the document block in the search results and the query vector. Sort the parent block index storage vector of the retrieved document block by similarity with the query vector, and determine the second sorting result of the retrieved document block; The merged sort of the search result document blocks is calculated based on the first and second sort results of the search result documents, and the search result document blocks are output based on the merged sort result.

2. The method according to claim 1, characterized in that, The step of calculating the merged ranking score(d) of the search result document blocks based on the first and second ranking results also includes: Where d represents the document block of the search results, and rank i (d) represents the sorting result of the i-th item in document block d of the search results, where k is an adjustment constant and w i It is the weighting coefficient.

3. The method according to claim 2, characterized in that, The step of outputting the search result document blocks based on the fusion ranking results also includes: outputting the search result document blocks whose ranking in the fusion ranking is lower than a preset rank threshold.

4. The method according to claim 1, characterized in that, The steps for dividing the document data in the retrieval database into blocks and constructing a recursive topic tree according to preset block division rules include: The retrieval library document data is divided into first-level document blocks based on the metadata information of the retrieval library document data. A large language model is used to generate first-level topics based on the first-level document blocks. The retrieval library document data is used as the root node of the tree, and the first-level topics and the content of the first-level document blocks are used as child nodes. Use all child nodes as input to the recursive topic tree. Terminate the recursive process when the length of the first-level document block content of the input child node is less than or equal to the maximum block text length. When the content of the first-level document block of the input child node is greater than the maximum block text length, a new tree node is created based on the content of the first-level document block of the current child node and the first-level topic.

5. The method according to claim 4, characterized in that, The steps for constructing a sub-block vector index based on the leaf nodes of the recursive topic tree include: constructing a sub-block vector index based on the recursive topic tree, where each sub-block corresponds to a leaf node in the recursive topic tree, and the text content of the sub-block includes the text content of the current leaf node, the topic name, and the topic names of all parent nodes of the leaf node. The text content of the sub-block is converted into a vector through a vector embedding model to create the sub-block vector index.

6. The method according to claim 5, characterized in that, The steps for constructing a parent block vector index based on the first-level child nodes of the recursive topic tree include: constructing a vector index of the parent block based on the recursive topic tree, where each parent block corresponds to a first-level document block child node in the recursive topic tree, and the text content of the parent block includes the text content of the current node and the topic name. The text content of the parent block is converted into a vector through vector embedding to create the parent block vector index.

7. A computer device, characterized in that, It includes a memory and a processor, the memory including a computer program, the calculator program being executed by the processor at runtime as described in any one of claims 1-6, a document chunking multilevel retrieval method based on a recursive topic tree.