A method and system for enhanced generated document knowledge management based on text retrieval

By using a text retrieval-based augmentation method, and leveraging large-scale language models and intelligent agents for document segmentation, meta-knowledge extraction, and vectorization, this approach addresses the low efficiency of existing document management systems in semantic understanding and knowledge utilization. It enables a highly efficient and automated knowledge management and question-answering system that is adaptable to diverse application scenarios.

CN120407749BActive Publication Date: 2025-11-11JIANGXI NORMAL UNIV
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510898879.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-01
Publication Date
2025-11-11
Estimated Expiration
2045-07-01

AI Technical Summary

Technical Problem

Existing document management systems suffer from insufficient semantic understanding and retrieval capabilities, high demand for manual intervention, low knowledge utilization efficiency, and limited application scenarios. This results in inaccurate answers to complex questions and makes it difficult to adapt to diverse scenarios such as enterprise knowledge base and educational resource management.

Method used

This paper adopts a text retrieval-based augmented generation method, which uses a large language model to segment documents, extract meta-knowledge, and vectorize them. It combines a knowledge-calling agent to perform accurate matching and generate answers, and optimizes the knowledge base through user feedback to build an efficient and automated knowledge management system.

Benefits of technology

The question-answering system achieves accurate semantic matching, improves the efficiency of knowledge extraction and utilization, reduces labor costs, supports the rapid knowledge transformation of multi-format documents, and realizes the self-optimization of the knowledge base through a feedback-driven mechanism.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120407749B_ABST
    Figure CN120407749B_ABST
Patent Text Reader

Abstract

This application discloses a document knowledge management method and system based on text retrieval enhancement, belonging to the field of computer intelligence technology. The method includes: preprocessing user-uploaded documents, dividing them into knowledge text blocks, extracting meta-knowledge, and quantifying it to construct a document knowledge system; when a user asks a question, analyzing the question through a knowledge-calling agent, combining meta-knowledge and vector similarity retrieval to construct a knowledge reference table containing meta-knowledge, knowledge text blocks, and knowledge sources; merging the user question with the knowledge reference table to form a context, driving a large model to generate accurate answers and provide knowledge tracing; evaluating the question-and-answer effect based on user feedback and the accuracy of knowledge citations; if the effect is good, storing the question-and-answer pair as new knowledge, and dynamically adjusting document slicing parameters and knowledge retrieval scope based on the evaluation results to achieve continuous optimization of the knowledge system. This invention can improve the accuracy of semantic understanding and retrieval, and enhance the ability to utilize document knowledge.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of computer technology, specifically relating to artificial intelligence, natural language processing, knowledge management, and intelligent question answering technology, and particularly to a document knowledge management method and system based on text retrieval enhancement. Background Technology

[0002] Document management technology is a crucial component of the information technology field, encompassing a wide range of applications including enterprise knowledge management, scientific research literature management, and educational and training resource management. Traditional document management systems, with file storage, classification indexing, and full-text search as their core functions, have been developing for decades. From manual archiving to electronic storage, and then to cloud storage and collaboration in recent years, document management technology has made significant progress in improving storage capacity and access efficiency.

[0003] With the development of artificial intelligence technology, some document management systems have begun to introduce basic intelligent functions, such as keyword search, tag recommendation, and simple automatic classification, aiming to improve the efficiency of knowledge extraction and utilization from documents. Current systems mostly rely on information retrieval technologies (such as TF-IDF and BM25) to achieve preliminary semantic matching and question-answering functions, but most still face the problems of limited application scenarios and insufficient intelligence.

[0004] Defects and shortcomings of existing technology:

[0005] 1. Limitations of Semantic Understanding and Retrieval Capabilities: Existing systems lack sufficient depth in understanding the semantics of user queries, relying solely on keyword matching or simple semantic embedding for retrieval. This limits their ability to answer complex questions. When documents possess rich knowledge and high semantic similarity, retrieval results can easily deviate from user needs, resulting in insufficient accuracy.

[0006] 2. High Demand for Manual Intervention: Most document management systems require users to manually categorize, annotate, or design structured indexes for retrieval. This approach demands specialized skills from operators, is time-consuming and labor-intensive, and incurs high management costs. In practical applications, document updates are frequent and unpredictable, making the shortcomings of manually maintained knowledge bases even more pronounced.

[0007] 3. Low knowledge utilization efficiency: Traditional systems lack the ability to combine retrieval and generation, only providing document fragments that match the user's question, unable to further extract answers, thus reducing the user experience. Systems typically rely heavily on knowledge extraction from individual documents, failing to connect information across documents and making it difficult to form a complete knowledge network.

[0008] 4. Limited application scenarios and insufficient versatility: Most existing knowledge management and question-answering systems are optimized for specific domains, making it difficult to adapt to diverse scenarios such as enterprise knowledge bases, educational resource management, and customer service support. In environments with large-scale document sets, system performance and response speed often decline significantly due to insufficient resource allocation. Summary of the Invention

[0009] To address the limitations of existing technologies in semantic understanding and retrieval capabilities, high demand for manual intervention, low efficiency of knowledge utilization, and limited application scenarios, this invention aims to provide a document knowledge management method and system based on text retrieval enhancement.

[0010] In a first aspect, the present invention provides a document knowledge management method based on text retrieval enhancement, comprising the following steps:

[0011] S1: Receive the document uploaded by the user, use the first large language model to segment the document, transform it into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, then vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, thus constructing a document knowledge system.

[0012] S2: Receive the input user question, use the knowledge calling agent to analyze the user question to determine the relevant meta-knowledge, and combine the meta-knowledge and the vector similarity between the knowledge text block vector and the user question vector to retrieve the relevant knowledge text block and its knowledge source from the document knowledge system, and construct a knowledge reference table containing the relevant meta-knowledge, knowledge text block and knowledge source;

[0013] S3: Integrate the user question with the knowledge reference table to form contextual information, use the second large-scale language model to generate an answer to the user question based on the contextual information, and provide the knowledge source corresponding to the knowledge text block referenced in the answer;

[0014] S4: Calculate the final evaluation score based on user feedback on the generated answer and the accuracy of the answer's reference to the knowledge text blocks in the knowledge reference table; if the final evaluation score meets the preset conditions, store the current question-answer pair as a new knowledge text block in the document knowledge system; and dynamically adjust the parameters for document segmentation and the number of relevant knowledge text blocks retrieved based on the final evaluation score.

[0015] As an optional implementation of the first aspect of this application, step S1 includes: document preprocessing: extracting and cleaning the text of the user-uploaded document to obtain clean text content; dividing knowledge text blocks: the first large-scale language model reads through the clean text content, extracts keywords based on the text content, and divides the text content into a sequence of knowledge text blocks with maximum token restrictions around the keywords; extracting and organizing meta-knowledge: the first large-scale language model parses the knowledge text blocks one by one to extract meta-knowledge, unifies similar meta-knowledge, and establishes associations between meta-knowledge and related knowledge text blocks; vectorizing knowledge text blocks: using an embedding model to generate a vector representation for each knowledge text block and storing it in a knowledge text block vector table, the knowledge text block vector table containing the ID, content, associated meta-knowledge, and knowledge source information of the knowledge text block.

[0016] As an optional implementation of the first aspect of this application, step S2 includes: meta-knowledge matching: the third large-scale language model in the knowledge retrieval intelligence analyzes the user question, identifies the meta-knowledge involved in the question, and compares it with the meta-knowledge in the document knowledge system to obtain a relevant meta-knowledge sequence; preliminary vector filtering: based on the relevant meta-knowledge sequence and its association with knowledge text blocks, a preliminary relevant knowledge text block vector sequence is filtered from the knowledge text block vector table; similarity calculation and filtering: the user question is vectorized, and the similarity between it and each vector in the preliminary relevant knowledge text block vector sequence is calculated. Based on the similarity score, a predetermined number of knowledge text block vectors with the highest similarity and their corresponding knowledge text blocks and knowledge sources are selected, which, together with the found corresponding meta-knowledge, constitute a knowledge reference table.

[0017] As an optional implementation of the first aspect of this application, the similarity calculation between the user question vector and the knowledge text block vector adopts cosine similarity.

[0018] As an optional implementation of the first aspect of this application, step S4, which calculates the final evaluation score based on user feedback on the generated answer and the accuracy of the answer's citation of knowledge text blocks in the knowledge reference table, includes: calculating the effective answer score: the relevant meta-knowledge is calculated based on user feedback on whether the answer is helpful, the feedback being represented by positive and negative samples; calculating the accurate knowledge citation score: the fourth large-scale language model analyzes whether the answer accurately cites the knowledge text blocks in the reference table and provides the knowledge source based on the generated answer and the knowledge reference table, and gives the accurate knowledge citation score; calculating the final score: the final evaluation score is obtained by weighted averaging of the effective answer score and the accurate knowledge citation score.

[0019] As an optional implementation of the first aspect of this application, in step S4, if the final evaluation score meets the preset conditions, the step of storing the current question-and-answer pair as a new knowledge text block into the document knowledge system further includes: vectorizing the new knowledge text block and storing it in the knowledge text block vector table, while establishing a connection with the corresponding meta-knowledge based on the meta-knowledge used in this question-and-answer session.

[0020] As an optional implementation of the first aspect of this application, step S4, which involves dynamically adjusting the parameters for document segmentation and the number of relevant knowledge text blocks retrieved based on the final evaluation score, includes: when the final evaluation score is higher than a preset threshold, increasing the maximum token limit for document segmentation and the number of relevant knowledge text blocks retrieved; and when the final evaluation score is lower than the preset threshold, decreasing the maximum token limit for document segmentation and the number of relevant knowledge text blocks retrieved.

[0021] Secondly, embodiments of this application provide a document knowledge management system based on text retrieval enhancement, including:

[0022] The knowledge document conversion module is used to receive documents uploaded by users, segment the documents using a first large-scale language model, convert them into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, and construct a document knowledge system.

[0023] The knowledge retrieval and reference construction module is used to receive input user questions, analyze the user questions using a knowledge invocation agent to determine relevant meta-knowledge, and combine the meta-knowledge and knowledge text block vectors with the vector similarity of the user questions to retrieve relevant knowledge text blocks and their knowledge sources from the document knowledge system, and construct a knowledge reference table containing the relevant meta-knowledge, knowledge text blocks and knowledge sources.

[0024] The question-and-answer generation and knowledge tracing module is used to integrate the user question with the knowledge reference table to form contextual information, use a second large-scale language model to generate an answer to the user question based on the contextual information, and provide the knowledge source corresponding to the knowledge text block referenced in the answer;

[0025] The feedback learning and system optimization module is used to calculate the final evaluation score based on user feedback on the generated answers and the accuracy of the answers' reference to knowledge text blocks in the knowledge reference table; if the final evaluation score meets preset conditions, the current question-answer pair is stored as a new knowledge text block in the document knowledge system; and the parameters for document segmentation and the number of relevant knowledge text blocks retrieved are dynamically adjusted based on the final evaluation score.

[0026] Thirdly, embodiments of this application provide an electronic device, which includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the steps of the method described in the first aspect.

[0027] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.

[0028] Compared with existing technologies, the present invention proposes a document knowledge management method based on text retrieval enhancement, which has the following beneficial effects:

[0029] 1. A question-answering system that achieves accurate semantic matching: Through vectorized semantic representation methods and meta-knowledge association mechanisms, large models can deeply understand user intent, achieve accurate matching at the knowledge fragment level, and significantly improve the accuracy and intelligence level of question answering.

[0030] 2. Construct an efficient and automated knowledge processing workflow: By combining large models with pre-trained embedded models, document slicing, meta-knowledge extraction, and structured vectorization are automatically completed, significantly improving processing efficiency, reducing labor costs, and supporting the rapid knowledge transformation of multi-format documents.

[0031] 3. Create a context-driven high-quality answer mechanism: The system constructs a structured knowledge reference table and dynamically generates the final question context by integrating the context, so that the generated answer has contextual consistency and reasoning logic, which greatly improves the response capability of complex questions and answers.

[0032] 4. Provide a feedback-driven knowledge optimization mechanism: Introduce a learning mechanism jointly driven by user feedback and citation accuracy scoring, dynamically adjust slice parameters and reference dimensions based on question and answer performance, realize the self-optimization and continuous enhancement of the knowledge base, and build an intelligent learning closed loop. Attached Figure Description

[0033] Figure 1 This is a flowchart of a document knowledge management method based on text retrieval enhancement provided in the first embodiment of the present invention;

[0034] Figure 2 This is a schematic diagram of the document knowledge conversion process in the first embodiment of the present invention;

[0035] Figure 3 This is a schematic diagram of the knowledge retrieval and reference construction process in the first embodiment of the present invention;

[0036] Figure 4This is a flowchart illustrating the feedback learning and system optimization process in the first embodiment of the present invention;

[0037] Figure 5 This is a schematic diagram of the structure of a document knowledge management system based on text retrieval enhancement proposed in the second embodiment of the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0039] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0040] Example 1

[0041] Please see Figure 1 This is a flowchart illustrating a document knowledge management method based on text retrieval enhancement provided in an embodiment of the present invention. The method may include the following steps:

[0042] S1, Document Knowledge Conversion (corresponding to) Figure 2 ): Receive documents uploaded by users, segment the documents using a first large-scale language model, transform them into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, thus constructing a document knowledge system.

[0043] For a user-uploaded document (denoted as k), the large model performs a thorough reading and, based on document segmentation and contextual semantics, divides the document into independent text blocks, transforming them into individual knowledge text blocks (forming a set). Next, all knowledge text blocks converted from the document are parsed to extract the meta-knowledge contained in all knowledge text blocks (denoted as...). Each knowledge text block contains several meta-knowledge items, and a meta-knowledge item also appears in several knowledge text blocks. The meta-knowledge items are associated with the knowledge text blocks to complete the transformation from document to knowledge. This is divided into the following three steps.

[0044] Step 1: Document Preprocessing

[0045] For the document The text is extracted, and irrelevant information (such as extra spaces and punctuation) is removed to form a complete and fluent clean text. The content is then stored in a "document table" to prepare for conversion.

[0046] Step 2: Divide the knowledge text into blocks

[0047] The first large-scale language model reads through the text obtained from the preprocessing step. Extract keywords from the text content and divide the text into blocks around the keywords (each text block is denoted as ). (It has a maximum token limit; if the maximum token is exceeded, it will be immediately split into independent knowledge text block sequences.) Store it in the "Knowledge Text Block Table".

[0048] Step 3: Extract meta-knowledge and organize the document's knowledge system

[0049] The first large-scale language model parses knowledge text blocks one by one. Extracting meta-knowledge from it After all knowledge text blocks have been parsed, similar meta-knowledge is unified into a single meta-knowledge, and all meta-knowledge is then processed. Store the knowledge in a "meta-knowledge table" and link the meta-knowledge with related knowledge text blocks to form a network.

[0050] sequence of knowledge text blocks Vectorization is performed using the text-embedding-3-small model to generate a vector representation for each knowledge text block. Each vector represents Calculated using the following formula:

[0051]

[0052] in, The weight matrix of the embedded model, For bias terms, It is a knowledge text block The vector representation of each knowledge text block is stored in the "Knowledge Text Block Vector Table". This table contains not only the vector representation of each knowledge text block, but also information such as the knowledge text block's ID, content, associated meta-knowledge, and knowledge source.

[0053] After vectorization is completed in this way, a complete document knowledge system is constructed, which provides a foundation for subsequent knowledge retrieval and retrieval based on similarity.

[0054] S2, Knowledge Retrieval and Reference Construction (corresponding to) Figure 3 ): Receives user input questions, uses a knowledge invocation agent to analyze the user questions to determine relevant meta-knowledge, and combines the meta-knowledge and the vector similarity between the knowledge text block vector and the user question vector to retrieve relevant knowledge text blocks and their knowledge sources from the document knowledge system, and constructs a knowledge reference table containing the relevant meta-knowledge, knowledge text blocks and knowledge sources.

[0055] To construct a more accurate and structured knowledge reference table (denoted as...) This allows the third large language model to reference precise and structured knowledge, helping to avoid the illusion created by the large model. The knowledge reference table contains the following elements: meta-knowledge. Knowledge text blocks Knowledge Source (That is, the document source of the knowledge text block). Constructing a knowledge reference table requires the following two steps.

[0056] The first step is to use knowledge to invoke the intelligent agent (denoted as...). This agent manages the "meta-knowledge table" and the association between meta-knowledge and knowledge text blocks. (User input question) Subsequently, the problem of large model analysis in intelligent agents. Meta-knowledge that may be needed Compare it with the meta-knowledge in the "meta-knowledge table". A comparison is performed to obtain the relevant meta-knowledge sequence. Then, based on the association between the meta-knowledge and the knowledge text block, all relevant knowledge text vector sequences in the "knowledge text block vector table" are found. .

[0057] The second step is to construct a knowledge reference table. User issues Vectorization is performed using the text-embedding-3-small model to obtain the user question vector. Then, the knowledge text vector sequence provided by the knowledge invocation agent will be used. respectively with Similarity calculation is performed to obtain a similarity sequence. The similarity calculation method is as follows:

[0058]

[0059] in, The L2 norm of a vector (i.e., the length of the vector).

[0060] Based on similarity scores, sort the knowledge text block vectors from highest to lowest, and select the top 5 most similar knowledge text block vectors (the number of knowledge text block vectors selected is denoted as...). (Adjustable independently) to find the corresponding knowledge text block. With knowledge source The corresponding meta-knowledge found in the first step Together, let's build a knowledge reference table. .

[0061] S3. Question and Answer Generation and Knowledge Source Tracing: The user question is integrated with the knowledge reference table to form contextual information. The second large-scale language model is used to generate an answer to the user question based on the contextual information, and the knowledge source corresponding to the knowledge text block referenced is provided in the answer.

[0062] Build a good knowledge reference table Then, the reference table and user questions will be... The final context is formed by integrating the second large-scale language model task setting. This enables the second large-scale language model to be context-based. The system uses document knowledge to generate reference answers and provides the knowledge sources used in the responses. .

[0063] S4, Feedback Learning and System Optimization (corresponding to) Figure 4 Based on user feedback on the generated answers and the accuracy of the answers' references to knowledge text blocks in the knowledge reference table, a final evaluation score is calculated. If the final evaluation score meets preset conditions, the current question-answer pair is stored as a new knowledge text block in the document knowledge system. The parameters for document segmentation and the number of relevant knowledge text blocks retrieved are dynamically adjusted based on the final evaluation score.

[0064] The solution involves strengthening the knowledge system based on user feedback, enhancing the fourth large-scale language model's understanding of document knowledge, and employing a scoring and feedback mechanism to optimize the knowledge system during user use. This allows the fourth large-scale language model to learn document knowledge through user use and feedback. The solution consists of the following three steps.

[0065] Step 1: Answer the question about calculating the effective score ( )

[0066] Set up user feedback ,in:

[0067] Indicates the user's opinion on the answer Helpful (positive sample)

[0068] Indicates the user's opinion on the answer No help (negative sample)

[0069] The valid score for the answer is defined as:

[0070]

[0071] Step 2: Calculate the exact score for knowledge citation ( )

[0072] After each answer is generated, the fourth large-scale language model uses the knowledge reference table. With answer Analyze whether the knowledge text blocks in the reference table were accurately cited. And accurately provided knowledge sources Give the knowledge citation accuracy score .

[0073] Step 3: Calculate the final score ( )

[0074] Set scoring weights The relative importance of controlling user feedback and the accuracy of knowledge citations.

[0075] The final score is the weighted average:

[0076]

[0077] when If the question and answer are valid, they are saved as a new knowledge text block. ,Will Store it in the "Knowledge Text Block Table", establish the connection between the meta-knowledge used this time and the corresponding meta-knowledge, and at the same time vectorize it into a vector representation. Store in the "Knowledge Text Block Vector Table".

[0078] To further optimize the knowledge system construction and retrieval performance, based on the final score... The value of the following two parameters is dynamically adjusted: the maximum token limit during document slicing. The knowledge reference table returns the previous The number of related knowledge text blocks will be adjusted using the following strategy:

[0079] when When it is higher than the preset threshold ( This indicates that the current slice quality and the hit rate with the reference text are good, and it is advisable to increase the slice size appropriately. and The value of makes the knowledge text block more contextually complete and expands the scope of reference;

[0080] when When it is below the preset threshold (e.g.) This indicates insufficient knowledge expression or hit rate, and the content can be appropriately reduced. and The value of makes the slices more refined and the retrieval more focused.

[0081] Through iterative cycles of the above four steps, the method described in this invention can continuously learn from user interactions and documents, thereby continuously optimizing its knowledge base and question-answering performance.

[0082] It should be noted that the "first large-scale language model," "second large-scale language model," "third large-scale language model," and "fourth large-scale language model" mentioned in this invention can be applications of the same general-purpose large model with multiple capabilities in different stages or tasks, or they can be different model instances that have been fine-tuned or optimized for specific tasks (such as text understanding, knowledge extraction, question answering generation, and evaluation). Embedded models such as "text-embedding-3-small" are existing or future available text vectorization tools. Various "tables" (such as document tables, knowledge text block tables, meta-knowledge tables, and knowledge text block vector tables) are logical data storage structures that can be implemented using relational databases, NoSQL databases, or dedicated vector databases.

[0083] Example 2

[0084] Please see Figure 5 The diagram shown is a structural schematic of a document knowledge management system based on text retrieval enhancement proposed in the second embodiment of this application. The system includes the following key modules:

[0085] The knowledge document conversion module 100 is used to receive documents uploaded by users, segment the documents using a first large-scale language model, convert them into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, and construct a document knowledge system.

[0086] The knowledge retrieval and reference construction module 200 is used to receive input user questions, analyze the user questions using a knowledge invocation agent to determine relevant meta-knowledge, and combine the meta-knowledge and the vector similarity between the knowledge text block vector and the user question vector to retrieve relevant knowledge text blocks and their knowledge sources from the document knowledge system, and construct a knowledge reference table containing the relevant meta-knowledge, knowledge text blocks and knowledge sources.

[0087] The question-and-answer generation and knowledge tracing module 300 is used to integrate the user question with the knowledge reference table to form contextual information, use a second large-scale language model to generate an answer to the user question based on the contextual information, and provide the knowledge source corresponding to the knowledge text block referenced in the answer;

[0088] The feedback learning and system optimization module 400 is used to calculate the final evaluation score based on the user's feedback on the generated answer and the accuracy of the answer's reference to the knowledge text block in the knowledge reference table; if the final evaluation score meets the preset conditions, the current question-answer pair is stored as a new knowledge text block in the document knowledge system; and the parameters for document segmentation and the number of relevant knowledge text blocks retrieved are dynamically adjusted according to the final evaluation score.

[0089] The document knowledge management system based on text retrieval enhancement in this application embodiment can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network-attached storage (NAS), personal computers (PCs), etc. This application embodiment does not impose specific limitations.

[0090] The document knowledge management system based on text retrieval enhancement in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.

[0091] This application provides a document knowledge management system based on text retrieval enhancement, which can achieve... Figure 1 The various processes implemented in the method embodiment of the document knowledge management method based on text retrieval enhancement are not described in detail here to avoid repetition.

[0092] Optionally, embodiments of this application also provide an electronic device, including a processor, a memory, and a program or instructions stored in the memory and executable on the processor. When the program or instructions are executed by the processor, they implement the various processes of the above-described embodiment of a document knowledge management method based on text retrieval enhancement, and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0093] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described embodiment of a document knowledge management method based on text retrieval enhancement, and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0094] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0095] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0097] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A document knowledge management method based on text retrieval enhancement, characterized in that, Includes the following steps: S1: Receive the document uploaded by the user, use the first large language model to segment the document, transform it into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, then vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, thus constructing a document knowledge system. S2: Receive the input user question, use the knowledge calling agent to analyze the user question to determine the relevant meta-knowledge, and combine the meta-knowledge and the vector similarity between the knowledge text block vector and the user question vector to retrieve the relevant knowledge text block and its knowledge source from the document knowledge system, and construct a knowledge reference table containing the relevant meta-knowledge, knowledge text block and knowledge source; S3: Integrate the user question with the knowledge reference table to form contextual information, use the second large-scale language model to generate an answer to the user question based on the contextual information, and provide the knowledge source corresponding to the knowledge text block referenced in the answer; S4: Based on user feedback on the generated answer and the accuracy of the answer's citation of knowledge text blocks in the knowledge reference table, calculate the final evaluation score. This includes: calculating the effective answer score: the relevant meta-knowledge is calculated based on user feedback on whether the answer is helpful, with the feedback represented by positive and negative samples; calculating the accurate knowledge citation score: the fourth large-scale language model analyzes whether the answer accurately cites knowledge text blocks in the reference table and provides knowledge sources based on the generated answer and the knowledge reference table, and gives the accurate knowledge citation score; calculating the final score: the effective answer score and the accurate knowledge citation score are weighted and averaged to obtain the final evaluation score; if the final evaluation score meets the preset conditions, the current question-answer pair is stored as a new knowledge text block in the document knowledge system; and the parameters for document segmentation and the number of relevant knowledge text blocks retrieved are dynamically adjusted based on the final evaluation score. Specifically, when the final evaluation score is higher than a preset threshold, the maximum token limit for document segmentation and the number of relevant knowledge text blocks retrieved are increased; when the final evaluation score is lower than a preset threshold, the maximum token limit for document segmentation and the number of relevant knowledge text blocks retrieved are decreased.

2. The method according to claim 1, characterized in that, Step S1 includes: Document preprocessing: Extracting and cleaning text from user-uploaded documents to obtain clean text content; Divide the knowledge text into blocks: The first large language model reads through the clean text content, extracts keywords based on the text content, and divides the text content into a sequence of knowledge text blocks with the maximum token limit around the keywords; Extracting and organizing meta-knowledge: The first large-scale language model parses knowledge text blocks one by one to extract meta-knowledge, unifies similar meta-knowledge, and establishes associations between meta-knowledge and related knowledge text blocks; Knowledge text block vectorization: An embedding model is used to generate a vector representation for each knowledge text block and store it in a knowledge text block vector table. The knowledge text block vector table contains the ID, content, associated meta-knowledge, and knowledge source information of the knowledge text block.

3. The method according to claim 1 or 2, characterized in that, Step S2 includes: Meta-knowledge matching: The knowledge calls the third large-scale language model in the intelligent body to analyze the user's question, identify the meta-knowledge involved in the question, and compare it with the meta-knowledge in the document knowledge system to obtain the relevant meta-knowledge sequence; Preliminary vector filtering: Based on the relevant meta-knowledge sequences and their association with knowledge text blocks, preliminary relevant knowledge text block vector sequences are filtered from the knowledge text block vector table; Similarity calculation and filtering: The user's question is vectorized, and the similarity between the question and each vector in the preliminarily related knowledge text block vector sequence is calculated. According to the similarity score, a predetermined number of knowledge text block vectors with the highest similarity and their corresponding knowledge text blocks and knowledge sources are selected, which together with the corresponding meta-knowledge found constitute a knowledge reference table.

4. The method according to claim 3, characterized in that, The similarity between the user question vector and the knowledge text block vector is calculated using cosine similarity.

5. The method according to claim 1, characterized in that, In step S4, if the final evaluation score meets the preset conditions, the step of storing the current question-answer pair as a new knowledge text block into the document knowledge system further includes: The new knowledge text block is vectorized and stored in the knowledge text block vector table. At the same time, a connection is established between the meta-knowledge used in this question and answer and the corresponding meta-knowledge.

6. A document knowledge management system based on text retrieval enhancement, characterized in that, include: The knowledge document conversion module is used to receive documents uploaded by users, segment the documents using a first large-scale language model, convert them into a set containing multiple knowledge text blocks, extract meta-knowledge from the knowledge text blocks, establish the association between the meta-knowledge and the knowledge text blocks, vectorize the knowledge text blocks to obtain knowledge text block vectors and store them, and construct a document knowledge system. The knowledge retrieval and reference construction module is used to receive input user questions, analyze the user questions using a knowledge invocation agent to determine relevant meta-knowledge, and combine the meta-knowledge and knowledge text block vectors with the vector similarity of the user questions to retrieve relevant knowledge text blocks and their knowledge sources from the document knowledge system, and construct a knowledge reference table containing the relevant meta-knowledge, knowledge text blocks and knowledge sources. The question-and-answer generation and knowledge tracing module is used to integrate the user question with the knowledge reference table to form contextual information, use a second large-scale language model to generate an answer to the user question based on the contextual information, and provide the knowledge source corresponding to the knowledge text block referenced in the answer; The feedback learning and system optimization module is used to calculate the final evaluation score based on user feedback on the generated answer and the accuracy of the answer's citation of knowledge text blocks in the knowledge reference table. Specifically, this includes: calculating the effective answer score: the relevant meta-knowledge is calculated based on user feedback regarding the helpfulness of the answer, represented by positive and negative samples; calculating the knowledge citation accuracy score: the fourth large-scale language model analyzes whether the answer accurately cites knowledge text blocks in the reference table and provides knowledge sources, based on the generated answer and the knowledge reference table, and gives a knowledge citation accuracy score; calculating the final score: the effective answer score and the knowledge citation accuracy score are weighted and averaged to obtain the final evaluation score; if the final evaluation score meets preset conditions, the current question-answer pair is stored as a new knowledge text block in the document knowledge system; and dynamically adjusting the parameters during document segmentation and the number of relevant knowledge text blocks retrieved based on the final evaluation score, specifically: when the final evaluation score is higher than a preset threshold, increasing the maximum token limit during document segmentation and the number of relevant knowledge text blocks retrieved; when the final evaluation score is lower than a preset threshold, decreasing the maximum token limit during document segmentation and the number of relevant knowledge text blocks retrieved.

7. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein when the program or instructions are executed by the processor, they implement the steps of a document knowledge management method based on text retrieval enhancement as described in any one of claims 1-5.

8. A readable storage medium, characterized in that, The program or instructions are stored on the readable storage medium, and when the program or instructions are executed by the processor, they implement the steps of the document knowledge management method based on text retrieval enhancement as described in any one of claims 1-5.

Citation Information

Patent Citations

  • Domain intelligent question-answering system and method based on knowledge graph library and text vector library

    CN119128095A